@accelint/map-toolkit 0.3.1 → 0.4.1

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 (104) hide show
  1. package/CHANGELOG.md +49 -24
  2. package/catalog-info.yaml +5 -7
  3. package/dist/cursor-coordinates/index.d.ts +14 -3
  4. package/dist/cursor-coordinates/index.js +16 -3
  5. package/dist/cursor-coordinates/use-cursor-coordinates.d.ts +20 -6
  6. package/dist/cursor-coordinates/use-cursor-coordinates.js +247 -128
  7. package/dist/cursor-coordinates/use-cursor-coordinates.js.map +1 -1
  8. package/dist/deckgl/base-map/constants.d.ts +14 -12
  9. package/dist/deckgl/base-map/constants.js +26 -12
  10. package/dist/deckgl/base-map/constants.js.map +1 -1
  11. package/dist/deckgl/base-map/events.d.ts +6 -4
  12. package/dist/deckgl/base-map/events.js +18 -4
  13. package/dist/deckgl/base-map/events.js.map +1 -1
  14. package/dist/deckgl/base-map/index.d.ts +45 -18
  15. package/dist/deckgl/base-map/index.js +216 -148
  16. package/dist/deckgl/base-map/index.js.map +1 -1
  17. package/dist/deckgl/base-map/provider.d.ts +48 -32
  18. package/dist/deckgl/base-map/provider.js +122 -11
  19. package/dist/deckgl/base-map/provider.js.map +1 -1
  20. package/dist/deckgl/base-map/types.d.ts +49 -39
  21. package/dist/deckgl/base-map/types.js +11 -2
  22. package/dist/deckgl/index.d.ts +18 -13
  23. package/dist/deckgl/index.js +19 -6
  24. package/dist/deckgl/symbol-layer/fiber.d.ts +21 -10
  25. package/dist/deckgl/symbol-layer/fiber.js +18 -3
  26. package/dist/deckgl/symbol-layer/fiber.js.map +1 -1
  27. package/dist/deckgl/symbol-layer/index.d.ts +68 -54
  28. package/dist/deckgl/symbol-layer/index.js +105 -85
  29. package/dist/deckgl/symbol-layer/index.js.map +1 -1
  30. package/dist/deckgl/text-layer/character-sets.d.ts +19 -17
  31. package/dist/deckgl/text-layer/character-sets.js +40 -19
  32. package/dist/deckgl/text-layer/character-sets.js.map +1 -1
  33. package/dist/deckgl/text-layer/default-settings.d.ts +16 -2
  34. package/dist/deckgl/text-layer/default-settings.js +42 -18
  35. package/dist/deckgl/text-layer/default-settings.js.map +1 -1
  36. package/dist/deckgl/text-layer/fiber.d.ts +38 -27
  37. package/dist/deckgl/text-layer/fiber.js +18 -3
  38. package/dist/deckgl/text-layer/fiber.js.map +1 -1
  39. package/dist/deckgl/text-layer/index.d.ts +39 -25
  40. package/dist/deckgl/text-layer/index.js +47 -29
  41. package/dist/deckgl/text-layer/index.js.map +1 -1
  42. package/dist/decorators/deckgl.d.ts +16 -2
  43. package/dist/decorators/deckgl.js +25 -7
  44. package/dist/decorators/deckgl.js.map +1 -1
  45. package/dist/map-cursor/events.d.ts +16 -0
  46. package/dist/map-cursor/events.js +27 -0
  47. package/dist/map-cursor/events.js.map +1 -0
  48. package/dist/map-cursor/index.d.ts +17 -0
  49. package/dist/map-cursor/index.js +18 -0
  50. package/dist/map-cursor/store.d.ts +93 -0
  51. package/dist/map-cursor/store.js +351 -0
  52. package/dist/map-cursor/store.js.map +1 -0
  53. package/dist/map-cursor/types.d.ts +81 -0
  54. package/dist/map-cursor/types.js +12 -0
  55. package/dist/map-cursor/use-map-cursor.d.ts +99 -0
  56. package/dist/map-cursor/use-map-cursor.js +116 -0
  57. package/dist/map-cursor/use-map-cursor.js.map +1 -0
  58. package/dist/map-mode/events.d.ts +11 -9
  59. package/dist/map-mode/events.js +43 -9
  60. package/dist/map-mode/events.js.map +1 -1
  61. package/dist/map-mode/index.d.ts +17 -6
  62. package/dist/map-mode/index.js +18 -5
  63. package/dist/map-mode/store.d.ts +26 -3
  64. package/dist/map-mode/store.js +329 -265
  65. package/dist/map-mode/store.js.map +1 -1
  66. package/dist/map-mode/types.d.ts +49 -35
  67. package/dist/map-mode/types.js +11 -2
  68. package/dist/map-mode/use-map-mode.d.ts +21 -7
  69. package/dist/map-mode/use-map-mode.js +66 -23
  70. package/dist/map-mode/use-map-mode.js.map +1 -1
  71. package/dist/maplibre/constants.d.ts +10 -8
  72. package/dist/maplibre/constants.js +22 -8
  73. package/dist/maplibre/constants.js.map +1 -1
  74. package/dist/maplibre/hooks/use-maplibre.d.ts +17 -2
  75. package/dist/maplibre/hooks/use-maplibre.js +77 -31
  76. package/dist/maplibre/hooks/use-maplibre.js.map +1 -1
  77. package/dist/maplibre/index.d.ts +15 -3
  78. package/dist/maplibre/index.js +17 -4
  79. package/dist/viewport/constants.d.ts +8 -6
  80. package/dist/viewport/constants.js +20 -6
  81. package/dist/viewport/constants.js.map +1 -1
  82. package/dist/viewport/index.d.ts +18 -13
  83. package/dist/viewport/index.js +19 -6
  84. package/dist/viewport/types.d.ts +27 -17
  85. package/dist/viewport/types.js +11 -2
  86. package/dist/viewport/use-viewport-state.d.ts +29 -14
  87. package/dist/viewport/use-viewport-state.js +200 -87
  88. package/dist/viewport/use-viewport-state.js.map +1 -1
  89. package/dist/viewport/utils.d.ts +25 -10
  90. package/dist/viewport/utils.js +67 -37
  91. package/dist/viewport/utils.js.map +1 -1
  92. package/dist/viewport/viewport-size.d.ts +27 -15
  93. package/dist/viewport/viewport-size.js +54 -11
  94. package/dist/viewport/viewport-size.js.map +1 -1
  95. package/package.json +107 -78
  96. package/dist/cursor-coordinates/index.js.map +0 -1
  97. package/dist/deckgl/base-map/types.js.map +0 -1
  98. package/dist/deckgl/index.js.map +0 -1
  99. package/dist/map-mode/index.js.map +0 -1
  100. package/dist/map-mode/types.js.map +0 -1
  101. package/dist/maplibre/index.js.map +0 -1
  102. package/dist/metafile-esm.json +0 -1
  103. package/dist/viewport/index.js.map +0 -1
  104. package/dist/viewport/types.js.map +0 -1
