@lattice-php/lattice 0.22.0 → 0.24.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/action/components/action-form.js +1 -1
- package/dist/action/components/action-group.js +1 -1
- package/dist/action/hooks/use-action.js +1 -1
- package/dist/chat/components/chat-box.js +1 -1
- package/dist/chat/components/prompt-input.js +1 -1
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +4 -1
- package/dist/core/registry.d.ts +5 -0
- package/dist/core/registry.js.map +1 -1
- package/dist/create-app.d.ts +6 -2
- package/dist/create-app.js +12 -1
- package/dist/create-app.js.map +1 -1
- package/dist/form/components/fields/rich-editor-field.js +1 -1
- package/dist/form/components/fields/row-actions.js +1 -1
- package/dist/form/components/fields/row-item.js +1 -1
- package/dist/form/components/fields/select.js +1 -1
- package/dist/form/components/fields/table-rows.js +1 -1
- package/dist/form/components/form.js +26 -5
- package/dist/form/components/form.js.map +1 -1
- package/dist/form/rich-editor/builtins.js +1 -1
- package/dist/i18n/backend.js +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/instance.d.ts +1 -0
- package/dist/i18n/instance.js +5 -5
- package/dist/i18n/instance.js.map +1 -1
- package/dist/i18n/timezone.js +1 -1
- package/dist/layout/components/callouts.js +1 -1
- package/dist/notifications/components/empty-state.js +1 -1
- package/dist/notifications/components/notification-item.js +1 -1
- package/dist/notifications/components/notifications.js +1 -1
- package/dist/remote/components/data-list.js +1 -1
- package/dist/table/components/cells/boolean-cell.js +1 -1
- package/dist/table/components/column-header.js +1 -1
- package/dist/table/components/filter-controls.js +1 -1
- package/dist/table/components/filter-value-input.js +1 -1
- package/dist/table/components/sort-bar.js +1 -1
- package/dist/table/components/table-search.js +1 -1
- package/dist/table/components/table.js +1 -1
- package/dist/toast/toaster.js +1 -1
- package/dist/types/generated.d.ts +5 -19
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/copyable-text.js +1 -1
- package/dist/ui/info-tooltip.js +1 -1
- package/dist/ui/plugin.js +1 -3
- package/dist/ui/plugin.js.map +1 -1
- package/dist/ui/spinner.js +1 -1
- package/dist/ui/tabs.js +1 -1
- package/dist/vite.d.ts +3 -2
- package/dist/vite.js +7 -3
- package/dist/vite.js.map +1 -1
- package/dist-standalone/chunks/{chart-view-C6R5iPra.js → chart-view-DEwGTt9d.js} +2 -2
- package/dist-standalone/chunks/{date-picker-field-DhhEB-Mh.js → date-picker-field-CCQ9nWx0.js} +1 -1
- package/dist-standalone/chunks/{page-props-DOfg30l5.js → page-props-D3FnL614.js} +1 -1
- package/dist-standalone/chunks/{rich-editor-field-DORXTHPw.js → rich-editor-field-B9Nv1qia.js} +2 -2
- package/dist-standalone/chunks/{subscriptions-DK_s_F2g.js → subscriptions-C-0lSr7X.js} +1 -1
- package/dist-standalone/lattice.css +1 -1
- package/dist-standalone/lattice.js +6 -6
- package/dist-standalone/manifest.json +7 -7
- package/package.json +2 -2
- package/dist/ui/tree-context.d.ts +0 -33
- package/dist/ui/tree-context.js +0 -135
- package/dist/ui/tree-context.js.map +0 -1
- package/dist/ui/tree.d.ts +0 -19
- package/dist/ui/tree.js +0 -187
- package/dist/ui/tree.js.map +0 -1
package/dist/toast/toaster.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useT } from "../i18n/instance.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { Icon } from "../icons/sprite.js";
|
|
3
4
|
import { RenderNode } from "../core/renderer.js";
|
|
4
5
|
import { resolveTranslatable } from "../i18n/translatable.js";
|
|
5
6
|
import { onToast } from "./toast.js";
|
|
6
|
-
import { useT } from "../i18n/instance.js";
|
|
7
7
|
import { variantStyles } from "./variant-styles.js";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -450,7 +450,6 @@ export type ComponentPropsMap = {
|
|
|
450
450
|
text: Text;
|
|
451
451
|
tooltip: Tooltip;
|
|
452
452
|
topbar: Topbar;
|
|
453
|
-
tree: Tree;
|
|
454
453
|
};
|
|
455
454
|
export type Condition = {
|
|
456
455
|
readonly field: string;
|
|
@@ -677,7 +676,10 @@ export type Form = {
|
|
|
677
676
|
state: Record<string, unknown>;
|
|
678
677
|
status: string | null;
|
|
679
678
|
submitButton: boolean;
|
|
679
|
+
submitButtons: Node<"button">[] | null;
|
|
680
|
+
submitJustify: Justify | null;
|
|
680
681
|
submitLabel: string | null;
|
|
682
|
+
submitVariant: ButtonVariant | null;
|
|
681
683
|
validationSummaryLabel: string;
|
|
682
684
|
validationTimeout: number | null;
|
|
683
685
|
};
|
|
@@ -828,7 +830,7 @@ export type MoneyColumn = {
|
|
|
828
830
|
toggleable: boolean;
|
|
829
831
|
width: ColumnWidth;
|
|
830
832
|
};
|
|
831
|
-
export type NodeType = "action" | "action.bulk" | "action.group" | "avatar" | "badge" | "breadcrumbs" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "collapsible" | "dropdown" | "field.builder" | "field.checkbox" | "field.choice" | "field.color-picker" | "field.date-input" | "field.date-time-input" | "field.file-upload" | "field.hidden-input" | "field.number-input" | "field.otp" | "field.password-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" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "progress" | "raw-block" | "remote.data-list" | "section" | "segmented-control" | "separator" | "sidebar" | "stack" | "tab" | "table" | "tabs" | "text" | "tooltip" | "topbar"
|
|
833
|
+
export type NodeType = "action" | "action.bulk" | "action.group" | "avatar" | "badge" | "breadcrumbs" | "button" | "callouts" | "card" | "chart" | "chat.box" | "chat.part.text" | "chat.part.tool-call" | "collapsible" | "dropdown" | "field.builder" | "field.checkbox" | "field.choice" | "field.color-picker" | "field.date-input" | "field.date-time-input" | "field.file-upload" | "field.hidden-input" | "field.number-input" | "field.otp" | "field.password-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" | "menu" | "menu-item" | "modal" | "notifications" | "outlet" | "progress" | "raw-block" | "remote.data-list" | "section" | "segmented-control" | "separator" | "sidebar" | "stack" | "tab" | "table" | "tabs" | "text" | "tooltip" | "topbar";
|
|
832
834
|
export type NotificationItem = {
|
|
833
835
|
readonly actions: Node[];
|
|
834
836
|
readonly body: string | null;
|
|
@@ -1370,23 +1372,7 @@ export type Translatable = {
|
|
|
1370
1372
|
payload: Record<string, string>;
|
|
1371
1373
|
replacements: Record<string, string | number | boolean>;
|
|
1372
1374
|
};
|
|
1373
|
-
export type
|
|
1374
|
-
activeId: string | null;
|
|
1375
|
-
defaultExpanded: string[];
|
|
1376
|
-
rememberState: boolean;
|
|
1377
|
-
};
|
|
1378
|
-
export type TreeNode = {
|
|
1379
|
-
actions: Node<"action"> | Node<"action.bulk"> | Node<"action.group"> | null;
|
|
1380
|
-
badge: string | null;
|
|
1381
|
-
children: TreeNode[];
|
|
1382
|
-
disabled: boolean;
|
|
1383
|
-
hasChildren: boolean;
|
|
1384
|
-
href: string | null;
|
|
1385
|
-
icon: string | null;
|
|
1386
|
-
readonly id: string;
|
|
1387
|
-
readonly label: string;
|
|
1388
|
-
};
|
|
1389
|
-
export type UiNodeType = "avatar" | "badge" | "button" | "card" | "chart" | "collapsible" | "floating-panel" | "grid" | "heading" | "icon" | "image" | "link" | "modal" | "progress" | "raw-block" | "section" | "segmented-control" | "separator" | "stack" | "tab" | "tabs" | "text" | "tooltip" | "tree";
|
|
1375
|
+
export type UiNodeType = "avatar" | "badge" | "button" | "card" | "chart" | "collapsible" | "floating-panel" | "grid" | "heading" | "icon" | "image" | "link" | "modal" | "progress" | "raw-block" | "section" | "segmented-control" | "separator" | "stack" | "tab" | "tabs" | "text" | "tooltip";
|
|
1390
1376
|
export type UnreadCount = {
|
|
1391
1377
|
readonly unreadCount: number;
|
|
1392
1378
|
};
|
package/dist/ui/combobox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useT } from "../i18n/instance.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { Icon } from "../icons/sprite.js";
|
|
3
|
-
import { useT } from "../i18n/instance.js";
|
|
4
4
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
5
5
|
import { useDebouncedCallback } from "../lib/use-debounced-callback.js";
|
|
6
6
|
import { useEffect, useState } from "react";
|
package/dist/ui/copyable-text.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useT } from "../i18n/instance.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { Icon } from "../icons/sprite.js";
|
|
3
|
-
import { useT } from "../i18n/instance.js";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region resources/js/ui/copyable-text.tsx
|
package/dist/ui/info-tooltip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Icon } from "../icons/sprite.js";
|
|
2
1
|
import { useT } from "../i18n/instance.js";
|
|
2
|
+
import { Icon } from "../icons/sprite.js";
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region resources/js/ui/info-tooltip.tsx
|
package/dist/ui/plugin.js
CHANGED
|
@@ -22,7 +22,6 @@ import StackComponent from "./stack.js";
|
|
|
22
22
|
import TabComponent, { TabsComponent } from "./tabs.js";
|
|
23
23
|
import TextComponent from "./text.js";
|
|
24
24
|
import TooltipComponent from "./tooltip.js";
|
|
25
|
-
import TreeComponent from "./tree.js";
|
|
26
25
|
//#region resources/js/ui/plugin.ts
|
|
27
26
|
var uiComponents = createPlugin({
|
|
28
27
|
components: {
|
|
@@ -49,8 +48,7 @@ var uiComponents = createPlugin({
|
|
|
49
48
|
tab: eagerComponent(TabComponent),
|
|
50
49
|
tabs: eagerComponent(TabsComponent),
|
|
51
50
|
text: eagerComponent(TextComponent),
|
|
52
|
-
tooltip: eagerComponent(TooltipComponent)
|
|
53
|
-
tree: eagerComponent(TreeComponent)
|
|
51
|
+
tooltip: eagerComponent(TooltipComponent)
|
|
54
52
|
},
|
|
55
53
|
name: "lattice/ui"
|
|
56
54
|
});
|
package/dist/ui/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","names":[],"sources":["../../resources/js/ui/plugin.ts"],"sourcesContent":["import {\n createPlugin,\n eagerComponent,\n type ComponentRegistryFor,\n} from \"@lattice-php/lattice/core/registry\";\nimport type { FragmentNodeType, UiNodeType } from \"@lattice-php/lattice/types/generated\";\nimport AvatarComponent from \"./avatar\";\nimport BadgeComponent from \"./badge\";\nimport ButtonComponent from \"./button\";\nimport CardComponent from \"./card\";\nimport ChartComponent from \"./chart\";\nimport CollapsibleComponent from \"./collapsible\";\nimport FloatingPanelComponent from \"./floating-panel\";\nimport FragmentComponent from \"./fragment\";\nimport GridComponent from \"./grid\";\nimport HeadingComponent from \"./heading\";\nimport IconComponent from \"./icon\";\nimport ImageComponent from \"./image\";\nimport LinkComponent from \"./link\";\nimport ModalComponent from \"./modal\";\nimport ProgressComponent from \"./progress\";\nimport RawBlockComponent from \"./raw-block\";\nimport SectionComponent from \"./section\";\nimport SegmentedControlComponent from \"./segmented-control\";\nimport SeparatorComponent from \"./separator\";\nimport StackComponent from \"./stack\";\nimport TabComponent, { TabsComponent } from \"./tabs\";\nimport TextComponent from \"./text\";\nimport TooltipComponent from \"./tooltip\";\
|
|
1
|
+
{"version":3,"file":"plugin.js","names":[],"sources":["../../resources/js/ui/plugin.ts"],"sourcesContent":["import {\n createPlugin,\n eagerComponent,\n type ComponentRegistryFor,\n} from \"@lattice-php/lattice/core/registry\";\nimport type { FragmentNodeType, UiNodeType } from \"@lattice-php/lattice/types/generated\";\nimport AvatarComponent from \"./avatar\";\nimport BadgeComponent from \"./badge\";\nimport ButtonComponent from \"./button\";\nimport CardComponent from \"./card\";\nimport ChartComponent from \"./chart\";\nimport CollapsibleComponent from \"./collapsible\";\nimport FloatingPanelComponent from \"./floating-panel\";\nimport FragmentComponent from \"./fragment\";\nimport GridComponent from \"./grid\";\nimport HeadingComponent from \"./heading\";\nimport IconComponent from \"./icon\";\nimport ImageComponent from \"./image\";\nimport LinkComponent from \"./link\";\nimport ModalComponent from \"./modal\";\nimport ProgressComponent from \"./progress\";\nimport RawBlockComponent from \"./raw-block\";\nimport SectionComponent from \"./section\";\nimport SegmentedControlComponent from \"./segmented-control\";\nimport SeparatorComponent from \"./separator\";\nimport StackComponent from \"./stack\";\nimport TabComponent, { TabsComponent } from \"./tabs\";\nimport TextComponent from \"./text\";\nimport TooltipComponent from \"./tooltip\";\n\ntype UiComponentType = UiNodeType | FragmentNodeType;\n\nexport const uiComponents = createPlugin({\n components: {\n avatar: eagerComponent(AvatarComponent),\n badge: eagerComponent(BadgeComponent),\n button: eagerComponent(ButtonComponent),\n card: eagerComponent(CardComponent),\n chart: eagerComponent(ChartComponent),\n collapsible: eagerComponent(CollapsibleComponent),\n \"floating-panel\": eagerComponent(FloatingPanelComponent),\n fragment: eagerComponent(FragmentComponent),\n grid: eagerComponent(GridComponent),\n heading: eagerComponent(HeadingComponent),\n icon: eagerComponent(IconComponent),\n image: eagerComponent(ImageComponent),\n link: eagerComponent(LinkComponent),\n modal: eagerComponent(ModalComponent),\n progress: eagerComponent(ProgressComponent),\n \"raw-block\": eagerComponent(RawBlockComponent),\n section: eagerComponent(SectionComponent),\n \"segmented-control\": eagerComponent(SegmentedControlComponent),\n separator: eagerComponent(SeparatorComponent),\n stack: eagerComponent(StackComponent),\n tab: eagerComponent(TabComponent),\n tabs: eagerComponent(TabsComponent),\n text: eagerComponent(TextComponent),\n tooltip: eagerComponent(TooltipComponent),\n } satisfies ComponentRegistryFor<UiComponentType>,\n name: \"lattice/ui\",\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAa,eAAe,aAAa;CACvC,YAAY;EACV,QAAQ,eAAe,eAAe;EACtC,OAAO,eAAe,cAAc;EACpC,QAAQ,eAAe,eAAe;EACtC,MAAM,eAAe,aAAa;EAClC,OAAO,eAAe,cAAc;EACpC,aAAa,eAAe,oBAAoB;EAChD,kBAAkB,eAAe,sBAAsB;EACvD,UAAU,eAAe,iBAAiB;EAC1C,MAAM,eAAe,aAAa;EAClC,SAAS,eAAe,gBAAgB;EACxC,MAAM,eAAe,aAAa;EAClC,OAAO,eAAe,cAAc;EACpC,MAAM,eAAe,aAAa;EAClC,OAAO,eAAe,cAAc;EACpC,UAAU,eAAe,iBAAiB;EAC1C,aAAa,eAAe,iBAAiB;EAC7C,SAAS,eAAe,gBAAgB;EACxC,qBAAqB,eAAe,yBAAyB;EAC7D,WAAW,eAAe,kBAAkB;EAC5C,OAAO,eAAe,cAAc;EACpC,KAAK,eAAe,YAAY;EAChC,MAAM,eAAe,aAAa;EAClC,MAAM,eAAe,aAAa;EAClC,SAAS,eAAe,gBAAgB;CAC1C;CACA,MAAM;AACR,CAAC"}
|
package/dist/ui/spinner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useT } from "../i18n/instance.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { Icon } from "../icons/sprite.js";
|
|
3
|
-
import { useT } from "../i18n/instance.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region resources/js/ui/spinner.tsx
|
|
6
6
|
function Spinner({ className, ...props }) {
|
package/dist/ui/tabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "../lib/utils.js";
|
|
2
1
|
import { useT } from "../i18n/instance.js";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { pillClassName } from "./pill.js";
|
|
4
4
|
import { router } from "@inertiajs/react";
|
|
5
5
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvgSpriteOptions } from '@lattice-php/vite-svg-sprite';
|
|
1
|
+
import { IconTypesOptions, SvgSpriteOptions } from '@lattice-php/vite-svg-sprite';
|
|
2
2
|
import { Plugin, PluginOption, UserConfig } from 'vite';
|
|
3
3
|
type InlineDependency = string | RegExp;
|
|
4
4
|
type ConfigWithTest = UserConfig & {
|
|
@@ -12,7 +12,7 @@ type ConfigWithTest = UserConfig & {
|
|
|
12
12
|
};
|
|
13
13
|
export type LatticeViteIconsOptions = Omit<SvgSpriteOptions, "dts" | "iconDirs"> & {
|
|
14
14
|
dirs?: string[];
|
|
15
|
-
dts?:
|
|
15
|
+
dts?: Partial<IconTypesOptions> | false;
|
|
16
16
|
};
|
|
17
17
|
export type LatticeViteOptions = {
|
|
18
18
|
appRoot?: string;
|
|
@@ -56,4 +56,5 @@ export declare function discoverComponentPackages(appRoot: string): LatticeCompo
|
|
|
56
56
|
*/
|
|
57
57
|
export declare function componentPackagesPlugin(packages: LatticeComponentPackage[]): Plugin;
|
|
58
58
|
export declare function latticeConfig(options?: LatticeViteOptions): ConfigWithTest;
|
|
59
|
+
export declare function resolveIconOptions(options: LatticeViteOptions): SvgSpriteOptions | null;
|
|
59
60
|
export {};
|
package/dist/vite.js
CHANGED
|
@@ -116,7 +116,8 @@ var OPTIONAL_PEER_STUBS = { "@laravel/echo-react": [
|
|
|
116
116
|
"};",
|
|
117
117
|
"export const useEcho = missing;",
|
|
118
118
|
"export const useEchoPublic = missing;",
|
|
119
|
-
"export const useEchoPresence = missing;"
|
|
119
|
+
"export const useEchoPresence = missing;",
|
|
120
|
+
"export const useEchoNotification = missing;"
|
|
120
121
|
].join("\n") };
|
|
121
122
|
function optionalPeersPlugin() {
|
|
122
123
|
return {
|
|
@@ -145,7 +146,10 @@ function resolveIconOptions(options) {
|
|
|
145
146
|
return {
|
|
146
147
|
...spriteOptions,
|
|
147
148
|
iconDirs: [path.resolve(root, "resources/icons"), ...dirs],
|
|
148
|
-
...dts === false ? {} : { dts:
|
|
149
|
+
...dts === false ? {} : { dts: {
|
|
150
|
+
...defaultTypes,
|
|
151
|
+
...dts
|
|
152
|
+
} }
|
|
149
153
|
};
|
|
150
154
|
}
|
|
151
155
|
function resolveRoots(options) {
|
|
@@ -156,6 +160,6 @@ function resolveRoots(options) {
|
|
|
156
160
|
};
|
|
157
161
|
}
|
|
158
162
|
//#endregion
|
|
159
|
-
export { collectComponentPackages, componentPackagesPlugin, discoverComponentPackages, lattice, latticeConfig };
|
|
163
|
+
export { collectComponentPackages, componentPackagesPlugin, discoverComponentPackages, lattice, latticeConfig, resolveIconOptions };
|
|
160
164
|
|
|
161
165
|
//# sourceMappingURL=vite.js.map
|
package/dist/vite.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.js","names":[],"sources":["../resources/js/vite.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { svgSprite } from \"@lattice-php/vite-svg-sprite\";\nimport type { SvgSpriteOptions } from \"@lattice-php/vite-svg-sprite\";\nimport { searchForWorkspaceRoot } from \"vite\";\nimport type { Plugin, PluginOption, UserConfig } from \"vite\";\n\ntype InlineDependency = string | RegExp;\n\ntype ConfigWithTest = UserConfig & {\n test?: {\n server?: {\n deps?: {\n inline?: InlineDependency[];\n };\n };\n };\n};\n\nexport type LatticeViteIconsOptions = Omit<SvgSpriteOptions, \"dts\" | \"iconDirs\"> & {\n dirs?: string[];\n dts?: SvgSpriteOptions[\"dts\"] | false;\n};\n\nexport type LatticeViteOptions = {\n appRoot?: string;\n icons?: boolean | LatticeViteIconsOptions;\n root?: string;\n source?: boolean;\n};\n\ntype Roots = {\n appRoot: string;\n root: string;\n};\n\nexport function lattice(options: LatticeViteOptions = {}): PluginOption[] {\n const { appRoot } = resolveRoots(options);\n const plugins: PluginOption[] = [\n corePlugin(options),\n optionalPeersPlugin(),\n componentPackagesPlugin(discoverComponentPackages(appRoot)),\n ];\n const iconOptions = resolveIconOptions(options);\n\n if (iconOptions) {\n plugins.push(svgSprite(iconOptions));\n }\n\n return plugins;\n}\n\n/** A Composer package that contributes a Lattice component plugin. */\nexport type LatticeComponentPackage = {\n name: string;\n /** Absolute path to the package's installed directory. */\n dir: string;\n /** Absolute path to the package's JS plugin entry (its `createPlugin(...)`). */\n plugin: string;\n};\n\ntype InstalledPackage = {\n name: string;\n \"install-path\"?: string;\n extra?: { lattice?: { plugin?: string } };\n};\n\n/**\n * Resolve every Composer package that declares `extra.lattice.plugin` into an\n * absolute plugin-entry path. `installPathsRelativeTo` is `vendor/composer` (the\n * dir `installed.json` records its `install-path`s against).\n */\nexport function collectComponentPackages(\n installed: { packages?: InstalledPackage[] } | InstalledPackage[],\n installPathsRelativeTo: string,\n): LatticeComponentPackage[] {\n const packages = Array.isArray(installed) ? installed : (installed.packages ?? []);\n\n return packages.flatMap((pkg) => {\n const entry = pkg.extra?.lattice?.plugin;\n\n if (typeof entry !== \"string\") {\n return [];\n }\n\n const dir = path.resolve(installPathsRelativeTo, pkg[\"install-path\"] ?? `../${pkg.name}`);\n\n return [{ name: pkg.name, dir, plugin: path.resolve(dir, entry) }];\n });\n}\n\n/** Read `<appRoot>/vendor/composer/installed.json` and collect component packages. */\nexport function discoverComponentPackages(appRoot: string): LatticeComponentPackage[] {\n const composerDir = path.resolve(appRoot, \"vendor/composer\");\n\n let raw: string;\n\n try {\n raw = readFileSync(path.join(composerDir, \"installed.json\"), \"utf8\");\n } catch {\n return [];\n }\n\n return collectComponentPackages(JSON.parse(raw), composerDir);\n}\n\nconst VIRTUAL_PLUGINS_ID = \"virtual:lattice/plugins\";\nconst RESOLVED_VIRTUAL_PLUGINS_ID = `\\0${VIRTUAL_PLUGINS_ID}`;\n\n/**\n * Exposes the discovered component packages as `virtual:lattice/plugins` — a\n * module whose default export is the array of their `createPlugin(...)` results,\n * ready for `extendRegistry(registry, ...plugins)`. Also grants Vite filesystem\n * access to each package dir so its source compiles from `vendor/` (or a symlink).\n */\nexport function componentPackagesPlugin(packages: LatticeComponentPackage[]): Plugin {\n return {\n name: \"lattice:component-packages\",\n config(config) {\n if (packages.length === 0) {\n return {};\n }\n\n const workspaceRoot = searchForWorkspaceRoot(config.root ?? process.cwd());\n\n return { server: { fs: { allow: [workspaceRoot, ...packages.map((pkg) => pkg.dir)] } } };\n },\n resolveId(id) {\n return id === VIRTUAL_PLUGINS_ID ? RESOLVED_VIRTUAL_PLUGINS_ID : null;\n },\n load(id) {\n if (id !== RESOLVED_VIRTUAL_PLUGINS_ID) {\n return null;\n }\n\n const imports = packages\n .map((pkg, index) => `import p${index} from ${JSON.stringify(pkg.plugin)};`)\n .join(\"\\n\");\n const list = packages.map((_, index) => `p${index}`).join(\", \");\n\n return `${imports}\\nexport default [${list}];\\n`;\n },\n };\n}\n\nexport function latticeConfig(options: LatticeViteOptions = {}): ConfigWithTest {\n const { appRoot, root } = resolveRoots(options);\n\n return {\n resolve: {\n alias: options.source\n ? {\n \"@lattice-php/lattice/css\": path.resolve(root, \"resources/css/lattice.css\"),\n \"@lattice-php/lattice\": path.resolve(root, \"resources/js\"),\n }\n : {\n react: path.resolve(appRoot, \"node_modules/react\"),\n \"react-dom\": path.resolve(appRoot, \"node_modules/react-dom\"),\n },\n dedupe: [\"@inertiajs/react\", \"react\", \"react-dom\"],\n },\n server: options.source\n ? {\n fs: {\n allow: [searchForWorkspaceRoot(appRoot), root],\n },\n }\n : undefined,\n test: {\n server: {\n deps: {\n inline: [\n \"@lattice-php/lattice\",\n /[/\\\\]lattice[/\\\\]dist[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]@radix-ui[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]@tiptap[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]react-i18next[/\\\\]/,\n ],\n },\n },\n },\n };\n}\n\nfunction corePlugin(options: LatticeViteOptions): Plugin {\n return {\n name: \"lattice\",\n config() {\n return latticeConfig(options);\n },\n };\n}\n\nconst OPTIONAL_PEER_STUB_PREFIX = \"\\0lattice-optional-peer/\";\n\n/**\n * Real-time listeners statically import their optional Echo peers. A consumer\n * that never uses real-time should still build, so stub a missing peer with\n * hooks that throw — the `RealtimeListeners` error boundary then degrades\n * gracefully and warns to install the peer, exactly as when it is absent.\n */\nconst OPTIONAL_PEER_STUBS: Record<string, string> = {\n \"@laravel/echo-react\": [\n \"const missing = () => {\",\n \" throw new Error(\",\n ' \"[lattice] Real-time listeners require @laravel/echo-react. Install it and call configureEcho().\",',\n \" );\",\n \"};\",\n \"export const useEcho = missing;\",\n \"export const useEchoPublic = missing;\",\n \"export const useEchoPresence = missing;\",\n ].join(\"\\n\"),\n};\n\nfunction optionalPeersPlugin(): Plugin {\n return {\n name: \"lattice:optional-peers\",\n enforce: \"pre\",\n async resolveId(id) {\n if (!Object.prototype.hasOwnProperty.call(OPTIONAL_PEER_STUBS, id)) {\n return null;\n }\n\n const installed = await this.resolve(id, undefined, { skipSelf: true });\n\n return installed ? null : `${OPTIONAL_PEER_STUB_PREFIX}${id}`;\n },\n load(id) {\n if (!id.startsWith(OPTIONAL_PEER_STUB_PREFIX)) {\n return null;\n }\n\n return OPTIONAL_PEER_STUBS[id.slice(OPTIONAL_PEER_STUB_PREFIX.length)] ?? null;\n },\n };\n}\n\nfunction resolveIconOptions(options: LatticeViteOptions): SvgSpriteOptions | null {\n const icons = options.icons ?? true;\n\n if (icons === false) {\n return null;\n }\n\n const { root } = resolveRoots(options);\n const iconOptions = icons === true ? {} : icons;\n const { dirs = [], dts, ...spriteOptions } = iconOptions;\n const defaultTypes = {\n file: \"resources/js/types/sprite-icons.ts\",\n augmentModule: \"@lattice-php/lattice\",\n augmentInterface: \"KnownIcons\",\n };\n\n return {\n ...spriteOptions,\n iconDirs: [path.resolve(root, \"resources/icons\"), ...dirs],\n ...(dts === false ? {} : { dts: dts ?? defaultTypes }),\n };\n}\n\nfunction resolveRoots(options: LatticeViteOptions): Roots {\n const appRoot = options.appRoot ?? process.cwd();\n const root = options.root ?? path.resolve(appRoot, \"vendor/lattice-php/lattice\");\n\n return { appRoot, root };\n}\n"],"mappings":";;;;;AAoCA,SAAgB,QAAQ,UAA8B,CAAC,GAAmB;CACxE,MAAM,EAAE,YAAY,aAAa,OAAO;CACxC,MAAM,UAA0B;EAC9B,WAAW,OAAO;EAClB,oBAAoB;EACpB,wBAAwB,0BAA0B,OAAO,CAAC;CAC5D;CACA,MAAM,cAAc,mBAAmB,OAAO;CAE9C,IAAI,aACF,QAAQ,KAAK,UAAU,WAAW,CAAC;CAGrC,OAAO;AACT;;;;;;AAsBA,SAAgB,yBACd,WACA,wBAC2B;CAG3B,QAFiB,MAAM,QAAQ,SAAS,IAAI,YAAa,UAAU,YAAY,CAAC,GAEhE,SAAS,QAAQ;EAC/B,MAAM,QAAQ,IAAI,OAAO,SAAS;EAElC,IAAI,OAAO,UAAU,UACnB,OAAO,CAAC;EAGV,MAAM,MAAM,KAAK,QAAQ,wBAAwB,IAAI,mBAAmB,MAAM,IAAI,MAAM;EAExF,OAAO,CAAC;GAAE,MAAM,IAAI;GAAM;GAAK,QAAQ,KAAK,QAAQ,KAAK,KAAK;EAAE,CAAC;CACnE,CAAC;AACH;;AAGA,SAAgB,0BAA0B,SAA4C;CACpF,MAAM,cAAc,KAAK,QAAQ,SAAS,iBAAiB;CAE3D,IAAI;CAEJ,IAAI;EACF,MAAM,aAAa,KAAK,KAAK,aAAa,gBAAgB,GAAG,MAAM;CACrE,QAAQ;EACN,OAAO,CAAC;CACV;CAEA,OAAO,yBAAyB,KAAK,MAAM,GAAG,GAAG,WAAW;AAC9D;AAEA,IAAM,qBAAqB;AAC3B,IAAM,8BAA8B,KAAK;;;;;;;AAQzC,SAAgB,wBA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AAEA,IAAM,4BAA4B;;;;;;;AAQlC,IAAM,sBAA8C,EAClD,uBAAuB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EAAE,KAAK,IAAI,EACb;AAEA,SAAS,sBAA8B;CACrC,OAAO;EACL,MAAM;EACN,SAAS;EACT,MAAM,UAAU,IAAI;GAClB,IAAI,CAAC,OAAO,UAAU,eAAe,KAAK,qBAAqB,EAAE,GAC/D,OAAO;GAKT,OAAO,MAFiB,KAAK,QAAQ,IAAI,KAAA,GAAW,EAAE,UAAU,KAAK,CAAC,IAEnD,OAAO,GAAG,4BAA4B;EAC3D;EACA,KAAK,IAAI;GACP,IAAI,CAAC,GAAG,WAAW,yBAAyB,GAC1C,OAAO;GAGT,OAAO,oBAAoB,GAAG,MAAM,EAAgC,MAAM;EAC5E;CACF;AACF;AAEA,SAAS,mBAAmB,SAAsD;CAChF,MAAM,QAAQ,QAAQ,SAAS;CAE/B,IAAI,UAAU,OACZ,OAAO;CAGT,MAAM,EAAE,SAAS,aAAa,OAAO;CAErC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,GAAG,kBADP,UAAU,OAAO,CAAC,IAAI;CAE1C,MAAM,eAAe;EACnB,MAAM;EACN,eAAe;EACf,kBAAkB;CACpB;CAEA,OAAO;EACL,GAAG;EACH,UAAU,CAAC,KAAK,QAAQ,MAAM,iBAAiB,GAAG,GAAG,IAAI;EACzD,GAAI,QAAQ,QAAQ,CAAC,IAAI,EAAE,KAAK,OAAO,aAAa;CACtD;AACF;AAEA,SAAS,aAAa,SAAoC;CACxD,MAAM,UAAU,QAAQ,WAAW,QAAQ,IAAI;CAG/C,OAAO;EAAE;EAAS,MAFL,QAAQ,QAAQ,KAAK,QAAQ,SAAS,4BAA4B;CAExD;AACzB"}
|
|
1
|
+
{"version":3,"file":"vite.js","names":[],"sources":["../resources/js/vite.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { svgSprite } from \"@lattice-php/vite-svg-sprite\";\nimport type { IconTypesOptions, SvgSpriteOptions } from \"@lattice-php/vite-svg-sprite\";\nimport { searchForWorkspaceRoot } from \"vite\";\nimport type { Plugin, PluginOption, UserConfig } from \"vite\";\n\ntype InlineDependency = string | RegExp;\n\ntype ConfigWithTest = UserConfig & {\n test?: {\n server?: {\n deps?: {\n inline?: InlineDependency[];\n };\n };\n };\n};\n\nexport type LatticeViteIconsOptions = Omit<SvgSpriteOptions, \"dts\" | \"iconDirs\"> & {\n dirs?: string[];\n dts?: Partial<IconTypesOptions> | false;\n};\n\nexport type LatticeViteOptions = {\n appRoot?: string;\n icons?: boolean | LatticeViteIconsOptions;\n root?: string;\n source?: boolean;\n};\n\ntype Roots = {\n appRoot: string;\n root: string;\n};\n\nexport function lattice(options: LatticeViteOptions = {}): PluginOption[] {\n const { appRoot } = resolveRoots(options);\n const plugins: PluginOption[] = [\n corePlugin(options),\n optionalPeersPlugin(),\n componentPackagesPlugin(discoverComponentPackages(appRoot)),\n ];\n const iconOptions = resolveIconOptions(options);\n\n if (iconOptions) {\n plugins.push(svgSprite(iconOptions));\n }\n\n return plugins;\n}\n\n/** A Composer package that contributes a Lattice component plugin. */\nexport type LatticeComponentPackage = {\n name: string;\n /** Absolute path to the package's installed directory. */\n dir: string;\n /** Absolute path to the package's JS plugin entry (its `createPlugin(...)`). */\n plugin: string;\n};\n\ntype InstalledPackage = {\n name: string;\n \"install-path\"?: string;\n extra?: { lattice?: { plugin?: string } };\n};\n\n/**\n * Resolve every Composer package that declares `extra.lattice.plugin` into an\n * absolute plugin-entry path. `installPathsRelativeTo` is `vendor/composer` (the\n * dir `installed.json` records its `install-path`s against).\n */\nexport function collectComponentPackages(\n installed: { packages?: InstalledPackage[] } | InstalledPackage[],\n installPathsRelativeTo: string,\n): LatticeComponentPackage[] {\n const packages = Array.isArray(installed) ? installed : (installed.packages ?? []);\n\n return packages.flatMap((pkg) => {\n const entry = pkg.extra?.lattice?.plugin;\n\n if (typeof entry !== \"string\") {\n return [];\n }\n\n const dir = path.resolve(installPathsRelativeTo, pkg[\"install-path\"] ?? `../${pkg.name}`);\n\n return [{ name: pkg.name, dir, plugin: path.resolve(dir, entry) }];\n });\n}\n\n/** Read `<appRoot>/vendor/composer/installed.json` and collect component packages. */\nexport function discoverComponentPackages(appRoot: string): LatticeComponentPackage[] {\n const composerDir = path.resolve(appRoot, \"vendor/composer\");\n\n let raw: string;\n\n try {\n raw = readFileSync(path.join(composerDir, \"installed.json\"), \"utf8\");\n } catch {\n return [];\n }\n\n return collectComponentPackages(JSON.parse(raw), composerDir);\n}\n\nconst VIRTUAL_PLUGINS_ID = \"virtual:lattice/plugins\";\nconst RESOLVED_VIRTUAL_PLUGINS_ID = `\\0${VIRTUAL_PLUGINS_ID}`;\n\n/**\n * Exposes the discovered component packages as `virtual:lattice/plugins` — a\n * module whose default export is the array of their `createPlugin(...)` results,\n * ready for `extendRegistry(registry, ...plugins)`. Also grants Vite filesystem\n * access to each package dir so its source compiles from `vendor/` (or a symlink).\n */\nexport function componentPackagesPlugin(packages: LatticeComponentPackage[]): Plugin {\n return {\n name: \"lattice:component-packages\",\n config(config) {\n if (packages.length === 0) {\n return {};\n }\n\n const workspaceRoot = searchForWorkspaceRoot(config.root ?? process.cwd());\n\n return { server: { fs: { allow: [workspaceRoot, ...packages.map((pkg) => pkg.dir)] } } };\n },\n resolveId(id) {\n return id === VIRTUAL_PLUGINS_ID ? RESOLVED_VIRTUAL_PLUGINS_ID : null;\n },\n load(id) {\n if (id !== RESOLVED_VIRTUAL_PLUGINS_ID) {\n return null;\n }\n\n const imports = packages\n .map((pkg, index) => `import p${index} from ${JSON.stringify(pkg.plugin)};`)\n .join(\"\\n\");\n const list = packages.map((_, index) => `p${index}`).join(\", \");\n\n return `${imports}\\nexport default [${list}];\\n`;\n },\n };\n}\n\nexport function latticeConfig(options: LatticeViteOptions = {}): ConfigWithTest {\n const { appRoot, root } = resolveRoots(options);\n\n return {\n resolve: {\n alias: options.source\n ? {\n \"@lattice-php/lattice/css\": path.resolve(root, \"resources/css/lattice.css\"),\n \"@lattice-php/lattice\": path.resolve(root, \"resources/js\"),\n }\n : {\n react: path.resolve(appRoot, \"node_modules/react\"),\n \"react-dom\": path.resolve(appRoot, \"node_modules/react-dom\"),\n },\n dedupe: [\"@inertiajs/react\", \"react\", \"react-dom\"],\n },\n server: options.source\n ? {\n fs: {\n allow: [searchForWorkspaceRoot(appRoot), root],\n },\n }\n : undefined,\n test: {\n server: {\n deps: {\n inline: [\n \"@lattice-php/lattice\",\n /[/\\\\]lattice[/\\\\]dist[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]@radix-ui[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]@tiptap[/\\\\]/,\n /[/\\\\]lattice[/\\\\]node_modules[/\\\\]react-i18next[/\\\\]/,\n ],\n },\n },\n },\n };\n}\n\nfunction corePlugin(options: LatticeViteOptions): Plugin {\n return {\n name: \"lattice\",\n config() {\n return latticeConfig(options);\n },\n };\n}\n\nconst OPTIONAL_PEER_STUB_PREFIX = \"\\0lattice-optional-peer/\";\n\n/**\n * Real-time listeners statically import their optional Echo peers. A consumer\n * that never uses real-time should still build, so stub a missing peer with\n * hooks that throw — the `RealtimeListeners` error boundary then degrades\n * gracefully and warns to install the peer, exactly as when it is absent.\n */\nconst OPTIONAL_PEER_STUBS: Record<string, string> = {\n \"@laravel/echo-react\": [\n \"const missing = () => {\",\n \" throw new Error(\",\n ' \"[lattice] Real-time listeners require @laravel/echo-react. Install it and call configureEcho().\",',\n \" );\",\n \"};\",\n \"export const useEcho = missing;\",\n \"export const useEchoPublic = missing;\",\n \"export const useEchoPresence = missing;\",\n \"export const useEchoNotification = missing;\",\n ].join(\"\\n\"),\n};\n\nfunction optionalPeersPlugin(): Plugin {\n return {\n name: \"lattice:optional-peers\",\n enforce: \"pre\",\n async resolveId(id) {\n if (!Object.prototype.hasOwnProperty.call(OPTIONAL_PEER_STUBS, id)) {\n return null;\n }\n\n const installed = await this.resolve(id, undefined, { skipSelf: true });\n\n return installed ? null : `${OPTIONAL_PEER_STUB_PREFIX}${id}`;\n },\n load(id) {\n if (!id.startsWith(OPTIONAL_PEER_STUB_PREFIX)) {\n return null;\n }\n\n return OPTIONAL_PEER_STUBS[id.slice(OPTIONAL_PEER_STUB_PREFIX.length)] ?? null;\n },\n };\n}\n\nexport function resolveIconOptions(options: LatticeViteOptions): SvgSpriteOptions | null {\n const icons = options.icons ?? true;\n\n if (icons === false) {\n return null;\n }\n\n const { root } = resolveRoots(options);\n const iconOptions = icons === true ? {} : icons;\n const { dirs = [], dts, ...spriteOptions } = iconOptions;\n const defaultTypes = {\n file: \"resources/js/types/sprite-icons.ts\",\n augmentModule: \"@lattice-php/lattice\",\n augmentInterface: \"KnownIcons\",\n };\n\n return {\n ...spriteOptions,\n iconDirs: [path.resolve(root, \"resources/icons\"), ...dirs],\n ...(dts === false ? {} : { dts: { ...defaultTypes, ...dts } }),\n };\n}\n\nfunction resolveRoots(options: LatticeViteOptions): Roots {\n const appRoot = options.appRoot ?? process.cwd();\n const root = options.root ?? path.resolve(appRoot, \"vendor/lattice-php/lattice\");\n\n return { appRoot, root };\n}\n"],"mappings":";;;;;AAoCA,SAAgB,QAAQ,UAA8B,CAAC,GAAmB;CACxE,MAAM,EAAE,YAAY,aAAa,OAAO;CACxC,MAAM,UAA0B;EAC9B,WAAW,OAAO;EAClB,oBAAoB;EACpB,wBAAwB,0BAA0B,OAAO,CAAC;CAC5D;CACA,MAAM,cAAc,mBAAmB,OAAO;CAE9C,IAAI,aACF,QAAQ,KAAK,UAAU,WAAW,CAAC;CAGrC,OAAO;AACT;;;;;;AAsBA,SAAgB,yBACd,WACA,wBAC2B;CAG3B,QAFiB,MAAM,QAAQ,SAAS,IAAI,YAAa,UAAU,YAAY,CAAC,GAEhE,SAAS,QAAQ;EAC/B,MAAM,QAAQ,IAAI,OAAO,SAAS;EAElC,IAAI,OAAO,UAAU,UACnB,OAAO,CAAC;EAGV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