@lattice-php/lattice 0.49.0 → 0.51.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 (40) hide show
  1. package/dist/effects/use-flash-effects.d.ts +5 -0
  2. package/dist/effects/use-flash-effects.js +22 -0
  3. package/dist/effects/use-flash-effects.js.map +1 -0
  4. package/dist/inertia-navigation.d.ts +9 -0
  5. package/dist/inertia-navigation.js +33 -0
  6. package/dist/inertia-navigation.js.map +1 -0
  7. package/dist/provider-base.js +14 -9
  8. package/dist/provider-base.js.map +1 -1
  9. package/dist/registry.d.ts +1 -1
  10. package/dist/registry.js +2 -1
  11. package/dist/registry.js.map +1 -1
  12. package/dist/runtime.d.ts +3 -1
  13. package/dist/runtime.js +4 -2
  14. package/dist/types/generated.d.ts +2 -1
  15. package/dist-standalone/chunks/{chart-view-6ohg4jIl.js → chart-view-7uSaRy0z.js} +17 -17
  16. package/dist-standalone/chunks/date-picker-field-BhEHDCJ1.js +1 -0
  17. package/dist-standalone/chunks/field-HgRGTmPZ.js +1 -0
  18. package/dist-standalone/chunks/{floating-ui.dom-CO6FyQ6K.js → floating-ui.dom-DRSJZ5ii.js} +1 -1
  19. package/dist-standalone/chunks/{input-DAZtm5hT.js → input-C-Wm1w0g.js} +1 -1
  20. package/dist-standalone/chunks/rich-editor-field-D76kQ6Fe.js +53 -0
  21. package/dist-standalone/chunks/runtime-BxB5Ladg.js +163 -0
  22. package/dist-standalone/chunks/subscriptions-Cr5l3mYJ.js +1 -0
  23. package/dist-standalone/lattice.js +1 -1
  24. package/dist-standalone/manifest.json +1 -1
  25. package/dist-standalone/runtime.js +1 -1
  26. package/package.json +13 -15
  27. package/dist-standalone/chunks/badge-oZDK5bxm.js +0 -1
  28. package/dist-standalone/chunks/date-picker-field-BrrRwWr6.js +0 -1
  29. package/dist-standalone/chunks/debounce-CBXrtDuZ.js +0 -1
  30. package/dist-standalone/chunks/dist-DbKexmtw.js +0 -97
  31. package/dist-standalone/chunks/field-DXT9pxYV.js +0 -1
  32. package/dist-standalone/chunks/page-props-DZ15iP5k.js +0 -1
  33. package/dist-standalone/chunks/rich-editor-field-B9ClQBQd.js +0 -53
  34. package/dist-standalone/chunks/runtime-f-HTYT36.js +0 -27
  35. package/dist-standalone/chunks/subscriptions-WYT4UqqY.js +0 -1
  36. package/dist-standalone/chunks/time-picker-CMZqQpOJ.js +0 -1
  37. package/dist-standalone/chunks/toolbar-button-DUDNmNDx.js +0 -1
  38. package/dist-standalone/chunks/translatable-D6DlHH6Q.js +0 -1
  39. package/dist-standalone/chunks/use-dependent-field-zJUDiN2l.js +0 -41
  40. package/dist-standalone/chunks/value-BlD987Uz.js +0 -1
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each
3
+ * Inertia navigation and runs the effects through the registry dispatcher.
4
+ */
5
+ export declare function useFlashEffects(): void;
@@ -0,0 +1,22 @@
1
+ import { router } from "@inertiajs/react";
2
+ import { useEffect } from "react";
3
+ import { getActionEffects } from "@lattice-php/ui/effects/dispatch";
4
+ import { useEffectDispatcher } from "@lattice-php/ui/effects/use-effect-dispatcher";
5
+ //#region resources/js/effects/use-flash-effects.ts
6
+ /**
7
+ * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each
8
+ * Inertia navigation and runs the effects through the registry dispatcher.
9
+ */
10
+ function useFlashEffects() {
11
+ const dispatch = useEffectDispatcher();
12
+ useEffect(() => {
13
+ return router.on("flash", (event) => {
14
+ const effects = getActionEffects(event.detail?.flash?.latticeEffects);
15
+ if (effects.length > 0) dispatch(effects);
16
+ });
17
+ }, [dispatch]);
18
+ }
19
+ //#endregion
20
+ export { useFlashEffects };
21
+
22
+ //# sourceMappingURL=use-flash-effects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-flash-effects.js","names":[],"sources":["../../resources/js/effects/use-flash-effects.ts"],"sourcesContent":["import { router } from \"@inertiajs/react\";\nimport { useEffect } from \"react\";\nimport { getActionEffects } from \"@lattice-php/ui/effects/dispatch\";\nimport { useEffectDispatcher } from \"@lattice-php/ui/effects/use-effect-dispatcher\";\n\ntype InertiaFlashEvent = CustomEvent<{\n flash?: {\n latticeEffects?: unknown;\n };\n}>;\n\n/**\n * Drains the `latticeEffects` flash bag (server `Effects::flash(...)`) on each\n * Inertia navigation and runs the effects through the registry dispatcher.\n */\nexport function useFlashEffects(): void {\n const dispatch = useEffectDispatcher();\n\n useEffect(() => {\n return router.on(\"flash\", (event) => {\n const effects = getActionEffects((event as InertiaFlashEvent).detail?.flash?.latticeEffects);\n\n if (effects.length > 0) {\n dispatch(effects);\n }\n });\n }, [dispatch]);\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,kBAAwB;CACtC,MAAM,WAAW,oBAAoB;CAErC,gBAAgB;EACd,OAAO,OAAO,GAAG,UAAU,UAAU;GACnC,MAAM,UAAU,iBAAkB,MAA4B,QAAQ,OAAO,cAAc;GAE3F,IAAI,QAAQ,SAAS,GACnB,SAAS,OAAO;EAEpB,CAAC;CACH,GAAG,CAAC,QAAQ,CAAC;AACf"}
@@ -0,0 +1,9 @@
1
+ import { Plugin } from '@lattice-php/core/registry';
2
+ import { NavigationAdapter } from '@lattice-php/ui/navigation';
3
+ export declare const inertiaNavigation: NavigationAdapter;
4
+ /**
5
+ * SPA-grade redirect/reload effect handlers. Registered as an effects
6
+ * extension so they override ui's window-based built-ins wherever the
7
+ * framework registry is active.
8
+ */
9
+ export declare const navigationPlugin: Plugin;
@@ -0,0 +1,33 @@
1
+ import { Link, router } from "@inertiajs/react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { effectHandler } from "@lattice-php/ui/effects/registry";
4
+ //#region resources/js/inertia-navigation.tsx
5
+ function InertiaLink({ href, method = "get", children, ...props }) {
6
+ return /* @__PURE__ */ jsx(Link, {
7
+ href,
8
+ method,
9
+ ...props,
10
+ children
11
+ });
12
+ }
13
+ var inertiaNavigation = {
14
+ Link: InertiaLink,
15
+ visit: (url, options) => router.visit(url, options),
16
+ reload: () => router.reload()
17
+ };
18
+ /**
19
+ * SPA-grade redirect/reload effect handlers. Registered as an effects
20
+ * extension so they override ui's window-based built-ins wherever the
21
+ * framework registry is active.
22
+ */
23
+ var navigationPlugin = {
24
+ name: "lattice/navigation",
25
+ extensions: { effects: {
26
+ redirect: effectHandler("redirect", (effect) => router.visit(effect.props.url)),
27
+ "reload-page": effectHandler("reload-page", (effect) => effect.props.full ? window.location.reload() : router.reload())
28
+ } }
29
+ };
30
+ //#endregion
31
+ export { inertiaNavigation, navigationPlugin };
32
+
33
+ //# sourceMappingURL=inertia-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inertia-navigation.js","names":[],"sources":["../resources/js/inertia-navigation.tsx"],"sourcesContent":["import { Link, router } from \"@inertiajs/react\";\nimport type { Plugin } from \"@lattice-php/core/registry\";\nimport { effectHandler } from \"@lattice-php/ui/effects/registry\";\nimport type { NavigationAdapter, NavLinkProps } from \"@lattice-php/ui/navigation\";\nimport type { ComponentProps } from \"react\";\n\nfunction InertiaLink({ href, method = \"get\", children, ...props }: NavLinkProps) {\n // NavLinkProps types handlers against HTMLAnchorElement; Inertia's Link\n // types them against Element. Same events at runtime, so the cast only\n // bridges React's generic variance.\n return (\n <Link href={href} method={method} {...(props as ComponentProps<typeof Link>)}>\n {children}\n </Link>\n );\n}\n\nexport const inertiaNavigation: NavigationAdapter = {\n Link: InertiaLink,\n visit: (url, options) => router.visit(url, options),\n reload: () => router.reload(),\n};\n\n/**\n * SPA-grade redirect/reload effect handlers. Registered as an effects\n * extension so they override ui's window-based built-ins wherever the\n * framework registry is active.\n */\nexport const navigationPlugin: Plugin = {\n name: \"lattice/navigation\",\n extensions: {\n effects: {\n redirect: effectHandler(\"redirect\", (effect) => router.visit(effect.props.url)),\n \"reload-page\": effectHandler(\"reload-page\", (effect) =>\n effect.props.full ? window.location.reload() : router.reload(),\n ),\n },\n },\n};\n"],"mappings":";;;;AAMA,SAAS,YAAY,EAAE,MAAM,SAAS,OAAO,UAAU,GAAG,SAAuB;CAI/E,OACE,oBAAC,MAAD;EAAY;EAAc;EAAQ,GAAK;EACpC;CACG,CAAA;AAEV;AAEA,IAAa,oBAAuC;CAClD,MAAM;CACN,QAAQ,KAAK,YAAY,OAAO,MAAM,KAAK,OAAO;CAClD,cAAc,OAAO,OAAO;AAC9B;;;;;;AAOA,IAAa,mBAA2B;CACtC,MAAM;CACN,YAAY,EACV,SAAS;EACP,UAAU,cAAc,aAAa,WAAW,OAAO,MAAM,OAAO,MAAM,GAAG,CAAC;EAC9E,eAAe,cAAc,gBAAgB,WAC3C,OAAO,MAAM,OAAO,OAAO,SAAS,OAAO,IAAI,OAAO,OAAO,CAC/D;CACF,EACF;AACF"}
@@ -1,10 +1,12 @@
1
1
  import { updateAppearance } from "./appearance/index.js";
