@drawnagency/primitives 0.1.96 → 0.1.98
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/{chunk-CI624HRS.js → chunk-26ALJO4K.js} +1 -1
- package/dist/{chunk-SOILPZ7U.js → chunk-3COSXTOY.js} +1 -1
- package/dist/{chunk-RHWWQV3J.js → chunk-BGHWUJFV.js} +1 -0
- package/dist/{chunk-RQPHPAT2.js → chunk-EWNDBKYK.js} +2 -2
- package/dist/{chunk-3HJDMFTB.js → chunk-FOY5TF7D.js} +1 -1
- package/dist/{chunk-YUUUCDXN.js → chunk-GYCBWGVW.js} +1 -1
- package/dist/chunk-HJSE6SK5.js +27 -0
- package/dist/{chunk-CSVGCAIH.js → chunk-HKHEAH5F.js} +7 -7
- package/dist/{chunk-IFCQWC3G.js → chunk-KP4DWTPR.js} +3 -3
- package/dist/{chunk-DJAJRBPD.js → chunk-MUTHF2GT.js} +2 -2
- package/dist/{chunk-CS2ECR3U.js → chunk-NA5EJM6Z.js} +24 -6
- package/dist/chunk-TGNS7D4F.js +200 -0
- package/dist/collab/rebase.d.ts +20 -0
- package/dist/collab/rebase.d.ts.map +1 -1
- package/dist/collab/rebase.js +17 -0
- package/dist/components/editor/DropEdgeIndicator.d.ts +6 -1
- package/dist/components/editor/DropEdgeIndicator.d.ts.map +1 -1
- package/dist/components/editor/NavGroupRow.d.ts +21 -0
- package/dist/components/editor/NavGroupRow.d.ts.map +1 -0
- package/dist/components/editor/PagesModal.d.ts +7 -1
- package/dist/components/editor/PagesModal.d.ts.map +1 -1
- package/dist/components/editor/index.js +5 -5
- package/dist/components/primitives/index.js +7 -7
- package/dist/components/sections/brand-guide.js +6 -6
- package/dist/components/sections/register-schemas.js +10 -10
- package/dist/components/sections/register.js +10 -10
- package/dist/components/shared/Navigation.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/hooks/useEditorPersistence.d.ts +7 -0
- package/dist/hooks/useEditorPersistence.d.ts.map +1 -1
- package/dist/hooks/useSortableNavRow.d.ts +27 -0
- package/dist/hooks/useSortableNavRow.d.ts.map +1 -0
- package/dist/index.js +26 -8
- package/dist/lib/dexie.d.ts.map +1 -1
- package/dist/lib/dexie.js +9 -2
- package/dist/lib/index-ops.d.ts +138 -2
- package/dist/lib/index-ops.d.ts.map +1 -1
- package/dist/lib/index-ops.js +176 -8
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +17 -6
- package/dist/lib/loader.d.ts +2 -2
- package/dist/lib/loader.d.ts.map +1 -1
- package/dist/lib/nav-tree.d.ts +63 -0
- package/dist/lib/nav-tree.d.ts.map +1 -0
- package/dist/lib/nav.d.ts +13 -2
- package/dist/lib/nav.d.ts.map +1 -1
- package/dist/lib/pages.d.ts +0 -1
- package/dist/lib/pages.d.ts.map +1 -1
- package/dist/lib/reorder.d.ts +24 -0
- package/dist/lib/reorder.d.ts.map +1 -1
- package/dist/media/index.js +3 -3
- package/dist/media/provider.d.ts +0 -1
- package/dist/media/provider.d.ts.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +10 -2
- package/dist/schemas/nav.d.ts +40 -0
- package/dist/schemas/nav.d.ts.map +1 -0
- package/dist/schemas/site-config.d.ts +12 -1
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/dist/types/database.d.ts +0 -3
- package/dist/types/database.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/collab/rebase.ts +35 -0
- package/src/components/editor/DropEdgeIndicator.tsx +15 -8
- package/src/components/editor/NavGroupRow.tsx +126 -0
- package/src/components/editor/PagesModal.tsx +150 -29
- package/src/components/shared/Navigation.tsx +51 -13
- package/src/components/shell/EditorShell.tsx +67 -18
- package/src/hooks/useEditorPersistence.ts +14 -0
- package/src/hooks/useSortableNavRow.ts +139 -0
- package/src/lib/dexie.ts +12 -2
- package/src/lib/index-ops.ts +261 -7
- package/src/lib/index.ts +1 -0
- package/src/lib/loader.ts +31 -4
- package/src/lib/nav-tree.ts +192 -0
- package/src/lib/nav.ts +43 -10
- package/src/lib/pages.ts +14 -11
- package/src/lib/reorder.ts +56 -0
- package/src/media/provider.ts +0 -1
- package/src/schemas/index.ts +1 -0
- package/src/schemas/nav.ts +36 -0
- package/src/schemas/site-config.ts +12 -2
- package/src/types/database.ts +0 -3
- package/dist/chunk-YBVK254P.js +0 -14
- /package/dist/{chunk-53DKVAB6.js → chunk-72CG6AA2.js} +0 -0
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
ColorItemSchema,
|
|
3
3
|
ColorSpaceSchema,
|
|
4
4
|
brandGuideSectionDefs
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-KP4DWTPR.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-MUTHF2GT.js";
|
|
8
|
+
import "../../chunk-26ALJO4K.js";
|
|
9
|
+
import "../../chunk-3COSXTOY.js";
|
|
10
10
|
import "../../chunk-PZJL2S3Z.js";
|
|
11
11
|
import "../../chunk-WDSVHKAH.js";
|
|
12
12
|
import "../../chunk-7EOSDFS3.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-TGNS7D4F.js";
|
|
14
14
|
import "../../chunk-VKAGMEKE.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-BGHWUJFV.js";
|
|
16
16
|
import "../../chunk-FM4M4Q2W.js";
|
|
17
17
|
import "../../chunk-JSBRDJBE.js";
|
|
18
18
|
export {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
allSectionDefs
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-HKHEAH5F.js";
|
|
4
|
+
import "../../chunk-KP4DWTPR.js";
|
|
5
|
+
import "../../chunk-GYCBWGVW.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-EWNDBKYK.js";
|
|
8
|
+
import "../../chunk-MUTHF2GT.js";
|
|
9
9
|
import "../../chunk-ZSPCE6MZ.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-26ALJO4K.js";
|
|
11
11
|
import "../../chunk-Y4JQGO6G.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-3COSXTOY.js";
|
|
13
13
|
import "../../chunk-PZJL2S3Z.js";
|
|
14
14
|
import "../../chunk-WDSVHKAH.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-72CG6AA2.js";
|
|
16
16
|
import "../../chunk-7EOSDFS3.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-TGNS7D4F.js";
|
|
18
18
|
import "../../chunk-TZQPOR5A.js";
|
|
19
19
|
import {
|
|
20
20
|
registerRichText,
|
|
21
21
|
registerSchema
|
|
22
22
|
} from "../../chunk-VKAGMEKE.js";
|
|
23
|
-
import "../../chunk-
|
|
23
|
+
import "../../chunk-BGHWUJFV.js";
|
|
24
24
|
import "../../chunk-FM4M4Q2W.js";
|
|
25
25
|
import "../../chunk-NSCT3AMV.js";
|
|
26
26
|
import "../../chunk-JSBRDJBE.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
allSectionDefs
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-HKHEAH5F.js";
|
|
4
|
+
import "../../chunk-KP4DWTPR.js";
|
|
5
|
+
import "../../chunk-GYCBWGVW.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-EWNDBKYK.js";
|
|
8
|
+
import "../../chunk-MUTHF2GT.js";
|
|
9
9
|
import "../../chunk-ZSPCE6MZ.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-26ALJO4K.js";
|
|
11
11
|
import "../../chunk-Y4JQGO6G.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-3COSXTOY.js";
|
|
13
13
|
import "../../chunk-PZJL2S3Z.js";
|
|
14
14
|
import "../../chunk-WDSVHKAH.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-72CG6AA2.js";
|
|
16
16
|
import "../../chunk-7EOSDFS3.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-TGNS7D4F.js";
|
|
18
18
|
import "../../chunk-TZQPOR5A.js";
|
|
19
19
|
import {
|
|
20
20
|
registerSection
|
|
21
21
|
} from "../../chunk-VKAGMEKE.js";
|
|
22
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-BGHWUJFV.js";
|
|
23
23
|
import "../../chunk-FM4M4Q2W.js";
|
|
24
24
|
import "../../chunk-NSCT3AMV.js";
|
|
25
25
|
import "../../chunk-JSBRDJBE.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Navigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Navigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAsC,MAAM,eAAe,CAAC;AAQjF,UAAU,KAAK;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;IACxC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAGlF,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;kFAG8E;IAC9E,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACjC;AAQD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,iBAAwB,EAAE,EAAE,KAAK,2CAqT/I"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAcjD,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAyDtF,OAAO,KAAK,EAAE,eAAe,EAA2D,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAcjD,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAyDtF,OAAO,KAAK,EAAE,eAAe,EAA2D,MAAM,oBAAoB,CAAC;AAyCnH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAoBxD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAIhB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;IAIhE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAKjC,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,MAAM,EACN,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EACZ,WAAW,EACX,sBAA8B,EAC9B,eAAe,GAChB,EAAE,KAAK,2CAwtDP;AAuED;6EAC6E;AAC7E,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,eAAe,EAAE,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B"}
|
|
@@ -10,6 +10,13 @@ interface PersistenceOptions {
|
|
|
10
10
|
sectionId: string;
|
|
11
11
|
content: SectionContent;
|
|
12
12
|
}[], indexFlushed: boolean) => void;
|
|
13
|
+
/** Ref mirror of the shell's pending-deletion set, read at flush time and
|
|
14
|
+
* persisted alongside the index snapshot. Deletion is INTENT that cannot be
|
|
15
|
+
* inferred back from the snapshot: the restore path would otherwise diff the
|
|
16
|
+
* stale local index against a fresh remote read and treat sections a third
|
|
17
|
+
* party added in the meantime (MCP connector, peer editor) as local
|
|
18
|
+
* deletions — then delete them on the next save. */
|
|
19
|
+
deletedSectionsRef?: React.RefObject<Set<string>>;
|
|
13
20
|
}
|
|
14
21
|
export declare function useEditorPersistence(siteIndexRef: React.RefObject<SiteIndex>, options?: PersistenceOptions): {
|
|
15
22
|
markSectionDirty: (sectionId: string, content: SectionContent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorPersistence.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorPersistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA2BpE,UAAU,kBAAkB;IAC1B;;;;+DAI2D;IAC3D,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,cAAc,CAAA;KAAE,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditorPersistence.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorPersistence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA2BpE,UAAU,kBAAkB;IAC1B;;;;+DAI2D;IAC3D,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,cAAc,CAAA;KAAE,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IACrG;;;;;yDAKqD;IACrD,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CACnD;AAED,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EACxC,OAAO,CAAC,EAAE,kBAAkB;kCA+Fd,MAAM,WAAW,cAAc;;+BAmBC,MAAM;oCAiBD,MAAM;mCAQ3C,MAAM;4BAI6B,UAAU;;;;;;;yCAgCH,MAAM;;;qCAWhD,MAAM,cAAc,MAAM;EAuBzC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NavLocation, NavRow } from "../lib/nav-tree";
|
|
2
|
+
interface Options {
|
|
3
|
+
/** This row's identity — supplies the source location and the drop container. */
|
|
4
|
+
row: NavRow;
|
|
5
|
+
/** The row's index in the TOP-LEVEL entry list (a member row: its group's index). */
|
|
6
|
+
entryIndex: number;
|
|
7
|
+
kind: "page" | "group";
|
|
8
|
+
onMove: (from: NavLocation, to: NavLocation) => void;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Closest-edge drag wiring for one Pages-modal nav row. A sibling of
|
|
13
|
+
* useSortableRow that speaks NavLocation instead of a flat index; the section
|
|
14
|
+
* modal keeps using the original, so this cannot regress it.
|
|
15
|
+
*
|
|
16
|
+
* Loads the atlaskit adapter lazily, matching useSortableRow, so it stays out
|
|
17
|
+
* of the SSR and initial bundles.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useSortableNavRow<R extends HTMLElement, H extends HTMLElement>({ row, entryIndex, kind, onMove, enabled, }: Options): {
|
|
20
|
+
rowRef: import("react").RefObject<R | null>;
|
|
21
|
+
handleRef: import("react").RefObject<H | null>;
|
|
22
|
+
isDragging: boolean;
|
|
23
|
+
closestEdge: "top" | "bottom" | null;
|
|
24
|
+
isDropTarget: boolean;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=useSortableNavRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSortableNavRow.d.ts","sourceRoot":"","sources":["../../src/hooks/useSortableNavRow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE3D,UAAU,OAAO;IACf,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAID;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,WAAW,EAAE,EAC9E,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAc,GAC9C,EAAE,OAAO;;;;;;EAgHT"}
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveMedia,
|
|
30
30
|
sanitizeMediaName,
|
|
31
31
|
setMediaProvider
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3COSXTOY.js";
|
|
33
33
|
import {
|
|
34
34
|
AUDIENCE_COOKIE,
|
|
35
35
|
AUDIENCE_MAX_AGE_SECONDS,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
AudienceNameSchema,
|
|
59
59
|
MediaGridOptionsSchema,
|
|
60
60
|
slugifyAudienceName
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-FOY5TF7D.js";
|
|
62
62
|
import {
|
|
63
63
|
AudienceSchema,
|
|
64
64
|
RoleSchema,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
safeRedirect,
|
|
92
92
|
suggestAccessibleOn,
|
|
93
93
|
wcagLevel
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-NA5EJM6Z.js";
|
|
95
95
|
import {
|
|
96
96
|
curatedIcons,
|
|
97
97
|
getIcon
|
|
@@ -107,19 +107,28 @@ import {
|
|
|
107
107
|
generateNavLinks,
|
|
108
108
|
sanitizeHtml,
|
|
109
109
|
toSectionId
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-72CG6AA2.js";
|
|
111
111
|
import {
|
|
112
112
|
cn
|
|
113
113
|
} from "./chunk-7EOSDFS3.js";
|
|
114
|
-
import {
|
|
115
|
-
audiencePasses
|
|
116
|
-
} from "./chunk-YBVK254P.js";
|
|
117
114
|
import {
|
|
118
115
|
isSameOriginRequest,
|
|
119
116
|
requireSessionSecret,
|
|
120
117
|
safeNextPath
|
|
121
118
|
} from "./chunk-S2L3BPLS.js";
|
|
119
|
+
import {
|
|
120
|
+
audiencePasses,
|
|
121
|
+
groupDisplayLabel,
|
|
122
|
+
groupOfPage,
|
|
123
|
+
navEntries,
|
|
124
|
+
pagesInNavOrder,
|
|
125
|
+
reconcileNav
|
|
126
|
+
} from "./chunk-TGNS7D4F.js";
|
|
122
127
|
import "./chunk-5BM2Y3NJ.js";
|
|
128
|
+
import {
|
|
129
|
+
NavEntrySchema,
|
|
130
|
+
NavFileSchema
|
|
131
|
+
} from "./chunk-HJSE6SK5.js";
|
|
123
132
|
import {
|
|
124
133
|
getSectionContentSchema,
|
|
125
134
|
getSectionSchema
|
|
@@ -149,6 +158,7 @@ import {
|
|
|
149
158
|
PageSchema,
|
|
150
159
|
PageStatusSchema,
|
|
151
160
|
RESERVED_SLUGS,
|
|
161
|
+
SLUG_RE,
|
|
152
162
|
SectionMetaSchema,
|
|
153
163
|
SingleMediaReferenceSchema,
|
|
154
164
|
SiteConfigSchema,
|
|
@@ -156,7 +166,7 @@ import {
|
|
|
156
166
|
TextLineSchema,
|
|
157
167
|
VariantSchema,
|
|
158
168
|
normalizeSiteIndex
|
|
159
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-BGHWUJFV.js";
|
|
160
170
|
import "./chunk-FM4M4Q2W.js";
|
|
161
171
|
import "./chunk-NSCT3AMV.js";
|
|
162
172
|
import {
|
|
@@ -195,6 +205,8 @@ export {
|
|
|
195
205
|
MediaGridOptionsSchema,
|
|
196
206
|
MediaItemSchema,
|
|
197
207
|
MediaReferenceSchema,
|
|
208
|
+
NavEntrySchema,
|
|
209
|
+
NavFileSchema,
|
|
198
210
|
PageSchema,
|
|
199
211
|
PageStatusSchema,
|
|
200
212
|
ProcessingQueue,
|
|
@@ -202,6 +214,7 @@ export {
|
|
|
202
214
|
RoleSchema,
|
|
203
215
|
SESSION_COOKIE,
|
|
204
216
|
SESSION_MAX_AGE_SECONDS,
|
|
217
|
+
SLUG_RE,
|
|
205
218
|
SavedMessageSchema,
|
|
206
219
|
SectionMetaSchema,
|
|
207
220
|
SectionUpdateMessageSchema,
|
|
@@ -250,6 +263,8 @@ export {
|
|
|
250
263
|
getSectionContentSchema,
|
|
251
264
|
getSectionSchema,
|
|
252
265
|
gridColsClass,
|
|
266
|
+
groupDisplayLabel,
|
|
267
|
+
groupOfPage,
|
|
253
268
|
hashFileBuffer,
|
|
254
269
|
isSafeHref,
|
|
255
270
|
isSameOriginRequest,
|
|
@@ -258,10 +273,13 @@ export {
|
|
|
258
273
|
mergeSiteContent,
|
|
259
274
|
mimeToExt,
|
|
260
275
|
navChangeEvent,
|
|
276
|
+
navEntries,
|
|
261
277
|
normalizeSiteIndex,
|
|
262
278
|
onPrimaryVarValue,
|
|
279
|
+
pagesInNavOrder,
|
|
263
280
|
primaryVarValue,
|
|
264
281
|
rebindImageRef,
|
|
282
|
+
reconcileNav,
|
|
265
283
|
registerSchema,
|
|
266
284
|
registerSection,
|
|
267
285
|
relativeLuminance,
|
package/dist/lib/dexie.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dexie.d.ts","sourceRoot":"","sources":["../../src/lib/dexie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAe,UAAU,EAAQ,MAAM,wBAAwB,CAAC;
|
|
1
|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AC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAGjG;AAED,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAG3F;AAED,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvE;AAED,wBAAsB,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAGlE;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAMvD;AAMD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;uEACuE;AACvE,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,UAAU,GAAG,UAAU,GAC9B,OAAO,CAAC,MAAM,CAAC,CAKjB;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAEtE;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE"}
|
package/dist/lib/dexie.js
CHANGED
|
@@ -137,7 +137,7 @@ async function restoreLocalChanges() {
|
|
|
137
137
|
const siteId = metaRow?.siteId ?? "";
|
|
138
138
|
return {
|
|
139
139
|
sections,
|
|
140
|
-
siteIndex: { siteId, pages: indexRow.pages, sections: indexRow.sections },
|
|
140
|
+
siteIndex: { siteId, pages: indexRow.pages, sections: indexRow.sections, nav: indexRow.nav },
|
|
141
141
|
siteConfig: configRow?.config,
|
|
142
142
|
deletedSections: indexRow.deletedSections ?? []
|
|
143
143
|
};
|
|
@@ -163,6 +163,7 @@ async function persistSiteIndex(index, deletedSections = []) {
|
|
|
163
163
|
key: "current",
|
|
164
164
|
pages: index.pages,
|
|
165
165
|
sections: index.sections,
|
|
166
|
+
nav: index.nav,
|
|
166
167
|
deletedSections,
|
|
167
168
|
updatedAt: now
|
|
168
169
|
});
|
|
@@ -249,7 +250,13 @@ async function persistAll(sections, siteIndex, deletedSectionIds, siteConfig) {
|
|
|
249
250
|
key: "current",
|
|
250
251
|
pages: siteIndex.pages,
|
|
251
252
|
sections: siteIndex.sections,
|
|
252
|
-
|
|
253
|
+
nav: siteIndex.nav,
|
|
254
|
+
// Record the deletion INTENT, not just its effect on the order. The
|
|
255
|
+
// restore path reads this back; when it was hardcoded `[]` that path
|
|
256
|
+
// had to re-derive deletions by diffing this snapshot against a fresh
|
|
257
|
+
// remote read, which treats a third party's additions (MCP connector,
|
|
258
|
+
// peer editor) as this editor's deletions.
|
|
259
|
+
deletedSections: deletedSectionIds ?? [],
|
|
253
260
|
updatedAt: now
|
|
254
261
|
});
|
|
255
262
|
await database.meta.put({
|
package/dist/lib/index-ops.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type SiteIndex } from "../schemas/site-config";
|
|
2
|
+
import { PageStatusSchema, type SiteIndex } from "../schemas/site-config";
|
|
3
|
+
/**
|
|
4
|
+
* Server-applied index deltas for the MCP connector's save path. An agent
|
|
5
|
+
* cannot reliably hand-transcribe a real site's 40–51 KB index into a tool
|
|
6
|
+
* parameter (two consecutive attempts each introduced an id-level slip), so
|
|
7
|
+
* structural edits are expressed as ops and applied here against the index the
|
|
8
|
+
* write is concurrency-checked against.
|
|
9
|
+
*
|
|
10
|
+
* Pure by contract: no I/O, no storage, no octokit. The caller owns reading the
|
|
11
|
+
* base index at the right commit and committing the result.
|
|
12
|
+
*/
|
|
13
|
+
declare const OpStatusSchema: z.ZodEnum<{
|
|
14
|
+
draft: "draft";
|
|
15
|
+
live: "live";
|
|
16
|
+
archived: "archived";
|
|
17
|
+
}>;
|
|
18
|
+
declare const SectionInsertSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
draft: "draft";
|
|
22
|
+
live: "live";
|
|
23
|
+
archived: "archived";
|
|
24
|
+
}>>;
|
|
25
|
+
access: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
3
27
|
export declare const IndexOpSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
28
|
op: z.ZodLiteral<"insertAfter">;
|
|
5
29
|
pageId: z.ZodString;
|
|
@@ -50,8 +74,119 @@ export declare const IndexOpSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
50
74
|
slug: z.ZodOptional<z.ZodString>;
|
|
51
75
|
showInNav: z.ZodOptional<z.ZodBoolean>;
|
|
52
76
|
access: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
live: "live";
|
|
79
|
+
archived: "archived";
|
|
80
|
+
}>>;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
op: z.ZodLiteral<"addPage">;
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
title: z.ZodString;
|
|
85
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
86
|
+
showInNav: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
access: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
navGroupId: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
op: z.ZodLiteral<"removePage">;
|
|
91
|
+
pageId: z.ZodString;
|
|
92
|
+
removeSections: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
op: z.ZodLiteral<"addNavGroup">;
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
label: z.ZodOptional<z.ZodString>;
|
|
97
|
+
startCollapsed: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
op: z.ZodLiteral<"removeNavGroup">;
|
|
101
|
+
groupId: z.ZodString;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
op: z.ZodLiteral<"setNavGroupMeta">;
|
|
104
|
+
groupId: z.ZodString;
|
|
105
|
+
label: z.ZodOptional<z.ZodString>;
|
|
106
|
+
startCollapsed: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
op: z.ZodLiteral<"movePageInNav">;
|
|
109
|
+
pageId: z.ZodString;
|
|
110
|
+
groupId: z.ZodNullable<z.ZodString>;
|
|
111
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
53
112
|
}, z.core.$strip>], "op">;
|
|
54
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Written out rather than `z.infer<typeof IndexOpSchema>`.
|
|
115
|
+
*
|
|
116
|
+
* The MCP SDK infers a tool's handler and JSON-Schema types from the Zod shape it
|
|
117
|
+
* is registered with, and at twelve union members each carrying several described
|
|
118
|
+
* optionals, re-deriving this union at that boundary overflowed tsc's stack — the
|
|
119
|
+
* `apps/mcp` typecheck segfaulted rather than failing with a diagnostic. Naming
|
|
120
|
+
* the type once caps that inference: consumers see this union directly instead of
|
|
121
|
+
* re-deriving it through the schema. `assertIndexOpTypesMatchSchema` in
|
|
122
|
+
* tests/lib/index-ops.test.ts pins the two together so they cannot drift.
|
|
123
|
+
*/
|
|
124
|
+
export type IndexOp = {
|
|
125
|
+
op: "insertAfter";
|
|
126
|
+
pageId: string;
|
|
127
|
+
afterId: string | null;
|
|
128
|
+
sections: SectionInsert[];
|
|
129
|
+
} | {
|
|
130
|
+
op: "insertAt";
|
|
131
|
+
pageId: string;
|
|
132
|
+
position: number;
|
|
133
|
+
sections: SectionInsert[];
|
|
134
|
+
} | {
|
|
135
|
+
op: "move";
|
|
136
|
+
pageId: string;
|
|
137
|
+
id: string;
|
|
138
|
+
afterId: string | null;
|
|
139
|
+
} | {
|
|
140
|
+
op: "remove";
|
|
141
|
+
ids: string[];
|
|
142
|
+
} | {
|
|
143
|
+
op: "setMeta";
|
|
144
|
+
id: string;
|
|
145
|
+
status?: OpStatus;
|
|
146
|
+
access?: string[];
|
|
147
|
+
} | {
|
|
148
|
+
op: "setPageMeta";
|
|
149
|
+
pageId: string;
|
|
150
|
+
title?: string;
|
|
151
|
+
slug?: string;
|
|
152
|
+
showInNav?: boolean;
|
|
153
|
+
access?: string[];
|
|
154
|
+
status?: PageStatus;
|
|
155
|
+
} | {
|
|
156
|
+
op: "addPage";
|
|
157
|
+
id: string;
|
|
158
|
+
title: string;
|
|
159
|
+
slug?: string;
|
|
160
|
+
showInNav?: boolean;
|
|
161
|
+
access?: string[];
|
|
162
|
+
navGroupId?: string;
|
|
163
|
+
} | {
|
|
164
|
+
op: "removePage";
|
|
165
|
+
pageId: string;
|
|
166
|
+
removeSections?: boolean;
|
|
167
|
+
} | {
|
|
168
|
+
op: "addNavGroup";
|
|
169
|
+
id: string;
|
|
170
|
+
label?: string;
|
|
171
|
+
startCollapsed?: boolean;
|
|
172
|
+
pageIds?: string[];
|
|
173
|
+
} | {
|
|
174
|
+
op: "removeNavGroup";
|
|
175
|
+
groupId: string;
|
|
176
|
+
} | {
|
|
177
|
+
op: "setNavGroupMeta";
|
|
178
|
+
groupId: string;
|
|
179
|
+
label?: string;
|
|
180
|
+
startCollapsed?: boolean;
|
|
181
|
+
} | {
|
|
182
|
+
op: "movePageInNav";
|
|
183
|
+
pageId: string;
|
|
184
|
+
groupId: string | null;
|
|
185
|
+
position?: number;
|
|
186
|
+
};
|
|
187
|
+
type OpStatus = z.infer<typeof OpStatusSchema>;
|
|
188
|
+
type PageStatus = z.infer<typeof PageStatusSchema>;
|
|
189
|
+
type SectionInsert = z.infer<typeof SectionInsertSchema>;
|
|
55
190
|
export type ApplyIndexOpsResult = {
|
|
56
191
|
ok: true;
|
|
57
192
|
index: SiteIndex;
|
|
@@ -74,4 +209,5 @@ export declare function collectPostedTypes(sections: {
|
|
|
74
209
|
*/
|
|
75
210
|
export declare function opTouchedSectionIds(ops: IndexOp[]): string[];
|
|
76
211
|
export declare function applyIndexOps(rawIndex: unknown, ops: IndexOp[], newSectionTypes: Record<string, string>): ApplyIndexOpsResult;
|
|
212
|
+
export {};
|
|
77
213
|
//# sourceMappingURL=index-ops.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-ops.d.ts","sourceRoot":"","sources":["../../src/lib/index-ops.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"index-ops.d.ts","sourceRoot":"","sources":["../../src/lib/index-ops.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAe,gBAAgB,EAA2B,KAAK,SAAS,EAAoB,MAAM,wBAAwB,CAAC;AAYlI;;;;;;;;;GASG;AAOH,QAAA,MAAM,cAAc;;;;EAAwC,CAAC;AAa7D,QAAA,MAAM,mBAAmB;;;;;;;;iBAIvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA2ExB,CAAC;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,GACf;IAAE,EAAE,EAAE,aAAa,CAAC;IAAC,MAAM,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