@@ -1,9 +1,22 @@
1
- import { TextLayerProps as TextLayerProps$1, TextLayer as TextLayer$1 } from '@deck.gl/layers';
2
- import { CharacterSetsKeys } from './character-sets.js';
3
- import { LiteralUnion } from 'type-fest';
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
4
12
 
13
+ import { CharacterSetsKeys } from "./character-sets.js";
14
+ import { TextLayer as TextLayer$1, TextLayerProps as TextLayerProps$1 } from "@deck.gl/layers";
15
+ import { LiteralUnion } from "type-fest";
16
+
17
+ //#region src/deckgl/text-layer/index.d.ts
5
18
  interface TextLayerProps<TData = unknown> extends TextLayerProps$1<TData> {
6
- characterSet?: LiteralUnion<CharacterSetsKeys, string>;
19
+ characterSet?: LiteralUnion<CharacterSetsKeys, string>;
7
20
  }
8
21
  /**
9
22
  * A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.
@@ -19,25 +32,26 @@ interface TextLayerProps<TData = unknown> extends TextLayerProps$1<TData> {
19
32
  * - Direct: `new TextLayer({ id: 'text', data: [...], ... })`
20
33
  */
21
34
  declare class TextLayer<TData = unknown> extends TextLayer$1<TData> {
22
- static CHARACTER_SETS: Readonly<{
23
- readonly ALL_NUMBERS: "1234567890";
24
- readonly ASCII_ALL: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
25
- readonly ASCII_ALPHA_NUMERIC: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
26
- readonly ASCII_LETTERS: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
27
- readonly ASCII_LETTERS_LOWERCASE: "abcdefghijklmnopqrstuvwxyz";
28
- readonly ASCII_LETTERS_UPPERCASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
29
- readonly ASCII_SYMBOLS: " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
30
- readonly AUTO: "auto";
31
- readonly EXPANDED: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
32
- readonly LATIN_ALL: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
33
- readonly LATIN_ALPHA_NUMERIC: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890";
34
- readonly LATIN_LETTERS: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
35
- readonly LATIN_LETTERS_LOWERCASE: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
36
- readonly LATIN_LETTERS_UPPERCASE: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
37
- readonly LATIN_SYMBOLS: " ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
38
- }>;
39
- static layerName: string;
40
- constructor(props: TextLayerProps<TData>);
35
+ static CHARACTER_SETS: Readonly<{
36
+ readonly ALL_NUMBERS: "1234567890";
37
+ readonly ASCII_ALL: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
38
+ readonly ASCII_ALPHA_NUMERIC: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
39
+ readonly ASCII_LETTERS: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
40
+ readonly ASCII_LETTERS_LOWERCASE: "abcdefghijklmnopqrstuvwxyz";
41
+ readonly ASCII_LETTERS_UPPERCASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
42
+ readonly ASCII_SYMBOLS: " !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
43
+ readonly AUTO: "auto";
44
+ readonly EXPANDED: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !\"#$%&'()*+,-./:;<=>?@[]^_`{|}~àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
45
+ readonly LATIN_ALL: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890 ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
46
+ readonly LATIN_ALPHA_NUMERIC: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ1234567890";
47
+ readonly LATIN_LETTERS: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
48
+ readonly LATIN_LETTERS_LOWERCASE: "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß";
49
+ readonly LATIN_LETTERS_UPPERCASE: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ";
50
+ readonly LATIN_SYMBOLS: " ¡¿¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿×÷";
51
+ }>;
52
+ static layerName: string;
53
+ constructor(props: TextLayerProps<TData>);
41
54
  }
