@takazudo/zudo-doc 5.7.0 → 5.9.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/CHANGELOG.md +35 -0
- package/README.md +17 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.js +1 -0
- package/dist/eject/index.js +9 -0
- package/dist/i18n-defaults/index.js +3 -0
- package/dist/plugins/codex-resources.d.ts +4 -0
- package/dist/plugins/codex-resources.js +31 -0
- package/dist/plugins/internal/claude-resources/generate.js +20 -291
- package/dist/plugins/internal/codex-resources/agents-md.d.ts +6 -0
- package/dist/plugins/internal/codex-resources/agents-md.js +70 -0
- package/dist/plugins/internal/codex-resources/agents.d.ts +7 -0
- package/dist/plugins/internal/codex-resources/agents.js +104 -0
- package/dist/plugins/internal/codex-resources/config.d.ts +6 -0
- package/dist/plugins/internal/codex-resources/config.js +111 -0
- package/dist/plugins/internal/codex-resources/generate.d.ts +20 -0
- package/dist/plugins/internal/codex-resources/generate.js +34 -0
- package/dist/plugins/internal/codex-resources/hooks.d.ts +6 -0
- package/dist/plugins/internal/codex-resources/hooks.js +174 -0
- package/dist/plugins/internal/codex-resources/index.d.ts +24 -0
- package/dist/plugins/internal/codex-resources/index.js +21 -0
- package/dist/plugins/internal/codex-resources/overview.d.ts +10 -0
- package/dist/plugins/internal/codex-resources/overview.js +33 -0
- package/dist/plugins/internal/codex-resources/rules.d.ts +6 -0
- package/dist/plugins/internal/codex-resources/rules.js +255 -0
- package/dist/plugins/internal/codex-resources/skills.d.ts +2 -0
- package/dist/plugins/internal/codex-resources/skills.js +84 -0
- package/dist/plugins/internal/codex-resources/utils.d.ts +14 -0
- package/dist/plugins/internal/codex-resources/utils.js +80 -0
- package/dist/plugins/internal/resource-docs-shared/fs.d.ts +3 -0
- package/dist/plugins/internal/resource-docs-shared/fs.js +19 -0
- package/dist/plugins/internal/resource-docs-shared/index.d.ts +7 -0
- package/dist/plugins/internal/resource-docs-shared/index.js +44 -0
- package/dist/plugins/internal/resource-docs-shared/links.d.ts +22 -0
- package/dist/plugins/internal/resource-docs-shared/links.js +44 -0
- package/dist/plugins/internal/resource-docs-shared/markdown-structure.d.ts +9 -0
- package/dist/plugins/internal/resource-docs-shared/markdown-structure.js +22 -0
- package/dist/plugins/internal/resource-docs-shared/mdx.d.ts +23 -0
- package/dist/plugins/internal/resource-docs-shared/mdx.js +63 -0
- package/dist/plugins/internal/resource-docs-shared/skills.d.ts +37 -0
- package/dist/plugins/internal/resource-docs-shared/skills.js +318 -0
- package/dist/plugins/internal/resource-docs-shared/walk.d.ts +20 -0
- package/dist/plugins/internal/resource-docs-shared/walk.js +41 -0
- package/dist/preset.d.ts +8 -0
- package/dist/preset.js +11 -0
- package/dist/safelist.css +1 -1
- package/dist/settings.d.ts +5 -0
- package/dist/transitions/nested-island-props-refresh.js +9 -3
- package/eject/header/gen-nav-overflow-script.mjs +771 -0
- package/eject/header/header.tsx +2 -0
- package/eject/header/nav-overflow-script.ts +11 -8
- package/package.json +9 -4
- /package/dist/plugins/internal/{claude-resources → resource-docs-shared}/escape-for-mdx.d.ts +0 -0
- /package/dist/plugins/internal/{claude-resources → resource-docs-shared}/escape-for-mdx.js +0 -0
|
@@ -2,6 +2,7 @@ import { BEFORE_SWAP_EVENT } from "./page-events.js";
|
|
|
2
2
|
const PERSIST_ATTR = "data-zfb-transition-persist";
|
|
3
3
|
const ISLAND_ATTR = "data-zfb-island";
|
|
4
4
|
const PROPS_ATTR = "data-props";
|
|
5
|
+
const PROPS_PRESERVE_ATTR = "data-zd-props-preserve";
|
|
5
6
|
const ISLAND_REMOUNT_ATTR = "data-zfb-island-remount";
|
|
6
7
|
const DOCUMENT_NODE = 9;
|
|
7
8
|
const installedControllers = /* @__PURE__ */ new WeakMap();
|
|
@@ -37,7 +38,7 @@ function refreshNestedIslandProps(liveDocument, incomingDocument) {
|
|
|
37
38
|
if (!incomingRoot) continue;
|
|
38
39
|
const incomingIslands = collectUniqueOwnedIslands(incomingRoot);
|
|
39
40
|
if (incomingIslands.size === 0) continue;
|
|
40
|
-
for (const [name, liveIsland] of collectUniqueOwnedIslands(liveRoot)) {
|
|
41
|
+
for (const [name, liveIsland] of collectUniqueOwnedIslands(liveRoot, true)) {
|
|
41
42
|
const incomingIsland = incomingIslands.get(name);
|
|
42
43
|
if (!incomingIsland) continue;
|
|
43
44
|
applyProps(liveIsland, incomingIsland);
|
|
@@ -56,9 +57,14 @@ function collectRefreshableRoots(doc) {
|
|
|
56
57
|
}
|
|
57
58
|
return roots;
|
|
58
59
|
}
|
|
59
|
-
function collectUniqueOwnedIslands(root) {
|
|
60
|
+
function collectUniqueOwnedIslands(root, excludePreserved = false) {
|
|
60
61
|
const owned = Array.from(root.querySelectorAll(`[${ISLAND_ATTR}]`)).filter(
|
|
61
|
-
(island) =>
|
|
62
|
+
(island) => {
|
|
63
|
+
if (island.closest(`[${PERSIST_ATTR}]`) !== root) return false;
|
|
64
|
+
if (!excludePreserved) return true;
|
|
65
|
+
const preserveBoundary = island.closest(`[${PROPS_PRESERVE_ATTR}]`);
|
|
66
|
+
return preserveBoundary === null || !root.contains(preserveBoundary);
|
|
67
|
+
}
|
|
62
68
|
);
|
|
63
69
|
return indexUniquely(owned, ISLAND_ATTR);
|
|
64
70
|
}
|