2
2
  import { Toaster } from "./toast/toaster.js";
3
+ import { useFlashEffects } from "./effects/use-flash-effects.js";
3
4
  import { EventBridge } from "./event-bridge.js";
5
+ import { inertiaNavigation } from "./inertia-navigation.js";
4
6
  import { RegistryContext } from "@lattice-php/core/registry-context";
5
7
  import { jsx, jsxs } from "react/jsx-runtime";
6
8
  import { ActionInteractionProvider } from "@lattice-php/action/components/action-trigger-provider";
7
- import { useFlashEffects } from "@lattice-php/ui/effects/use-flash-effects";
9
+ import { NavigationProvider } from "@lattice-php/ui/navigation";
8
10
  import { SpriteProvider } from "@lattice-php/ui/icons/sprite";
9
11
  //#region resources/js/provider-base.tsx
10
12
  var defaultSprite = { href: "" };
@@ -12,14 +14,17 @@ function ProviderBase({ children, registry, sprite = defaultSprite, toaster = tr
12
14
  useFlashEffects();
13
15
  return /* @__PURE__ */ jsx(RegistryContext.Provider, {
14
16
  value: registry,
15
- children: /* @__PURE__ */ jsx(ActionInteractionProvider, { children: /* @__PURE__ */ jsxs(SpriteProvider, {
16
- sprite,
17
- children: [
18
- children,
19
- /* @__PURE__ */ jsx(EventBridge, { onAppearanceChange: updateAppearance }),
20
- toaster ? /* @__PURE__ */ jsx(Toaster, {}) : null
21
- ]
22
- }) })
17
+ children: /* @__PURE__ */ jsx(NavigationProvider, {
18
+ adapter: inertiaNavigation,
19
+ children: /* @__PURE__ */ jsx(ActionInteractionProvider, { children: /* @__PURE__ */ jsxs(SpriteProvider, {
20
+ sprite,
21
+ children: [
22
+ children,
23
+ /* @__PURE__ */ jsx(EventBridge, { onAppearanceChange: updateAppearance }),
24
+ toaster ? /* @__PURE__ */ jsx(Toaster, {}) : null
25
+ ]
26
+ }) })
27
+ })
23
28
  });
24
29
  }
25
30
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"provider-base.js","names":[],"sources":["../resources/js/provider-base.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ActionInteractionProvider } from \"@lattice-php/action/components/action-trigger-provider\";\nimport type { Registry } from \"@lattice-php/core/registry\";\nimport { RegistryContext } from \"@lattice-php/core/registry-context\";\nimport { useFlashEffects } from \"@lattice-php/ui/effects/use-flash-effects\";\nimport { EventBridge } from \"./event-bridge\";\nimport type { SpriteValue } from \"@lattice-php/ui/icons/sprite\";\nimport { SpriteProvider } from \"@lattice-php/ui/icons/sprite\";\nimport { Toaster } from \"./toast\";\nimport { updateAppearance } from \"./appearance\";\n\nconst defaultSprite: SpriteValue = { href: \"\" };\n\nexport type ProviderBaseProps = {\n children: ReactNode;\n registry: Registry;\n sprite?: SpriteValue;\n toaster?: boolean;\n};\n\nexport function ProviderBase({\n children,\n registry,\n sprite = defaultSprite,\n toaster = true,\n}: ProviderBaseProps) {\n useFlashEffects();\n\n return (\n <RegistryContext.Provider value={registry}>\n <ActionInteractionProvider>\n <SpriteProvider sprite={sprite}>\n {children}\n <EventBridge onAppearanceChange={updateAppearance} />\n {toaster ? <Toaster /> : null}\n </SpriteProvider>\n </ActionInteractionProvider>\n </RegistryContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAWA,IAAM,gBAA6B,EAAE,MAAM,GAAG;AAS9C,SAAgB,aAAa,EAC3B,UACA,UACA,SAAS,eACT,UAAU,QACU;CACpB,gBAAgB;CAEhB,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;EAC/B,UAAA,oBAAC,2BAAD,EAAA,UACE,qBAAC,gBAAD;GAAwB;GAAxB,UAAA;IACG;IACD,oBAAC,aAAD,EAAa,oBAAoB,iBAAmB,CAAA;IACnD,UAAU,oBAAC,SAAD,CAAU,CAAA,IAAI;GACX;EACS,CAAA,EAAA,CAAA;CACH,CAAA;AAE9B"}
1
+ {"version":3,"file":"provider-base.js","names":[],"sources":["../resources/js/provider-base.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ActionInteractionProvider } from \"@lattice-php/action/components/action-trigger-provider\";\nimport type { Registry } from \"@lattice-php/core/registry\";\nimport { RegistryContext } from \"@lattice-php/core/registry-context\";\nimport { useFlashEffects } from \"./effects/use-flash-effects\";\nimport { NavigationProvider } from \"@lattice-php/ui/navigation\";\nimport { EventBridge } from \"./event-bridge\";\nimport { inertiaNavigation } from \"./inertia-navigation\";\nimport type { SpriteValue } from \"@lattice-php/ui/icons/sprite\";\nimport { SpriteProvider } from \"@lattice-php/ui/icons/sprite\";\nimport { Toaster } from \"./toast\";\nimport { updateAppearance } from \"./appearance\";\n\nconst defaultSprite: SpriteValue = { href: \"\" };\n\nexport type ProviderBaseProps = {\n children: ReactNode;\n registry: Registry;\n sprite?: SpriteValue;\n toaster?: boolean;\n};\n\nexport function ProviderBase({\n children,\n registry,\n sprite = defaultSprite,\n toaster = true,\n}: ProviderBaseProps) {\n useFlashEffects();\n\n return (\n <RegistryContext.Provider value={registry}>\n <NavigationProvider adapter={inertiaNavigation}>\n <ActionInteractionProvider>\n <SpriteProvider sprite={sprite}>\n {children}\n <EventBridge onAppearanceChange={updateAppearance} />\n {toaster ? <Toaster /> : null}\n </SpriteProvider>\n </ActionInteractionProvider>\n </NavigationProvider>\n </RegistryContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAM,gBAA6B,EAAE,MAAM,GAAG;AAS9C,SAAgB,aAAa,EAC3B,UACA,UACA,SAAS,eACT,UAAU,QACU;CACpB,gBAAgB;CAEhB,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;EAC/B,UAAA,oBAAC,oBAAD;GAAoB,SAAS;GAC3B,UAAA,oBAAC,2BAAD,EAAA,UACE,qBAAC,gBAAD;IAAwB;IAAxB,UAAA;KACG;KACD,oBAAC,aAAD,EAAa,oBAAoB,iBAAmB,CAAA;KACnD,UAAU,oBAAC,SAAD,CAAU,CAAA,IAAI;IACX;GACS,CAAA,EAAA,CAAA;EACT,CAAA;CACI,CAAA;AAE9B"}
@@ -1,5 +1,5 @@
1
1
  import { ActionNodeType, ChatNodeType, FormNodeType, FragmentNodeType, LayoutNodeType, NodeType, NotificationNodeType, RemoteNodeType, TableNodeType, UiNodeType } from './types/generated.js';
2
- type OptInNodeType = "api-reference" | "media.library" | "signature" | "timeline" | "tree";
2
+ type OptInNodeType = "api-reference" | "media.library" | "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results" | "signature" | "timeline" | "tree";
3
3
  type RegisteredNodeType = ActionNodeType | ChatNodeType | FormNodeType | FragmentNodeType | LayoutNodeType | NotificationNodeType | OptInNodeType | RemoteNodeType | TableNodeType | UiNodeType;
4
4
  type Assert<T extends true> = T;
5
5
  export type AllNodeTypesRegistered = Assert<Exclude<NodeType, RegisteredNodeType> extends never ? true : false>;
package/dist/registry.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { layoutComponents } from "./layout/plugin.js";
2
+ import { navigationPlugin } from "./inertia-navigation.js";
2
3
  import { chatComponents } from "./chat/plugin.js";
3
4
  import { fragmentComponents } from "./fragments/plugin.js";
4
5
  import { notificationsComponents } from "./notifications/plugin.js";
@@ -9,7 +10,7 @@ import { formComponents } from "@lattice-php/form";
9
10
  import { tableComponents } from "@lattice-php/table";
10
11
  import { uiComponents } from "@lattice-php/ui";
11
12
  //#region resources/js/registry.ts
12
- var registry = createRegistry(uiComponents, fragmentComponents, actionComponents, formComponents, layoutComponents, tableComponents, chatComponents, notificationsComponents, remoteComponents);
13
+ var registry = createRegistry(uiComponents, fragmentComponents, actionComponents, formComponents, layoutComponents, tableComponents, chatComponents, notificationsComponents, remoteComponents, navigationPlugin);
13
14
  //#endregion
14
15
  export { registry };
15
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","names":[],"sources":["../resources/js/registry.ts"],"sourcesContent":["import { createRegistry } from \"@lattice-php/core/registry\";\nimport type {\n ActionNodeType,\n ChatNodeType,\n FormNodeType,\n FragmentNodeType,\n LayoutNodeType,\n NodeType,\n NotificationNodeType,\n RemoteNodeType,\n TableNodeType,\n UiNodeType,\n} from \"@lattice-php/lattice/types/generated\";\nimport { actionComponents } from \"@lattice-php/action/plugin\";\nimport { chatComponents } from \"./chat/plugin\";\nimport { formComponents } from \"@lattice-php/form\";\nimport { fragmentComponents } from \"./fragments/plugin\";\nimport { layoutComponents } from \"./layout/plugin\";\nimport { notificationsComponents } from \"./notifications/plugin\";\nimport { remoteComponents } from \"./remote/plugin\";\nimport { tableComponents } from \"@lattice-php/table\";\nimport { uiComponents } from \"@lattice-php/ui\";\n\n// Opt-in packages whose plugins are not bundled in the framework registry —\n// a consuming app registers them itself when it opts into the package.\n// WireModelBuilder::buildAll() still discovers them for the framework\n// document's system-wide NodeType (every composer package that declares\n// extra.lattice.discover, not just the ones this workbench emits a module\n// for), so their node types are legitimately part of it and are acknowledged\n// here rather than belonging to a registered plugin's union.\ntype OptInNodeType = \"api-reference\" | \"media.library\" | \"signature\" | \"timeline\" | \"tree\";\n\n// Compile-time totality: every generated NodeType must belong to a registered\n// plugin's union, or be an acknowledged opt-in package above. A new PHP\n// domain fails here until its plugin exists (or it's added to the opt-in list).\ntype RegisteredNodeType =\n | ActionNodeType\n | ChatNodeType\n | FormNodeType\n | FragmentNodeType\n | LayoutNodeType\n | NotificationNodeType\n | OptInNodeType\n | RemoteNodeType\n | TableNodeType\n | UiNodeType;\ntype Assert<T extends true> = T;\nexport type AllNodeTypesRegistered = Assert<\n Exclude<NodeType, RegisteredNodeType> extends never ? true : false\n>;\n\nexport const registry = createRegistry(\n uiComponents,\n fragmentComponents,\n actionComponents,\n formComponents,\n layoutComponents,\n tableComponents,\n chatComponents,\n notificationsComponents,\n remoteComponents,\n);\n"],"mappings":";;;;;;;;;;;AAmDA,IAAa,WAAW,eACtB,cACA,oBACA,kBACA,gBACA,kBACA,iBACA,gBACA,yBACA,gBACF"}
1
+ {"version":3,"file":"registry.js","names":[],"sources":["../resources/js/registry.ts"],"sourcesContent":["import { createRegistry } from \"@lattice-php/core/registry\";\nimport { navigationPlugin } from \"./inertia-navigation\";\nimport type {\n ActionNodeType,\n ChatNodeType,\n FormNodeType,\n FragmentNodeType,\n LayoutNodeType,\n NodeType,\n NotificationNodeType,\n RemoteNodeType,\n TableNodeType,\n UiNodeType,\n} from \"@lattice-php/lattice/types/generated\";\nimport { actionComponents } from \"@lattice-php/action/plugin\";\nimport { chatComponents } from \"./chat/plugin\";\nimport { formComponents } from \"@lattice-php/form\";\nimport { fragmentComponents } from \"./fragments/plugin\";\nimport { layoutComponents } from \"./layout/plugin\";\nimport { notificationsComponents } from \"./notifications/plugin\";\nimport { remoteComponents } from \"./remote/plugin\";\nimport { tableComponents } from \"@lattice-php/table\";\nimport { uiComponents } from \"@lattice-php/ui\";\n\n// Opt-in packages whose plugins are not bundled in the framework registry —\n// a consuming app registers them itself when it opts into the package.\n// WireModelBuilder::buildAll() still discovers them for the framework\n// document's system-wide NodeType (every composer package that declares\n// extra.lattice.discover, not just the ones this workbench emits a module\n// for), so their node types are legitimately part of it and are acknowledged\n// here rather than belonging to a registered plugin's union.\ntype OptInNodeType =\n | \"api-reference\"\n | \"media.library\"\n | \"search.box\"\n | \"search.categories\"\n | \"search.input\"\n | \"search.preview\"\n | \"search.recent\"\n | \"search.results\"\n | \"signature\"\n | \"timeline\"\n | \"tree\";\n\n// Compile-time totality: every generated NodeType must belong to a registered\n// plugin's union, or be an acknowledged opt-in package above. A new PHP\n// domain fails here until its plugin exists (or it's added to the opt-in list).\ntype RegisteredNodeType =\n | ActionNodeType\n | ChatNodeType\n | FormNodeType\n | FragmentNodeType\n | LayoutNodeType\n | NotificationNodeType\n | OptInNodeType\n | RemoteNodeType\n | TableNodeType\n | UiNodeType;\ntype Assert<T extends true> = T;\nexport type AllNodeTypesRegistered = Assert<\n Exclude<NodeType, RegisteredNodeType> extends never ? true : false\n>;\n\nexport const registry = createRegistry(\n uiComponents,\n fragmentComponents,\n actionComponents,\n formComponents,\n layoutComponents,\n tableComponents,\n chatComponents,\n notificationsComponents,\n remoteComponents,\n navigationPlugin,\n);\n"],"mappings":";;;;;;;;;;;;AA+DA,IAAa,WAAW,eACtB,cACA,oBACA,kBACA,gBACA,kBACA,iBACA,gBACA,yBACA,kBACA,gBACF"}
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './index.js';
2
2
  export { router } from '@inertiajs/react';