42
-
43
- export { TextLayer, type TextLayerProps };
55
+ //#endregion
56
+ export { TextLayer, TextLayerProps };
57
+ //# sourceMappingURL=index.d.ts.map
@@ -1,33 +1,51 @@
1
- import { TextLayer as TextLayer$1 } from '@deck.gl/layers';
2
- import { CHARACTER_SETS } from './character-sets.js';
3
- import { defaultSettings } from './default-settings.js';
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
4
12
 
5
- class TextLayer extends TextLayer$1 {
6
- static CHARACTER_SETS = CHARACTER_SETS;
7
- static layerName = "textLayer";
8
- constructor(props) {
9
- const {
10
- characterSet = CHARACTER_SETS.EXPANDED,
11
- fontSettings,
12
- ...rest
13
- } = props;
14
- super({
15
- // set opinionated defaults
16
- ...defaultSettings,
17
- // user props override defaults
18
- ...rest,
19
- // handle special characterSet logic
20
- characterSet: CHARACTER_SETS[characterSet] ?? characterSet,
21
- fontSettings: {
22
- // merge fontSettings
23
- ...defaultSettings.fontSettings,
24
- // user props override defaults
25
- ...fontSettings
26
- }
27
- });
28
- }
29
- }
30
13
 
14
+ import { CHARACTER_SETS } from "./character-sets.js";
15
+ import { defaultSettings } from "./default-settings.js";
16
+ import { TextLayer as TextLayer$1 } from "@deck.gl/layers";
17
+
18
+ //#region src/deckgl/text-layer/index.ts
19
+ /**
20
+ * A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.
21
+ *
22
+ * This layer provides:
23
+ * - Customizable font styling (size, weight, family, line height)
24
+ * - Text outline support
25
+ * - Extended character set support
26
+ * - Consistent styling based on design specifications
27
+ *
28
+ * Can be used directly with Deck.gl or as a JSX element with React Fiber:
29
+ * - React Fiber: `<textLayer id="text" data={[...]} ... />`
30
+ * - Direct: `new TextLayer({ id: 'text', data: [...], ... })`
31
+ */
32
+ var TextLayer = class extends TextLayer$1 {
33
+ static CHARACTER_SETS = CHARACTER_SETS;
34
+ static layerName = "textLayer";
35
+ constructor(props) {
36
+ const { characterSet = CHARACTER_SETS.EXPANDED, fontSettings, ...rest } = props;
37
+ super({
38
+ ...defaultSettings,
39
+ ...rest,
40
+ characterSet: CHARACTER_SETS[characterSet] ?? characterSet,
41
+ fontSettings: {
42
+ ...defaultSettings.fontSettings,
43
+ ...fontSettings
44
+ }
45
+ });
46
+ }
47
+ };
48
+
49
+ //#endregion
31
50
  export { TextLayer };
