@kispace-io/gs-lib 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +58 -0
  2. package/bin/map-builder.js +132 -0
  3. package/dist/base-map-builder.d.ts +102 -0
  4. package/dist/base-map-builder.d.ts.map +1 -0
  5. package/dist/gs-gs2ol.d.ts +41 -0
  6. package/dist/gs-gs2ol.d.ts.map +1 -0
  7. package/dist/gs-lib.css +3724 -0
  8. package/dist/gs-lib.d.ts +16 -0
  9. package/dist/gs-lib.d.ts.map +1 -0
  10. package/dist/gs-litns.d.ts +32 -0
  11. package/dist/gs-litns.d.ts.map +1 -0
  12. package/dist/gs-model.d.ts +186 -0
  13. package/dist/gs-model.d.ts.map +1 -0
  14. package/dist/gs-ol-adapters.d.ts +23 -0
  15. package/dist/gs-ol-adapters.d.ts.map +1 -0
  16. package/dist/gs-ol2gs.d.ts +9 -0
  17. package/dist/gs-ol2gs.d.ts.map +1 -0
  18. package/dist/gs-olns.d.ts +22 -0
  19. package/dist/gs-olns.d.ts.map +1 -0
  20. package/dist/index.d.ts +11 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.html +69 -0
  23. package/dist/index.js +104888 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/pwa/assets/icons/192x192.png +0 -0
  26. package/dist/pwa/assets/icons/24x24.png +0 -0
  27. package/dist/pwa/assets/icons/48x48.png +0 -0
  28. package/dist/pwa/assets/icons/512x512.png +0 -0
  29. package/dist/pwa/assets/icons/icon_192.png +0 -0
  30. package/dist/pwa/assets/icons/icon_24.png +0 -0
  31. package/dist/pwa/assets/icons/icon_48.png +0 -0
  32. package/dist/pwa/assets/icons/icon_512.png +0 -0
  33. package/dist/pwa/manifest.json +54 -0
  34. package/dist/pwa/staticwebapp.config.json +6 -0
  35. package/dist/pwa/sw.js +109 -0
  36. package/lib/node-map-builder.ts +200 -0
  37. package/package.json +51 -0
  38. package/public/index.html +69 -0
  39. package/public/pwa/assets/icons/192x192.png +0 -0
  40. package/public/pwa/assets/icons/24x24.png +0 -0
  41. package/public/pwa/assets/icons/48x48.png +0 -0
  42. package/public/pwa/assets/icons/512x512.png +0 -0
  43. package/public/pwa/assets/icons/icon_192.png +0 -0
  44. package/public/pwa/assets/icons/icon_24.png +0 -0
  45. package/public/pwa/assets/icons/icon_48.png +0 -0
  46. package/public/pwa/assets/icons/icon_512.png +0 -0
  47. package/public/pwa/manifest.json +54 -0
  48. package/public/pwa/staticwebapp.config.json +6 -0
  49. package/public/pwa/sw.js +109 -0
  50. package/src/base-map-builder.ts +414 -0
  51. package/src/gs-gs2ol.ts +626 -0
  52. package/src/gs-lib.ts +54 -0
  53. package/src/gs-litns.ts +213 -0
  54. package/src/gs-model.ts +393 -0
  55. package/src/gs-ol-adapters.ts +89 -0
  56. package/src/gs-ol2gs.ts +86 -0
  57. package/src/gs-olns.ts +30 -0
  58. package/src/index.ts +15 -0
  59. package/tsconfig.json +23 -0
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @kispace-io/gs-lib
2
+
3
+ Runtime library for geo!space maps. This package provides the core functionality to convert GsMap domain models into OpenLayers map instances.
4
+
5
+ ## Features
6
+
7
+ - Type definitions for GsMap domain model (GsMap, GsLayer, GsFeature, etc.)
8
+ - Conversion from GsMap to OpenLayers (toOlMap)
9
+ - Conversion from OpenLayers to GsMap (toGsFeature, etc.)
10
+ - Style management and evaluation
11
+ - Control and overlay support
12
+ - Lit integration for custom components
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @kispace-io/gs-lib
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```typescript
23
+ import { gsLib, GsMap } from '@kispace-io/gs-lib';
24
+
25
+ const gsMap: GsMap = {
26
+ view: { center: [0, 0], zoom: 2, projection: 'EPSG:3857' },
27
+ layers: [...],
28
+ // ...
29
+ };
30
+
31
+ const olMap = await gsLib({
32
+ containerSelector: '#map',
33
+ gsMap: gsMap,
34
+ env: { /* environment variables */ }
35
+ });
36
+ ```
37
+
38
+ ## WebAwesome Support
39
+
40
+ If your application uses user modules (controls/overlays) that utilize WebAwesome components (e.g., `<wa-button>`, `<wa-icon>`), you need to import WebAwesome in your application:
41
+
42
+ ```typescript
43
+ import '@awesome.me/webawesome/dist/components/button/button.js';
44
+ // ... import other components as needed
45
+ ```
46
+
47
+ Or if using the appspace package:
48
+
49
+ ```typescript
50
+ import '@kispace-io/appspace/externals/webawesome';
51
+ ```
52
+
53
+ WebAwesome is an optional peer dependency of this package - it's only needed if your user modules use WebAwesome components.
54
+
55
+ ## License
56
+
57
+ EPL-2.0
58
+
@@ -0,0 +1,132 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { fileURLToPath } from 'url'
4
+ import { dirname, resolve } from 'path'
5
+ import { readFileSync } from 'fs'
6
+
7
+ const __filename = fileURLToPath(import.meta.url)
8
+ const __dirname = dirname(__filename)
9
+
10
+ // Parse command line arguments
11
+ const args = process.argv.slice(2)
12
+
13
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
14
+ console.log(`
15
+ Usage: map-builder <map-file> [options]
16
+
17
+ Build a .geospace project into a deployable PWA.
18
+
19
+ Arguments:
20
+ <map-file> Path to the .geospace map file (required)
21
+
22
+ Options:
23
+ --title <title> Title for the application (default: map file name)
24
+ --version <version> Version number (default: 1.0.0)
25
+ --output-dir <dir> Output directory (default: dist)
26
+ --env-file <file> Path to .env file (optional)
27
+ --no-clean Don't clean build directory after build
28
+ --help, -h Show this help message
29
+
30
+ Examples:
31
+ map-builder my-map.geospace
32
+ map-builder my-map.geospace --title "My App" --version "1.2.3"
33
+ map-builder my-map.geospace --output-dir build --env-file .env.production
34
+ `)
35
+ process.exit(0)
36
+ }
37
+
38
+ // Parse arguments
39
+ const mapFile = args[0]
40
+ if (!mapFile) {
41
+ console.error('Error: map-file is required')
42
+ process.exit(1)
43
+ }
44
+
45
+ const options = {}
46
+ let currentOption = null
47
+
48
+ for (let i = 1; i < args.length; i++) {
49
+ const arg = args[i]
50
+
51
+ if (arg === '--title') {
52
+ currentOption = 'title'
53
+ } else if (arg === '--version') {
54
+ currentOption = 'version'
55
+ } else if (arg === '--output-dir') {
56
+ currentOption = 'outputDir'
57
+ } else if (arg === '--env-file') {
58
+ currentOption = 'envFile'
59
+ } else if (arg === '--no-clean') {
60
+ options.cleanAfterBuild = false
61
+ currentOption = null
62
+ } else if (currentOption) {
63
+ options[currentOption] = arg
64
+ currentOption = null
65
+ } else {
66
+ console.error(`Error: Unknown option: ${arg}`)
67
+ process.exit(1)
68
+ }
69
+ }
70
+
71
+ // Resolve paths relative to current working directory
72
+ const projectRoot = process.cwd()
73
+ const resolvedMapFile = resolve(projectRoot, mapFile)
74
+
75
+ // Load environment variables if env file is provided
76
+ let env = {}
77
+ if (options.envFile) {
78
+ try {
79
+ const envPath = resolve(projectRoot, options.envFile)
80
+ const envContent = readFileSync(envPath, 'utf-8')
81
+ envContent.split('\n').forEach(line => {
82
+ const trimmed = line.trim()
83
+ if (trimmed && !trimmed.startsWith('#')) {
84
+ const [key, ...valueParts] = trimmed.split('=')
85
+ if (key) {
86
+ env[key.trim()] = valueParts.join('=').trim()
87
+ }
88
+ }
89
+ })
90
+ } catch (error) {
91
+ console.warn(`Warning: Could not load env file: ${error.message}`)
92
+ }
93
+ }
94
+
95
+ // Progress callback
96
+ const progress = (step, message, totalSteps) => {
97
+ if (totalSteps) {
98
+ console.log(`[${step}/${totalSteps}] ${message}`)
99
+ } else {
100
+ console.log(`[${step}] ${message}`)
101
+ }
102
+ }
103
+
104
+ // Main async function
105
+ (async () => {
106
+ try {
107
+ // Import buildProject from lib (outside src so Vite doesn't analyze it)
108
+ const { buildProject } = await import('../lib/node-map-builder.ts')
109
+
110
+ // Always use the CLI's own package location (parent of bin directory)
111
+ const gsLibPath = resolve(__dirname, '..')
112
+
113
+ // Build the project
114
+ await buildProject(projectRoot, resolvedMapFile, {
115
+ title: options.title,
116
+ version: options.version || '1.0.0',
117
+ env: env || {},
118
+ gsLibPackagePath: gsLibPath,
119
+ outputDir: options.outputDir || 'dist',
120
+ cleanAfterBuild: options.cleanAfterBuild !== undefined ? options.cleanAfterBuild : true
121
+ }, progress)
122
+
123
+ console.log('\n✅ Build completed successfully!')
124
+ process.exit(0)
125
+ } catch (error) {
126
+ console.error('\n❌ Build failed:', error.message)
127
+ if (process.env.DEBUG) {
128
+ console.error(error.stack)
129
+ }
130
+ process.exit(1)
131
+ }
132
+ })()
@@ -0,0 +1,102 @@
1
+ import { GsMap } from './gs-model';
2
+ type EsbuildPlugin = {
3
+ name: string;
4
+ setup: (build: any) => void;
5
+ };
6
+ type EsbuildInstance = {
7
+ build: (options: any) => Promise<{
8
+ outputFiles?: Array<{
9
+ contents: Uint8Array;
10
+ }>;
11
+ }>;
12
+ };
13
+ export interface BuildOptions {
14
+ title: string;
15
+ gsMap: GsMap;
16
+ env: any;
17
+ version: string;
18
+ }
19
+ export interface FileSystem {
20
+ readFile(path: string): Promise<string | Uint8Array>;
21
+ writeFile(path: string, content: string | Uint8Array): Promise<void>;
22
+ ensureDir(path: string): Promise<void>;
23
+ exists(path: string): Promise<boolean>;
24
+ deleteDir?(path: string): Promise<void>;
25
+ }
26
+ export interface ProgressCallback {
27
+ (step: number, message: string, totalSteps?: number): void;
28
+ }
29
+ /**
30
+ * Generate the entry point JavaScript code for the map application
31
+ */
32
+ export declare function generateAppJs(vars: {
33
+ gsMap: GsMap;
34
+ gsLibPath: string;
35
+ env: any;
36
+ }): string;
37
+ /**
38
+ * Process service worker content by replacing version placeholder
39
+ */
40
+ export declare function processServiceWorker(content: string, version: string): string;
41
+ /**
42
+ * Process manifest content by updating title and version
43
+ */
44
+ export declare function processManifest(content: string, title: string, version: string): string;
45
+ /**
46
+ * Process HTML template by replacing title placeholder
47
+ */
48
+ export declare function processHtml(content: string, title: string): string;
49
+ /**
50
+ * Bundle the application code using esbuild
51
+ * @param esbuildInstance - The esbuild instance to use (esbuild-wasm for browser, esbuild for Node.js)
52
+ */
53
+ export declare function bundleApp(entryPointPath: string, outputPath: string, gsLibPath: string, fileSys: FileSystem, resolvePlugin: EsbuildPlugin, esbuildInstance: EsbuildInstance, progress?: ProgressCallback, currentStep?: {
54
+ value: number;
55
+ }, totalSteps?: number): Promise<void>;
56
+ /**
57
+ * Interface for copying files from gs-lib package
58
+ * This abstracts the difference between browser (import promises) and Node.js (file system)
59
+ */
60
+ export interface GsLibFileCopier {
61
+ /**
62
+ * Copy a text file from gs-lib
63
+ * @param srcPath - Source path relative to gs-lib package (e.g., "dist/index.js", "public/index.html")
64
+ * @param destPath - Destination path in the project
65
+ * @param processor - Optional function to process content before saving
66
+ */
67
+ copyTextFile(srcPath: string, destPath: string, processor?: (content: string) => string | Promise<string>): Promise<void>;
68
+ /**
69
+ * Copy a binary file from gs-lib
70
+ * @param srcPath - Source path relative to gs-lib package
71
+ * @param destPath - Destination path in the project
72
+ */
73
+ copyBinaryFile(srcPath: string, destPath: string): Promise<void>;
74
+ }
75
+ /**
76
+ * Create a standard GsLibFileCopier that uses FileSystem to read from gs-lib package
77
+ */
78
+ export declare function createFileSystemGsLibCopier(fs: FileSystem, gsLibPackagePath: string): GsLibFileCopier;
79
+ /**
80
+ * Calculate total build steps based on configuration
81
+ */
82
+ export declare function calculateTotalSteps(hasReadStep: boolean, hasAssets: boolean, cleanBeforeBuild: boolean, cleanAfterBuild: boolean): number;
83
+ /**
84
+ * Create a standard copyAssets function that works with FileSystem
85
+ */
86
+ export declare function createCopyAssetsFunction(fs: FileSystem): (fs: FileSystem, outputDir: string, progress?: ProgressCallback) => Promise<void>;
87
+ /**
88
+ * Unified build function that works in both browser and Node.js
89
+ * This is the single source of truth for the build process
90
+ */
91
+ export declare function buildMap(options: BuildOptions, fs: FileSystem, resolvePlugin: EsbuildPlugin, esbuildInstance: EsbuildInstance, config?: {
92
+ outputDir?: string;
93
+ buildDir?: string;
94
+ gsLibPath?: string;
95
+ gsLibPackagePath?: string;
96
+ gsLibCopier?: GsLibFileCopier;
97
+ cleanBeforeBuild?: boolean;
98
+ cleanAfterBuild?: boolean;
99
+ copyAssets?: (fs: FileSystem, outputDir: string, progress?: ProgressCallback) => Promise<void>;
100
+ }, progress?: ProgressCallback): Promise<void>;
101
+ export {};
102
+ //# sourceMappingURL=base-map-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-map-builder.d.ts","sourceRoot":"","sources":["../src/base-map-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAW,MAAM,YAAY,CAAA;AAG1C,KAAK,aAAa,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC9B,CAAA;AAGD,KAAK,eAAe,GAAG;IACnB,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;QAAE,WAAW,CAAC,EAAE,KAAK,CAAC;YAAE,QAAQ,EAAE,UAAU,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAA;CACtF,CAAA;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,CAAA;IACpD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpE,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,C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, GsGeometry, GsIcon, GsImageStyle, GsLayer, GsMap, GsOverlay, GsSource, GsStrokeStyle, GsStyle, GsTextStyle } from './gs-model';
2
+ import { Feature, Map, Overlay } from 'ol';
3
+ import { MapOptions } from 'ol/Map';
4
+ import { Circle as CircleStyle, Fill, Icon, RegularShape, Stroke, Style, Text } from 'ol/style';
5
+ import { default as TileLayer } from 'ol/layer/Tile';
6
+ import { default as TileSource } from 'ol/source/Tile';
7
+ import { default as BaseLayer } from 'ol/layer/Base';
8
+ import { Control } from 'ol/control';
9
+ import * as olGeom from "ol/geom";
10
+ export declare const toOLGeometry: (geometry: GsGeometry) => olGeom.Point | olGeom.MultiPoint | olGeom.Polygon | olGeom.MultiPolygon | olGeom.LineString | olGeom.MultiLineString | olGeom.Circle | olGeom.LinearRing;
11
+ export declare const toOlResource: (resource: GsIcon) => Icon;
12
+ export declare const toOlStroke: (gsStroke: GsStrokeStyle) => Stroke;
13
+ export declare const toOlFill: (gsFill: GsFillStyle) => Fill;
14
+ export declare const toOlCircleImage: (gsImage: GsImageStyle) => CircleStyle;
15
+ export declare const toOlIconImage: (gsImage: GsImageStyle) => Icon;
16
+ export declare const toOlRegularShapeImage: (gsImage: GsImageStyle) => RegularShape;
17
+ export declare const toOlImage: (gsImage: GsImageStyle) => CircleStyle | Icon | RegularShape;
18
+ export declare const toOlText: (gsText: GsTextStyle) => Text;
19
+ export declare const toOlStyle: (gsStyle: GsStyle) => Style;
20
+ export declare const toOlFeature: (feature: GsFeature) => Feature;
21
+ export declare const OL_SOURCES: any;
22
+ export declare const toOlSource: (source: GsSource, olLayer?: TileLayer<TileSource>) => any;
23
+ export declare const OL_LAYERS: any;
24
+ export declare const toOlLayer: (layer: GsLayer) => BaseLayer;
25
+ export declare class GsOlControl extends Control {
26
+ constructor(options?: any);
27
+ getElement(): HTMLElement;
28
+ }
29
+ export declare class GsOlOverlay extends Overlay {
30
+ constructor(options?: any);
31
+ getElement(): HTMLElement;
32
+ }
33
+ export declare const toOlOverlay: (overlay: GsOverlay) => GsOlOverlay;
34
+ export declare const toOlControl: (control: GsControl) => GsOlControl;
35
+ export declare const importOverlaySource: (olOverlay: GsOlOverlay, src: string, importer?: Importer) => Promise<void>;
36
+ export declare const importControlSource: (olControl: GsOlControl, src: string, importer?: Importer) => Promise<void>;
37
+ export type Importer = (src: string) => Promise<any>;
38
+ export declare const DefaultImporter: Importer;
39
+ export declare const cleanupEventSubscriptions: (olMap: Map) => void;
40
+ export declare const toOlMap: (gsMap: GsMap, options?: MapOptions, env?: any, importer?: Importer) => Promise<Map>;
41
+ //# sourceMappingURL=gs-gs2ol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gs-gs2ol.d.ts","sourceRoot":"","sources":["../src/gs-gs2ol.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,OAAO,EAEP,KAAK,EACL,SAAS,EACT,QAAQ,EAGR,aAAa,EACb,OAAO,EACP,WAAW,EAYd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAO,MAAM,IAAI,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAElC,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,EAAC,MAAM,IAAI,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAC,MAAM,UAAU,CAAC;AAO9F,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,UAAU,MAAM,gBAAgB,CAAC;AAExC,OAAO,SAAS,MAAM,eAAe,CAAC;AAGtC,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAwBnC,eAAO,MAAM,YAAY,GAAI,UAAU,UAAU,6JAEhD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,SAI5C,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