@sqlrooms/kepler 0.27.0-rc.3 → 0.27.0-rc.4

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.
@@ -1,12 +1,22 @@
1
- export type KeplerFactory<TReturn = unknown> = (...args: any[]) => TReturn;
1
+ import { type InjectorType } from '@kepler.gl/components';
2
+ import React from 'react';
3
+ export declare const CustomAddDataButtonFactory: () => () => null;
4
+ export declare const CustomPanelTitleFactory: () => React.FC<{
5
+ children?: React.ReactNode | undefined;
6
+ }>;
7
+ export type KeplerFactory<TReturn = unknown> = (..._args: any[]) => TReturn;
2
8
  export type KeplerFactoryRecipe = [KeplerFactory, KeplerFactory];
3
9
  export type KeplerFactoryRecipeMode = 'append' | 'replace';
4
10
  export declare function configureKeplerInjector(recipes: KeplerFactoryRecipe[], options?: {
5
11
  mode?: KeplerFactoryRecipeMode;
6
12
  }): void;
7
13
  export declare function resetKeplerInjectorRecipes(): void;
8
- export declare function getKeplerInjector(): import("@kepler.gl/components").InjectorType;
14
+ export declare function getKeplerInjector(): InjectorType;
9
15
  export declare function getKeplerFactory<TFactory extends KeplerFactory>(factory: TFactory): ReturnType<TFactory>;