32
- //# sourceMappingURL=index.js.map
33
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/deckgl/text-layer/index.ts"],"names":["DglTextLayer"],"mappings":";;;;AAuCO,MAAM,kBAAmCA,WAAA,CAAoB;AAAA,EAClE,OAAO,cAAA,GAAiB,cAAA;AAAA,EAExB,OAAgB,SAAA,GAAY,WAAA;AAAA,EAE5B,YAAY,KAAA,EAA8B;AACxC,IAAA,MAAM;AAAA,MACJ,eAAe,cAAA,CAAe,QAAA;AAAA,MAC9B,YAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,KAAA,CAAM;AAAA;AAAA,MAEJ,GAAG,eAAA;AAAA;AAAA,MAGH,GAAG,IAAA;AAAA;AAAA,MAGH,YAAA,EACE,cAAA,CAAe,YAAiC,CAAA,IAAK,YAAA;AAAA,MAEvD,YAAA,EAAc;AAAA;AAAA,QAEZ,GAAG,eAAA,CAAgB,YAAA;AAAA;AAAA,QAGnB,GAAG;AAAA;AACL,KACD,CAAA;AAAA,EACH;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n TextLayer as DglTextLayer,\n type TextLayerProps as DglTextLayerProps,\n} from '@deck.gl/layers';\nimport { CHARACTER_SETS, type CharacterSetsKeys } from './character-sets.js';\nimport { defaultSettings } from './default-settings.js';\nimport type { LiteralUnion } from 'type-fest';\n\nexport interface TextLayerProps<TData = unknown>\n extends DglTextLayerProps<TData> {\n // A union type that preserves autocompletion for CharacterSetsKeys while allowing any string.\n characterSet?: LiteralUnion<CharacterSetsKeys, string>;\n}\n\n/**\n * A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.\n *\n * This layer provides:\n * - Customizable font styling (size, weight, family, line height)\n * - Text outline support\n * - Extended character set support\n * - Consistent styling based on design specifications\n *\n * Can be used directly with Deck.gl or as a JSX element with React Fiber:\n * - React Fiber: `<textLayer id=\"text\" data={[...]} ... />`\n * - Direct: `new TextLayer({ id: 'text', data: [...], ... })`\n */\nexport class TextLayer<TData = unknown> extends DglTextLayer<TData> {\n static CHARACTER_SETS = CHARACTER_SETS;\n\n static override layerName = 'textLayer';\n\n constructor(props: TextLayerProps<TData>) {\n const {\n characterSet = CHARACTER_SETS.EXPANDED,\n fontSettings,\n ...rest\n } = props;\n\n super({\n // set opinionated defaults\n ...defaultSettings,\n\n // user props override defaults\n ...rest,\n\n // handle special characterSet logic\n characterSet:\n CHARACTER_SETS[characterSet as CharacterSetsKeys] ?? characterSet,\n\n fontSettings: {\n // merge fontSettings\n ...defaultSettings.fontSettings,\n\n // user props override defaults\n ...fontSettings,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","names":["DglTextLayer"],"sources":["../../../src/deckgl/text-layer/index.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n TextLayer as DglTextLayer,\n type TextLayerProps as DglTextLayerProps,\n} from '@deck.gl/layers';\nimport { CHARACTER_SETS, type CharacterSetsKeys } from './character-sets.js';\nimport { defaultSettings } from './default-settings.js';\nimport type { LiteralUnion } from 'type-fest';\n\nexport interface TextLayerProps<TData = unknown>\n extends DglTextLayerProps<TData> {\n // A union type that preserves autocompletion for CharacterSetsKeys while allowing any string.\n characterSet?: LiteralUnion<CharacterSetsKeys, string>;\n}\n\n/**\n * A styled text layer that extends Deck.gl's TextLayer with enhanced styling capabilities.\n *\n * This layer provides:\n * - Customizable font styling (size, weight, family, line height)\n * - Text outline support\n * - Extended character set support\n * - Consistent styling based on design specifications\n *\n * Can be used directly with Deck.gl or as a JSX element with React Fiber:\n * - React Fiber: `<textLayer id=\"text\" data={[...]} ... />`\n * - Direct: `new TextLayer({ id: 'text', data: [...], ... })`\n */\nexport class TextLayer<TData = unknown> extends DglTextLayer<TData> {\n static CHARACTER_SETS = CHARACTER_SETS;\n\n static override layerName = 'textLayer';\n\n constructor(props: TextLayerProps<TData>) {\n const {\n characterSet = CHARACTER_SETS.EXPANDED,\n fontSettings,\n ...rest\n } = props;\n\n super({\n // set opinionated defaults\n ...defaultSettings,\n\n // user props override defaults\n ...rest,\n\n // handle special characterSet logic\n characterSet:\n CHARACTER_SETS[characterSet as CharacterSetsKeys] ?? characterSet,\n\n fontSettings: {\n // merge fontSettings\n ...defaultSettings.fontSettings,\n\n // user props override defaults\n ...fontSettings,\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAa,YAAb,cAAgDA,YAAoB;CAClE,OAAO,iBAAiB;CAExB,OAAgB,YAAY;CAE5B,YAAY,OAA8B;EACxC,MAAM,EACJ,eAAe,eAAe,UAC9B,cACA,GAAG,SACD;AAEJ,QAAM;GAEJ,GAAG;GAGH,GAAG;GAGH,cACE,eAAe,iBAAsC;GAEvD,cAAc;IAEZ,GAAG,gBAAgB;IAGnB,GAAG;IACJ;GACF,CAAC"}
@@ -1,5 +1,19 @@
1
- import { Decorator } from '@storybook/react-vite';
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
2
12
 
3
- declare const withDeckGL: () => Decorator;
13
+ import { Decorator } from "@storybook/react-vite";
4
14
 
15
+ //#region src/decorators/deckgl.d.ts
16
+ declare const withDeckGL: () => Decorator;
17
+ //#endregion
5
18
  export { withDeckGL };
19
+ //# sourceMappingURL=deckgl.d.ts.map
@@ -1,14 +1,32 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { uuid } from '@accelint/core';
3
- import { BaseMap } from '../deckgl/base-map/index.js';
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
4
12
 
13
+
14
+ import { BaseMap } from "../deckgl/base-map/index.js";
15
+ import { uuid } from "@accelint/core";
16
+ import { jsx } from "react/jsx-runtime";
17
+
18
+ //#region src/decorators/deckgl.tsx
5
19
  const STORYBOOK_MAP_ID = uuid();
6
20
  const withDeckGL = () => {
7
- return (Story) => {
8
- return /* @__PURE__ */ jsx(BaseMap, { className: "h-dvh w-dvw", id: STORYBOOK_MAP_ID, children: /* @__PURE__ */ jsx(Story, {}) });
9
- };
21
+ return (Story) => {
22
+ return /* @__PURE__ */ jsx(BaseMap, {
23
+ className: "h-dvh w-dvw",
24
+ id: STORYBOOK_MAP_ID,
25
+ children: /* @__PURE__ */ jsx(Story, {})
26
+ });
27
+ };
10
28
  };
11
29
 
30
+ //#endregion
12
31
  export { withDeckGL };
13
- //# sourceMappingURL=deckgl.js.map
14
32
  //# sourceMappingURL=deckgl.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/decorators/deckgl.tsx"],"names":[],"mappings":";;;;AAmBA,MAAM,mBAAmB,IAAA,EAAK;AAEvB,MAAM,aAAa,MAAiB;AACzC,EAAA,OAAO,CAAC,KAAA,KAAU;AAChB,IAAA,uBACE,GAAA,CAAC,WAAQ,SAAA,EAAU,aAAA,EAAc,IAAI,gBAAA,EACnC,QAAA,kBAAA,GAAA,CAAC,SAAM,CAAA,EACT,CAAA;AAAA,EAEJ,CAAA;AACF","file":"deckgl.js","sourcesContent":["// __private-exports\n\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { uuid } from '@accelint/core';\nimport { BaseMap } from '../deckgl/base-map';\nimport type { Decorator } from '@storybook/react-vite';\n\n// Module-level constant - stable across all Storybook renders\nconst STORYBOOK_MAP_ID = uuid();\n\nexport const withDeckGL = (): Decorator => {\n return (Story) => {\n return (\n <BaseMap className='h-dvh w-dvw' id={STORYBOOK_MAP_ID}>\n <Story />\n </BaseMap>\n );\n };\n};\n"]}
1
+ {"version":3,"file":"deckgl.js","names":[],"sources":["../../src/decorators/deckgl.tsx"],"sourcesContent":["// __private-exports\n\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { uuid } from '@accelint/core';\nimport { BaseMap } from '../deckgl/base-map';\nimport type { Decorator } from '@storybook/react-vite';\n\n// Module-level constant - stable across all Storybook renders\nconst STORYBOOK_MAP_ID = uuid();\n\nexport const withDeckGL = (): Decorator => {\n return (Story) => {\n return (\n <BaseMap className='h-dvh w-dvw' id={STORYBOOK_MAP_ID}>\n <Story />\n </BaseMap>\n );\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,mBAAmB,MAAM;AAE/B,MAAa,mBAA8B;AACzC,SAAQ,UAAU;AAChB,SACE,oBAAC;GAAQ,WAAU;GAAc,IAAI;aACnC,oBAAC,UAAQ;IACD"}
@@ -0,0 +1,16 @@
1
+ //#region src/map-cursor/events.d.ts
2
+ /**
3
+ * Event keys for map cursor state changes.
4
+ * These events are used for communication between cursor stores and consumers.
5
+ */
6
+ declare const MapCursorEvents: {
7
+ /** Emitted when a component requests a cursor change */
8
+ readonly changeRequest: "cursor:change-request";
9
+ /** Emitted when the cursor has been changed */
10
+ readonly changed: "cursor:changed";
11
+ /** Emitted when a cursor change request is rejected */
12
+ readonly rejected: "cursor:rejected";
13
+ };
14
+ //#endregion
15
+ export { MapCursorEvents };
16
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ //#region src/map-cursor/events.ts
15
+ /**
16
+ * Event keys for map cursor state changes.
17
+ * These events are used for communication between cursor stores and consumers.
18
+ */
19
+ const MapCursorEvents = {
20
+ changeRequest: "cursor:change-request",
21
+ changed: "cursor:changed",
22
+ rejected: "cursor:rejected"
23
+ };
24
+
25
+ //#endregion
26
+ export { MapCursorEvents };
27
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../src/map-cursor/events.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Event keys for map cursor state changes.\n * These events are used for communication between cursor stores and consumers.\n */\nexport const MapCursorEvents = {\n /** Emitted when a component requests a cursor change */\n changeRequest: 'cursor:change-request',\n /** Emitted when the cursor has been changed */\n changed: 'cursor:changed',\n /** Emitted when a cursor change request is rejected */\n rejected: 'cursor:rejected',\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,MAAa,kBAAkB;CAE7B,eAAe;CAEf,SAAS;CAET,UAAU;CACX"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { MapCursorEvents } from "./events.js";
14
+ import { CSSCursorType, CursorChangeRequestEvent, CursorChangedEvent, CursorRejectedEvent, MapCursorEventType } from "./types.js";
15
+ import { destroyStore, getOrCreateStore } from "./store.js";
16
+ import { UseMapCursorReturn, useMapCursor, useMapCursorEffect } from "./use-map-cursor.js";
17
+ export { type CSSCursorType, type CursorChangeRequestEvent, type CursorChangedEvent, type CursorRejectedEvent, type MapCursorEventType, MapCursorEvents, type UseMapCursorReturn, destroyStore, getOrCreateStore, useMapCursor, useMapCursorEffect };
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ import { MapCursorEvents } from "./events.js";
15
+ import { destroyStore, getOrCreateStore } from "./store.js";
16
+ import { useMapCursor, useMapCursorEffect } from "./use-map-cursor.js";
17
+
18
+ export { MapCursorEvents, destroyStore, getOrCreateStore, useMapCursor, useMapCursorEffect };
@@ -0,0 +1,93 @@
1
+ /*
2
+ * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { CSSCursorType } from "./types.js";
14
+ import { UniqueId } from "@accelint/core";
15
+
16
+ //#region src/map-cursor/store.d.ts
17
+ /**
18
+ * Creates or retrieves a cached subscription function for a given instanceId.
19
+ * Uses a fan-out pattern: 1 bus listener -> N React subscribers.
20
+ * Automatically cleans up cursor state when the last subscriber unsubscribes.
21
+ *
22
+ * @param instanceId - The unique identifier for the map cursor instance
23
+ * @returns A subscription function for useSyncExternalStore
24
+ */
25
+ declare function getOrCreateSubscription(instanceId: UniqueId): (onStoreChange: () => void) => () => void;
26
+ /**
27
+ * Creates or retrieves a cached snapshot function for a given instanceId.
28
+ * The cursor returned gets equality checked, so it needs to be stable or React re-renders unnecessarily.
29
+ *
30
+ * @param instanceId - The unique identifier for the map cursor instance
31
+ * @returns A snapshot function for useSyncExternalStore
32
+ */
33
+ declare function getOrCreateSnapshot(instanceId: UniqueId): () => CSSCursorType;
34
+ /**
35
+ * Creates or retrieves a cached server snapshot function for a given instanceId.
36
+ * Server snapshots always return the default cursor since cursor state is client-only.
37
+ * Required for SSR/RSC compatibility with useSyncExternalStore.
38
+ *
39
+ * @param instanceId - The unique identifier for the map cursor instance
40
+ * @returns A server snapshot function for useSyncExternalStore
41
+ */
42
+ declare function getOrCreateServerSnapshot(instanceId: UniqueId): () => CSSCursorType;
43
+ /**
44
+ * Creates or retrieves a cached requestCursorChange function for a given instanceId.
45
+ * This maintains referential stability for the function reference.
46
+ *
47
+ * @param instanceId - The unique identifier for the map cursor instance
48
+ * @returns A requestCursorChange function for this instance
49
+ */
50
+ declare function getOrCreateRequestCursorChange(instanceId: UniqueId): (cursor: CSSCursorType, owner: string) => void;
51
+ /**
52
+ * Creates or retrieves a cached clearCursor function for a given instanceId.
53
+ * This maintains referential stability for the function reference.
54
+ *
55
+ * @param instanceId - The unique identifier for the map cursor instance
56
+ * @returns A clearCursor function for this instance
57
+ */
58
+ declare function getOrCreateClearCursor(instanceId: UniqueId): (owner: string) => void;
59
+ /**
60
+ * Get the current cursor for a given instance (direct access, not reactive).
61
+ * @internal - For internal map-toolkit use only
62
+ *
63
+ * @param instanceId - The unique identifier for the map instance
64
+ * @returns The current cursor
65
+ */
66
+ declare function getCursor(instanceId: UniqueId): CSSCursorType;
67
+ /**
68
+ * Manually clear all cursor state for a specific instanceId.
69
+ * This is typically not needed as cleanup happens automatically when all subscribers unmount.
70
+ * Use this only in advanced scenarios where manual cleanup is required.
71
+ *
72
+ * @param instanceId - The unique identifier for the map cursor instance to clear
73
+ *
74
+ * @example
75
+ * ```tsx
76
+ * // Manual cleanup (rarely needed)
77
+ * clearCursorState('my-map-instance');
78
+ * ```
79
+ */
80
+ declare function clearCursorState(instanceId: UniqueId): void;
81
+ /** @deprecated Use module functions directly */
82
+ declare function getOrCreateStore(id: UniqueId): {
83
+ getSnapshot: () => CSSCursorType;
84
+ };
85
+ /** @deprecated Use clearCursorState instead */
86
+ declare function destroyStore(id: UniqueId): void;
87
+ /** @deprecated Use direct function calls instead */
88
+ declare function getStore(id: UniqueId): {
89
+ getSnapshot: () => CSSCursorType;
90
+ } | undefined;
91
+ //#endregion
92
+ export { clearCursorState, destroyStore, getCursor, getOrCreateClearCursor, getOrCreateRequestCursorChange, getOrCreateServerSnapshot, getOrCreateSnapshot, getOrCreateStore, getOrCreateSubscription, getStore };
93
+ //# sourceMappingURL=store.d.ts.map