Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions example-app-spm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@
"@capacitor/ios": "next",
"@capacitor/keyboard": "next",
"@capacitor/status-bar": "next",
"@ionic/react": "^6.0.0",
"@ionic/react-router": "^6.0.0",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.6.3",
"@ionic/react": "^8.7.10",
"@ionic/react-router": "^8.7.10",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/google.maps": "~3.58.1",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
"@types/react": "^16.14.3",
"@types/react-dom": "^16.9.10",
"@types/react-router": "^5.1.11",
"@types/react-router-dom": "^5.1.7",
"ionicons": "^5.4.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.0",
"typescript": "^4.1.3",
"web-vitals": "^0.2.4",
"workbox-background-sync": "^5.1.4",
"workbox-broadcast-update": "^5.1.4",
"workbox-cacheable-response": "^5.1.4",
"workbox-core": "^5.1.4",
"workbox-expiration": "^5.1.4",
"workbox-google-analytics": "^5.1.4",
"workbox-navigation-preload": "^5.1.4",
"workbox-precaching": "^5.1.4",
"workbox-range-requests": "^5.1.4",
"workbox-routing": "^5.1.4",
"workbox-strategies": "^5.1.4",
"workbox-streams": "^5.1.4"
"@types/jest": "^30.0.0",
"@types/node": "^24.10.1",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"ionicons": "^8.0.13",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"react-scripts": "^5.0.1",
"typescript": "^5.9.3",
"web-vitals": "^5.1.0",
"workbox-background-sync": "^7.4.0",
"workbox-broadcast-update": "^7.4.0",
"workbox-cacheable-response": "^7.4.0",
"workbox-core": "^7.4.0",
"workbox-expiration": "^7.4.0",
"workbox-google-analytics": "^7.4.0",
"workbox-navigation-preload": "^7.4.0",
"workbox-precaching": "^7.4.0",
"workbox-range-requests": "^7.4.0",
"workbox-routing": "^7.4.0",
"workbox-strategies": "^7.4.0",
"workbox-streams": "^7.4.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
12 changes: 12 additions & 0 deletions example-app-spm/src/custom-elements.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import '@capacitor/google-maps';

declare global {
namespace JSX {
interface IntrinsicElements {
'capacitor-google-map': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
}
}
}

export {};

17 changes: 10 additions & 7 deletions example-app-spm/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import App from './App';
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
const container = document.getElementById('root');
if (container) {
const root = createRoot(container);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
}

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
Expand Down
1 change: 1 addition & 0 deletions example-app-spm/src/pages/Drawing/Circles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const CircleMapPage: React.FC = () => {
autoGrow={true}
></IonTextarea>
</div>
{/* @ts-ignore - custom element */}
<capacitor-google-map
id="map_circles"
style={{
Expand Down
10 changes: 10 additions & 0 deletions example-app-spm/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/// <reference types="react-scripts" />

declare global {
namespace JSX {
interface IntrinsicElements {
'capacitor-google-map': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
}
}
}

export {};
16 changes: 7 additions & 9 deletions example-app-spm/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { ReportHandler } from 'web-vitals';
import { onCLS, onINP, onFCP, onLCP, onTTFB, Metric } from 'web-vitals';

const reportWebVitals = (onPerfEntry?: ReportHandler) => {
const reportWebVitals = (onPerfEntry?: (metric: Metric) => void) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
onCLS(onPerfEntry);
onINP(onPerfEntry);
onFCP(onPerfEntry);
onLCP(onPerfEntry);
onTTFB(onPerfEntry);
}
};

Expand Down
3 changes: 2 additions & 1 deletion example-app-spm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"jsx": "react-jsx"
},
"include": [
"src"
"src",
"src/**/*.d.ts"
]
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
},
"devDependencies": {
"@capacitor/ios": "next",
"@types/node": "^20.11.25",
"glob": "^11.0.0",
"husky": "^9.0.1",
"lerna": "^8.1.2",
"typescript": "^5.4.2"
"@types/node": "^24.10.1",
"glob": "^13.0.0",
"husky": "^9.1.7",
"lerna": "^9.0.1",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=20",
Expand Down
7 changes: 0 additions & 7 deletions plugin/.eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions plugin/.eslintrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions plugin/.prettierignore

This file was deleted.

29 changes: 0 additions & 29 deletions plugin/.prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ The callback function to be called when map events are emitted.

#### Marker

Supports markers of either either "legacy" or "advanced" types.
Supports markers of either "legacy" or "advanced" types.

<code>google.maps.<a href="#marker">Marker</a> | google.maps.marker.AdvancedMarkerElement</code>

Expand Down
62 changes: 31 additions & 31 deletions plugin/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@
"@capacitor/ios": "next",
"@capacitor/keyboard": "next",
"@capacitor/status-bar": "next",
"@ionic/react": "^6.0.0",
"@ionic/react-router": "^6.0.0",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.6.3",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
"@types/react": "^16.14.3",
"@types/react-dom": "^16.9.10",
"@types/react-router": "^5.1.11",
"@types/react-router-dom": "^5.1.7",
"ionicons": "^5.4.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.0",
"typescript": "^4.1.3",
"web-vitals": "^0.2.4",
"workbox-background-sync": "^5.1.4",
"workbox-broadcast-update": "^5.1.4",
"workbox-cacheable-response": "^5.1.4",
"workbox-core": "^5.1.4",
"workbox-expiration": "^5.1.4",
"workbox-google-analytics": "^5.1.4",
"workbox-navigation-preload": "^5.1.4",
"workbox-precaching": "^5.1.4",
"workbox-range-requests": "^5.1.4",
"workbox-routing": "^5.1.4",
"workbox-strategies": "^5.1.4",
"workbox-streams": "^5.1.4"
"@ionic/react": "^8.7.9",
"@ionic/react-router": "^8.7.9",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^30.0.0",
"@types/node": "^24.10.1",
"@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"ionicons": "^8.0.13",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"react-scripts": "^5.0.1",
"typescript": "^5.9.3",
"web-vitals": "^5.1.0",
"workbox-background-sync": "^7.3.0",
"workbox-broadcast-update": "^7.3.0",
"workbox-cacheable-response": "^7.3.0",
"workbox-core": "^7.3.0",
"workbox-expiration": "^7.3.0",
"workbox-google-analytics": "^7.3.0",
"workbox-navigation-preload": "^7.3.0",
"workbox-precaching": "^7.3.0",
"workbox-range-requests": "^7.3.0",
"workbox-routing": "^7.3.0",
"workbox-strategies": "^7.3.0",
"workbox-streams": "^7.3.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
51 changes: 51 additions & 0 deletions plugin/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const eslintjs = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tseslintparser = require('@typescript-eslint/parser');
const prettierConfig = require('eslint-config-prettier');

module.exports = [
{
ignores: ['node_modules/**', 'dist/**', 'build/**', 'e2e-tests/**', 'unit-tests/**', 'android/**', 'ios/**', 'types/**', 'eslint.config.*'],
},
eslintjs.configs.recommended,
{
files: ['**/*.ts', '**/*.js'],
languageOptions: {
parser: tseslintparser,
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
browser: 'readonly',
window: 'readonly',
document: 'readonly',
console: 'readonly',
HTMLElement: 'readonly',
customElements: 'readonly',
ResizeObserver: 'readonly',
DOMRect: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
clearTimeout: 'readonly',
screen: 'readonly',
navigator: 'readonly',
GeolocationPosition: 'readonly',
google: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
},
prettierConfig,
];

Loading