3
+ export { inertiaNavigation, navigationPlugin } from './inertia-navigation.js';
4
+ export { defaultNavigation, NavigationProvider, useNavigation } from '@lattice-php/ui/navigation';
3
5
  export { runAction } from '@lattice-php/action';
4
6
  export { apiFetch, apiJson, setRefRefreshEndpoint, xsrfToken } from '@lattice-php/core/api';
5
7
  export { RenderNode } from '@lattice-php/core/renderer';
@@ -11,7 +13,7 @@ export * from '@lattice-php/form/toolkit';
11
13
  export { useTable } from '@lattice-php/table/hooks/use-table';
12
14
  export { useTableSelection } from '@lattice-php/table/hooks/use-table-selection';
13
15
  export { getBulkActions } from '@lattice-php/table/lib/bulk';
14
- export { Button, Checkbox, cn, ConfirmDialog, Dialog, DialogContent, DialogHeader, formatDateValue, IconButton, Input, Label, NativeSelect, PreviewableImage, useDebouncedCallback, useFormatContext, usePersistentState, } from '@lattice-php/ui';
16
+ export { Badge, Button, Checkbox, cn, CodeBlock, Combobox, ConfirmDialog, CopyButton, Dialog, DialogContent, DialogHeader, formatDateValue, IconButton, InfoTooltip, Input, Label, NativeSelect, PreviewableImage, SegmentedPills, Spinner, Textarea, useDebouncedCallback, useFormatContext, usePersistentState, } from '@lattice-php/ui';
15
17
  export * from '@lattice-php/ui/i18n';