16
+ /**
17
+ * Stable access to Kepler factories. Prefer calling `get()` at module scope
18
+ * (or in a constant initializer) so the returned component type is reused.
19
+ */
10
20
  export declare const KeplerInjector: {
11
21
  get<TFactory extends KeplerFactory>(factory: TFactory): ReturnType<TFactory>;
12
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"KeplerInjector.d.ts","sourceRoot":"","sources":["../../src/components/KeplerInjector.tsx"],"names":[],"mappings":"AA8BA,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACjE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,S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AQ,SAAS,aAAa,WAAW,QAAQ;CAGtD,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { AddDataButtonFactory, appInjector, DndContextFactory, FilterPanelHeaderFactory, MapControlTooltipFactory, MapLegendFactory, MapLegendPanelFactory, PanelTitleFactory, provideRecipesToInjector, } from '@kepler.gl/components';
2
+ import { AddDataButtonFactory, ContainerFactory, injector as createInjector, DndContextFactory, FilterPanelHeaderFactory, flattenDeps, MapControlTooltipFactory, MapLegendFactory, MapLegendPanelFactory, PanelTitleFactory, typeCheckRecipe, } from '@kepler.gl/components';
3
3
  import { CustomDndContextFactory } from './CustomDndContext';
4
4
  import { CustomFilterPanelHeaderFactory } from './CustomFilterPanelHeader';
5
5
  import { CustomMapControlTooltipFactory } from './CustomMapControlTooltipFactory';
6
6
  import { CustomMapLegendFactory } from './CustomMapLegend';
7
7
  import { CustomMapLegendPanelFactory } from './CustomMapLegendPanel';
8
- const CustomAddDataButtonFactory = () => {
8
+ export const CustomAddDataButtonFactory = () => {
9
9
  return () => null;
10
10
  };
11
- const CustomPanelTitleFactory = () => {
11
+ export const CustomPanelTitleFactory = () => {
12
12
  const PanelTitle = ({ children }) => (_jsx("div", { className: "flex items-center justify-end", children: children }));
13
13
  return PanelTitle;
14
14
  };
@@ -23,8 +23,56 @@ const defaultRecipes = [
23
23
  ];
24
24
  let customRecipes = [];
25
25
  let injector = createKeplerInjector();
26
+ function createBaseInjector() {
27
+ const allDependencies = flattenDeps([], ContainerFactory);
28
+ return allDependencies.reduce((current, factory) => current.provide(factory, factory), createInjector());
29
+ }
30
+ /**
31
+ * Applies factory replacement recipes on top of a fresh Kepler injector while
32
+ * preserving explicit replacement targets.
33
+ *
34
+ * Kepler's default `provideRecipesToInjector` pre-provides all replacement
35
+ * dependencies as identity mappings (`dep -> dep`) before applying each recipe.
36
+ * That can unintentionally override factories that were already replaced by
37
+ * earlier recipes, and emits noisy "already injected" warnings.
38
+ *
39
+ * This helper keeps the same high-level flow (process recipes in order and then
40
+ * eagerly resolve the configured factories), but skips identity-providing any
41
+ * dependency that is itself an explicit replacement target in the current
42
+ * recipe set. As a result:
43
+ * - earlier explicit replacements are not overwritten by later dependency setup
44
+ * - replacement ordering remains deterministic
45
+ * - configured factories are still warmed via `get(factoryToReplace)`
46
+ */
47
+ function provideRecipesToInjectorSafely(recipes, baseInjector) {
48
+ const replacementTargets = new Set(recipes
49
+ .filter((recipe) => typeCheckRecipe(recipe))
50
+ .map((recipe) => recipe[0]));
51
+ const provided = new Map();
52
+ const injectorWithRecipes = recipes.reduce((currentInjector, recipe) => {
53
+ if (!typeCheckRecipe(recipe)) {
54
+ return currentInjector;
55
+ }
56
+ const [factoryToReplace, replacementFactory] = recipe;
57
+ const customDependencies = flattenDeps([], replacementFactory);
58
+ const injectorWithDependencies = customDependencies.reduce((dependencyInjector, dependencyFactory) => {
59
+ // If a dependency has an explicit replacement recipe, skip self-injecting it.
60
+ // This avoids overriding previous replacements and warning noise.
61
+ if (replacementTargets.has(dependencyFactory)) {
62
+ return dependencyInjector;
63
+ }
64
+ return dependencyInjector.provide(dependencyFactory, dependencyFactory);
65
+ }, currentInjector);
66
+ provided.set(factoryToReplace, replacementFactory);
67
+ return injectorWithDependencies.provide(factoryToReplace, replacementFactory);
68
+ }, baseInjector);
69
+ provided.forEach((_, factoryToReplace) => {
70
+ injectorWithRecipes.get(factoryToReplace);
71
+ });
72
+ return injectorWithRecipes;
73
+ }
26
74
  function createKeplerInjector(recipes = []) {
27
- return provideRecipesToInjector([...defaultRecipes, ...recipes], appInjector);
75
+ return provideRecipesToInjectorSafely([...defaultRecipes, ...recipes], createBaseInjector());
28
76
  }
29
77
  export function configureKeplerInjector(recipes, options = {}) {
30
78
  const mode = options.mode ?? 'append';
@@ -39,15 +87,42 @@ export function resetKeplerInjectorRecipes() {
39
87
  export function getKeplerInjector() {
40
88
  return injector;
41
89
  }
90
+ // Cache resolved components per injector so we keep a stable component
91
+ // reference across re-renders. Invalidated when injector is replaced (configure/reset).
92
+ const injectorToFactoryCache = new WeakMap();
93
+ // Cache wrapper components per factory so callers always get a stable component type.
94
+ const factoryToWrapperCache = new Map();
42
95
  export function getKeplerFactory(factory) {
43
- // Resolve from the injector at render time so late configuration works,
44
- // while keeping a stable component definition outside render.
45
- const Wrapped = ((props) => {
46
- const Component = getKeplerInjector().get(factory);
47
- return _jsx(Component, { ...props });
48
- });
96
+ let Wrapped = factoryToWrapperCache.get(factory);
97
+ if (Wrapped === undefined) {
98
+ const WrappedComponent = function KeplerFactoryWrapper(props) {
99
+ // Resolve at top level of render (not inside useMemo) so injector.get()
100
+ // running the factory chain does not run hooks inside a hook.
101
+ const injectorInstance = getKeplerInjector();
102
+ let byFactory = injectorToFactoryCache.get(injectorInstance);
103
+ if (byFactory === undefined) {
104
+ byFactory = new Map();
105
+ injectorToFactoryCache.set(injectorInstance, byFactory);
106
+ }
107
+ let Component = byFactory.get(factory);
108
+ if (Component === undefined) {
109
+ Component = injectorInstance.get(factory);
110
+ byFactory.set(factory, Component);
111
+ }
112
+ // eslint-disable-next-line react-hooks/static-components -- Kepler factory components resolved at render by design
113
+ return _jsx(Component, { ...props });
114
+ };
115
+ const factoryName = factory.name || 'Anonymous';
116
+ WrappedComponent.displayName = `KeplerFactory(${factoryName})`;
117
+ Wrapped = WrappedComponent;
118
+ factoryToWrapperCache.set(factory, WrappedComponent);
119
+ }
49
120
  return Wrapped;
50
121
  }
122
+ /**
123
+ * Stable access to Kepler factories. Prefer calling `get()` at module scope
124
+ * (or in a constant initializer) so the returned component type is reused.
125
+ */
51
126
  export const KeplerInjector = {
52
127
  get(factory) {
53
128
  return getKeplerFactory(factory);
@@ -1 +1 @@
1
- {"version":3,"file":"KeplerInjector.js","sourceRoot":"","sources":["../../src/components/KeplerInjector.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EAEjB,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EA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AAuB,CACrC,OAA8B,EAC9B,UAA4C,EAAE;IAE9C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC;IACtC,aAAa;QACX,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC,CAAC;IACrE,QAAQ,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,aAAa,GAAG,EAAE,CAAC;IACnB,QAAQ,GAAG,oBAAoB,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAAiB;IAEjB,wEAAwE;IACxE,8DAA8D;IAC9D,MAAM,OAAO,GAAG,CAAC,CAAC,KAA8B,EAAE,EAAE;QAClD,MAAM,SAAS,GAAG,iBAAiB,EAAE,CAAC,GAAG,CACvC,OAA6B,CACkB,CAAC;QAClD,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;IAClC,CAAC,CAAoC,CAAC;IACtC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,GAAG,CAAiC,OAAiB;QACnD,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,CAAC","sourcesContent":["import {\n AddDataButtonFactory,\n appInjector,\n DndContextFactory,\n Factory,\n FilterPanelHeaderFactory,\n MapControlTooltipFactory,\n MapLegendFactory,\n MapLegendPanelFactory,\n PanelTitleFactory,\n provideRecipesToInjector,\n} from '@kepler.gl/components';\nimport React, {PropsWithChildren} from 'react';\nimport {CustomDndContextFactory} from './CustomDndContext';\nimport {CustomFilterPanelHeaderFactory} from './CustomFilterPanelHeader';\nimport {CustomMapControlTooltipFactory} from './CustomMapControlTooltipFactory';\nimport {CustomMapLegendFactory} from './CustomMapLegend';\nimport {CustomMapLegendPanelFactory} from './CustomMapLegendPanel';\n\nconst CustomAddDataButtonFactory = () => {\n return () => null;\n};\n\nconst CustomPanelTitleFactory = () => {\n const PanelTitle: React.FC<PropsWithChildren> = ({children}) => (\n <div className=\"flex items-center justify-end\">{children}</div>\n );\n\n return PanelTitle;\n};\nexport type KeplerFactory<TReturn = unknown> = (...args: any[]) => TReturn;\nexport type KeplerFactoryRecipe = [KeplerFactory, KeplerFactory];\nexport type KeplerFactoryRecipeMode = 'append' | 'replace';\n\nconst defaultRecipes: KeplerFactoryRecipe[] = [\n [AddDataButtonFactory, CustomAddDataButtonFactory],\n [PanelTitleFactory, CustomPanelTitleFactory],\n [DndContextFactory, CustomDndContextFactory],\n [FilterPanelHeaderFactory, CustomFilterPanelHeaderFactory],\n [MapLegendPanelFactory, CustomMapLegendPanelFactory],\n [MapLegendFactory, CustomMapLegendFactory],\n [MapControlTooltipFactory, CustomMapControlTooltipFactory],\n];\n\nlet customRecipes: KeplerFactoryRecipe[] = [];\nlet injector = createKeplerInjector();\n\nfunction createKeplerInjector(recipes: KeplerFactoryRecipe[] = []) {\n return provideRecipesToInjector(\n [...defaultRecipes, ...recipes] as unknown as [Factory, Factory][],\n appInjector,\n );\n}\n\nexport function configureKeplerInjector(\n recipes: KeplerFactoryRecipe[],\n options: {mode?: KeplerFactoryRecipeMode} = {},\n) {\n const mode = options.mode ?? 'append';\n customRecipes =\n mode === 'replace' ? [...recipes] : [...customRecipes, ...recipes];\n injector = createKeplerInjector(customRecipes);\n}\n\nexport function resetKeplerInjectorRecipes() {\n customRecipes = [];\n injector = createKeplerInjector();\n}\n\nexport function getKeplerInjector() {\n return injector;\n}\n\nexport function getKeplerFactory<TFactory extends KeplerFactory>(\n factory: TFactory,\n): ReturnType<TFactory> {\n // Resolve from the injector at render time so late configuration works,\n // while keeping a stable component definition outside render.\n const Wrapped = ((props: Record<string, unknown>) => {\n const Component = getKeplerInjector().get(\n factory as unknown as Factory,\n ) as React.ComponentType<Record<string, unknown>>;\n return <Component {...props} />;\n }) as unknown as ReturnType<TFactory>;\n return Wrapped;\n}\n\nexport const KeplerInjector = {\n get<TFactory extends KeplerFactory>(factory: TFactory) {\n return getKeplerFactory(factory);\n },\n};\n"]}
1
+ {"version":3,"file":"KeplerInjector.js","sourceRoot":"","sources":["../../src/components/KeplerInjector.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,QAAQ,IAAI,cAAc,EAC1B,iBAAiB,EAEjB,wBAAwB,EACxB,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAC,8BAA8B,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAC,8BAA8B,EAAC,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAEnE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,UAAU,GAAgC,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,CAC9D,cAAK,SAAS,EAAC,+BAA+B,YAAE,QAAQ,GAAO,CAChE,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAMF,MAAM,cAAc,GAA0B;IAC5C,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;IAClD,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;IAC5C,CAAC,iBAAiB,EAAE,uBAAuB,CAAC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,qBAAqB,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,OAA0C,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,GAAG,CAAiC,OAAiB;QACnD,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,CAAC","sourcesContent":["import {\n AddDataButtonFactory,\n ContainerFactory,\n injector as createInjector,\n DndContextFactory,\n Factory,\n FilterPanelHeaderFactory,\n flattenDeps,\n MapControlTooltipFactory,\n MapLegendFactory,\n MapLegendPanelFactory,\n PanelTitleFactory,\n typeCheckRecipe,\n type InjectorType,\n} from '@kepler.gl/components';\nimport React, {PropsWithChildren} from 'react';\nimport {CustomDndContextFactory} from './CustomDndContext';\nimport {CustomFilterPanelHeaderFactory} from './CustomFilterPanelHeader';\nimport {CustomMapControlTooltipFactory} from './CustomMapControlTooltipFactory';\nimport {CustomMapLegendFactory} from './CustomMapLegend';\nimport {CustomMapLegendPanelFactory} from './CustomMapLegendPanel';\n\nexport const CustomAddDataButtonFactory = () => {\n return () => null;\n};\n\nexport const CustomPanelTitleFactory = () => {\n const PanelTitle: React.FC<PropsWithChildren> = ({children}) => (\n <div className=\"flex items-center justify-end\">{children}</div>\n );\n\n return PanelTitle;\n};\n\nexport type KeplerFactory<TReturn = unknown> = (..._args: any[]) => TReturn;\nexport type KeplerFactoryRecipe = [KeplerFactory, KeplerFactory];\nexport type KeplerFactoryRecipeMode = 'append' | 'replace';\n\nconst defaultRecipes: KeplerFactoryRecipe[] = [\n [AddDataButtonFactory, CustomAddDataButtonFactory],\n [PanelTitleFactory, CustomPanelTitleFactory],\n [DndContextFactory, CustomDndContextFactory],\n [FilterPanelHeaderFactory, CustomFilterPanelHeaderFactory],\n [MapLegendPanelFactory, CustomMapLegendPanelFactory],\n [MapLegendFactory, CustomMapLegendFactory],\n [MapControlTooltipFactory, CustomMapControlTooltipFactory],\n];\n\nlet customRecipes: KeplerFactoryRecipe[] = [];\nlet injector = createKeplerInjector();\n\nfunction createBaseInjector() {\n const allDependencies = flattenDeps(\n [],\n ContainerFactory as unknown as Factory,\n );\n return allDependencies.reduce(\n (current, factory) => current.provide(factory, factory),\n createInjector(),\n );\n}\n\n/**\n * Applies factory replacement recipes on top of a fresh Kepler injector while\n * preserving explicit replacement targets.\n *\n * Kepler's default `provideRecipesToInjector` pre-provides all replacement\n * dependencies as identity mappings (`dep -> dep`) before applying each recipe.\n * That can unintentionally override factories that were already replaced by\n * earlier recipes, and emits noisy \"already injected\" warnings.\n *\n * This helper keeps the same high-level flow (process recipes in order and then\n * eagerly resolve the configured factories), but skips identity-providing any\n * dependency that is itself an explicit replacement target in the current\n * recipe set. As a result:\n * - earlier explicit replacements are not overwritten by later dependency setup\n * - replacement ordering remains deterministic\n * - configured factories are still warmed via `get(factoryToReplace)`\n */\nfunction provideRecipesToInjectorSafely(\n recipes: KeplerFactoryRecipe[],\n baseInjector: InjectorType,\n) {\n const replacementTargets = new Set(\n recipes\n .filter((recipe) =>\n typeCheckRecipe(recipe as unknown as [Factory, Factory]),\n )\n .map((recipe) => recipe[0]),\n );\n\n const provided = new Map();\n\n const injectorWithRecipes = recipes.reduce((currentInjector, recipe) => {\n if (!typeCheckRecipe(recipe as unknown as [Factory, Factory])) {\n return currentInjector;\n }\n\n const [factoryToReplace, replacementFactory] = recipe;\n const customDependencies = flattenDeps(\n [],\n replacementFactory as unknown as Factory,\n );\n\n const injectorWithDependencies = customDependencies.reduce(\n (dependencyInjector, dependencyFactory) => {\n // If a dependency has an explicit replacement recipe, skip self-injecting it.\n // This avoids overriding previous replacements and warning noise.\n if (\n replacementTargets.has(dependencyFactory as unknown as KeplerFactory)\n ) {\n return dependencyInjector;\n }\n return dependencyInjector.provide(dependencyFactory, dependencyFactory);\n },\n currentInjector,\n );\n\n provided.set(factoryToReplace, replacementFactory);\n return injectorWithDependencies.provide(\n factoryToReplace,\n replacementFactory,\n );\n }, baseInjector);\n\n provided.forEach((_, factoryToReplace) => {\n injectorWithRecipes.get(factoryToReplace);\n });\n\n return injectorWithRecipes;\n}\n\nfunction createKeplerInjector(recipes: KeplerFactoryRecipe[] = []) {\n return provideRecipesToInjectorSafely(\n [...defaultRecipes, ...recipes],\n createBaseInjector(),\n );\n}\n\nexport function configureKeplerInjector(\n recipes: KeplerFactoryRecipe[],\n options: {mode?: KeplerFactoryRecipeMode} = {},\n) {\n const mode = options.mode ?? 'append';\n customRecipes =\n mode === 'replace' ? [...recipes] : [...customRecipes, ...recipes];\n injector = createKeplerInjector(customRecipes);\n}\n\nexport function resetKeplerInjectorRecipes() {\n customRecipes = [];\n injector = createKeplerInjector();\n}\n\nexport function getKeplerInjector() {\n return injector;\n}\n\n// Cache resolved components per injector so we keep a stable component\n// reference across re-renders. Invalidated when injector is replaced (configure/reset).\nconst injectorToFactoryCache = new WeakMap<\n object,\n Map<KeplerFactory, React.ComponentType<Record<string, unknown>>>\n>();\n\n// Cache wrapper components per factory so callers always get a stable component type.\nconst factoryToWrapperCache = new Map<\n KeplerFactory,\n React.ComponentType<Record<string, unknown>>\n>();\n\nexport function getKeplerFactory<TFactory extends KeplerFactory>(\n factory: TFactory,\n): ReturnType<TFactory> {\n let Wrapped = factoryToWrapperCache.get(factory);\n if (Wrapped === undefined) {\n const WrappedComponent = function KeplerFactoryWrapper(\n props: Record<string, unknown>,\n ) {\n // Resolve at top level of render (not inside useMemo) so injector.get()\n // running the factory chain does not run hooks inside a hook.\n const injectorInstance = getKeplerInjector();\n let byFactory = injectorToFactoryCache.get(injectorInstance as object);\n if (byFactory === undefined) {\n byFactory = new Map();\n injectorToFactoryCache.set(injectorInstance as object, byFactory);\n }\n let Component = byFactory.get(factory);\n if (Component === undefined) {\n Component = injectorInstance.get(\n factory as unknown as Factory,\n ) as React.ComponentType<Record<string, unknown>>;\n byFactory.set(factory, Component);\n }\n // eslint-disable-next-line react-hooks/static-components -- Kepler factory components resolved at render by design\n return <Component {...props} />;\n };\n\n const factoryName = factory.name || 'Anonymous';\n WrappedComponent.displayName = `KeplerFactory(${factoryName})`;\n Wrapped = WrappedComponent;\n factoryToWrapperCache.set(factory, WrappedComponent);\n }\n return Wrapped as unknown as ReturnType<TFactory>;\n}\n\n/**\n * Stable access to Kepler factories. Prefer calling `get()` at module scope\n * (or in a constant initializer) so the returned component type is reused.\n */\nexport const KeplerInjector = {\n get<TFactory extends KeplerFactory>(factory: TFactory) {\n return getKeplerFactory(factory);\n },\n};\n"]}
package/dist/index.d.ts CHANGED
@@ -2,22 +2,28 @@
2
2
  * {@include ../README.md}
3
3
  * @packageDocumentation
4
4
  */
5
- export { createKeplerSlice, useStoreWithKepler, createDefaultKeplerConfig, } from './KeplerSlice';
5
+ export { createDefaultKeplerConfig, createKeplerSlice, useStoreWithKepler, } from './KeplerSlice';
6
6
  export type { KeplerSliceState } from './KeplerSlice';
7
- export { KeplerMapContainer } from './components/KeplerMapContainer';
8
- export { KeplerSidePanels } from './components/KeplerSidePanels';
7
+ export { FileDropInput } from './components/FileDropInput';
8
+ export { KeplerAddDataDialog } from './components/KeplerAddDataDialog';
9
+ export type { AddDataMethods, KeplerAddDataDialogProps, } from './components/KeplerAddDataDialog';
9
10
  export { KeplerAddTileSetDialog } from './components/KeplerAddTileSetDialog';
10
11
  export type { LoadTileSet } from './components/KeplerAddTileSetDialog';
11
- export { KeplerAddDataDialog } from './components/KeplerAddDataDialog';
12
- export type { KeplerAddDataDialogProps, AddDataMethods, } from './components/KeplerAddDataDialog';
13
- export { FileDropInput } from './components/FileDropInput';
12
+ export { KeplerImageExport } from './components/KeplerImageExport';
13
+ export { configureKeplerInjector, KeplerInjector, getKeplerFactory, getKeplerInjector, resetKeplerInjectorRecipes, } from './components/KeplerInjector';
14
+ export type { KeplerFactoryRecipe, KeplerFactoryRecipeMode, } from './components/KeplerInjector';
15
+ export { KeplerMapContainer } from './components/KeplerMapContainer';
16
+ export { KeplerPlotContainer } from './components/KeplerPlotContainer';
17
+ export { KeplerProvider } from './components/KeplerProvider';
14
18
  export { KeplerS3Browser } from './components/KeplerS3Browser';
15
19
  export type { KeplerS3BrowserProps } from './components/KeplerS3Browser';
16
- export { KeplerProvider } from './components/KeplerProvider';
20
+ export { KeplerSidePanels } from './components/KeplerSidePanels';
17
21
  export { useKeplerStateActions } from './hooks/useKeplerStateActions';
18
- export { KeplerPlotContainer } from './components/KeplerPlotContainer';
19
- export { KeplerImageExport } from './components/KeplerImageExport';
20
- export { configureKeplerInjector, resetKeplerInjectorRecipes, getKeplerInjector, getKeplerFactory, } from './components/KeplerInjector';
21
- export type { KeplerFactoryRecipe, KeplerFactoryRecipeMode, } from './components/KeplerInjector';
22
22
  export { KeplerMapSchema, KeplerSliceConfig } from '@sqlrooms/kepler-config';
23
+ export { CustomDndContextFactory } from './components/CustomDndContext';
24
+ export { CustomFilterPanelHeaderFactory } from './components/CustomFilterPanelHeader';
25
+ export { CustomMapControlTooltipFactory } from './components/CustomMapControlTooltipFactory';
26
+ export { CustomMapLegendFactory } from './components/CustomMapLegend';
27
+ export { CustomMapLegendPanelFactory } from './components/CustomMapLegendPanel';
28
+ export { CustomAddDataButtonFactory, CustomPanelTitleFactory, } from './components/KeplerInjector';
23
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,YAAY,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAC3E,YAAY,EAAC,WAAW,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAA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CAAC;AACjE,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,YAAY,EAAC,oBAAoB,EAAC,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAIpE,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAC,8BAA8B,EAAC,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAC,8BAA8B,EAAC,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAC,sBAAsB,EAAC,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -2,19 +2,25 @@
2
2
  * {@include ../README.md}
3
3
  * @packageDocumentation
4
4
  */
5
- export { createKeplerSlice, useStoreWithKepler, createDefaultKeplerConfig, } from './KeplerSlice';
6
- export { KeplerMapContainer } from './components/KeplerMapContainer';
7
- export { KeplerSidePanels } from './components/KeplerSidePanels';
8
- export { KeplerAddTileSetDialog } from './components/KeplerAddTileSetDialog';
9
- export { KeplerAddDataDialog } from './components/KeplerAddDataDialog';
5
+ export { createDefaultKeplerConfig, createKeplerSlice, useStoreWithKepler, } from './KeplerSlice';
10
6
  export { FileDropInput } from './components/FileDropInput';
11
- export { KeplerS3Browser } from './components/KeplerS3Browser';
7
+ export { KeplerAddDataDialog } from './components/KeplerAddDataDialog';
8
+ export { KeplerAddTileSetDialog } from './components/KeplerAddTileSetDialog';
9
+ export { KeplerImageExport } from './components/KeplerImageExport';
10
+ export { configureKeplerInjector, KeplerInjector, getKeplerFactory, getKeplerInjector, resetKeplerInjectorRecipes, } from './components/KeplerInjector';
11
+ export { KeplerMapContainer } from './components/KeplerMapContainer';
12
+ export { KeplerPlotContainer } from './components/KeplerPlotContainer';
12
13
  export { KeplerProvider } from './components/KeplerProvider';
14
+ export { KeplerS3Browser } from './components/KeplerS3Browser';
15
+ export { KeplerSidePanels } from './components/KeplerSidePanels';
13
16
  export { useKeplerStateActions } from './hooks/useKeplerStateActions';
14
- export { KeplerPlotContainer } from './components/KeplerPlotContainer';
15
- export { KeplerImageExport } from './components/KeplerImageExport';
16
- export { configureKeplerInjector, resetKeplerInjectorRecipes, getKeplerInjector, getKeplerFactory, } from './components/KeplerInjector';
17
17
  // Re-export from @sqlrooms/kepler-config
18
18
  // Values also export their corresponding types automatically (Zod pattern)
19
19
  export { KeplerMapSchema, KeplerSliceConfig } from '@sqlrooms/kepler-config';
20
+ export { CustomDndContextFactory } from './components/CustomDndContext';
21
+ export { CustomFilterPanelHeaderFactory } from './components/CustomFilterPanelHeader';
22
+ export { CustomMapControlTooltipFactory } from './components/CustomMapControlTooltipFactory';
23
+ export { CustomMapLegendFactory } from './components/CustomMapLegend';
24
+ export { CustomMapLegendPanelFactory } from './components/CustomMapLegendPanel';
25
+ export { CustomAddDataButtonFactory, CustomPanelTitleFactory, } from './components/KeplerInjector';
20
26
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAKrE,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAMrC,yCAAyC;AACzC,2EAA2E;AAC3E,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport {\n createKeplerSlice,\n useStoreWithKepler,\n createDefaultKeplerConfig,\n} from './KeplerSlice';\nexport type {KeplerSliceState} from './KeplerSlice';\n\nexport {KeplerMapContainer} from './components/KeplerMapContainer';\nexport {KeplerSidePanels} from './components/KeplerSidePanels';\nexport {KeplerAddTileSetDialog} from './components/KeplerAddTileSetDialog';\nexport type {LoadTileSet} from './components/KeplerAddTileSetDialog';\nexport {KeplerAddDataDialog} from './components/KeplerAddDataDialog';\nexport type {\n KeplerAddDataDialogProps,\n AddDataMethods,\n} from './components/KeplerAddDataDialog';\nexport {FileDropInput} from './components/FileDropInput';\nexport {KeplerS3Browser} from './components/KeplerS3Browser';\nexport type {KeplerS3BrowserProps} from './components/KeplerS3Browser';\nexport {KeplerProvider} from './components/KeplerProvider';\nexport {useKeplerStateActions} from './hooks/useKeplerStateActions';\nexport {KeplerPlotContainer} from './components/KeplerPlotContainer';\nexport {KeplerImageExport} from './components/KeplerImageExport';\nexport {\n configureKeplerInjector,\n resetKeplerInjectorRecipes,\n getKeplerInjector,\n getKeplerFactory,\n} from './components/KeplerInjector';\nexport type {\n KeplerFactoryRecipe,\n KeplerFactoryRecipeMode,\n} from './components/KeplerInjector';\n\n// Re-export from @sqlrooms/kepler-config\n// Values also export their corresponding types automatically (Zod pattern)\nexport {KeplerMapSchema, KeplerSliceConfig} from '@sqlrooms/kepler-config';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAKrE,OAAO,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAEpE,yCAAyC;AACzC,2EAA2E;AAC3E,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAC,8BAA8B,EAAC,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAC,8BAA8B,EAAC,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAC,sBAAsB,EAAC,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,6BAA6B,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport {\n createDefaultKeplerConfig,\n createKeplerSlice,\n useStoreWithKepler,\n} from './KeplerSlice';\nexport type {KeplerSliceState} from './KeplerSlice';\n\nexport {FileDropInput} from './components/FileDropInput';\nexport {KeplerAddDataDialog} from './components/KeplerAddDataDialog';\nexport type {\n AddDataMethods,\n KeplerAddDataDialogProps,\n} from './components/KeplerAddDataDialog';\nexport {KeplerAddTileSetDialog} from './components/KeplerAddTileSetDialog';\nexport type {LoadTileSet} from './components/KeplerAddTileSetDialog';\nexport {KeplerImageExport} from './components/KeplerImageExport';\nexport {\n configureKeplerInjector,\n KeplerInjector,\n getKeplerFactory,\n getKeplerInjector,\n resetKeplerInjectorRecipes,\n} from './components/KeplerInjector';\nexport type {\n KeplerFactoryRecipe,\n KeplerFactoryRecipeMode,\n} from './components/KeplerInjector';\nexport {KeplerMapContainer} from './components/KeplerMapContainer';\nexport {KeplerPlotContainer} from './components/KeplerPlotContainer';\nexport {KeplerProvider} from './components/KeplerProvider';\nexport {KeplerS3Browser} from './components/KeplerS3Browser';\nexport type {KeplerS3BrowserProps} from './components/KeplerS3Browser';\nexport {KeplerSidePanels} from './components/KeplerSidePanels';\nexport {useKeplerStateActions} from './hooks/useKeplerStateActions';\n\n// Re-export from @sqlrooms/kepler-config\n// Values also export their corresponding types automatically (Zod pattern)\nexport {KeplerMapSchema, KeplerSliceConfig} from '@sqlrooms/kepler-config';\n\nexport {CustomDndContextFactory} from './components/CustomDndContext';\nexport {CustomFilterPanelHeaderFactory} from './components/CustomFilterPanelHeader';\nexport {CustomMapControlTooltipFactory} from './components/CustomMapControlTooltipFactory';\nexport {CustomMapLegendFactory} from './components/CustomMapLegend';\nexport {CustomMapLegendPanelFactory} from './components/CustomMapLegendPanel';\nexport {\n CustomAddDataButtonFactory,\n CustomPanelTitleFactory,\n} from './components/KeplerInjector';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/kepler",
3
- "version": "0.27.0-rc.3",
3
+ "version": "0.27.0-rc.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -34,11 +34,11 @@
34
34
  "@kepler.gl/types": "3.2.4",
35
35
  "@kepler.gl/utils": "3.2.4",
36
36
  "@paralleldrive/cuid2": "^3.0.0",
37
- "@sqlrooms/duckdb": "0.27.0-rc.3",
38
- "@sqlrooms/kepler-config": "0.27.0-rc.3",
39
- "@sqlrooms/room-shell": "0.27.0-rc.3",
40
- "@sqlrooms/s3-browser": "0.27.0-rc.3",
41
- "@sqlrooms/ui": "0.27.0-rc.3",
37
+ "@sqlrooms/duckdb": "0.27.0-rc.4",
38
+ "@sqlrooms/kepler-config": "0.27.0-rc.4",
39
+ "@sqlrooms/room-shell": "0.27.0-rc.4",
40
+ "@sqlrooms/s3-browser": "0.27.0-rc.4",
41
+ "@sqlrooms/ui": "0.27.0-rc.4",
42
42
  "apache-arrow": "17.0.0",
43
43
  "immer": "^11.0.1",
44
44
  "lucide-react": "^0.556.0",
@@ -62,5 +62,5 @@
62
62
  "devDependencies": {
63
63
  "@types/redux-logger": "^3.0.13"
64
64
  },
65
- "gitHead": "41dabd4b989c2c15d9aed822714aae869a31197e"
65
+ "gitHead": "892408d49720d1fb195308029674894ae059969d"
66
66
  }