@takazudo/zudo-doc 0.2.0-next.1 → 0.2.0-next.3
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 -2
- package/dist/header/right-items.d.ts +1 -5
- package/dist/header/right-items.js +1 -1
- package/dist/i18n-version/version-switcher.d.ts +0 -8
- package/dist/theme/index.d.ts +0 -1
- package/dist/theme/index.js +2 -8
- package/dist/toc/index.d.ts +1 -1
- package/dist/toc/types.d.ts +1 -8
- package/package.json +6 -6
- package/dist/theme/design-token-tweak-panel.d.ts +0 -11
- package/dist/theme/design-token-tweak-panel.js +0 -10
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Framework primitives that sit on top of zfb's engine — the framework layer that zfb deliberately doesn't ship (per ADR-003).
|
|
4
4
|
|
|
5
|
-
This package
|
|
5
|
+
This package provides the missing-by-design framework concerns:
|
|
6
6
|
|
|
7
7
|
- **Sidebar tree builder** (`./sidebar-tree`) — turns collection entries + `_category_.json` into a sidebar `SidebarNode[]`.
|
|
8
8
|
- **Theme controls** (`./theme`) — color scheme provider + design-token tweak panel (Preact island that wraps an iframe).
|
|
@@ -10,7 +10,7 @@ This package is part of the **Astro→zfb migration** (super-epic [#473](https:/
|
|
|
10
10
|
- **Breadcrumb** (`./breadcrumb`) — JSX breadcrumb fed by the sidebar tree.
|
|
11
11
|
- **DocLayout** (`./doclayout`) — composable layout shell with explicit `<Header>`, `<Sidebar>`, `<Main>`, `<Toc>`, `<Footer>` props; ships a `<DocLayoutWithDefaults>` wrapper that holds the 16 `create-zudo-doc` injection anchors.
|
|
12
12
|
- **View Transitions** (`./transitions`) — native View Transitions API shim (Chrome/Edge/Safari 18+); persistent regions via `view-transition-name`. No-op fallback in Firefox.
|
|
13
|
-
- **Head injection** (`./head`) — canonical, og:\*, twitter:\*, robots, preload hints, RSS link, sitemap link, theme-color — byte-equal to today's
|
|
13
|
+
- **Head injection** (`./head`) — canonical, og:\*, twitter:\*, robots, preload hints, RSS link, sitemap link, theme-color — byte-equal to today's legacy doc-layout output.
|
|
14
14
|
- **SSR-skip wrappers** (`./ssr-skip`) — `<AiChatModalIsland>`, `<ImageEnlargeIsland>`, `<DesignTokenTweakPanelIsland>`, `<MockInitIsland>` — wrap zfb's `<Island ssrFallback>` with the right fallback markup so doc pages don't have to re-implement the SSR-skip pattern.
|
|
15
15
|
|
|
16
16
|
## Pre-publish dev workflow
|
|
@@ -7,10 +7,7 @@ import { HeaderRightItem } from './types.js';
|
|
|
7
7
|
* header-right-items.ts` pre-#1729). Each flag corresponds to a specific
|
|
8
8
|
* `settings.*` switch the original implementation consulted directly:
|
|
9
9
|
*
|
|
10
|
-
* - `designTokenPanel` — `settings.designTokenPanel
|
|
11
|
-
* - `colorTweakPanel` — retained for symmetry; treated as an OR with
|
|
12
|
-
* `designTokenPanel` so callers that still distinguish the deprecated
|
|
13
|
-
* alias get the same gate as the legacy helper.
|
|
10
|
+
* - `designTokenPanel` — `settings.designTokenPanel`
|
|
14
11
|
* - `aiAssistant` — `settings.aiAssistant`
|
|
15
12
|
* - `colorMode` — `Boolean(settings.colorMode)`
|
|
16
13
|
* - `hasLocales` — `Object.keys(settings.locales).length > 0`
|
|
@@ -19,7 +16,6 @@ import { HeaderRightItem } from './types.js';
|
|
|
19
16
|
*/
|
|
20
17
|
interface HeaderRightItemFlags {
|
|
21
18
|
designTokenPanel: boolean;
|
|
22
|
-
colorTweakPanel: boolean;
|
|
23
19
|
aiAssistant: boolean;
|
|
24
20
|
colorMode: boolean;
|
|
25
21
|
hasLocales: boolean;
|
|
@@ -2,7 +2,7 @@ function filterHeaderRightItems(items, flags) {
|
|
|
2
2
|
return items.filter((item) => {
|
|
3
3
|
if (item.type === "trigger") {
|
|
4
4
|
if (item.trigger === "design-token-panel") {
|
|
5
|
-
return flags.designTokenPanel
|
|
5
|
+
return flags.designTokenPanel;
|
|
6
6
|
}
|
|
7
7
|
if (item.trigger === "ai-chat") {
|
|
8
8
|
return flags.aiAssistant;
|
|
@@ -40,14 +40,6 @@ interface VersionSwitcherProps {
|
|
|
40
40
|
* unique.
|
|
41
41
|
*/
|
|
42
42
|
idSuffix?: string;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated No longer wired — the component never emits an inline
|
|
45
|
-
* `<style>`. Visibility CSS lives in the consumer's global stylesheet
|
|
46
|
-
* (see `VERSION_SWITCHER_VISIBILITY_STYLE` for the canonical rule).
|
|
47
|
-
* Retained on the public interface for backwards compatibility; passing
|
|
48
|
-
* any value is a no-op.
|
|
49
|
-
*/
|
|
50
|
-
disableInlineVisibilityStyle?: boolean;
|
|
51
43
|
}
|
|
52
44
|
/**
|
|
53
45
|
* Canonical CSS rule that backs the responsive visibility of the
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as ThemeToggle } from './theme-toggle.js';
|
|
2
2
|
export { default as ColorSchemeProvider, ColorSchemeProviderColorMode, ColorSchemeProviderProps } from './color-scheme-provider.js';
|
|
3
|
-
export { default as DesignTokenTweakPanel, DesignTokenTweakPanelInner } from './design-token-tweak-panel.js';
|
|
4
3
|
export { default as ColorTweakExportModal } from './color-tweak-export-modal.js';
|
|
5
4
|
export { DESIGN_TOKEN_SCHEMA, DeserializeOptions, DeserializeResult, DesignTokenJson, DesignTokenJsonColor, DesignTokenJsonColorBase, DesignTokenJsonOverrides, DesignTokenManifest, DesignTokenSchemaError, SerializeOptions, deserialize, serialize } from './design-token-serde.js';
|
|
6
5
|
export { ColorTweakState, TokenOverrides, TweakState, emptyOverrides } from './design-token-types.js';
|
package/dist/theme/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { default as default2 } from "./theme-toggle.js";
|
|
2
2
|
import { default as default3 } from "./color-scheme-provider.js";
|
|
3
|
-
import {
|
|
4
|
-
default as default4,
|
|
5
|
-
DesignTokenTweakPanelInner
|
|
6
|
-
} from "./design-token-tweak-panel.js";
|
|
7
|
-
import { default as default5 } from "./color-tweak-export-modal.js";
|
|
3
|
+
import { default as default4 } from "./color-tweak-export-modal.js";
|
|
8
4
|
import {
|
|
9
5
|
DESIGN_TOKEN_SCHEMA,
|
|
10
6
|
DesignTokenSchemaError,
|
|
@@ -25,11 +21,9 @@ import {
|
|
|
25
21
|
export {
|
|
26
22
|
BRIDGE_SOURCE,
|
|
27
23
|
default3 as ColorSchemeProvider,
|
|
28
|
-
|
|
24
|
+
default4 as ColorTweakExportModal,
|
|
29
25
|
DESIGN_TOKEN_SCHEMA,
|
|
30
26
|
DesignTokenSchemaError,
|
|
31
|
-
default4 as DesignTokenTweakPanel,
|
|
32
|
-
DesignTokenTweakPanelInner,
|
|
33
27
|
default2 as ThemeToggle,
|
|
34
28
|
deserialize,
|
|
35
29
|
emptyOverrides,
|
package/dist/toc/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Toc, TocProps } from './toc.js';
|
|
2
2
|
export { MobileToc, MobileTocProps } from './mobile-toc.js';
|
|
3
3
|
export { UseActiveHeadingResult, getActiveHeadingId, useActiveHeading } from './use-active-heading.js';
|
|
4
|
-
export { HeadingItem
|
|
4
|
+
export { HeadingItem } from './types.js';
|
|
5
5
|
import 'preact';
|
package/dist/toc/types.d.ts
CHANGED
|
@@ -12,12 +12,5 @@ interface HeadingItem {
|
|
|
12
12
|
readonly slug: string;
|
|
13
13
|
readonly text: string;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Alias kept for ergonomic imports — `TocItem` is the same shape the
|
|
17
|
-
* TOC components consume after filtering by depth. Filtering does not
|
|
18
|
-
* change the per-item shape, so the alias documents intent without
|
|
19
|
-
* introducing a structural difference.
|
|
20
|
-
*/
|
|
21
|
-
type TocItem = HeadingItem;
|
|
22
15
|
|
|
23
|
-
export type { HeadingItem
|
|
16
|
+
export type { HeadingItem };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -154,9 +154,9 @@
|
|
|
154
154
|
],
|
|
155
155
|
"peerDependencies": {
|
|
156
156
|
"preact": "^10.29.1",
|
|
157
|
-
"@takazudo/zfb": "^0.1.0-next.
|
|
158
|
-
"@takazudo/zfb-runtime": "^0.1.0-next.
|
|
159
|
-
"@takazudo/zudo-doc-history-server": "^0.2.0-next.
|
|
157
|
+
"@takazudo/zfb": "^0.1.0-next.28",
|
|
158
|
+
"@takazudo/zfb-runtime": "^0.1.0-next.28",
|
|
159
|
+
"@takazudo/zudo-doc-history-server": "^0.2.0-next.3"
|
|
160
160
|
},
|
|
161
161
|
"peerDependenciesMeta": {
|
|
162
162
|
"@takazudo/zudo-doc-history-server": {
|
|
@@ -174,8 +174,8 @@
|
|
|
174
174
|
"tsup": "^8.0.0",
|
|
175
175
|
"typescript": "^5.0.0",
|
|
176
176
|
"vitest": "^3.0.0",
|
|
177
|
-
"@takazudo/zfb": "0.1.0-next.
|
|
178
|
-
"@takazudo/zfb-runtime": "0.1.0-next.
|
|
177
|
+
"@takazudo/zfb": "0.1.0-next.28",
|
|
178
|
+
"@takazudo/zfb-runtime": "0.1.0-next.28"
|
|
179
179
|
},
|
|
180
180
|
"scripts": {
|
|
181
181
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsup",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
|
|
3
|
-
/** @jsxRuntime automatic */
|
|
4
|
-
/** @jsxImportSource preact */
|
|
5
|
-
|
|
6
|
-
/** Stub — the real panel is bootstrapped by zdtp via design-token-panel-bootstrap.ts. */
|
|
7
|
-
declare function DesignTokenTweakPanelInner(): JSX.Element | null;
|
|
8
|
-
/** Stub — see DesignTokenTweakPanelInner. */
|
|
9
|
-
declare function DesignTokenTweakPanel(): JSX.Element | null;
|
|
10
|
-
|
|
11
|
-
export { DesignTokenTweakPanelInner, DesignTokenTweakPanel as default };
|