16
18
  export { announce, attachTreeItemInstruction, combine, draggable, dropTargetForElements, extractTreeItemInstruction, } from './dnd/index.js';
17
19
  export type { Variant } from './toast/index.js';
package/dist/runtime.js CHANGED
@@ -9,6 +9,7 @@ import SchemaLayout from "./layout/components/schema-layout.js";
9
9
  import { RealtimeListeners } from "./realtime/listeners.js";
10
10
  import { createLayoutResolver, createPageResolver, pageComponentName, withVisitHeaders } from "./inertia.js";
11
11
  import { EventBridge } from "./event-bridge.js";
12
+ import { inertiaNavigation, navigationPlugin } from "./inertia-navigation.js";
12
13
  import { useChat } from "./chat/hooks/use-chat.js";
13
14
  import { chatComponents } from "./chat/plugin.js";
14
15
  import { registry } from "./registry.js";
@@ -20,7 +21,8 @@ import { router } from "@inertiajs/react";
20
21
  import { apiFetch, apiJson, setRefRefreshEndpoint, xsrfToken } from "@lattice-php/core/api";
21
22
  import { RenderNode } from "@lattice-php/core/renderer";
22
23
  import { nodeIdentity } from "@lattice-php/core/test-id";
23
- import { Button, Checkbox, ConfirmDialog, Dialog, DialogContent, DialogHeader, IconButton, Input, Label, NativeSelect, PreviewableImage, cn, formatDateValue, useDebouncedCallback, useFormatContext, usePersistentState } from "@lattice-php/ui";
24
+ import { NavigationProvider, defaultNavigation, useNavigation } from "@lattice-php/ui/navigation";
25
+ import { Badge, Button, Checkbox, CodeBlock, Combobox, ConfirmDialog, CopyButton, Dialog, DialogContent, DialogHeader, IconButton, InfoTooltip, Input, Label, NativeSelect, PreviewableImage, SegmentedPills, Spinner, Textarea, cn, formatDateValue, useDebouncedCallback, useFormatContext, usePersistentState } from "@lattice-php/ui";
24
26
  import { runAction } from "@lattice-php/action";
