@lattice-php/lattice 0.51.0 → 0.53.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.
- package/dist/index.d.ts +0 -4
- package/dist/index.js +1 -3
- package/dist/layout/components/breadcrumbs.js +13 -10
- package/dist/layout/components/breadcrumbs.js.map +1 -1
- package/dist/layout/components/sidebar-footer.d.ts +3 -0
- package/dist/layout/components/sidebar-footer.js +12 -0
- package/dist/layout/components/sidebar-footer.js.map +1 -0
- package/dist/layout/plugin.js +2 -0
- package/dist/layout/plugin.js.map +1 -1
- package/dist/registry.d.ts +3 -3
- package/dist/registry.js +1 -2
- package/dist/registry.js.map +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +3 -3
- package/dist/types/generated.d.ts +6 -43
- package/dist-standalone/chunks/{chart-view-7uSaRy0z.js → chart-view-B0JDdw6X.js} +6 -6
- package/dist-standalone/chunks/{date-picker-field-BhEHDCJ1.js → date-picker-field-BQYBMkGH.js} +1 -1
- package/dist-standalone/chunks/{field-HgRGTmPZ.js → field-DUsnOq--.js} +1 -1
- package/dist-standalone/chunks/{rich-editor-field-D76kQ6Fe.js → rich-editor-field-DB0MCHzF.js} +2 -2
- package/dist-standalone/chunks/{runtime-BxB5Ladg.js → runtime-CqO6aLVU.js} +8 -9
- package/dist-standalone/chunks/{subscriptions-Cr5l3mYJ.js → subscriptions-Cg-Qrt0-.js} +1 -1
- package/dist-standalone/lattice.css +1 -1
- package/dist-standalone/lattice.js +1 -1
- package/dist-standalone/manifest.json +1 -1
- package/dist-standalone/runtime.js +1 -1
- package/package.json +6 -10
- package/dist/chat/components/chat-box.d.ts +0 -3
- package/dist/chat/components/chat-box.js +0 -72
- package/dist/chat/components/chat-box.js.map +0 -1
- package/dist/chat/components/message-list.d.ts +0 -5
- package/dist/chat/components/message-list.js +0 -22
- package/dist/chat/components/message-list.js.map +0 -1
- package/dist/chat/components/message.d.ts +0 -5
- package/dist/chat/components/message.js +0 -20
- package/dist/chat/components/message.js.map +0 -1
- package/dist/chat/components/prompt-input.d.ts +0 -8
- package/dist/chat/components/prompt-input.js +0 -49
- package/dist/chat/components/prompt-input.js.map +0 -1
- package/dist/chat/hooks/use-chat.d.ts +0 -15
- package/dist/chat/hooks/use-chat.js +0 -162
- package/dist/chat/hooks/use-chat.js.map +0 -1
- package/dist/chat/index.d.ts +0 -4
- package/dist/chat/index.js +0 -3
- package/dist/chat/lib/transport.d.ts +0 -4
- package/dist/chat/lib/transport.js +0 -66
- package/dist/chat/lib/transport.js.map +0 -1
- package/dist/chat/parts/text.d.ts +0 -3
- package/dist/chat/parts/text.js +0 -12
- package/dist/chat/parts/text.js.map +0 -1
- package/dist/chat/parts/tool-call.d.ts +0 -3
- package/dist/chat/parts/tool-call.js +0 -20
- package/dist/chat/parts/tool-call.js.map +0 -1
- package/dist/chat/plugin.d.ts +0 -2
- package/dist/chat/plugin.js +0 -17
- package/dist/chat/plugin.js.map +0 -1
- package/dist/chat/types.d.ts +0 -31
- package/dist/chat/types.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import "./types/core-augmentation.js";
|
|
2
2
|
export { registry } from './registry.js';
|
|
3
|
-
export { useChat } from './chat/hooks/use-chat.js';
|
|
4
|
-
export { chatComponents } from './chat/plugin.js';
|
|
5
3
|
export { getActionEffects, isActionEffect, dispatchEffects, dispatchActionError, } from '@lattice-php/ui/effects/dispatch';
|
|
6
4
|
export { useEffectDispatcher } from '@lattice-php/ui/effects/use-effect-dispatcher';
|
|
7
5
|
export { builtinEffectHandlers, effectHandler, mergeEffectHandlers, } from '@lattice-php/ui/effects/registry';
|
|
@@ -16,8 +14,6 @@ export { Provider, useColumnRegistry, useComponentRegistry } from './provider.js
|
|
|
16
14
|
export { onCallout, onToast, Toaster } from './toast/index.js';
|
|
17
15
|
export { createRegistry, eagerComponent, extendRegistry, lazyComponent, loadPluginModules, } from '@lattice-php/core/registry';
|
|
18
16
|
export type { Plugin, Registry } from '@lattice-php/core/registry';
|
|
19
|
-
export type { UseChatOptions } from './chat/hooks/use-chat.js';
|
|
20
|
-
export type { ChatFrame, ChatMessage, ChatRole, ChatStatus, ChatTransport, ChatTransportRequest, UseChatReturn, } from './chat/types.js';
|
|
21
17
|
export { Renderer } from '@lattice-php/core/renderer';
|
|
22
18
|
export { LATTICE_REF_HEADER, withRefHeader } from '@lattice-php/core/component-ref';
|
|
23
19
|
export { withHeaders } from '@lattice-php/core/headers';
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,6 @@ 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 { useChat } from "./chat/hooks/use-chat.js";
|
|
13
|
-
import { chatComponents } from "./chat/plugin.js";
|
|
14
12
|
import { registry } from "./registry.js";
|
|
15
13
|
import { createLatticeApp } from "./create-app.js";
|
|
16
14
|
import { Provider, useColumnRegistry, useComponentRegistry } from "./provider.js";
|
|
@@ -25,4 +23,4 @@ import { useEffectDispatcher } from "@lattice-php/ui/effects/use-effect-dispatch
|
|
|
25
23
|
import { builtinEffectHandlers, effectHandler, mergeEffectHandlers } from "@lattice-php/ui/effects/registry";
|
|
26
24
|
import { copyToClipboard } from "@lattice-php/ui/copyable-text";
|
|
27
25
|
import { columnCell } from "@lattice-php/table/registry";
|
|
28
|
-
export { Callouts, EventBridge, Icon, IconRenderer, IconRendererProvider, LATTICE_EVENT, LATTICE_REF_HEADER, OutletContext, Provider, RealtimeListeners, Renderer, SchemaLayout, SidebarCollapsedContext, SpriteProvider, Toaster, builtinEffectHandlers,
|
|
26
|
+
export { Callouts, EventBridge, Icon, IconRenderer, IconRendererProvider, LATTICE_EVENT, LATTICE_REF_HEADER, OutletContext, Provider, RealtimeListeners, Renderer, SchemaLayout, SidebarCollapsedContext, SpriteProvider, Toaster, builtinEffectHandlers, columnCell, copyToClipboard, createLatticeApp, createLayoutResolver, createPageResolver, createRegistry, dispatchActionError, dispatchEffects, eagerComponent, effectHandler, extendRegistry, getActionEffects, initializeAppearance, isActionEffect, layoutComponents, lazyComponent, loadPluginModules, mergeEffectHandlers, onCallout, onToast, pageComponentName, registry, updateAppearance, useAppearance, useColumnRegistry, useComponentRegistry, useEffectDispatcher, useSidebarCollapsed, withHeaders, withRefHeader, withVisitHeaders };
|
|
@@ -10,21 +10,24 @@ var BreadcrumbsComponent = ({ node }) => {
|
|
|
10
10
|
if (crumbs.length === 0) return null;
|
|
11
11
|
return /* @__PURE__ */ jsx("nav", {
|
|
12
12
|
"aria-label": t("common.breadcrumb", "Breadcrumb"),
|
|
13
|
-
className: "
|
|
13
|
+
className: "min-w-0 flex-1",
|
|
14
14
|
"data-lattice-component": nodeIdentity(node),
|
|
15
15
|
children: /* @__PURE__ */ jsx("ol", {
|
|
16
16
|
className: "flex items-center gap-2 text-sm text-lt-muted-fg",
|
|
17
17
|
children: crumbs.map((crumb, index) => {
|
|
18
18
|
const isLast = index === crumbs.length - 1;
|
|
19
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("li", {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("li", {
|
|
20
|
+
className: "min-w-0",
|
|
21
|
+
children: isLast ? /* @__PURE__ */ jsx("span", {
|
|
22
|
+
"aria-current": "page",
|
|
23
|
+
className: "block truncate text-lt-fg",
|
|
24
|
+
children: crumb.title
|
|
25
|
+
}) : /* @__PURE__ */ jsx(Link, {
|
|
26
|
+
className: "block truncate hover:text-lt-fg",
|
|
27
|
+
href: crumb.href,
|
|
28
|
+
children: crumb.title
|
|
29
|
+
})
|
|
30
|
+
}), isLast ? null : /* @__PURE__ */ jsx("li", {
|
|
28
31
|
"aria-hidden": "true",
|
|
29
32
|
children: "/"
|
|
30
33
|
})] }, crumb.href);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.js","names":[],"sources":["../../../resources/js/layout/components/breadcrumbs.tsx"],"sourcesContent":["import { Link, usePage } from \"@inertiajs/react\";\nimport { Fragment } from \"react\";\nimport type { RendererComponent } from \"@lattice-php/core/types\";\nimport type { PagePayload } from \"@lattice-php/lattice/types\";\nimport { nodeIdentity } from \"@lattice-php/core/test-id\";\nimport { useT } from \"@lattice-php/ui/i18n\";\n\nconst BreadcrumbsComponent: RendererComponent<\"breadcrumbs\"> = ({ node }) => {\n const { t } = useT(\"lattice\");\n const page = usePage();\n const crumbs = (page.props.lattice as PagePayload | undefined)?.breadcrumbs ?? [];\n\n if (crumbs.length === 0) {\n return null;\n }\n\n return (\n <nav\n aria-label={t(\"common.breadcrumb\", \"Breadcrumb\")}\n className=\"
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","names":[],"sources":["../../../resources/js/layout/components/breadcrumbs.tsx"],"sourcesContent":["import { Link, usePage } from \"@inertiajs/react\";\nimport { Fragment } from \"react\";\nimport type { RendererComponent } from \"@lattice-php/core/types\";\nimport type { PagePayload } from \"@lattice-php/lattice/types\";\nimport { nodeIdentity } from \"@lattice-php/core/test-id\";\nimport { useT } from \"@lattice-php/ui/i18n\";\n\nconst BreadcrumbsComponent: RendererComponent<\"breadcrumbs\"> = ({ node }) => {\n const { t } = useT(\"lattice\");\n const page = usePage();\n const crumbs = (page.props.lattice as PagePayload | undefined)?.breadcrumbs ?? [];\n\n if (crumbs.length === 0) {\n return null;\n }\n\n return (\n <nav\n aria-label={t(\"common.breadcrumb\", \"Breadcrumb\")}\n className=\"min-w-0 flex-1\"\n data-lattice-component={nodeIdentity(node)}\n >\n <ol className=\"flex items-center gap-2 text-sm text-lt-muted-fg\">\n {crumbs.map((crumb, index) => {\n const isLast = index === crumbs.length - 1;\n\n return (\n <Fragment key={crumb.href}>\n <li className=\"min-w-0\">\n {isLast ? (\n <span aria-current=\"page\" className=\"block truncate text-lt-fg\">\n {crumb.title}\n </span>\n ) : (\n <Link className=\"block truncate hover:text-lt-fg\" href={crumb.href}>\n {crumb.title}\n </Link>\n )}\n </li>\n {isLast ? null : <li aria-hidden=\"true\">/</li>}\n </Fragment>\n );\n })}\n </ol>\n </nav>\n );\n};\n\nexport default BreadcrumbsComponent;\n"],"mappings":";;;;;;AAOA,IAAM,wBAA0D,EAAE,WAAW;CAC3E,MAAM,EAAE,MAAM,KAAK,SAAS;CAE5B,MAAM,SADO,QACG,CAAA,CAAK,MAAM,SAAqC,eAAe,CAAC;CAEhF,IAAI,OAAO,WAAW,GACpB,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,cAAY,EAAE,qBAAqB,YAAY;EAC/C,WAAU;EACV,0BAAwB,aAAa,IAAI;EAEzC,UAAA,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,OAAO,KAAK,OAAO,UAAU;IAC5B,MAAM,SAAS,UAAU,OAAO,SAAS;IAEzC,OACE,qBAAC,UAAD,EAAA,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,SACC,oBAAC,QAAD;MAAM,gBAAa;MAAO,WAAU;MACjC,UAAA,MAAM;KACH,CAAA,IAEN,oBAAC,MAAD;MAAM,WAAU;MAAkC,MAAM,MAAM;MAC3D,UAAA,MAAM;KACH,CAAA;IAEN,CAAA,GACH,SAAS,OAAO,oBAAC,MAAD;KAAI,eAAY;KAAO,UAAA;IAAK,CAAA,CACrC,EAAA,GAbK,MAAM,IAaX;GAEd,CAAC;EACC,CAAA;CACD,CAAA;AAET"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { nodeIdentity } from "@lattice-php/core/test-id";
|
|
3
|
+
//#region resources/js/layout/components/sidebar-footer.tsx
|
|
4
|
+
var SidebarFooterComponent = ({ children, node }) => /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: "mt-auto flex flex-col gap-4",
|
|
6
|
+
"data-lattice-component": nodeIdentity(node),
|
|
7
|
+
children
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SidebarFooterComponent as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=sidebar-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-footer.js","names":[],"sources":["../../../resources/js/layout/components/sidebar-footer.tsx"],"sourcesContent":["import type { RendererComponent } from \"@lattice-php/core/types\";\nimport { nodeIdentity } from \"@lattice-php/core/test-id\";\n\nconst SidebarFooterComponent: RendererComponent<\"sidebar.footer\"> = ({ children, node }) => (\n <div className=\"mt-auto flex flex-col gap-4\" data-lattice-component={nodeIdentity(node)}>\n {children}\n </div>\n);\n\nexport default SidebarFooterComponent;\n"],"mappings":";;;AAGA,IAAM,0BAA+D,EAAE,UAAU,WAC/E,oBAAC,OAAD;CAAK,WAAU;CAA8B,0BAAwB,aAAa,IAAI;CACnF;AACE,CAAA"}
|
package/dist/layout/plugin.js
CHANGED
|
@@ -5,6 +5,7 @@ import MenuComponent from "./components/menu.js";
|
|
|
5
5
|
import MenuItemComponent from "./components/menu-item.js";
|
|
6
6
|
import OutletComponent from "./components/outlet.js";
|
|
7
7
|
import SidebarComponent from "./components/sidebar.js";
|
|
8
|
+
import SidebarFooterComponent from "./components/sidebar-footer.js";
|
|
8
9
|
import TopbarComponent from "./components/topbar.js";
|
|
9
10
|
import { eagerComponent } from "@lattice-php/core/registry";
|
|
10
11
|
//#region resources/js/layout/plugin.ts
|
|
@@ -17,6 +18,7 @@ var layoutComponents = {
|
|
|
17
18
|
"menu-item": eagerComponent(MenuItemComponent),
|
|
18
19
|
outlet: eagerComponent(OutletComponent),
|
|
19
20
|
sidebar: eagerComponent(SidebarComponent),
|
|
21
|
+
"sidebar.footer": eagerComponent(SidebarFooterComponent),
|
|
20
22
|
topbar: eagerComponent(TopbarComponent)
|
|
21
23
|
},
|
|
22
24
|
name: "lattice/layout"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","names":[],"sources":["../../resources/js/layout/plugin.ts"],"sourcesContent":["import { eagerComponent, type ComponentRegistryFor, type Plugin } from \"@lattice-php/core/registry\";\nimport type { LayoutNodeType } from \"@lattice-php/lattice/types/generated\";\nimport BreadcrumbsComponent from \"./components/breadcrumbs\";\nimport CalloutsComponent from \"./components/callouts\";\nimport DropdownComponent from \"./components/dropdown\";\nimport MenuComponent from \"./components/menu\";\nimport MenuItemComponent from \"./components/menu-item\";\nimport OutletComponent from \"./components/outlet\";\nimport SidebarComponent from \"./components/sidebar\";\nimport TopbarComponent from \"./components/topbar\";\n\nexport const layoutComponents: Plugin = {\n components: {\n breadcrumbs: eagerComponent(BreadcrumbsComponent),\n callouts: eagerComponent(CalloutsComponent),\n dropdown: eagerComponent(DropdownComponent),\n menu: eagerComponent(MenuComponent),\n \"menu-item\": eagerComponent(MenuItemComponent),\n outlet: eagerComponent(OutletComponent),\n sidebar: eagerComponent(SidebarComponent),\n topbar: eagerComponent(TopbarComponent),\n } satisfies ComponentRegistryFor<LayoutNodeType>,\n name: \"lattice/layout\",\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.js","names":[],"sources":["../../resources/js/layout/plugin.ts"],"sourcesContent":["import { eagerComponent, type ComponentRegistryFor, type Plugin } from \"@lattice-php/core/registry\";\nimport type { LayoutNodeType } from \"@lattice-php/lattice/types/generated\";\nimport BreadcrumbsComponent from \"./components/breadcrumbs\";\nimport CalloutsComponent from \"./components/callouts\";\nimport DropdownComponent from \"./components/dropdown\";\nimport MenuComponent from \"./components/menu\";\nimport MenuItemComponent from \"./components/menu-item\";\nimport OutletComponent from \"./components/outlet\";\nimport SidebarComponent from \"./components/sidebar\";\nimport SidebarFooterComponent from \"./components/sidebar-footer\";\nimport TopbarComponent from \"./components/topbar\";\n\nexport const layoutComponents: Plugin = {\n components: {\n breadcrumbs: eagerComponent(BreadcrumbsComponent),\n callouts: eagerComponent(CalloutsComponent),\n dropdown: eagerComponent(DropdownComponent),\n menu: eagerComponent(MenuComponent),\n \"menu-item\": eagerComponent(MenuItemComponent),\n outlet: eagerComponent(OutletComponent),\n sidebar: eagerComponent(SidebarComponent),\n \"sidebar.footer\": eagerComponent(SidebarFooterComponent),\n topbar: eagerComponent(TopbarComponent),\n } satisfies ComponentRegistryFor<LayoutNodeType>,\n name: \"lattice/layout\",\n};\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,mBAA2B;CACtC,YAAY;EACV,aAAa,eAAe,oBAAoB;EAChD,UAAU,eAAe,QAAiB;EAC1C,UAAU,eAAe,iBAAiB;EAC1C,MAAM,eAAe,aAAa;EAClC,aAAa,eAAe,iBAAiB;EAC7C,QAAQ,eAAe,eAAe;EACtC,SAAS,eAAe,gBAAgB;EACxC,kBAAkB,eAAe,sBAAsB;EACvD,QAAQ,eAAe,eAAe;CACxC;CACA,MAAM;AACR"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionNodeType,
|
|
2
|
-
type OptInNodeType = "api-reference" | "media.library" | "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results" | "signature" | "timeline" | "tree";
|
|
3
|
-
type RegisteredNodeType = ActionNodeType |
|
|
1
|
+
import { ActionNodeType, FormNodeType, FragmentNodeType, LayoutNodeType, NodeType, NotificationNodeType, RemoteNodeType, TableNodeType, UiNodeType } from './types/generated.js';
|
|
2
|
+
type OptInNodeType = "api-reference" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "map" | "media.library" | "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results" | "signature" | "timeline" | "tree";
|
|
3
|
+
type RegisteredNodeType = ActionNodeType | 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>;
|
|
6
6
|
export declare const registry: import('@lattice-php/core').Registry;
|
package/dist/registry.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { layoutComponents } from "./layout/plugin.js";
|
|
2
2
|
import { navigationPlugin } from "./inertia-navigation.js";
|
|
3
|
-
import { chatComponents } from "./chat/plugin.js";
|
|
4
3
|
import { fragmentComponents } from "./fragments/plugin.js";
|
|
5
4
|
import { notificationsComponents } from "./notifications/plugin.js";
|
|
6
5
|
import { remoteComponents } from "./remote/plugin.js";
|
|
@@ -10,7 +9,7 @@ import { formComponents } from "@lattice-php/form";
|
|
|
10
9
|
import { tableComponents } from "@lattice-php/table";
|
|
11
10
|
import { uiComponents } from "@lattice-php/ui";
|
|
12
11
|
//#region resources/js/registry.ts
|
|
13
|
-
var registry = createRegistry(uiComponents, fragmentComponents, actionComponents, formComponents, layoutComponents, tableComponents,
|
|
12
|
+
var registry = createRegistry(uiComponents, fragmentComponents, actionComponents, formComponents, layoutComponents, tableComponents, notificationsComponents, remoteComponents, navigationPlugin);
|
|
14
13
|
//#endregion
|
|
15
14
|
export { registry };
|
|
16
15
|
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 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 { 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 | \"chat.box\"\n | \"chat.part.text\"\n | \"chat.part.tool-call\"\n | \"map\"\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 | 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 notificationsComponents,\n remoteComponents,\n navigationPlugin,\n);\n"],"mappings":";;;;;;;;;;;AAgEA,IAAa,WAAW,eACtB,cACA,oBACA,kBACA,gBACA,kBACA,iBACA,yBACA,kBACA,gBACF"}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ export { inertiaNavigation, navigationPlugin } from './inertia-navigation.js';
|
|
|
4
4
|
export { defaultNavigation, NavigationProvider, useNavigation } from '@lattice-php/ui/navigation';
|
|
5
5
|
export { runAction } from '@lattice-php/action';
|
|
6
6
|
export { apiFetch, apiJson, setRefRefreshEndpoint, xsrfToken } from '@lattice-php/core/api';
|
|
7
|
+
export { useExtensionRegistry } from '@lattice-php/core/registry-context';
|
|
7
8
|
export { RenderNode } from '@lattice-php/core/renderer';
|
|
9
|
+
export { coerceColor, toneProps } from '@lattice-php/ui/lib/color';
|
|
8
10
|
export { nodeIdentity } from '@lattice-php/core/test-id';
|
|
9
11
|
export { requestSignedUpload, xhrTransfer } from '@lattice-php/core/upload';
|
|
10
12
|
export { SimpleField } from '@lattice-php/form/components/fields/simple-field';
|
package/dist/runtime.js
CHANGED
|
@@ -10,8 +10,6 @@ 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
12
|
import { inertiaNavigation, navigationPlugin } from "./inertia-navigation.js";
|
|
13
|
-
import { useChat } from "./chat/hooks/use-chat.js";
|
|
14
|
-
import { chatComponents } from "./chat/plugin.js";
|
|
15
13
|
import { registry } from "./registry.js";
|
|
16
14
|
import { createLatticeApp } from "./create-app.js";
|
|
17
15
|
import { Provider, useColumnRegistry, useComponentRegistry } from "./provider.js";
|
|
@@ -19,11 +17,13 @@ import { Icon, IconRenderer, IconRendererProvider, LATTICE_EVENT, LATTICE_REF_HE
|
|
|
19
17
|
import { announce, attachTreeItemInstruction, combine, draggable, dropTargetForElements, extractTreeItemInstruction } from "./dnd/index.js";
|
|
20
18
|
import { router } from "@inertiajs/react";
|
|
21
19
|
import { apiFetch, apiJson, setRefRefreshEndpoint, xsrfToken } from "@lattice-php/core/api";
|
|
20
|
+
import { useExtensionRegistry } from "@lattice-php/core/registry-context";
|
|
22
21
|
import { RenderNode } from "@lattice-php/core/renderer";
|
|
23
22
|
import { nodeIdentity } from "@lattice-php/core/test-id";
|
|
24
23
|
import { NavigationProvider, defaultNavigation, useNavigation } from "@lattice-php/ui/navigation";
|
|
25
24
|
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";
|
|
26
25
|
import { runAction } from "@lattice-php/action";
|
|
26
|
+
import { coerceColor, toneProps } from "@lattice-php/ui/lib/color";
|
|
27
27
|
import { requestSignedUpload, xhrTransfer } from "@lattice-php/core/upload";
|
|
28
28
|
import { SimpleField } from "@lattice-php/form/components/fields/simple-field";
|
|
29
29
|
import { RICH_EDITOR_EXTENSION, ToolbarIconButton } from "@lattice-php/form/rich-editor";
|
|
@@ -32,4 +32,4 @@ import { useTableSelection } from "@lattice-php/table/hooks/use-table-selection"
|
|
|
32
32
|
import { getBulkActions } from "@lattice-php/table/lib/bulk";
|
|
33
33
|
export * from "@lattice-php/ui/i18n";
|
|
34
34
|
export * from "@lattice-php/form/toolkit";
|
|
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,
|
|
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, cn, coerceColor, 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, toneProps, updateAppearance, useAppearance, useColumnRegistry, useComponentRegistry, useDebouncedCallback, useEffectDispatcher, useExtensionRegistry, useFormatContext, useNavigation, usePersistentState, useSidebarCollapsed, useTable, useTableSelection, withHeaders, withRefHeader, withVisitHeaders, xhrTransfer, xsrfToken };
|
|
@@ -1,40 +1,16 @@
|
|
|
1
|
-
import { Affix, Breadcrumb, Node } from '@lattice-php/core';
|
|
1
|
+
import { Affix, Breadcrumb, Node, RemoteAccess } from '@lattice-php/core';
|
|
2
2
|
import { HttpMethod, Placement, Size, Translatable, Variant } from '@lattice-php/ui';
|
|
3
3
|
import { Effect } from '@lattice-php/ui/effects/types';
|
|
4
4
|
export type ActionNodeType = "action" | "action.bulk" | "action.group";
|
|
5
5
|
export type Breadcrumbs = Record<string, never>;
|
|
6
|
-
export type BrowserToken = {
|
|
7
|
-
readonly accessToken: string;
|
|
8
|
-
readonly audience: string;
|
|
9
|
-
readonly expiresIn: number;
|
|
10
|
-
readonly scopes: string[];
|
|
11
|
-
readonly tokenType: string;
|
|
12
|
-
};
|
|
13
6
|
export type CalendarNodeType = "timeline";
|
|
14
7
|
export type Callouts = Record<string, never>;
|
|
15
8
|
export type ChannelVisibility = "public" | "private" | "presence";
|
|
16
|
-
export type ChatBox = {
|
|
17
|
-
fill: boolean;
|
|
18
|
-
historyEndpoint: string | null;
|
|
19
|
-
placeholder: string | null;
|
|
20
|
-
remote: RemoteAccess | null;
|
|
21
|
-
streamEndpoint: string | null;
|
|
22
|
-
title: string | null;
|
|
23
|
-
};
|
|
24
|
-
export type ChatMessage = {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly parts: Node[];
|
|
27
|
-
readonly role: ChatRole;
|
|
28
|
-
};
|
|
29
9
|
export type ChatNodeType = "chat.box" | "chat.part.text" | "chat.part.tool-call";
|
|
30
|
-
export type ChatRole = "user" | "assistant" | "system";
|
|
31
10
|
export type ColumnNodeType = "column.badge" | "column.boolean" | "column.icon" | "column.image" | "column.money" | "column.number" | "column.stack" | "column.text";
|
|
32
11
|
export type ComponentPropsMap = {
|
|
33
12
|
breadcrumbs: Breadcrumbs;
|
|
34
13
|
callouts: Callouts;
|
|
35
|
-
"chat.box": ChatBox;
|
|
36
|
-
"chat.part.text": TextPart;
|
|
37
|
-
"chat.part.tool-call": ToolCallPart;
|
|
38
14
|
dropdown: Dropdown;
|
|
39
15
|
fragment: Fragment;
|
|
40
16
|
menu: Menu;
|
|
@@ -43,6 +19,7 @@ export type ComponentPropsMap = {
|
|
|
43
19
|
outlet: Outlet;
|
|
44
20
|
"remote.data-list": DataList;
|
|
45
21
|
sidebar: Sidebar;
|
|
22
|
+
"sidebar.footer": SidebarFooter;
|
|
46
23
|
topbar: Topbar;
|
|
47
24
|
};
|
|
48
25
|
export type DataList = {
|
|
@@ -74,13 +51,14 @@ export type I18nConfig = {
|
|
|
74
51
|
readonly saveMissing: boolean;
|
|
75
52
|
readonly timezone: string | null;
|
|
76
53
|
};
|
|
77
|
-
export type LayoutNodeType = "breadcrumbs" | "callouts" | "dropdown" | "menu" | "menu-item" | "outlet" | "sidebar" | "topbar";
|
|
54
|
+
export type LayoutNodeType = "breadcrumbs" | "callouts" | "dropdown" | "menu" | "menu-item" | "outlet" | "sidebar" | "sidebar.footer" | "topbar";
|
|
78
55
|
export type Listen = {
|
|
79
56
|
readonly channel: string;
|
|
80
57
|
effects: Effect[];
|
|
81
58
|
events: string[];
|
|
82
59
|
readonly visibility: ChannelVisibility;
|
|
83
60
|
};
|
|
61
|
+
export type MapNodeType = "map";
|
|
84
62
|
export type MediumNodeType = "media.library";
|
|
85
63
|
export type Menu = Record<string, never>;
|
|
86
64
|
export type MenuItem = {
|
|
@@ -93,7 +71,7 @@ export type MenuItem = {
|
|
|
93
71
|
prefix: Affix | null;
|
|
94
72
|
suffix: Affix | null;
|
|
95
73
|
};
|
|
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";
|
|
74
|
+
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" | "map" | "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" | "sidebar.footer" | "signature" | "stack" | "tab" | "table" | "tabs" | "text" | "timeline" | "tooltip" | "topbar" | "tree" | "wizard" | "wizard-step";
|
|
97
75
|
export type NotificationItem = {
|
|
98
76
|
readonly actions: Node[];
|
|
99
77
|
readonly body: Translatable | string | null;
|
|
@@ -130,30 +108,15 @@ export type PagePayload = {
|
|
|
130
108
|
readonly title: string | null;
|
|
131
109
|
readonly width: string;
|
|
132
110
|
};
|
|
133
|
-
export type RemoteAccess = {
|
|
134
|
-
readonly audience: string;
|
|
135
|
-
readonly nodeId: string;
|
|
136
|
-
readonly nodeType: string;
|
|
137
|
-
readonly ref: string;
|
|
138
|
-
readonly scopes: string[];
|
|
139
|
-
readonly source: string;
|
|
140
|
-
readonly tokenEndpoint: string;
|
|
141
|
-
};
|
|
142
111
|
export type RemoteNodeType = "remote.data-list";
|
|
143
112
|
export type SearchNodeType = "search.box" | "search.categories" | "search.input" | "search.preview" | "search.recent" | "search.results";
|
|
144
113
|
export type Sidebar = {
|
|
145
114
|
collapsible: boolean;
|
|
146
115
|
rememberState: boolean;
|
|
147
116
|
};
|
|
117
|
+
export type SidebarFooter = Record<string, never>;
|
|
148
118
|
export type SignatureExampleNodeType = "signature";
|
|
149
119
|
export type TableNodeType = "table";
|
|
150
|
-
export type TextPart = {
|
|
151
|
-
text: string;
|
|
152
|
-
};
|
|
153
|
-
export type ToolCallPart = {
|
|
154
|
-
args: Record<string, unknown>;
|
|
155
|
-
name: string;
|
|
156
|
-
};
|
|
157
120
|
export type Topbar = {
|
|
158
121
|
sticky: boolean;
|
|
159
122
|
};
|