@hanzo/ui 8.27.7 → 8.27.9
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/README.md +2 -1
- package/dist/agents/ChannelMembers.cjs +8 -0
- package/dist/agents/ChannelMembers.d.ts +17 -0
- package/dist/agents/ChannelMembers.d.ts.map +1 -0
- package/dist/agents/ChannelMembers.js +5 -0
- package/dist/agents/ChannelMembers.js.map +1 -0
- package/dist/agents/ChannelNotes.cjs +15 -0
- package/dist/agents/ChannelNotes.d.ts +11 -0
- package/dist/agents/ChannelNotes.d.ts.map +1 -0
- package/dist/agents/ChannelNotes.js +12 -0
- package/dist/agents/ChannelNotes.js.map +1 -0
- package/dist/agents/DiffViewer.cjs +47 -0
- package/dist/agents/DiffViewer.d.ts +10 -0
- package/dist/agents/DiffViewer.d.ts.map +1 -0
- package/dist/agents/DiffViewer.js +44 -0
- package/dist/agents/DiffViewer.js.map +1 -0
- package/dist/agents/LiveVoiceCall.cjs +62 -0
- package/dist/agents/LiveVoiceCall.d.ts +17 -0
- package/dist/agents/LiveVoiceCall.d.ts.map +1 -0
- package/dist/agents/LiveVoiceCall.js +59 -0
- package/dist/agents/LiveVoiceCall.js.map +1 -0
- package/dist/agents/MCPHub.cjs +14 -0
- package/dist/agents/MCPHub.d.ts +24 -0
- package/dist/agents/MCPHub.d.ts.map +1 -0
- package/dist/agents/MCPHub.js +11 -0
- package/dist/agents/MCPHub.js.map +1 -0
- package/dist/agents/ShortcutsSheet.cjs +24 -0
- package/dist/agents/ShortcutsSheet.d.ts +14 -0
- package/dist/agents/ShortcutsSheet.d.ts.map +1 -0
- package/dist/agents/ShortcutsSheet.js +21 -0
- package/dist/agents/ShortcutsSheet.js.map +1 -0
- package/dist/agents/SwarmBar.cjs +19 -0
- package/dist/agents/SwarmBar.d.ts +20 -0
- package/dist/agents/SwarmBar.d.ts.map +1 -0
- package/dist/agents/SwarmBar.js +16 -0
- package/dist/agents/SwarmBar.js.map +1 -0
- package/dist/agents/ThemeCustomizer.cjs +20 -0
- package/dist/agents/ThemeCustomizer.d.ts +13 -0
- package/dist/agents/ThemeCustomizer.d.ts.map +1 -0
- package/dist/agents/ThemeCustomizer.js +17 -0
- package/dist/agents/ThemeCustomizer.js.map +1 -0
- package/dist/agents/index.cjs +17 -1
- package/dist/agents/index.d.ts +8 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +8 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/canvas.cjs +3 -3
- package/dist/canvas.js +3 -3
- package/dist/canvas.js.map +1 -1
- package/dist/gallery.html +2 -2
- package/dist/grid.cjs +19 -43
- package/dist/grid.d.ts +36 -1
- package/dist/grid.d.ts.map +1 -1
- package/dist/grid.js +19 -43
- package/dist/grid.js.map +1 -1
- package/dist/gui-config.d.ts +30 -0
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +5 -1
- package/dist/index.node.js +3 -0
- package/dist/product/ChunkGuard.cjs +58 -0
- package/dist/product/ChunkGuard.d.ts +7 -0
- package/dist/product/ChunkGuard.d.ts.map +1 -0
- package/dist/product/ChunkGuard.js +56 -0
- package/dist/product/ChunkGuard.js.map +1 -0
- package/dist/product/DetailPane.cjs +46 -0
- package/dist/product/DetailPane.d.ts +47 -0
- package/dist/product/DetailPane.d.ts.map +1 -0
- package/dist/product/DetailPane.js +43 -0
- package/dist/product/DetailPane.js.map +1 -0
- package/dist/product/Fact.cjs +19 -0
- package/dist/product/Fact.d.ts +23 -0
- package/dist/product/Fact.d.ts.map +1 -0
- package/dist/product/Fact.js +17 -0
- package/dist/product/Fact.js.map +1 -0
- package/dist/product/chunkGuard.logic.cjs +54 -0
- package/dist/product/chunkGuard.logic.d.ts +26 -0
- package/dist/product/chunkGuard.logic.d.ts.map +1 -0
- package/dist/product/chunkGuard.logic.js +49 -0
- package/dist/product/chunkGuard.logic.js.map +1 -0
- package/dist/product/index.cjs +10 -0
- package/dist/product/index.d.ts +3 -0
- package/dist/product/index.d.ts.map +1 -1
- package/dist/product/index.js +10 -0
- package/dist/product/index.js.map +1 -1
- package/package.json +5 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DetailPane — the ONE reusable right-side pane for viewing or editing the
|
|
3
|
+
* details of an item. A product does NOT build its own pane: it writes a
|
|
4
|
+
* DESCRIPTOR (`{ title, subtitle?, icon?, content, footer? }`) and calls
|
|
5
|
+
* `useDetailPane().open(descriptor)`. The pane slides out from the right
|
|
6
|
+
* (full-screen on mobile) via `SlideOver`, so every "open item detail" looks
|
|
7
|
+
* and behaves identically (DRY).
|
|
8
|
+
*
|
|
9
|
+
* Rendered ONCE near the shell root; any module — a row, a list item, a
|
|
10
|
+
* pinned form — opens the same pane. Interactive content closes itself with
|
|
11
|
+
* `useDetailPane().close()`.
|
|
12
|
+
*
|
|
13
|
+
* The last descriptor stays mounted through the close transition, so the exit
|
|
14
|
+
* animates with its content (no flash of empty pane). Opening a new
|
|
15
|
+
* descriptor replaces it.
|
|
16
|
+
*/
|
|
17
|
+
import { type ReactNode } from 'react';
|
|
18
|
+
import { type IconLike } from './color.js';
|
|
19
|
+
export type DetailDescriptor = {
|
|
20
|
+
/** Pane title (the item's name). */
|
|
21
|
+
title: ReactNode;
|
|
22
|
+
/** Optional secondary line under the title (type, id, status…). */
|
|
23
|
+
subtitle?: ReactNode;
|
|
24
|
+
/** Optional title icon, tinted with `iconColor`. */
|
|
25
|
+
icon?: IconLike;
|
|
26
|
+
iconColor?: string;
|
|
27
|
+
/** Desktop pane width (px). Mobile is always full-screen. Default 460. */
|
|
28
|
+
size?: number;
|
|
29
|
+
/** The body — the detail view or edit form for the item. */
|
|
30
|
+
content: ReactNode;
|
|
31
|
+
/** Optional sticky footer (primary actions), pinned below the scroll body. */
|
|
32
|
+
footer?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export type DetailPaneApi = {
|
|
35
|
+
open: (descriptor: DetailDescriptor) => void;
|
|
36
|
+
close: () => void;
|
|
37
|
+
isOpen: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare function useDetailPane(): DetailPaneApi;
|
|
40
|
+
export type DetailPaneProps = {
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
/** z-index for stacking — a pane opened over another overlay passes a
|
|
43
|
+
* higher value. Left to `SlideOver`'s own default otherwise. */
|
|
44
|
+
zIndex?: number;
|
|
45
|
+
};
|
|
46
|
+
export declare function DetailPane({ children, zIndex }: DetailPaneProps): import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=DetailPane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailPane.d.ts","sourceRoot":"","sources":["../../src/product/DetailPane.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAKd,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAA;IAChB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,OAAO,EAAE,SAAS,CAAA;IAClB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAID,wBAAgB,aAAa,IAAI,aAAa,CAI7C;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,SAAS,CAAA;IACnB;qEACiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,+BAsD/D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* DetailPane — the ONE reusable right-side pane for viewing or editing the
|
|
5
|
+
* details of an item. A product does NOT build its own pane: it writes a
|
|
6
|
+
* DESCRIPTOR (`{ title, subtitle?, icon?, content, footer? }`) and calls
|
|
7
|
+
* `useDetailPane().open(descriptor)`. The pane slides out from the right
|
|
8
|
+
* (full-screen on mobile) via `SlideOver`, so every "open item detail" looks
|
|
9
|
+
* and behaves identically (DRY).
|
|
10
|
+
*
|
|
11
|
+
* Rendered ONCE near the shell root; any module — a row, a list item, a
|
|
12
|
+
* pinned form — opens the same pane. Interactive content closes itself with
|
|
13
|
+
* `useDetailPane().close()`.
|
|
14
|
+
*
|
|
15
|
+
* The last descriptor stays mounted through the close transition, so the exit
|
|
16
|
+
* animates with its content (no flash of empty pane). Opening a new
|
|
17
|
+
* descriptor replaces it.
|
|
18
|
+
*/
|
|
19
|
+
import { createContext, useCallback, useContext, useMemo, useState, } from 'react';
|
|
20
|
+
import { Button, ScrollView, Text, XStack, YStack } from '@hanzo/gui';
|
|
21
|
+
import { X } from '@hanzogui/lucide-icons-2';
|
|
22
|
+
import { SlideOver } from './SlideOver.js';
|
|
23
|
+
import { asColor } from './color.js';
|
|
24
|
+
const Ctx = createContext(null);
|
|
25
|
+
export function useDetailPane() {
|
|
26
|
+
const ctx = useContext(Ctx);
|
|
27
|
+
if (!ctx)
|
|
28
|
+
throw new Error('useDetailPane must be used within <DetailPane>');
|
|
29
|
+
return ctx;
|
|
30
|
+
}
|
|
31
|
+
export function DetailPane({ children, zIndex }) {
|
|
32
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
33
|
+
const [desc, setDesc] = useState(null);
|
|
34
|
+
const open = useCallback((descriptor) => {
|
|
35
|
+
setDesc(descriptor);
|
|
36
|
+
setIsOpen(true);
|
|
37
|
+
}, []);
|
|
38
|
+
const close = useCallback(() => setIsOpen(false), []);
|
|
39
|
+
const api = useMemo(() => ({ open, close, isOpen }), [open, close, isOpen]);
|
|
40
|
+
const Icon = desc?.icon;
|
|
41
|
+
return (_jsxs(Ctx.Provider, { value: api, children: [children, _jsxs(SlideOver, { open: isOpen, onClose: close, side: "right", size: desc?.size ?? 460, ariaLabel: typeof desc?.title === 'string' ? desc?.title : 'Details', zIndex: zIndex, children: [_jsxs(XStack, { items: "center", gap: "$2.5", px: "$4", height: 56, borderBottomWidth: 1, borderColor: "$borderColor", children: [Icon ? _jsx(Icon, { size: 18, color: desc?.iconColor ? asColor(desc.iconColor) : undefined }) : null, _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$5", fontWeight: "700", color: "$color12", numberOfLines: 1, children: desc?.title }), desc?.subtitle !== undefined ? (_jsx(Text, { fontSize: "$2", color: "$color10", numberOfLines: 1, children: desc?.subtitle })) : null] }), _jsx(Button, { size: "$2", chromeless: true, icon: _jsx(X, { size: 18 }), onPress: close, "aria-label": "Close" })] }), _jsx(ScrollView, { flex: 1, minH: 0, children: _jsx(YStack, { p: "$4", gap: "$3", children: desc?.content }) }), desc?.footer !== undefined ? (_jsx(XStack, { px: "$4", py: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", bg: "$color1", children: desc?.footer })) : null] })] }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=DetailPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailPane.js","sourceRoot":"","sources":["../../src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AC,YAClD,IAAI,EAAE,QAAQ,GACV,CACR,CAAC,CAAC,CAAC,IAAI,IACD,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,UAAU,QAAC,IAAI,EAAE,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,EAAE,OAAO,EAAE,KAAK,gBAAa,OAAO,GAAG,IAClF,EAET,KAAC,UAAU,IAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,YAC1B,KAAC,MAAM,IAAC,CAAC,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,YACpB,IAAI,EAAE,OAAO,GACP,GACE,EAEZ,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAC5B,KAAC,MAAM,IAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,cAAc,EAAE,CAAC,EAAE,WAAW,EAAC,cAAc,EAAC,EAAE,EAAC,SAAS,YACxF,IAAI,EAAE,MAAM,GACN,CACV,CAAC,CAAC,CAAC,IAAI,IACE,IACC,CAChB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Fact = Fact;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const gui_1 = require("@hanzo/gui");
|
|
6
|
+
const fonts_1 = require("../core/fonts.cjs");
|
|
7
|
+
/**
|
|
8
|
+
* Fact — one row of a property list: a label on the left, a value on the
|
|
9
|
+
* right, a hairline separator beneath. The read-only counterpart to `Field`'s
|
|
10
|
+
* editable row — a detail pane is a stack of these where a settings form is a
|
|
11
|
+
* stack of `Field`s.
|
|
12
|
+
*
|
|
13
|
+
* Written twice, near-identically, in two console detail drawers before
|
|
14
|
+
* either could find the other. This is the one definition; the wider of the
|
|
15
|
+
* two shapes won (a non-string `value` renders as given, not stringified).
|
|
16
|
+
*/
|
|
17
|
+
function Fact({ label, value, mono }) {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", items: "center", py: "$1.5", borderBottomWidth: 1, borderColor: "$borderColor", gap: "$3", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color11", children: label }), typeof value === 'string' ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", color: "$color12", fontWeight: "600", numberOfLines: 1, style: mono ? { fontFamily: fonts_1.fontMono } : undefined, children: value })) : (value)] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type FactProps = {
|
|
3
|
+
/** The row's left-hand label. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The row's right-hand value. A string renders in the value color and
|
|
6
|
+
* weight; anything else (a badge, a link, a stack of controls) renders as
|
|
7
|
+
* given. */
|
|
8
|
+
value: ReactNode;
|
|
9
|
+
/** Render a string value in the monospace face — an id, a hash, a path. */
|
|
10
|
+
mono?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Fact — one row of a property list: a label on the left, a value on the
|
|
14
|
+
* right, a hairline separator beneath. The read-only counterpart to `Field`'s
|
|
15
|
+
* editable row — a detail pane is a stack of these where a settings form is a
|
|
16
|
+
* stack of `Field`s.
|
|
17
|
+
*
|
|
18
|
+
* Written twice, near-identically, in two console detail drawers before
|
|
19
|
+
* either could find the other. This is the one definition; the wider of the
|
|
20
|
+
* two shapes won (a non-string `value` renders as given, not stringified).
|
|
21
|
+
*/
|
|
22
|
+
export declare function Fact({ label, value, mono }: FactProps): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=Fact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fact.d.ts","sourceRoot":"","sources":["../../src/product/Fact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,MAAM,SAAS,GAAG;IACtB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb;;iBAEa;IACb,KAAK,EAAE,SAAS,CAAA;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,+BA4BrD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, XStack } from '@hanzo/gui';
|
|
3
|
+
import { fontMono } from '../core/fonts.js';
|
|
4
|
+
/**
|
|
5
|
+
* Fact — one row of a property list: a label on the left, a value on the
|
|
6
|
+
* right, a hairline separator beneath. The read-only counterpart to `Field`'s
|
|
7
|
+
* editable row — a detail pane is a stack of these where a settings form is a
|
|
8
|
+
* stack of `Field`s.
|
|
9
|
+
*
|
|
10
|
+
* Written twice, near-identically, in two console detail drawers before
|
|
11
|
+
* either could find the other. This is the one definition; the wider of the
|
|
12
|
+
* two shapes won (a non-string `value` renders as given, not stringified).
|
|
13
|
+
*/
|
|
14
|
+
export function Fact({ label, value, mono }) {
|
|
15
|
+
return (_jsxs(XStack, { justify: "space-between", items: "center", py: "$1.5", borderBottomWidth: 1, borderColor: "$borderColor", gap: "$3", children: [_jsx(Text, { fontSize: "$2", color: "$color11", children: label }), typeof value === 'string' ? (_jsx(Text, { fontSize: "$2", color: "$color12", fontWeight: "600", numberOfLines: 1, style: mono ? { fontFamily: fontMono } : undefined, children: value })) : (value)] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Fact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fact.js","sourceRoot":"","sources":["../../src/product/Fact.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAaxC;;;;;;;;;GASG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAa;IACpD,OAAO,CACL,MAAC,MAAM,IACL,OAAO,EAAC,eAAe,EACvB,KAAK,EAAC,QAAQ,EACd,EAAE,EAAC,MAAM,EACT,iBAAiB,EAAE,CAAC,EACpB,WAAW,EAAC,cAAc,EAC1B,GAAG,EAAC,IAAI,aAER,KAAC,IAAI,IAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,UAAU,YACjC,KAAK,GACD,EACN,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC3B,KAAC,IAAI,IACH,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,UAAU,EAChB,UAAU,EAAC,KAAK,EAChB,aAAa,EAAE,CAAC,EAChB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,YAEjD,KAAK,GACD,CACR,CAAC,CAAC,CAAC,CACF,KAAK,CACN,IACM,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure decisions for `ChunkGuard`, kept apart from the window listeners so
|
|
4
|
+
* they are unit-tested without a browser.
|
|
5
|
+
*
|
|
6
|
+
* On a rolling deploy, an open tab (or a fresh deep-link landing on a new
|
|
7
|
+
* replica) can request a hashed chunk that no longer exists. The 404 falls
|
|
8
|
+
* through to the app-shell HTML, so the browser throws `ChunkLoadError` /
|
|
9
|
+
* "Unexpected token '<'" trying to parse HTML as JS — a blank,
|
|
10
|
+
* unrecoverable screen. In a PRODUCTION build, user code never throws
|
|
11
|
+
* "Unexpected token '<'" at runtime (that is a build-time syntax error), so
|
|
12
|
+
* at runtime it is a chunk skew — recover, don't crash.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CHUNK_RELOAD_AT_KEY = void 0;
|
|
16
|
+
exports.isChunkLoadError = isChunkLoadError;
|
|
17
|
+
exports.isBuildAssetError = isBuildAssetError;
|
|
18
|
+
exports.shouldReloadForChunk = shouldReloadForChunk;
|
|
19
|
+
/** The sessionStorage key a recovery reload is bounded by, so a skew that
|
|
20
|
+
* trips the guard more than once in a burst reloads at most once. */
|
|
21
|
+
exports.CHUNK_RELOAD_AT_KEY = 'hz.chunkReloadAt';
|
|
22
|
+
/** True for a webpack/Next dynamic chunk (JS or CSS) load failure, including
|
|
23
|
+
* the stale-deploy case where a 404'd chunk URL is parsed as JS. */
|
|
24
|
+
function isChunkLoadError(e) {
|
|
25
|
+
if (!e)
|
|
26
|
+
return false;
|
|
27
|
+
const name = typeof e === 'object' && e !== null && 'name' in e ? String(e.name) : '';
|
|
28
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
29
|
+
return (name === 'ChunkLoadError' ||
|
|
30
|
+
/ChunkLoadError/i.test(msg) ||
|
|
31
|
+
/Loading (?:CSS )?chunk [\w./-]+ failed/i.test(msg) ||
|
|
32
|
+
/(?:Failed to fetch|error loading|Importing a module script failed).*dynamically imported module/i.test(msg) ||
|
|
33
|
+
/Failed to fetch dynamically imported module/i.test(msg) ||
|
|
34
|
+
/Importing a module script failed/i.test(msg) ||
|
|
35
|
+
// Stale chunk URL served the HTML shell → parsed as JS.
|
|
36
|
+
/Unexpected token '<'|expected expression, got '<'|Unexpected token <|<!DOCTYPE/i.test(msg));
|
|
37
|
+
}
|
|
38
|
+
/** True for a failed resource load whose element targets a build asset
|
|
39
|
+
* (a script or stylesheet under `pathPrefix`, default `/_next/static/`). */
|
|
40
|
+
function isBuildAssetError(target, pathPrefix = '/_next/static/') {
|
|
41
|
+
if (!target || typeof target !== 'object')
|
|
42
|
+
return false;
|
|
43
|
+
const el = target;
|
|
44
|
+
const url = el.src || el.href;
|
|
45
|
+
return typeof url === 'string' && url.includes(pathPrefix);
|
|
46
|
+
}
|
|
47
|
+
/** Reload at most once per `windowMs` to recover from a chunk skew.
|
|
48
|
+
* `lastReloadAt` is the epoch-ms of the last recovery reload (null when
|
|
49
|
+
* there has been none); true means a fresh reload is safe. */
|
|
50
|
+
function shouldReloadForChunk(now, lastReloadAt, windowMs = 15_000) {
|
|
51
|
+
if (lastReloadAt == null || !Number.isFinite(lastReloadAt))
|
|
52
|
+
return true;
|
|
53
|
+
return now - lastReloadAt >= windowMs;
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure decisions for `ChunkGuard`, kept apart from the window listeners so
|
|
3
|
+
* they are unit-tested without a browser.
|
|
4
|
+
*
|
|
5
|
+
* On a rolling deploy, an open tab (or a fresh deep-link landing on a new
|
|
6
|
+
* replica) can request a hashed chunk that no longer exists. The 404 falls
|
|
7
|
+
* through to the app-shell HTML, so the browser throws `ChunkLoadError` /
|
|
8
|
+
* "Unexpected token '<'" trying to parse HTML as JS — a blank,
|
|
9
|
+
* unrecoverable screen. In a PRODUCTION build, user code never throws
|
|
10
|
+
* "Unexpected token '<'" at runtime (that is a build-time syntax error), so
|
|
11
|
+
* at runtime it is a chunk skew — recover, don't crash.
|
|
12
|
+
*/
|
|
13
|
+
/** The sessionStorage key a recovery reload is bounded by, so a skew that
|
|
14
|
+
* trips the guard more than once in a burst reloads at most once. */
|
|
15
|
+
export declare const CHUNK_RELOAD_AT_KEY = "hz.chunkReloadAt";
|
|
16
|
+
/** True for a webpack/Next dynamic chunk (JS or CSS) load failure, including
|
|
17
|
+
* the stale-deploy case where a 404'd chunk URL is parsed as JS. */
|
|
18
|
+
export declare function isChunkLoadError(e: unknown): boolean;
|
|
19
|
+
/** True for a failed resource load whose element targets a build asset
|
|
20
|
+
* (a script or stylesheet under `pathPrefix`, default `/_next/static/`). */
|
|
21
|
+
export declare function isBuildAssetError(target: EventTarget | null, pathPrefix?: string): boolean;
|
|
22
|
+
/** Reload at most once per `windowMs` to recover from a chunk skew.
|
|
23
|
+
* `lastReloadAt` is the epoch-ms of the last recovery reload (null when
|
|
24
|
+
* there has been none); true means a fresh reload is safe. */
|
|
25
|
+
export declare function shouldReloadForChunk(now: number, lastReloadAt: number | null, windowMs?: number): boolean;
|
|
26
|
+
//# sourceMappingURL=chunkGuard.logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkGuard.logic.d.ts","sourceRoot":"","sources":["../../src/product/chunkGuard.logic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;sEACsE;AACtE,eAAO,MAAM,mBAAmB,qBAAqB,CAAA;AAErD;qEACqE;AACrE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAcpD;AAED;6EAC6E;AAC7E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,UAAU,SAAmB,GAAG,OAAO,CAKpG;AAED;;+DAE+D;AAC/D,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,SAAS,GAAG,OAAO,CAGzG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure decisions for `ChunkGuard`, kept apart from the window listeners so
|
|
3
|
+
* they are unit-tested without a browser.
|
|
4
|
+
*
|
|
5
|
+
* On a rolling deploy, an open tab (or a fresh deep-link landing on a new
|
|
6
|
+
* replica) can request a hashed chunk that no longer exists. The 404 falls
|
|
7
|
+
* through to the app-shell HTML, so the browser throws `ChunkLoadError` /
|
|
8
|
+
* "Unexpected token '<'" trying to parse HTML as JS — a blank,
|
|
9
|
+
* unrecoverable screen. In a PRODUCTION build, user code never throws
|
|
10
|
+
* "Unexpected token '<'" at runtime (that is a build-time syntax error), so
|
|
11
|
+
* at runtime it is a chunk skew — recover, don't crash.
|
|
12
|
+
*/
|
|
13
|
+
/** The sessionStorage key a recovery reload is bounded by, so a skew that
|
|
14
|
+
* trips the guard more than once in a burst reloads at most once. */
|
|
15
|
+
export const CHUNK_RELOAD_AT_KEY = 'hz.chunkReloadAt';
|
|
16
|
+
/** True for a webpack/Next dynamic chunk (JS or CSS) load failure, including
|
|
17
|
+
* the stale-deploy case where a 404'd chunk URL is parsed as JS. */
|
|
18
|
+
export function isChunkLoadError(e) {
|
|
19
|
+
if (!e)
|
|
20
|
+
return false;
|
|
21
|
+
const name = typeof e === 'object' && e !== null && 'name' in e ? String(e.name) : '';
|
|
22
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
23
|
+
return (name === 'ChunkLoadError' ||
|
|
24
|
+
/ChunkLoadError/i.test(msg) ||
|
|
25
|
+
/Loading (?:CSS )?chunk [\w./-]+ failed/i.test(msg) ||
|
|
26
|
+
/(?:Failed to fetch|error loading|Importing a module script failed).*dynamically imported module/i.test(msg) ||
|
|
27
|
+
/Failed to fetch dynamically imported module/i.test(msg) ||
|
|
28
|
+
/Importing a module script failed/i.test(msg) ||
|
|
29
|
+
// Stale chunk URL served the HTML shell → parsed as JS.
|
|
30
|
+
/Unexpected token '<'|expected expression, got '<'|Unexpected token <|<!DOCTYPE/i.test(msg));
|
|
31
|
+
}
|
|
32
|
+
/** True for a failed resource load whose element targets a build asset
|
|
33
|
+
* (a script or stylesheet under `pathPrefix`, default `/_next/static/`). */
|
|
34
|
+
export function isBuildAssetError(target, pathPrefix = '/_next/static/') {
|
|
35
|
+
if (!target || typeof target !== 'object')
|
|
36
|
+
return false;
|
|
37
|
+
const el = target;
|
|
38
|
+
const url = el.src || el.href;
|
|
39
|
+
return typeof url === 'string' && url.includes(pathPrefix);
|
|
40
|
+
}
|
|
41
|
+
/** Reload at most once per `windowMs` to recover from a chunk skew.
|
|
42
|
+
* `lastReloadAt` is the epoch-ms of the last recovery reload (null when
|
|
43
|
+
* there has been none); true means a fresh reload is safe. */
|
|
44
|
+
export function shouldReloadForChunk(now, lastReloadAt, windowMs = 15_000) {
|
|
45
|
+
if (lastReloadAt == null || !Number.isFinite(lastReloadAt))
|
|
46
|
+
return true;
|
|
47
|
+
return now - lastReloadAt >= windowMs;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=chunkGuard.logic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkGuard.logic.js","sourceRoot":"","sources":["../../src/product/chunkGuard.logic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;sEACsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAA;AAErD;qEACqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,CAAU;IACzC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAE,CAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7G,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACtD,OAAO,CACL,IAAI,KAAK,gBAAgB;QACzB,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3B,yCAAyC,CAAC,IAAI,CAAC,GAAG,CAAC;QACnD,kGAAkG,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5G,8CAA8C,CAAC,IAAI,CAAC,GAAG,CAAC;QACxD,mCAAmC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7C,wDAAwD;QACxD,iFAAiF,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5F,CAAA;AACH,CAAC;AAED;6EAC6E;AAC7E,MAAM,UAAU,iBAAiB,CAAC,MAA0B,EAAE,UAAU,GAAG,gBAAgB;IACzF,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACvD,MAAM,EAAE,GAAG,MAAsD,CAAA;IACjE,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAA;IAC7B,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AAC5D,CAAC;AAED;;+DAE+D;AAC/D,MAAM,UAAU,oBAAoB,CAAC,GAAW,EAAE,YAA2B,EAAE,QAAQ,GAAG,MAAM;IAC9F,IAAI,YAAY,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QAAE,OAAO,IAAI,CAAA;IACvE,OAAO,GAAG,GAAG,YAAY,IAAI,QAAQ,CAAA;AACvC,CAAC"}
|
package/dist/product/index.cjs
CHANGED
|
@@ -113,6 +113,9 @@ __exportStar(require("./Workbench.cjs"), exports);
|
|
|
113
113
|
__exportStar(require("./EmptyState.cjs"), exports);
|
|
114
114
|
__exportStar(require("./FadeIn.cjs"), exports);
|
|
115
115
|
__exportStar(require("./Field.cjs"), exports);
|
|
116
|
+
// `Fact` is `Field`'s read-only counterpart: a settings form is a stack of
|
|
117
|
+
// `Field`s, a detail pane is a stack of these.
|
|
118
|
+
__exportStar(require("./Fact.cjs"), exports);
|
|
116
119
|
__exportStar(require("./HanzoMark.cjs"), exports);
|
|
117
120
|
__exportStar(require("./PageHeader.cjs"), exports);
|
|
118
121
|
// Palette — the ONE ⌘K bar, plus its opener. The list it renders is not written
|
|
@@ -129,6 +132,9 @@ __exportStar(require("./Reorder.cjs"), exports);
|
|
|
129
132
|
__exportStar(require("./SelectMenu.cjs"), exports);
|
|
130
133
|
__exportStar(require("./Skeleton.cjs"), exports);
|
|
131
134
|
__exportStar(require("./SlideOver.cjs"), exports);
|
|
135
|
+
// `DetailPane` is the one mount point over `SlideOver` for a descriptor-driven
|
|
136
|
+
// item view: a caller writes `{ title, content, footer? }`, never a drawer.
|
|
137
|
+
__exportStar(require("./DetailPane.cjs"), exports);
|
|
132
138
|
__exportStar(require("./StatusTag.cjs"), exports);
|
|
133
139
|
__exportStar(require("./Split.cjs"), exports);
|
|
134
140
|
__exportStar(require("./tone.cjs"), exports);
|
|
@@ -140,6 +146,10 @@ __exportStar(require("./ThemeToggle.cjs"), exports);
|
|
|
140
146
|
// those shapes; reaching for them is the signal you have left the common case.
|
|
141
147
|
__exportStar(require("./DialogTemplate.cjs"), exports);
|
|
142
148
|
__exportStar(require("./TooltipAnchor.cjs"), exports);
|
|
149
|
+
// `ChunkGuard` — the window-level net for a stale-deploy chunk 404 (see
|
|
150
|
+
// `chunkGuard.logic.ts` for the pure decisions). Mount it once near the shell
|
|
151
|
+
// root; it renders nothing.
|
|
152
|
+
__exportStar(require("./ChunkGuard.cjs"), exports);
|
|
143
153
|
// `ThemeToggleNext` is NOT re-exported here, and that is the whole reason this
|
|
144
154
|
// comment exists. It is the @hanzogui/next-theme binding, and next-theme's
|
|
145
155
|
// provider imports `next/script` — so a static edge from this barrel put Next in
|
package/dist/product/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './Workbench.js';
|
|
|
33
33
|
export * from './EmptyState.js';
|
|
34
34
|
export * from './FadeIn.js';
|
|
35
35
|
export * from './Field.js';
|
|
36
|
+
export * from './Fact.js';
|
|
36
37
|
export * from './HanzoMark.js';
|
|
37
38
|
export * from './PageHeader.js';
|
|
38
39
|
export * from './Palette.js';
|
|
@@ -45,12 +46,14 @@ export * from './Reorder.js';
|
|
|
45
46
|
export * from './SelectMenu.js';
|
|
46
47
|
export * from './Skeleton.js';
|
|
47
48
|
export * from './SlideOver.js';
|
|
49
|
+
export * from './DetailPane.js';
|
|
48
50
|
export * from './StatusTag.js';
|
|
49
51
|
export * from './Split.js';
|
|
50
52
|
export * from './tone.js';
|
|
51
53
|
export * from './ThemeToggle.js';
|
|
52
54
|
export * from './DialogTemplate.js';
|
|
53
55
|
export * from './TooltipAnchor.js';
|
|
56
|
+
export * from './ChunkGuard.js';
|
|
54
57
|
export * from './Toast.js';
|
|
55
58
|
export * from './accent.js';
|
|
56
59
|
export * from './color.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AAKxB,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAK/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,cAAc,mBAAmB,CAAA;AASjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AAKvB,cAAc,QAAQ,CAAA;AAKtB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAK5B,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AAOzB,cAAc,cAAc,CAAA;AAK5B,cAAc,YAAY,CAAA;AAO1B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAI7B,cAAc,cAAc,CAAA;AAG5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AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAGvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAM5B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAG3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAM7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAK/B,cAAc,cAAc,CAAA;AAc5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AASvB,cAAc,UAAU,CAAA;AAKxB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/product/index.js
CHANGED
|
@@ -84,6 +84,9 @@ export * from './Workbench.js';
|
|
|
84
84
|
export * from './EmptyState.js';
|
|
85
85
|
export * from './FadeIn.js';
|
|
86
86
|
export * from './Field.js';
|
|
87
|
+
// `Fact` is `Field`'s read-only counterpart: a settings form is a stack of
|
|
88
|
+
// `Field`s, a detail pane is a stack of these.
|
|
89
|
+
export * from './Fact.js';
|
|
87
90
|
export * from './HanzoMark.js';
|
|
88
91
|
export * from './PageHeader.js';
|
|
89
92
|
// Palette — the ONE ⌘K bar, plus its opener. The list it renders is not written
|
|
@@ -100,6 +103,9 @@ export * from './Reorder.js';
|
|
|
100
103
|
export * from './SelectMenu.js';
|
|
101
104
|
export * from './Skeleton.js';
|
|
102
105
|
export * from './SlideOver.js';
|
|
106
|
+
// `DetailPane` is the one mount point over `SlideOver` for a descriptor-driven
|
|
107
|
+
// item view: a caller writes `{ title, content, footer? }`, never a drawer.
|
|
108
|
+
export * from './DetailPane.js';
|
|
103
109
|
export * from './StatusTag.js';
|
|
104
110
|
export * from './Split.js';
|
|
105
111
|
export * from './tone.js';
|
|
@@ -111,6 +117,10 @@ export * from './ThemeToggle.js';
|
|
|
111
117
|
// those shapes; reaching for them is the signal you have left the common case.
|
|
112
118
|
export * from './DialogTemplate.js';
|
|
113
119
|
export * from './TooltipAnchor.js';
|
|
120
|
+
// `ChunkGuard` — the window-level net for a stale-deploy chunk 404 (see
|
|
121
|
+
// `chunkGuard.logic.ts` for the pure decisions). Mount it once near the shell
|
|
122
|
+
// root; it renders nothing.
|
|
123
|
+
export * from './ChunkGuard.js';
|
|
114
124
|
// `ThemeToggleNext` is NOT re-exported here, and that is the whole reason this
|
|
115
125
|
// comment exists. It is the @hanzogui/next-theme binding, and next-theme's
|
|
116
126
|
// provider imports `next/script` — so a static edge from this barrel put Next in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAE7E,kFAAkF;AAClF,gEAAgE;AAChE,cAAc,UAAU,CAAA;AAExB,2EAA2E;AAC3E,+EAA+E;AAC/E,4CAA4C;AAC5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,SAAS,IAAI,eAAe,EAC5B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,KAAK,GACN,MAAM,UAA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,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,8EAA8E;AAC9E,yEAAyE;AACzE,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAE/B,wEAAwE;AACxE,8EAA8E;AAC9E,4BAA4B;AAC5B,cAAc,cAAc,CAAA;AAE5B,+EAA+E;AAC/E,2EAA2E;AAC3E,iFAAiF;AACjF,0EAA0E;AAC1E,8EAA8E;AAC9E,iFAAiF;AACjF,0BAA0B;AAC1B,EAAE;AACF,0EAA0E;AAC1E,EAAE;AACF,+EAA+E;AAC/E,kEAAkE;AAClE,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,mFAAmF;AACnF,qFAAqF;AACrF,uEAAuE;AAEvE,iFAAiF;AACjF,kFAAkF;AAClF,kEAAkE;AAClE,cAAc,UAAU,CAAA;AAExB,sEAAsE;AACtE,+EAA+E;AAC/E,8EAA8E;AAC9E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|
|
@@ -241,7 +241,9 @@
|
|
|
241
241
|
"./dist/product/social/api.js"
|
|
242
242
|
],
|
|
243
243
|
"files": [
|
|
244
|
-
"dist"
|
|
244
|
+
"dist",
|
|
245
|
+
"LICENSE-APACHE",
|
|
246
|
+
"LICENSE-MIT"
|
|
245
247
|
],
|
|
246
248
|
"dependencies": {
|
|
247
249
|
"@hanzo/appearance": "0.2.2",
|
|
@@ -328,7 +330,7 @@
|
|
|
328
330
|
"publishConfig": {
|
|
329
331
|
"access": "public"
|
|
330
332
|
},
|
|
331
|
-
"license": "MIT",
|
|
333
|
+
"license": "Apache-2.0 OR MIT",
|
|
332
334
|
"author": "Hanzo AI <dev@hanzo.ai>",
|
|
333
335
|
"scripts": {
|
|
334
336
|
"build": "rm -rf dist dist-cjs && tsc -p tsconfig.build.json && tsc -p tsconfig.cjs.json --noCheck && mkdir -p dist/styles && node scripts/compose-theme.mjs && cp src/styles/motion.css dist/styles/motion.css && cp src/next.cjs dist/next.cjs && node scripts/postbuild.mjs && node scripts/gen-css.mjs",
|