25
27
  import { requestSignedUpload, xhrTransfer } from "@lattice-php/core/upload";
26
28
  import { SimpleField } from "@lattice-php/form/components/fields/simple-field";
@@ -30,4 +32,4 @@ import { useTableSelection } from "@lattice-php/table/hooks/use-table-selection"
30
32
  import { getBulkActions } from "@lattice-php/table/lib/bulk";
31
33
  export * from "@lattice-php/ui/i18n";
32
34
  export * from "@lattice-php/form/toolkit";
33
- export { Button, Callouts, Checkbox, ConfirmDialog, Dialog, DialogContent, DialogHeader, EventBridge, Icon, IconButton, IconRenderer, IconRendererProvider, Input, LATTICE_EVENT, LATTICE_REF_HEADER, Label, NativeSelect, OutletContext, PreviewableImage, Provider, RICH_EDITOR_EXTENSION, RealtimeListeners, RenderNode, Renderer, SchemaLayout, SidebarCollapsedContext, SimpleField, SpriteProvider, Toaster, ToolbarIconButton, announce, apiFetch, apiJson, attachTreeItemInstruction, builtinEffectHandlers, chatComponents, cn, columnCell, combine, copyToClipboard, createLatticeApp, createLayoutResolver, createPageResolver, createRegistry, dispatchActionError, dispatchEffects, draggable, dropTargetForElements, eagerComponent, effectHandler, extendRegistry, extractTreeItemInstruction, formatDateValue, getActionEffects, getBulkActions, initializeAppearance, isActionEffect, layoutComponents, lazyComponent, loadPluginModules, mergeEffectHandlers, nodeIdentity, onCallout, onToast, pageComponentName, registry, requestSignedUpload, router, runAction, setRefRefreshEndpoint, updateAppearance, useAppearance, useChat, useColumnRegistry, useComponentRegistry, useDebouncedCallback, useEffectDispatcher, useFormatContext, usePersistentState, useSidebarCollapsed, useTable, useTableSelection, withHeaders, withRefHeader, withVisitHeaders, xhrTransfer, xsrfToken };
35
+ export { Badge, Button, Callouts, Checkbox, CodeBlock, Combobox, ConfirmDialog, CopyButton, Dialog, DialogContent, DialogHeader, EventBridge, Icon, IconButton, IconRenderer, IconRendererProvider, InfoTooltip, Input, LATTICE_EVENT, LATTICE_REF_HEADER, Label, NativeSelect, NavigationProvider, OutletContext, PreviewableImage, Provider, RICH_EDITOR_EXTENSION, RealtimeListeners, RenderNode, Renderer, SchemaLayout, SegmentedPills, SidebarCollapsedContext, SimpleField, Spinner, SpriteProvider, Textarea, Toaster, ToolbarIconButton, announce, apiFetch, apiJson, attachTreeItemInstruction, builtinEffectHandlers, chatComponents, cn, columnCell, combine, copyToClipboard, createLatticeApp, createLayoutResolver, createPageResolver, createRegistry, defaultNavigation, dispatchActionError, dispatchEffects, draggable, dropTargetForElements, eagerComponent, effectHandler, extendRegistry, extractTreeItemInstruction, formatDateValue, getActionEffects, getBulkActions, inertiaNavigation, initializeAppearance, isActionEffect, layoutComponents, lazyComponent, loadPluginModules, mergeEffectHandlers, navigationPlugin, nodeIdentity, onCallout, onToast, pageComponentName, registry, requestSignedUpload, router, runAction, setRefRefreshEndpoint, updateAppearance, useAppearance, useChat, useColumnRegistry, useComponentRegistry, useDebouncedCallback, useEffectDispatcher, useFormatContext, useNavigation, usePersistentState, useSidebarCollapsed, useTable, useTableSelection, withHeaders, withRefHeader, withVisitHeaders, xhrTransfer, xsrfToken };
@@ -93,7 +93,7 @@ export type MenuItem = {
93
93
  prefix: Affix | null;
94
94
  suffix: Affix | null;
95
95
  };
