@drawnagency/primitives 0.1.111 → 0.1.112
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-3GAG6ZXB.js → chunk-3SZNUCXI.js} +8 -4
- package/dist/chunk-4I5OO5UB.js +785 -0
- package/dist/{chunk-ALMEC3XN.js → chunk-5KNXTMUC.js} +22 -18
- package/dist/{chunk-OUYB2GCW.js → chunk-BR4MIPTM.js} +1 -57
- package/dist/chunk-CXZ5YJG4.js +85 -0
- package/dist/{chunk-RA5IOFPY.js → chunk-DNY72JZN.js} +16 -38
- package/dist/{chunk-7MI3HCOF.js → chunk-EPWBPIV6.js} +10 -6
- package/dist/chunk-FV7JQRCN.js +94 -0
- package/dist/{chunk-UVIYI4J6.js → chunk-HSXMOS5Q.js} +15 -2
- package/dist/chunk-IIDKW7AV.js +41 -0
- package/dist/chunk-IINIZBQB.js +204 -0
- package/dist/chunk-MM7KZS5C.js +30 -0
- package/dist/{chunk-VCCNKTFD.js → chunk-OGGZ5AXT.js} +3 -31
- package/dist/{chunk-XQMDWXD6.js → chunk-P3ZNCHW7.js} +1 -1
- package/dist/chunk-QQ3S3P5P.js +38 -0
- package/dist/{chunk-ELQ4C677.js → chunk-TALRVOGO.js} +9 -44
- package/dist/chunk-VAYZJKVR.js +209 -0
- package/dist/{chunk-OTDA6KWL.js → chunk-VLPELTPI.js} +1 -1
- package/dist/{chunk-7WQJ57XG.js → chunk-VT3PYGVW.js} +68 -260
- package/dist/chunk-WUJ3XNFI.js +62 -0
- package/dist/{chunk-NXGIHSL5.js → chunk-Z2LO4PSQ.js} +11 -91
- package/dist/collab/rebase.js +1 -1
- package/dist/components/chat/ChatComposer.d.ts +25 -0
- package/dist/components/chat/ChatComposer.d.ts.map +1 -0
- package/dist/components/chat/ChatPanel.d.ts +5 -4
- package/dist/components/chat/ChatPanel.d.ts.map +1 -1
- package/dist/components/chat/markdown.d.ts +14 -0
- package/dist/components/chat/markdown.d.ts.map +1 -0
- package/dist/components/editor/index.js +16 -11
- package/dist/components/primitives/EditablePlainText.d.ts.map +1 -1
- package/dist/components/primitives/index.js +15 -10
- package/dist/components/sections/brand-guide.js +11 -9
- package/dist/components/sections/register-schemas.js +19 -14
- package/dist/components/sections/register.js +19 -14
- package/dist/components/shell/AudienceChips.d.ts +10 -0
- package/dist/components/shell/AudienceChips.d.ts.map +1 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsChatbot.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsDecks.d.ts +13 -0
- package/dist/components/shell/SiteSettingsDecks.d.ts.map +1 -0
- package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
- package/dist/deck/DeckComponentView.d.ts +13 -0
- package/dist/deck/DeckComponentView.d.ts.map +1 -0
- package/dist/deck/DeckPlayer.d.ts +26 -0
- package/dist/deck/DeckPlayer.d.ts.map +1 -0
- package/dist/deck/DeckSlideView.d.ts +17 -0
- package/dist/deck/DeckSlideView.d.ts.map +1 -0
- package/dist/deck/DeckStage.d.ts +16 -0
- package/dist/deck/DeckStage.d.ts.map +1 -0
- package/dist/deck/components/DeckImage.d.ts +14 -0
- package/dist/deck/components/DeckImage.d.ts.map +1 -0
- package/dist/deck/components/DeckImageGrid.d.ts +27 -0
- package/dist/deck/components/DeckImageGrid.d.ts.map +1 -0
- package/dist/deck/components/DeckRichText.d.ts +22 -0
- package/dist/deck/components/DeckRichText.d.ts.map +1 -0
- package/dist/deck/components/DeckVideo.d.ts +15 -0
- package/dist/deck/components/DeckVideo.d.ts.map +1 -0
- package/dist/deck/editing.d.ts +50 -0
- package/dist/deck/editing.d.ts.map +1 -0
- package/dist/deck/flip.d.ts +11 -0
- package/dist/deck/flip.d.ts.map +1 -0
- package/dist/deck/index.d.ts +24 -0
- package/dist/deck/index.d.ts.map +1 -0
- package/dist/deck/index.js +53 -0
- package/dist/deck/layouts/CenteredTextLayout.d.ts +12 -0
- package/dist/deck/layouts/CenteredTextLayout.d.ts.map +1 -0
- package/dist/deck/layouts/ColumnSplitLayout.d.ts +14 -0
- package/dist/deck/layouts/ColumnSplitLayout.d.ts.map +1 -0
- package/dist/deck/layouts/FullBleedImageLayout.d.ts +14 -0
- package/dist/deck/layouts/FullBleedImageLayout.d.ts.map +1 -0
- package/dist/deck/media.d.ts +33 -0
- package/dist/deck/media.d.ts.map +1 -0
- package/dist/deck/tokens.d.ts +22 -0
- package/dist/deck/tokens.d.ts.map +1 -0
- package/dist/deck/useStageScale.d.ts +10 -0
- package/dist/deck/useStageScale.d.ts.map +1 -0
- package/dist/deck-builder/DeckBuilderApp.d.ts +30 -0
- package/dist/deck-builder/DeckBuilderApp.d.ts.map +1 -0
- package/dist/deck-builder/DeckBuilderTopBar.d.ts +24 -0
- package/dist/deck-builder/DeckBuilderTopBar.d.ts.map +1 -0
- package/dist/deck-builder/DeckChatPanel.d.ts +45 -0
- package/dist/deck-builder/DeckChatPanel.d.ts.map +1 -0
- package/dist/deck-builder/DeckEditor.d.ts +37 -0
- package/dist/deck-builder/DeckEditor.d.ts.map +1 -0
- package/dist/deck-builder/DeckLibrary.d.ts +22 -0
- package/dist/deck-builder/DeckLibrary.d.ts.map +1 -0
- package/dist/deck-builder/DeckSlideSurface.d.ts +31 -0
- package/dist/deck-builder/DeckSlideSurface.d.ts.map +1 -0
- package/dist/deck-builder/deck-api.d.ts +76 -0
- package/dist/deck-builder/deck-api.d.ts.map +1 -0
- package/dist/deck-builder/deck-chat-client.d.ts +44 -0
- package/dist/deck-builder/deck-chat-client.d.ts.map +1 -0
- package/dist/deck-builder/deck-chat-history.d.ts +10 -0
- package/dist/deck-builder/deck-chat-history.d.ts.map +1 -0
- package/dist/deck-builder/index.d.ts +13 -0
- package/dist/deck-builder/index.d.ts.map +1 -0
- package/dist/deck-builder/index.js +1505 -0
- package/dist/deck-builder/starter-deck.d.ts +23 -0
- package/dist/deck-builder/starter-deck.d.ts.map +1 -0
- package/dist/deck-builder/types.d.ts +29 -0
- package/dist/deck-builder/types.d.ts.map +1 -0
- package/dist/deck-builder/useSortableSlide.d.ts +29 -0
- package/dist/deck-builder/useSortableSlide.d.ts.map +1 -0
- package/dist/index.js +70 -63
- package/dist/lib/deck-access.d.ts +86 -0
- package/dist/lib/deck-access.d.ts.map +1 -0
- package/dist/lib/deck-access.js +58 -0
- package/dist/lib/deck-dexie.d.ts +88 -0
- package/dist/lib/deck-dexie.d.ts.map +1 -0
- package/dist/lib/deck-dexie.js +22 -0
- package/dist/lib/deck-edit.d.ts +67 -0
- package/dist/lib/deck-edit.d.ts.map +1 -0
- package/dist/lib/deck-media-assets.d.ts +27 -0
- package/dist/lib/deck-media-assets.d.ts.map +1 -0
- package/dist/lib/deck-media-assets.js +25 -0
- package/dist/lib/deck-media-refs.d.ts +35 -0
- package/dist/lib/deck-media-refs.d.ts.map +1 -0
- package/dist/lib/deck-media-refs.js +36 -0
- package/dist/lib/deck-tool.d.ts +25 -0
- package/dist/lib/deck-tool.d.ts.map +1 -0
- package/dist/lib/deck-tool.js +58 -0
- package/dist/lib/index-ops.js +2 -2
- package/dist/lib/index.js +17 -12
- package/dist/lib/nav.d.ts.map +1 -1
- package/dist/media/index.js +3 -3
- package/dist/schemas/deck-meta.d.ts +85 -0
- package/dist/schemas/deck-meta.d.ts.map +1 -0
- package/dist/schemas/deck-meta.js +64 -0
- package/dist/schemas/deck.d.ts +954 -0
- package/dist/schemas/deck.d.ts.map +1 -0
- package/dist/schemas/deck.js +65 -0
- package/dist/schemas/index.js +39 -37
- package/dist/schemas/site-config.d.ts +13 -1
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/package.json +37 -1
- package/src/components/chat/ChatComposer.tsx +100 -0
- package/src/components/chat/ChatPanel.tsx +20 -69
- package/src/components/chat/markdown.ts +32 -0
- package/src/components/primitives/EditablePlainText.tsx +11 -1
- package/src/components/shell/AudienceChips.tsx +30 -0
- package/src/components/shell/EditorShell.tsx +12 -0
- package/src/components/shell/SiteSettingsChatbot.tsx +1 -18
- package/src/components/shell/SiteSettingsDecks.tsx +41 -0
- package/src/components/shell/SiteSettingsModal.tsx +11 -0
- package/src/deck/DeckComponentView.tsx +28 -0
- package/src/deck/DeckPlayer.tsx +166 -0
- package/src/deck/DeckSlideView.tsx +38 -0
- package/src/deck/DeckStage.tsx +39 -0
- package/src/deck/components/DeckImage.tsx +38 -0
- package/src/deck/components/DeckImageGrid.tsx +254 -0
- package/src/deck/components/DeckRichText.tsx +111 -0
- package/src/deck/components/DeckVideo.tsx +81 -0
- package/src/deck/editing.tsx +201 -0
- package/src/deck/flip.ts +70 -0
- package/src/deck/index.ts +30 -0
- package/src/deck/layouts/CenteredTextLayout.tsx +29 -0
- package/src/deck/layouts/ColumnSplitLayout.tsx +69 -0
- package/src/deck/layouts/FullBleedImageLayout.tsx +58 -0
- package/src/deck/media.tsx +46 -0
- package/src/deck/tokens.ts +57 -0
- package/src/deck/useStageScale.ts +44 -0
- package/src/deck-builder/DeckBuilderApp.tsx +572 -0
- package/src/deck-builder/DeckBuilderTopBar.tsx +62 -0
- package/src/deck-builder/DeckChatPanel.tsx +334 -0
- package/src/deck-builder/DeckEditor.tsx +258 -0
- package/src/deck-builder/DeckLibrary.tsx +195 -0
- package/src/deck-builder/DeckSlideSurface.tsx +55 -0
- package/src/deck-builder/deck-api.ts +177 -0
- package/src/deck-builder/deck-chat-client.ts +129 -0
- package/src/deck-builder/deck-chat-history.ts +62 -0
- package/src/deck-builder/index.ts +12 -0
- package/src/deck-builder/starter-deck.ts +86 -0
- package/src/deck-builder/types.ts +24 -0
- package/src/deck-builder/useSortableSlide.ts +102 -0
- package/src/lib/deck-access.ts +132 -0
- package/src/lib/deck-dexie.ts +190 -0
- package/src/lib/deck-edit.ts +196 -0
- package/src/lib/deck-media-assets.ts +57 -0
- package/src/lib/deck-media-refs.ts +67 -0
- package/src/lib/deck-tool.ts +95 -0
- package/src/lib/nav.ts +21 -1
- package/src/schemas/deck-meta.ts +88 -0
- package/src/schemas/deck.ts +478 -0
- package/src/schemas/index.ts +4 -0
- package/src/schemas/site-config.ts +24 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DeckImageGrid as DeckImageGridContent } from "../../schemas/deck";
|
|
2
|
+
interface Props {
|
|
3
|
+
content: DeckImageGridContent;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Greedy shortest-column packing: each tile joins whichever column is currently
|
|
7
|
+
* least tall, ties going left. With uniform aspect ratios that degenerates to
|
|
8
|
+
* round-robin, which is what makes the simple cases look deliberate.
|
|
9
|
+
*/
|
|
10
|
+
export declare function packMasonry(ratios: number[], columns: number): number[][];
|
|
11
|
+
/**
|
|
12
|
+
* Deck Component — image grid, and the runtime's signature interaction.
|
|
13
|
+
*
|
|
14
|
+
* Masonry columns: every image keeps its own aspect ratio, the column width
|
|
15
|
+
* decides its height, and a stack that runs past the bottom of the slot is
|
|
16
|
+
* clipped there. That clip is the point — on a fixed 16:9 stage a collage that
|
|
17
|
+
* runs off the bottom edge reads better than one that crops every frame to a
|
|
18
|
+
* uniform cell, and nothing may spill past the slot onto the rest of the slide.
|
|
19
|
+
*
|
|
20
|
+
* Hover lifts a tile; activating it expands that tile to fill the whole grid
|
|
21
|
+
* region as a lightbox contained inside the slide (never a full-screen overlay
|
|
22
|
+
* — the deck stays the deck). Activating again, the close affordance, or Escape
|
|
23
|
+
* returns it. Tiles are real buttons, so keyboard activation is the browser's.
|
|
24
|
+
*/
|
|
25
|
+
export declare function DeckImageGrid({ content }: Props): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=DeckImageGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckImageGrid.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckImageGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAqC,MAAM,oBAAoB,CAAC;AAKnH,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAqBD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAYzE;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CA0G/C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DeckTextSlot } from "../../lib/deck-edit";
|
|
2
|
+
import type { DeckRichText as DeckRichTextContent } from "../../schemas/deck";
|
|
3
|
+
interface Props {
|
|
4
|
+
content: DeckRichTextContent;
|
|
5
|
+
/**
|
|
6
|
+
* Which slot of the enclosing Layout this component fills. Supplied only so a
|
|
7
|
+
* text leaf can address itself for inline editing (#39); absent means "no
|
|
8
|
+
* edit seam here", which is the read-only default every viewer surface gets.
|
|
9
|
+
*/
|
|
10
|
+
slot?: DeckTextSlot;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Deck Component — rich text.
|
|
14
|
+
*
|
|
15
|
+
* Every size is px against the 1600x900 stage; every color, family and radius
|
|
16
|
+
* is a token (`--deck-*` are set by the enclosing Layout, see ./tokens.ts).
|
|
17
|
+
* Fields are typographic roles, not markup: the schema carries plain strings
|
|
18
|
+
* and marked spans, so nothing here interpolates HTML.
|
|
19
|
+
*/
|
|
20
|
+
export declare function DeckRichText({ content, slot }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=DeckRichText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckRichText.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckRichText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAkB,YAAY,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9F,UAAU,KAAK;IACb,OAAO,EAAE,mBAAmB,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AA8BD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,2CA2DpD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DeckVideo as DeckVideoContent } from "../../schemas/deck";
|
|
2
|
+
interface Props {
|
|
3
|
+
content: DeckVideoContent;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Deck Component — video.
|
|
7
|
+
*
|
|
8
|
+
* Two states: a poster with a play affordance, and playback with the browser's
|
|
9
|
+
* own controls. Nothing custom drives the media element once it is playing —
|
|
10
|
+
* a presenter needs scrubbing and volume, and native controls are the ones
|
|
11
|
+
* their keyboard already knows.
|
|
12
|
+
*/
|
|
13
|
+
export declare function DeckVideo({ content }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=DeckVideo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckVideo.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckVideo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIxE,UAAU,KAAK;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CA8D3C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DeckTextPath } from "../lib/deck-edit";
|
|
3
|
+
/**
|
|
4
|
+
* The runtime's inline-editing seam (#39).
|
|
5
|
+
*
|
|
6
|
+
* Editing happens INSIDE the real renderer rather than in an overlay that
|
|
7
|
+
* imitates it, which is the only way "renders identically on blur" is true
|
|
8
|
+
* rather than approximately true — the element the author types into is the
|
|
9
|
+
* element the deck ships with.
|
|
10
|
+
*
|
|
11
|
+
* The seam is a context that defaults to null, so every read-only surface — a
|
|
12
|
+
* filmstrip thumbnail, an in-portal deck view, the Public Link route — renders
|
|
13
|
+
* exactly the markup it rendered before this file existed, with no affordance
|
|
14
|
+
* and no listeners. Providing the context is an explicit act, performed in one
|
|
15
|
+
* place (`DeckSlideSurface`).
|
|
16
|
+
*/
|
|
17
|
+
export interface DeckTextEditor {
|
|
18
|
+
/** Commit a leaf edit. The provider owns validation and staging. */
|
|
19
|
+
onEditText: (path: DeckTextPath, text: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Locked while a chat turn is in flight: a turn rewrites the WHOLE deck
|
|
22
|
+
* (ADR 0001), so an edit committed mid-stream would be written over by the
|
|
23
|
+
* turn's own `putDeckDraft` with nothing anywhere saying so.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function DeckTextEditProvider({ editor, children }: {
|
|
28
|
+
editor: DeckTextEditor | null;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function useDeckTextEditor(): DeckTextEditor | null;
|
|
32
|
+
interface EditableTextProps {
|
|
33
|
+
/** Absent when the enclosing component was rendered without a slot — i.e. by
|
|
34
|
+
* a surface that never carries an edit seam. Renders inert. */
|
|
35
|
+
path?: DeckTextPath;
|
|
36
|
+
/** The leaf's current text. Always a plain string; that is the schema's shape. */
|
|
37
|
+
children: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* One editable text leaf, or plain text when there is no editor.
|
|
41
|
+
*
|
|
42
|
+
* The two states are DIFFERENT ELEMENTS on purpose. React does not manage the
|
|
43
|
+
* text of a `contentEditable` node it has no children for, so the field can be
|
|
44
|
+
* written to freely while it is open, and swapping back to a React-rendered
|
|
45
|
+
* span on commit is what makes the committed value the one that renders — no
|
|
46
|
+
* reconciliation against a DOM the author mutated behind React's back.
|
|
47
|
+
*/
|
|
48
|
+
export declare function EditableText({ path, children }: EditableTextProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=editing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../src/deck/editing.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAEhH;AAED,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,IAAI,CAEzD;AAED,UAAU,iBAAiB;IACzB;oEACgE;IAChE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAyDjE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FLIP for the image grid's expand/collapse.
|
|
3
|
+
*
|
|
4
|
+
* The grid changes layout via React state, so the "First" rects have to be
|
|
5
|
+
* taken in the event handler (before `setState`) and the invert applied in a
|
|
6
|
+
* layout effect (after the DOM has moved, before paint).
|
|
7
|
+
*/
|
|
8
|
+
export type TileRects = Map<Element, DOMRect>;
|
|
9
|
+
export declare function captureTileRects(grid: HTMLElement): TileRects;
|
|
10
|
+
export declare function playTileFlip(grid: HTMLElement, before: TileRects): void;
|
|
11
|
+
//# sourceMappingURL=flip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flip.d.ts","sourceRoot":"","sources":["../../src/deck/flip.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAI7D;AAaD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwCvE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The deck runtime — a sealed subtree, like ./document.
|
|
3
|
+
*
|
|
4
|
+
* NOT re-exported from the primitives root barrel, and deliberately not a
|
|
5
|
+
* section type: nothing on an ordinary viewer page may pull this graph in.
|
|
6
|
+
* Only deck surfaces (the Deck Builder, in-portal deck views, the Public Link
|
|
7
|
+
* route) import from here.
|
|
8
|
+
*/
|
|
9
|
+
export { DeckPlayer } from "./DeckPlayer";
|
|
10
|
+
export { DeckStage } from "./DeckStage";
|
|
11
|
+
export { DeckSlideView } from "./DeckSlideView";
|
|
12
|
+
export { DeckComponentView } from "./DeckComponentView";
|
|
13
|
+
export { CenteredTextLayout } from "./layouts/CenteredTextLayout";
|
|
14
|
+
export { ColumnSplitLayout } from "./layouts/ColumnSplitLayout";
|
|
15
|
+
export { FullBleedImageLayout } from "./layouts/FullBleedImageLayout";
|
|
16
|
+
export { DeckRichText } from "./components/DeckRichText";
|
|
17
|
+
export { DeckImage } from "./components/DeckImage";
|
|
18
|
+
export { DeckImageGrid } from "./components/DeckImageGrid";
|
|
19
|
+
export { DeckVideo } from "./components/DeckVideo";
|
|
20
|
+
export { DeckMediaProvider, DeckMissingMedia, useDeckMedia, useDeckMediaResolver, type DeckMediaAsset, type DeckMediaResolver, } from "./media";
|
|
21
|
+
export { DeckTextEditProvider, EditableText, useDeckTextEditor, type DeckTextEditor } from "./editing";
|
|
22
|
+
export { useStageScale } from "./useStageScale";
|
|
23
|
+
export { deckAlign, surfaceInk, DECK_ELEVATION, SURFACE_BACKGROUND, type DeckAlign, type DeckSurface } from "./tokens";
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deck/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CenteredTextLayout,
|
|
3
|
+
ColumnSplitLayout,
|
|
4
|
+
DECK_ELEVATION,
|
|
5
|
+
DeckComponentView,
|
|
6
|
+
DeckImage,
|
|
7
|
+
DeckImageGrid,
|
|
8
|
+
DeckMediaProvider,
|
|
9
|
+
DeckMissingMedia,
|
|
10
|
+
DeckPlayer,
|
|
11
|
+
DeckRichText,
|
|
12
|
+
DeckSlideView,
|
|
13
|
+
DeckStage,
|
|
14
|
+
DeckTextEditProvider,
|
|
15
|
+
DeckVideo,
|
|
16
|
+
EditableText,
|
|
17
|
+
FullBleedImageLayout,
|
|
18
|
+
SURFACE_BACKGROUND,
|
|
19
|
+
deckAlign,
|
|
20
|
+
surfaceInk,
|
|
21
|
+
useDeckMedia,
|
|
22
|
+
useDeckMediaResolver,
|
|
23
|
+
useDeckTextEditor,
|
|
24
|
+
useStageScale
|
|
25
|
+
} from "../chunk-4I5OO5UB.js";
|
|
26
|
+
import "../chunk-7EOSDFS3.js";
|
|
27
|
+
import "../chunk-VAYZJKVR.js";
|
|
28
|
+
import "../chunk-JSBRDJBE.js";
|
|
29
|
+
export {
|
|
30
|
+
CenteredTextLayout,
|
|
31
|
+
ColumnSplitLayout,
|
|
32
|
+
DECK_ELEVATION,
|
|
33
|
+
DeckComponentView,
|
|
34
|
+
DeckImage,
|
|
35
|
+
DeckImageGrid,
|
|
36
|
+
DeckMediaProvider,
|
|
37
|
+
DeckMissingMedia,
|
|
38
|
+
DeckPlayer,
|
|
39
|
+
DeckRichText,
|
|
40
|
+
DeckSlideView,
|
|
41
|
+
DeckStage,
|
|
42
|
+
DeckTextEditProvider,
|
|
43
|
+
DeckVideo,
|
|
44
|
+
EditableText,
|
|
45
|
+
FullBleedImageLayout,
|
|
46
|
+
SURFACE_BACKGROUND,
|
|
47
|
+
deckAlign,
|
|
48
|
+
surfaceInk,
|
|
49
|
+
useDeckMedia,
|
|
50
|
+
useDeckMediaResolver,
|
|
51
|
+
useDeckTextEditor,
|
|
52
|
+
useStageScale
|
|
53
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CenteredTextLayout as CenteredTextLayoutNode } from "../../schemas/deck";
|
|
2
|
+
interface Props {
|
|
3
|
+
layout: CenteredTextLayoutNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Layout — centered text. A full-slide title card holding one Deck Component,
|
|
7
|
+
* centered on both axes. The Layout owns the surface (background + ink tokens)
|
|
8
|
+
* and the stage-relative padding; the component owns nothing but its own type.
|
|
9
|
+
*/
|
|
10
|
+
export declare function CenteredTextLayout({ layout }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=CenteredTextLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CenteredTextLayout.d.ts","sourceRoot":"","sources":["../../../src/deck/layouts/CenteredTextLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAIvF,UAAU,KAAK;IACb,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,2CAcnD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ColumnSplitLayout as ColumnSplitLayoutNode } from "../../schemas/deck";
|
|
2
|
+
interface Props {
|
|
3
|
+
layout: ColumnSplitLayoutNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Layout — left/right column split.
|
|
7
|
+
*
|
|
8
|
+
* The hairline runs down the text column's inner edge, which is the editorial
|
|
9
|
+
* treatment's only separator: the columns are set apart by the type and the
|
|
10
|
+
* crop, not by a card or a shadow.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ColumnSplitLayout({ layout }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ColumnSplitLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnSplitLayout.d.ts","sourceRoot":"","sources":["../../../src/deck/layouts/ColumnSplitLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAiC,MAAM,oBAAoB,CAAC;AAIpH,UAAU,KAAK;IACb,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAmBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,2CAkBlD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FullBleedImageLayout as FullBleedImageLayoutNode } from "../../schemas/deck";
|
|
2
|
+
interface Props {
|
|
3
|
+
layout: FullBleedImageLayoutNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Layout — full-bleed image with an optional text overlay panel.
|
|
7
|
+
*
|
|
8
|
+
* The Layout owns both surfaces: the slide is base (the image covers it), the
|
|
9
|
+
* panel declares brand, so the rich text inside reads on-primary ink without
|
|
10
|
+
* knowing it sits over a photograph.
|
|
11
|
+
*/
|
|
12
|
+
export declare function FullBleedImageLayout({ layout }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=FullBleedImageLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FullBleedImageLayout.d.ts","sourceRoot":"","sources":["../../../src/deck/layouts/FullBleedImageLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAKjH,UAAU,KAAK;IACb,MAAM,EAAE,wBAAwB,CAAC;CAClC;AAaD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,2CA6BrD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DeckMediaAsset, DeckMediaRef, DeckMediaResolver } from "../schemas/deck";
|
|
3
|
+
/**
|
|
4
|
+
* The runtime's media seam.
|
|
5
|
+
*
|
|
6
|
+
* Deck JSON stores references, never URLs (ADR 0001), so something outside the
|
|
7
|
+
* runtime has to turn `{ kind: "portal", id }` into bytes. That something is a
|
|
8
|
+
* resolver injected through context: the Deck Builder passes the manifest-backed
|
|
9
|
+
* one, the dev preview route passes placeholders, and the components below never
|
|
10
|
+
* learn which. Absent a provider every reference resolves to `null`, which is
|
|
11
|
+
* also what a deleted asset resolves to — one path, one rendering.
|
|
12
|
+
*/
|
|
13
|
+
export type { DeckMediaAsset, DeckMediaResolver } from "../schemas/deck";
|
|
14
|
+
export declare function DeckMediaProvider({ resolve, children }: {
|
|
15
|
+
resolve: DeckMediaResolver;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function useDeckMedia(ref: DeckMediaRef): DeckMediaAsset | null;
|
|
19
|
+
/**
|
|
20
|
+
* The resolver itself, for a component that has to resolve a whole set before
|
|
21
|
+
* it can lay any of it out — the image grid packs its masonry columns from
|
|
22
|
+
* every tile's aspect ratio, which it cannot learn one `useDeckMedia` at a time.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useDeckMediaResolver(): DeckMediaResolver;
|
|
25
|
+
/**
|
|
26
|
+
* What an unresolvable reference renders. A published deck can outlive the
|
|
27
|
+
* media it points at (ADR 0002 flags the GC hazard), and a torn alt string over
|
|
28
|
+
* a presentation is worse than a quiet gap.
|
|
29
|
+
*/
|
|
30
|
+
export declare function DeckMissingMedia({ className }: {
|
|
31
|
+
className?: string;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/deck/media.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvF;;;;;;;;;GASG;AAEH,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMzE,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAAE,OAAO,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAE3G;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAErE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import type { DeckSurface } from "../schemas/deck";
|
|
3
|
+
export type { DeckSurface } from "../schemas/deck";
|
|
4
|
+
export declare function surfaceInk(surface: DeckSurface): CSSProperties;
|
|
5
|
+
/** Tailwind background utility for a surface — both are brand tokens. */
|
|
6
|
+
export declare const SURFACE_BACKGROUND: Record<DeckSurface, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Alignment travels the same way the ink does: a Layout declares how its slot
|
|
9
|
+
* reads, components resolve `--deck-align` (an `align-self` value). Without it
|
|
10
|
+
* a component would have to know whether it sits on a centered title card or in
|
|
11
|
+
* a left-aligned column, which is precisely what the indirection prevents.
|
|
12
|
+
*/
|
|
13
|
+
export type DeckAlign = "center" | "start";
|
|
14
|
+
export declare function deckAlign(align: DeckAlign): CSSProperties;
|
|
15
|
+
/**
|
|
16
|
+
* Elevation for media that lifts off the slide — grid tiles on hover, the video
|
|
17
|
+
* play affordance. Declared as `--deck-*` custom properties rather than as
|
|
18
|
+
* arbitrary Tailwind values so the shadow can be mixed from the site's ink
|
|
19
|
+
* token instead of a literal rgba, and so a hover variant can reference it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DECK_ELEVATION: CSSProperties;
|
|
22
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/deck/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAsBnD,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CAE9D;AAED,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAG1D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3C,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAEzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,aAGX,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The factor that fits the fixed 1600x900 stage inside `fitRef`'s box.
|
|
4
|
+
*
|
|
5
|
+
* `null` until the box has been measured — an unmeasured box (SSR, jsdom, a
|
|
6
|
+
* hidden ancestor) reports 0x0, and scaling the stage to 0 would blank it. The
|
|
7
|
+
* caller renders the stage unscaled until a real measurement arrives.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useStageScale(fitRef: RefObject<HTMLElement | null>): number | null;
|
|
10
|
+
//# sourceMappingURL=useStageScale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStageScale.d.ts","sourceRoot":"","sources":["../../src/deck/useStageScale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAW7E;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAyBlF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DeckMediaAsset } from "../schemas/deck";
|
|
2
|
+
/**
|
|
3
|
+
* The Deck Builder shell (#34).
|
|
4
|
+
*
|
|
5
|
+
* Builder mode is its own ROUTE rather than an overlay on a viewer page, which
|
|
6
|
+
* is what makes "the sidebar drops out for a top bar" and "leaving restores
|
|
7
|
+
* portal chrome" trivially true — and what keeps every byte of the deck runtime
|
|
8
|
+
* off ordinary viewer pages, where the entry point is a plain server-rendered
|
|
9
|
+
* `<a>` FAB. `/present` is the same shape for the same reasons.
|
|
10
|
+
*
|
|
11
|
+
* The working deck is a Deck Draft in IndexedDB (ADR 0002): the builder reads
|
|
12
|
+
* the decks branch to list and to reopen, and writes to it only when the author
|
|
13
|
+
* presses Publish.
|
|
14
|
+
*/
|
|
15
|
+
interface Props {
|
|
16
|
+
/** Keys the draft database, so two portals in one browser never collide. */
|
|
17
|
+
siteId: string;
|
|
18
|
+
/** The other half of that key: a `deckDraftScope` digest of the caller's
|
|
19
|
+
* identity, so two people sharing a browser profile never share drafts. */
|
|
20
|
+
draftScope: string;
|
|
21
|
+
/** Pre-resolved portal media for the runtime's resolver seam. */
|
|
22
|
+
mediaAssets: Record<string, DeckMediaAsset>;
|
|
23
|
+
/** Where "Leave builder" goes — the page the FAB was pressed on. */
|
|
24
|
+
exitHref: string;
|
|
25
|
+
/** Server-decided: editor, or a member of a deck-enabled audience. */
|
|
26
|
+
canCreate: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function DeckBuilderApp({ siteId, draftScope, mediaAssets, exitHref, canCreate }: Props): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default DeckBuilderApp;
|
|
30
|
+
//# sourceMappingURL=DeckBuilderApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckBuilderApp.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckBuilderApp.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAQ,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAe5D;;;;;;;;;;;;GAYG;AACH,UAAU,KAAK;IACb,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf;gFAC4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,SAAS,EAAE,OAAO,CAAC;CACpB;AAOD,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,2CAgc7F;AAoDD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Builder mode's chrome (the 2026-08-05 prototype verdict: variant B's bar).
|
|
4
|
+
*
|
|
5
|
+
* A hand-for-hand match of EditorShell's toolbar — full-bleed bordered band,
|
|
6
|
+
* `max-w-screen-xl` inner grid of three columns at `h-16`, framed icon buttons
|
|
7
|
+
* on the right — because this bar REPLACES the portal sidebar while builder
|
|
8
|
+
* mode is open, and the two surfaces should not read as different products.
|
|
9
|
+
* Not `fixed`: the builder owns the whole viewport and lays out as a column, so
|
|
10
|
+
* the bar is a flex child that nothing can scroll under.
|
|
11
|
+
*/
|
|
12
|
+
interface Props {
|
|
13
|
+
/** Left cell: the primary action for whichever view is showing. */
|
|
14
|
+
primaryAction: ReactNode;
|
|
15
|
+
/** Center cell: one line of draft/deck status. */
|
|
16
|
+
status: ReactNode;
|
|
17
|
+
/** Where leaving builder mode goes — the page the FAB was pressed on. */
|
|
18
|
+
exitHref: string;
|
|
19
|
+
/** Shown while a deck is open; returns to the grid. */
|
|
20
|
+
onBackToLibrary?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function DeckBuilderTopBar({ primaryAction, status, exitHref, onBackToLibrary }: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=DeckBuilderTopBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckBuilderTopBar.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckBuilderTopBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;GASG;AACH,UAAU,KAAK;IACb,mEAAmE;IACnE,aAAa,EAAE,SAAS,CAAC;IACzB,kDAAkD;IAClD,MAAM,EAAE,SAAS,CAAC;IAClB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,KAAK,2CAmC5F"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Deck } from "../schemas/deck";
|
|
2
|
+
/**
|
|
3
|
+
* The Deck Builder's docked assistant (#35) — the surface that makes the
|
|
4
|
+
* builder an authoring tool rather than a viewer.
|
|
5
|
+
*
|
|
6
|
+
* It is the ChatPanel IDIOM (h-16 header, `p-3` log, the shared composer and
|
|
7
|
+
* markdown treatment) rendered as an in-flow column rather than as
|
|
8
|
+
* ChatPanel itself: that component is bound to `/api/chat`'s contract, to the
|
|
9
|
+
* viewer/editor chrome it positions against, and to a task selector and history
|
|
10
|
+
* archive a deck conversation has no use for. What the two genuinely share —
|
|
11
|
+
* the composer, the assistant-markdown rules, the bubble treatment — is
|
|
12
|
+
* imported, not copied.
|
|
13
|
+
*
|
|
14
|
+
* "Chat authors, direct manipulation adjusts": this pane is the ~80% path, and
|
|
15
|
+
* `busy` is what #39's inline editing will lock against.
|
|
16
|
+
*/
|
|
17
|
+
interface Props {
|
|
18
|
+
deck: Deck;
|
|
19
|
+
/** The identity digest the Deck Draft is keyed by — the transcript is scoped
|
|
20
|
+
* the same way, so two people sharing a browser never read each other's. */
|
|
21
|
+
scope: string;
|
|
22
|
+
/**
|
|
23
|
+
* The deck as of RIGHT NOW, for send time. The `deck` prop above comes from
|
|
24
|
+
* React state, which lags the Deck Draft by one round-trip — and pressing Send
|
|
25
|
+
* blurs an open inline field, so the author's last edit is routinely in that
|
|
26
|
+
* gap. Grounding a turn on the prop would post a deck they had just changed.
|
|
27
|
+
*/
|
|
28
|
+
getDeck?: () => Deck | null;
|
|
29
|
+
/** A deck that PARSED server-side. The caller stages it; this pane never writes. */
|
|
30
|
+
onDeck: (deck: Deck) => void;
|
|
31
|
+
/** Streaming state, lifted so the shell can lock publish and (later) editing. */
|
|
32
|
+
onBusyChange?: (busy: boolean) => void;
|
|
33
|
+
/**
|
|
34
|
+
* The OTHER half of that lock. The shell sets this while it is doing
|
|
35
|
+
* something that reads or rewrites the draft row (publish, reopen, delete):
|
|
36
|
+
* a turn landing inside a publish's round-trip would have its `putDeckDraft`
|
|
37
|
+
* overwritten by the baseline that publish writes on the way out, and the
|
|
38
|
+
* author would lose the turn with no error anywhere.
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
onClose: () => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function DeckChatPanel({ deck, getDeck, scope, onDeck, onBusyChange, disabled, onClose }: Props): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=DeckChatPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckChatPanel.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckChatPanel.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAS5C;;;;;;;;;;;;;;GAcG;AAEH,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX;iFAC6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC5B,oFAAoF;IACpF,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7B,iFAAiF;IACjF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,QAAgB,EAAE,OAAO,EAAE,EAAE,KAAK,2CAkR7G"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { DeckTextPath } from "../lib/deck-edit";
|
|
2
|
+
import type { Deck, DeckMediaAsset } from "../schemas/deck";
|
|
3
|
+
/**
|
|
4
|
+
* The deck-editing view (prototype variant A's arrangement): a back-link to the
|
|
5
|
+
* grid, the deck's own head row, a 16:9 stage, and a horizontal filmstrip of
|
|
6
|
+
* slide thumbnails BELOW it.
|
|
7
|
+
*
|
|
8
|
+
* Direct manipulation is #39's scope, and its boundary is the product decision
|
|
9
|
+
* recorded in CONTEXT.md — "chat authors, direct manipulation adjusts". What is
|
|
10
|
+
* here: editing a text leaf in place on the stage, and reorder / duplicate /
|
|
11
|
+
* delete on the strip. What is deliberately NOT here, and must not be added
|
|
12
|
+
* without revisiting that decision: layout switching, adding or removing a Deck
|
|
13
|
+
* Component, and grid composition. Those belong to the assistant.
|
|
14
|
+
*/
|
|
15
|
+
interface Props {
|
|
16
|
+
deck: Deck;
|
|
17
|
+
mediaAssets: Record<string, DeckMediaAsset>;
|
|
18
|
+
currentSlide: number;
|
|
19
|
+
onSelectSlide: (index: number) => void;
|
|
20
|
+
onBack: () => void;
|
|
21
|
+
/** Draft-vs-published state, spelled out under the title. */
|
|
22
|
+
statusLine: string;
|
|
23
|
+
onEditText: (path: DeckTextPath, text: string) => void;
|
|
24
|
+
/** `to` is the destination index in the post-removal list. */
|
|
25
|
+
onMoveSlide: (from: number, to: number) => void;
|
|
26
|
+
onDuplicateSlide: (index: number) => void;
|
|
27
|
+
onDeleteSlide: (index: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* A chat turn is in flight. Every manual affordance goes inert: a turn
|
|
30
|
+
* rewrites the whole deck, so an edit landing mid-stream would be overwritten
|
|
31
|
+
* with nothing anywhere saying so.
|
|
32
|
+
*/
|
|
33
|
+
locked: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function DeckEditor({ deck, mediaAssets, currentSlide, onSelectSlide, onBack, statusLine, onEditText, onMoveSlide, onDuplicateSlide, onDeleteSlide, locked, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=DeckEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckEditor.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAa,MAAM,iBAAiB,CAAC;AAIvE;;;;;;;;;;;GAWG;AACH,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,8DAA8D;IAC9D,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,MAAM,GACP,EAAE,KAAK,2CAsIP"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DeckMediaAsset } from "../schemas/deck";
|
|
2
|
+
import type { DeckGridEntry } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Builder mode's landing view (prototype variant A): a responsive grid of the
|
|
5
|
+
* caller's own decks, each a 16:9 thumbnail with a status chip and a kebab, and
|
|
6
|
+
* a designed empty state in place of the grid when there are none.
|
|
7
|
+
*
|
|
8
|
+
* Only "Private" exists as a status today — audience grants (#36) and Public
|
|
9
|
+
* Links (#37) are what make the chip worth its space, and inventing their
|
|
10
|
+
* labels now would be inventing their semantics.
|
|
11
|
+
*/
|
|
12
|
+
interface Props {
|
|
13
|
+
entries: DeckGridEntry[];
|
|
14
|
+
mediaAssets: Record<string, DeckMediaAsset>;
|
|
15
|
+
canCreate: boolean;
|
|
16
|
+
onOpen: (id: string) => void;
|
|
17
|
+
onCreate: () => void;
|
|
18
|
+
onDelete: (id: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function DeckLibrary({ entries, mediaAssets, canCreate, onOpen, onCreate, onDelete }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=DeckLibrary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckLibrary.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckLibrary.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;GAQG;AACH,UAAU,KAAK;IACb,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAyBjG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type DeckTextEditor } from "../deck";
|
|
2
|
+
import type { DeckMediaAsset, DeckSlide } from "../schemas/deck";
|
|
3
|
+
export type { DeckTextEditor };
|
|
4
|
+
/**
|
|
5
|
+
* The builder's one window onto the deck runtime — every other module in this
|
|
6
|
+
* directory renders decks THROUGH this component and imports nothing from
|
|
7
|
+
* `../deck` itself. That is deliberate: `tests/deck/viewer-isolation.test.ts`
|
|
8
|
+
* whitelists the files that may reach the runtime, and keeping the list at one
|
|
9
|
+
* entry is what keeps the whitelist reviewable.
|
|
10
|
+
*
|
|
11
|
+
* `DeckPlayer` is not used here because it owns its own slide index and slide
|
|
12
|
+
* chrome, and in the builder the filmstrip owns both. This composes the same
|
|
13
|
+
* three runtime pieces `DeckPlayer` does, which is why a thumbnail and the
|
|
14
|
+
* stage render identically.
|
|
15
|
+
*/
|
|
16
|
+
interface Props {
|
|
17
|
+
slide: DeckSlide;
|
|
18
|
+
/** Pre-resolved portal media, keyed by media id (see `deckMediaAssets`). */
|
|
19
|
+
mediaAssets: Record<string, DeckMediaAsset>;
|
|
20
|
+
/** Applied to the fit box the 16:9 stage is scaled into. */
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Inline text editing (#39). Omitted everywhere but the editing view's own
|
|
24
|
+
* stage — filmstrip thumbnails, in-portal deck views and the Public Link
|
|
25
|
+
* route all render read-only, which is the acceptance criterion "nothing in
|
|
26
|
+
* this surface appears for read-only deck viewing" held at one place.
|
|
27
|
+
*/
|
|
28
|
+
editor?: DeckTextEditor;
|
|
29
|
+
}
|
|
30
|
+
export declare function DeckSlideSurface({ slide, mediaAssets, className, editor }: Props): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=DeckSlideSurface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeckSlideSurface.d.ts","sourceRoot":"","sources":["../../src/deck-builder/DeckSlideSurface.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AACjH,OAAO,KAAK,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKpF,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,2CAkBhF"}
|