@dfosco/storyboard 0.9.0 → 0.9.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfosco/storyboard",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Storyboard prototyping framework — core engine, React integration, and canvas",
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"@primer/octicons": "^19.22.0",
|
|
91
91
|
"@toon-format/toon": "^2.1.0",
|
|
92
92
|
"ansi-to-html": "^0.7.2",
|
|
93
|
+
"clsx": "^2.1.1",
|
|
93
94
|
"cmdk": "^1.1.1",
|
|
94
95
|
"feather-icons": "^4.29.2",
|
|
95
96
|
"ghostty-web": "^0.4.0",
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"remark": "^15.0.1",
|
|
103
104
|
"remark-gfm": "^4.0.1",
|
|
104
105
|
"remark-html": "^16.0.1",
|
|
106
|
+
"tailwind-merge": "^3.5.0",
|
|
105
107
|
"ws": "^8.0.0",
|
|
106
108
|
"zod": "^3.23.8"
|
|
107
109
|
},
|
|
@@ -126,9 +128,7 @@
|
|
|
126
128
|
"@tailwindcss/vite": "^4.2.2",
|
|
127
129
|
"@types/node": "^20.0.0",
|
|
128
130
|
"@vitejs/plugin-react": "^4.3.4",
|
|
129
|
-
"clsx": "^2.1.1",
|
|
130
131
|
"marked": "^17.0.5",
|
|
131
|
-
"tailwind-merge": "^3.5.0",
|
|
132
132
|
"tailwind-variants": "^3.2.2",
|
|
133
133
|
"tailwindcss": "^4.2.2",
|
|
134
134
|
"tw-animate-css": "^1.4.0",
|
|
@@ -418,6 +418,21 @@ export async function mountStoryboardCore(config = {}, options = {}) {
|
|
|
418
418
|
// Apply saved theme to DOM immediately — before React mount
|
|
419
419
|
applyEarlyTheme(config)
|
|
420
420
|
|
|
421
|
+
// Apply customer mode synchronously, before any `await`. The homepage
|
|
422
|
+
// redirect (`canvasHomepage` / `protoHomepage`) must mutate
|
|
423
|
+
// window.location.pathname BEFORE the consumer's router reads it — and
|
|
424
|
+
// because most consumers call `createBrowserRouter` and
|
|
425
|
+
// `mountStoryboardCore` back-to-back without awaiting, any await in
|
|
426
|
+
// this function would push the redirect past router instantiation and
|
|
427
|
+
// the wrong route would render.
|
|
428
|
+
//
|
|
429
|
+
// Reads config.customerMode directly (skips the unified-config store)
|
|
430
|
+
// so it works even when the virtual `initConfig()` hasn't run yet.
|
|
431
|
+
if (config.customerMode) {
|
|
432
|
+
initCustomerModeConfig(config.customerMode)
|
|
433
|
+
applyCustomerMode(basePath)
|
|
434
|
+
}
|
|
435
|
+
|
|
421
436
|
// Forward cmd/ctrl+click on links to the host shell when running in
|
|
422
437
|
// an iframe. Installed early so it covers both the embed-only path
|
|
423
438
|
// and the full canvas/workspace mount below.
|
|
@@ -489,17 +504,16 @@ export async function mountStoryboardCore(config = {}, options = {}) {
|
|
|
489
504
|
}
|
|
490
505
|
}
|
|
491
506
|
|
|
492
|
-
// Initialize customer mode config
|
|
493
|
-
|
|
507
|
+
// Initialize customer mode config — fall back to the unified config store
|
|
508
|
+
// when the consumer didn't pass customerMode directly. The early sync path
|
|
509
|
+
// at the top of this function already handled the synchronous redirect for
|
|
510
|
+
// consumers passing `config.customerMode` directly; this branch covers
|
|
511
|
+
// consumers that seed customer-mode purely through the unified store.
|
|
512
|
+
if (!config.customerMode && uc.customerMode && Object.keys(uc.customerMode).length > 0) {
|
|
494
513
|
initCustomerModeConfig(uc.customerMode)
|
|
495
|
-
|
|
496
|
-
initCustomerModeConfig(config.customerMode)
|
|
514
|
+
applyCustomerMode(basePath)
|
|
497
515
|
}
|
|
498
516
|
|
|
499
|
-
// Apply customer-mode side effects (DOM classes + early redirect).
|
|
500
|
-
// Reads from the now-initialized customerMode store.
|
|
501
|
-
applyCustomerMode(basePath)
|
|
502
|
-
|
|
503
517
|
// Initialize comments config (framework-agnostic)
|
|
504
518
|
const commentsConfig = uc.comments && Object.keys(uc.comments).length > 0 ? uc.comments : config.comments
|
|
505
519
|
if (commentsConfig) {
|