96
- export type NodeType = "action" | "action.bulk" | "action.group" | "api-reference" | "avatar" | "badge" | "breadcrumbs" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "code-block" | "collapsible" | "description-list" | "dropdown" | "entry.badge" | "entry.boolean" | "entry.component" | "entry.date" | "entry.text" | "field.builder" | "field.checkbox" | "field.choice" | "field.color-picker" | "field.date-input" | "field.date-time-input" | "field.file-upload" | "field.hidden-input" | "field.media-picker" | "field.number-input" | "field.otp" | "field.password-input" | "field.pattern-input" | "field.repeater" | "field.rich-editor" | "field.select" | "field.text-input" | "field.textarea" | "field.time-input" | "field.toggle" | "floating-panel" | "form" | "fragment" | "grid" | "heading" | "icon" | "image" | "link" | "media.library" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "progress" | "raw-block" | "remote.data-list" | "section" | "segmented-control" | "separator" | "sidebar" | "signature" | "stack" | "tab" | "table" | "tabs" | "text" | "timeline" | "tooltip" | "topbar" | "tree" | "wizard" | "wizard-step";
96
+ export type NodeType = "action" | "action.bulk" | "action.group" | "api-reference" | "avatar" | "badge" | "breadcrumbs" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "code-block" | "collapsible" | "description-list" | "dropdown" | "entry.badge" | "entry.boolean" | "entry.component" | "entry.date" | "entry.text" | "field.builder" | "field.checkbox" | "field.choice" | "field.color-picker" | "field.date-input" | "field.date-time-input" | "field.file-upload" | "field.hidden-input" | "field.media-picker" | "field.number-input" | "field.otp" | "field.password-input" | "field.pattern-input" | "field.repeater" | "field.rich-editor" | "field.select" | "field.text-input" | "field.textarea" | "field.time-input" | "field.toggle" | "floating-panel" | "form" | "fragment" | "grid" | "heading" | "icon" | "image" | "link" | "media.library" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "progress" | "raw-block" | "remote.data-list" | "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results" | "section" | "segmented-control" | "separator" | "sidebar" | "signature" | "stack" | "tab" | "table" | "tabs" | "text" | "timeline" | "tooltip" | "topbar" | "tree" | "wizard" | "wizard-step";
97
97
  export type NotificationItem = {
98
98
  readonly actions: Node[];
99
99
  readonly body: Translatable | string | null;
@@ -140,6 +140,7 @@ export type RemoteAccess = {
140
140
  readonly tokenEndpoint: string;
141
141
  };
142
142
  export type RemoteNodeType = "remote.data-list";
143
+ export type SearchNodeType = "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results";
143
144
  export type Sidebar = {
144
145
  collapsible: boolean;
145
146
  rememberState: boolean;