@mgamadeus/ddd-design-studio 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +358 -2
- package/dist/canvas/index.d.ts +18 -0
- package/dist/canvas/index.js +3063 -0
- package/dist/canvas/index.js.map +1 -0
- package/dist/chunk-RFW6QPM3.js +143 -0
- package/dist/chunk-RFW6QPM3.js.map +1 -0
- package/dist/index.d.ts +803 -0
- package/dist/index.js +386 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -4
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/canvas/designReference.ts
|
|
4
|
+
var DESIGN_REFERENCE_PREFIX = "[design-ref]";
|
|
5
|
+
var oneLine = (text) => text.replace(/\s+/g, " ").trim();
|
|
6
|
+
var buildDesignReference = (input) => {
|
|
7
|
+
const fields = [
|
|
8
|
+
`${DESIGN_REFERENCE_PREFIX} ${oneLine(input.projectName)} \u203A ${oneLine(input.canvasName)} \u203A ${oneLine(input.boardTitle)}`,
|
|
9
|
+
`file ${input.boardKey}`,
|
|
10
|
+
`canvas ${input.projectKey}/${input.canvasKey}`,
|
|
11
|
+
`v${input.contentHash ? input.contentHash.slice(0, 7) : "?"}`,
|
|
12
|
+
`theme ${input.themeReference || "none"}`
|
|
13
|
+
];
|
|
14
|
+
if (input.region) {
|
|
15
|
+
const { x, y, width, height } = input.region;
|
|
16
|
+
fields.push(`region ${Math.round(x)},${Math.round(y)},${Math.round(width)},${Math.round(height)}`);
|
|
17
|
+
}
|
|
18
|
+
if (input.comment) {
|
|
19
|
+
const position = input.comment.x != null && input.comment.y != null ? ` at ${Math.round(input.comment.x)},${Math.round(input.comment.y)}` : "";
|
|
20
|
+
fields.push(`comment ${input.comment.id}${position}`);
|
|
21
|
+
}
|
|
22
|
+
fields.push(input.url);
|
|
23
|
+
const lines = [fields.join(" \xB7 ")];
|
|
24
|
+
for (const commentLine of input.comment?.lines ?? []) {
|
|
25
|
+
if (commentLine.trim()) lines.push(`comment: ${oneLine(commentLine)}`);
|
|
26
|
+
}
|
|
27
|
+
if (input.note?.trim()) lines.push(`note: ${oneLine(input.note)}`);
|
|
28
|
+
return lines.join("\n");
|
|
29
|
+
};
|
|
30
|
+
var buildBoardDeepLink = (pageUrl, boardKey, themeId, mode, viewport) => {
|
|
31
|
+
const url = new URL(pageUrl);
|
|
32
|
+
url.search = "";
|
|
33
|
+
url.hash = "";
|
|
34
|
+
url.searchParams.set("board", boardKey);
|
|
35
|
+
if (themeId) {
|
|
36
|
+
url.searchParams.set("theme", themeId);
|
|
37
|
+
url.searchParams.set("mode", mode);
|
|
38
|
+
}
|
|
39
|
+
if (viewport) url.searchParams.set("vp", viewport);
|
|
40
|
+
return url.toString().replace(/%2C/gi, ",").replace(/%3A/gi, ":");
|
|
41
|
+
};
|
|
42
|
+
var copyTextToClipboard = async (text) => {
|
|
43
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
44
|
+
try {
|
|
45
|
+
await navigator.clipboard.writeText(text);
|
|
46
|
+
return true;
|
|
47
|
+
} catch {
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (typeof document === "undefined") return false;
|
|
51
|
+
const textarea = document.createElement("textarea");
|
|
52
|
+
textarea.value = text;
|
|
53
|
+
textarea.setAttribute("readonly", "");
|
|
54
|
+
textarea.style.position = "fixed";
|
|
55
|
+
textarea.style.opacity = "0";
|
|
56
|
+
document.body.appendChild(textarea);
|
|
57
|
+
textarea.select();
|
|
58
|
+
const isCopied = document.execCommand("copy");
|
|
59
|
+
textarea.remove();
|
|
60
|
+
return isCopied;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// src/canvas/designTheme.ts
|
|
64
|
+
var splitThemeReference = (themeReference) => {
|
|
65
|
+
const reference = (themeReference ?? "").trim();
|
|
66
|
+
if (!reference) return null;
|
|
67
|
+
for (const mode of ["light", "dark"]) {
|
|
68
|
+
if (reference.endsWith(`:${mode}`)) return { themeId: reference.slice(0, -(mode.length + 1)), mode };
|
|
69
|
+
}
|
|
70
|
+
return { themeId: reference, mode: "light" };
|
|
71
|
+
};
|
|
72
|
+
var buildThemeReference = (themeId, mode) => mode === "dark" ? `${themeId}:dark` : themeId;
|
|
73
|
+
|
|
74
|
+
// src/provider/texts.ts
|
|
75
|
+
var DEFAULT_DESIGN_STUDIO_TEXTS = {
|
|
76
|
+
referencesCopied: (count) => count > 1 ? `References copied (${count})` : "Reference copied",
|
|
77
|
+
boardsUpdated: (count) => count === 1 ? "1 board updated" : `${count} boards updated`,
|
|
78
|
+
showUpdatedBoard: "Show",
|
|
79
|
+
canvasUpToDate: "Canvas is up to date",
|
|
80
|
+
reload: "Reload (R)",
|
|
81
|
+
thumbnailsFailed: "Thumbnails failed \xB7 try again",
|
|
82
|
+
thumbnailsWaitingForRenderer: (themeLabel) => `Thumbnails for ${themeLabel} are waiting for the renderer`,
|
|
83
|
+
thumbnailsRendering: (themeLabel) => `Thumbnails for ${themeLabel} are being rendered`,
|
|
84
|
+
thumbnailsFallbackThemeLabel: "this look",
|
|
85
|
+
thumbnailsMissing: (count) => count === 1 ? "1 board has no thumbnail in this look yet; it appears as soon as it is rendered." : `${count} boards have no thumbnail in this look yet; they appear as soon as they are rendered.`,
|
|
86
|
+
thumbnailsLastError: (error) => `Last error: ${error}`,
|
|
87
|
+
themeWithoutDarkMode: "This theme has no dark mode",
|
|
88
|
+
thumbnailMissing: "No thumbnail yet",
|
|
89
|
+
referenceNotePlaceholder: "What should change? (optional, goes into the reference)"
|
|
90
|
+
};
|
|
91
|
+
var resolveDesignStudioTexts = (texts) => {
|
|
92
|
+
if (!texts) return DEFAULT_DESIGN_STUDIO_TEXTS;
|
|
93
|
+
const defined = Object.fromEntries(Object.entries(texts).filter(([, value]) => value !== void 0));
|
|
94
|
+
return { ...DEFAULT_DESIGN_STUDIO_TEXTS, ...defined };
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/provider/DesignStudioProvider.tsx
|
|
98
|
+
import { createContext, useContext, useMemo } from "react";
|
|
99
|
+
import { jsx } from "react/jsx-runtime";
|
|
100
|
+
var DesignStudioContext = createContext(null);
|
|
101
|
+
var DesignStudioProvider = ({ environment, children }) => /* @__PURE__ */ jsx(DesignStudioContext.Provider, { value: environment, children });
|
|
102
|
+
var useDesignStudio = () => {
|
|
103
|
+
const environment = useContext(DesignStudioContext);
|
|
104
|
+
if (!environment) {
|
|
105
|
+
throw new Error("The design studio needs a DesignStudioProvider above it");
|
|
106
|
+
}
|
|
107
|
+
return environment;
|
|
108
|
+
};
|
|
109
|
+
var useDesignStudioApi = () => useDesignStudio().api;
|
|
110
|
+
var useDesignStudioComponents = () => useDesignStudio().components;
|
|
111
|
+
var useDesignStudioRouter = () => useDesignStudio().router;
|
|
112
|
+
var useDesignStudioPaths = () => useDesignStudio().paths;
|
|
113
|
+
var useDesignStudioNotify = () => useDesignStudio().notify;
|
|
114
|
+
var useDesignStudioTexts = () => {
|
|
115
|
+
const { texts } = useDesignStudio();
|
|
116
|
+
return useMemo(() => resolveDesignStudioTexts(texts), [texts]);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// src/utils/cx.ts
|
|
120
|
+
import { clsx } from "clsx";
|
|
121
|
+
import { twMerge } from "tailwind-merge";
|
|
122
|
+
var cx = (...inputs) => twMerge(clsx(inputs));
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
DESIGN_REFERENCE_PREFIX,
|
|
126
|
+
buildDesignReference,
|
|
127
|
+
buildBoardDeepLink,
|
|
128
|
+
copyTextToClipboard,
|
|
129
|
+
splitThemeReference,
|
|
130
|
+
buildThemeReference,
|
|
131
|
+
DEFAULT_DESIGN_STUDIO_TEXTS,
|
|
132
|
+
resolveDesignStudioTexts,
|
|
133
|
+
DesignStudioProvider,
|
|
134
|
+
useDesignStudio,
|
|
135
|
+
useDesignStudioApi,
|
|
136
|
+
useDesignStudioComponents,
|
|
137
|
+
useDesignStudioRouter,
|
|
138
|
+
useDesignStudioPaths,
|
|
139
|
+
useDesignStudioNotify,
|
|
140
|
+
useDesignStudioTexts,
|
|
141
|
+
cx
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=chunk-RFW6QPM3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/canvas/designReference.ts","../src/canvas/designTheme.ts","../src/provider/texts.ts","../src/provider/DesignStudioProvider.tsx","../src/utils/cx.ts"],"sourcesContent":["/**\n * Design references for agentic editing (\"send to agent\"): a plain-text block that names one\n * board (and optionally a region of it, a comment, a note) with stable keys, so an agent session can resolve it.\n * Format (one line per board, fields joined by \" · \", the deep link always last; optional\n * extra lines below):\n *\n * [design-ref] App › Onboarding – first run › 2 Welcome · file welcome-2.dc.html · canvas app/onboarding\n * · v3f9c2ab · theme brand:1:dark · region 24,180,342,220\n * · https://…/app/canvases/onboarding?board=welcome-2.dc.html&theme=brand:1&mode=dark\n * note: make the tab bar more compact\n *\n * `file` is the board key (the file name in the canvas folder), `v…` the first 7 characters of the board file's\n * content hash (git blob hash), `theme` the theme reference the board was looked at in (`none` = as authored).\n *\n * Pure functions, no React (tested in designReference.test.ts).\n */\n\nexport const DESIGN_REFERENCE_PREFIX = '[design-ref]';\n\n/** A rectangle on a board in board pixels (independent of the zoom). */\nexport interface BoardRegion {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface DesignReferenceInput {\n projectName: string;\n canvasName: string;\n projectKey: string;\n canvasKey: string;\n boardTitle: string;\n /** File name of the board in the canvas folder. */\n boardKey: string;\n /** Content hash of the board file (git blob hash); the reference carries its first 7 characters. */\n contentHash: string | null;\n /** Theme reference the board is shown in (`<themeId>` or `<themeId>:dark`), null = as authored. */\n themeReference: string | null;\n /** Deep link to the board on the canvas (with theme and mode). */\n url: string;\n region?: BoardRegion | null;\n /** A comment thread the reference is about (id + pin position). */\n comment?: { id: number | string; x: number | null; y: number | null; lines: string[] } | null;\n /** What should change (free text). */\n note?: string | null;\n}\n\nconst oneLine = (text: string) => text.replace(/\\s+/g, ' ').trim();\n\n/** One reference block (first line + optional `comment:` / `note:` lines). */\nexport const buildDesignReference = (input: DesignReferenceInput): string => {\n const fields = [\n `${DESIGN_REFERENCE_PREFIX} ${oneLine(input.projectName)} › ${oneLine(input.canvasName)} › ${oneLine(input.boardTitle)}`,\n `file ${input.boardKey}`,\n `canvas ${input.projectKey}/${input.canvasKey}`,\n `v${input.contentHash ? input.contentHash.slice(0, 7) : '?'}`,\n `theme ${input.themeReference || 'none'}`,\n ];\n if (input.region) {\n const { x, y, width, height } = input.region;\n fields.push(`region ${Math.round(x)},${Math.round(y)},${Math.round(width)},${Math.round(height)}`);\n }\n if (input.comment) {\n const position =\n input.comment.x != null && input.comment.y != null\n ? ` at ${Math.round(input.comment.x)},${Math.round(input.comment.y)}`\n : '';\n fields.push(`comment ${input.comment.id}${position}`);\n }\n fields.push(input.url);\n const lines = [fields.join(' · ')];\n for (const commentLine of input.comment?.lines ?? []) {\n if (commentLine.trim()) lines.push(`comment: ${oneLine(commentLine)}`);\n }\n if (input.note?.trim()) lines.push(`note: ${oneLine(input.note)}`);\n return lines.join('\\n');\n};\n\n/**\n * Deep link to a board: the current page URL with `board` (the board key), the look (`theme`, `mode`; left out when\n * the board is shown as authored) and, when given, the canvas viewport `vp` (other canvas parameters dropped) — the\n * link reopens the focus view over the same part of the canvas.\n */\nexport const buildBoardDeepLink = (\n pageUrl: string,\n boardKey: string,\n themeId: string | null,\n mode: 'light' | 'dark',\n viewport?: string | null\n): string => {\n const url = new URL(pageUrl);\n url.search = '';\n url.hash = '';\n url.searchParams.set('board', boardKey);\n if (themeId) {\n url.searchParams.set('theme', themeId);\n url.searchParams.set('mode', mode);\n }\n if (viewport) url.searchParams.set('vp', viewport);\n // commas and colons are valid in a query; unescaped, the viewport and the theme stay readable in a pasted reference\n return url.toString().replace(/%2C/gi, ',').replace(/%3A/gi, ':');\n};\n\n/**\n * Copies text: the async Clipboard API, else a hidden textarea + `execCommand('copy')` (older browsers, insecure\n * origins).\n * @returns whether the text reached the clipboard\n */\nexport const copyTextToClipboard = async (text: string): Promise<boolean> => {\n if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {\n try {\n await navigator.clipboard.writeText(text);\n return true;\n } catch {\n // fall through to the textarea fallback (permission denied, document not focused)\n }\n }\n if (typeof document === 'undefined') return false;\n const textarea = document.createElement('textarea');\n textarea.value = text;\n textarea.setAttribute('readonly', '');\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.select();\n const isCopied = document.execCommand('copy');\n textarea.remove();\n return isCopied;\n};\n","/**\n * Theme references of the design studio: `<themeId>` or `<themeId>:<mode>` (mode `light` or `dark`), e.g.\n * `brand:1:dark` — the theme id itself may contain colons, only a trailing `:light` / `:dark` is the mode (same rule\n * as `DesignThemeReference::fromString`). Pure functions, no React (tested in designTheme.test.ts).\n */\n\nexport type ThemeMode = 'light' | 'dark';\n\nexport interface ThemeLook {\n themeId: string;\n mode: ThemeMode;\n}\n\n/** Splits a theme reference; null without one (the boards are shown as authored). */\nexport const splitThemeReference = (themeReference: string | null | undefined): ThemeLook | null => {\n const reference = (themeReference ?? '').trim();\n if (!reference) return null;\n for (const mode of ['light', 'dark'] as const) {\n if (reference.endsWith(`:${mode}`)) return { themeId: reference.slice(0, -(mode.length + 1)), mode };\n }\n return { themeId: reference, mode: 'light' };\n};\n\n/** `<themeId>` for light, `<themeId>:dark` for dark. */\nexport const buildThemeReference = (themeId: string, mode: ThemeMode): string =>\n mode === 'dark' ? `${themeId}:dark` : themeId;\n","import type { DesignStudioTexts } from './types';\n\n/** The English defaults of the texts an application can replace through `environment.texts`. */\nexport const DEFAULT_DESIGN_STUDIO_TEXTS: DesignStudioTexts = {\n referencesCopied: count => (count > 1 ? `References copied (${count})` : 'Reference copied'),\n boardsUpdated: count => (count === 1 ? '1 board updated' : `${count} boards updated`),\n showUpdatedBoard: 'Show',\n canvasUpToDate: 'Canvas is up to date',\n reload: 'Reload (R)',\n thumbnailsFailed: 'Thumbnails failed · try again',\n thumbnailsWaitingForRenderer: themeLabel => `Thumbnails for ${themeLabel} are waiting for the renderer`,\n thumbnailsRendering: themeLabel => `Thumbnails for ${themeLabel} are being rendered`,\n thumbnailsFallbackThemeLabel: 'this look',\n thumbnailsMissing: count =>\n count === 1\n ? '1 board has no thumbnail in this look yet; it appears as soon as it is rendered.'\n : `${count} boards have no thumbnail in this look yet; they appear as soon as they are rendered.`,\n thumbnailsLastError: error => `Last error: ${error}`,\n themeWithoutDarkMode: 'This theme has no dark mode',\n thumbnailMissing: 'No thumbnail yet',\n referenceNotePlaceholder: 'What should change? (optional, goes into the reference)',\n};\n\n/** The defaults with the application's replacements on top; an entry that is missing or `undefined` keeps its default. */\nexport const resolveDesignStudioTexts = (texts: Partial<DesignStudioTexts> | undefined): DesignStudioTexts => {\n if (!texts) return DEFAULT_DESIGN_STUDIO_TEXTS;\n const defined = Object.fromEntries(Object.entries(texts).filter(([, value]) => value !== undefined));\n return { ...DEFAULT_DESIGN_STUDIO_TEXTS, ...defined };\n};\n","'use client';\n\nimport { createContext, type ReactNode, useContext, useMemo } from 'react';\n\nimport type { DesignStudioApi } from '../api/createDesignStudioApi';\nimport { resolveDesignStudioTexts } from './texts';\nimport type {\n DesignStudioComponents,\n DesignStudioEnvironment,\n DesignStudioNotify,\n DesignStudioPaths,\n DesignStudioRouter,\n DesignStudioTexts,\n} from './types';\n\nconst DesignStudioContext = createContext<DesignStudioEnvironment | null>(null);\n\nexport interface DesignStudioProviderProps {\n /** Keep it referentially stable (a module constant): every studio component reads it. */\n environment: DesignStudioEnvironment;\n children: ReactNode;\n}\n\n/** Hands the application's environment (API, router, UI primitives, …) to the studio's screens below it. */\nexport const DesignStudioProvider = ({ environment, children }: DesignStudioProviderProps) => (\n <DesignStudioContext.Provider value={environment}>{children}</DesignStudioContext.Provider>\n);\n\n/** The whole environment. */\nexport const useDesignStudio = (): DesignStudioEnvironment => {\n const environment = useContext(DesignStudioContext);\n if (!environment) {\n throw new Error('The design studio needs a DesignStudioProvider above it');\n }\n return environment;\n};\n\nexport const useDesignStudioApi = (): DesignStudioApi => useDesignStudio().api;\n\nexport const useDesignStudioComponents = (): DesignStudioComponents => useDesignStudio().components;\n\nexport const useDesignStudioRouter = (): DesignStudioRouter => useDesignStudio().router;\n\nexport const useDesignStudioPaths = (): DesignStudioPaths => useDesignStudio().paths;\n\nexport const useDesignStudioNotify = (): DesignStudioNotify => useDesignStudio().notify;\n\n/** The UI texts: the application's replacements (`environment.texts`) on top of the English defaults. Stable per environment. */\nexport const useDesignStudioTexts = (): DesignStudioTexts => {\n const { texts } = useDesignStudio();\n return useMemo(() => resolveDesignStudioTexts(texts), [texts]);\n};\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/** Conditional class names, later Tailwind classes winning over earlier ones (`clsx` + `tailwind-merge`). */\nexport const cx = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n"],"mappings":";;;AAiBO,IAAM,0BAA0B;AA+BvC,IAAM,UAAU,CAAC,SAAiB,KAAK,QAAQ,QAAQ,GAAG,EAAE,KAAK;AAG1D,IAAM,uBAAuB,CAAC,UAAwC;AAC3E,QAAM,SAAS;AAAA,IACb,GAAG,uBAAuB,IAAI,QAAQ,MAAM,WAAW,CAAC,WAAM,QAAQ,MAAM,UAAU,CAAC,WAAM,QAAQ,MAAM,UAAU,CAAC;AAAA,IACtH,QAAQ,MAAM,QAAQ;AAAA,IACtB,UAAU,MAAM,UAAU,IAAI,MAAM,SAAS;AAAA,IAC7C,IAAI,MAAM,cAAc,MAAM,YAAY,MAAM,GAAG,CAAC,IAAI,GAAG;AAAA,IAC3D,SAAS,MAAM,kBAAkB,MAAM;AAAA,EACzC;AACA,MAAI,MAAM,QAAQ;AAChB,UAAM,EAAE,GAAG,GAAG,OAAO,OAAO,IAAI,MAAM;AACtC,W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