@pure-ds/storybook 0.5.52 → 0.5.54
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/.storybook/preview.js
CHANGED
|
@@ -17,6 +17,10 @@ import { toastFormData } from '../stories/utils/toast-utils.js';
|
|
|
17
17
|
// Expose toastFormData globally for inline event handlers
|
|
18
18
|
window.toastFormData = toastFormData;
|
|
19
19
|
|
|
20
|
+
console.log('[PDS Storybook] preview.js loaded');
|
|
21
|
+
console.log('[PDS Storybook] PDS import', PDS ? 'OK' : 'MISSING');
|
|
22
|
+
console.log('[PDS Storybook] location', window.location.href);
|
|
23
|
+
|
|
20
24
|
// Get initial preset from storage or URL or default
|
|
21
25
|
const getInitialPreset = () => {
|
|
22
26
|
try {
|
|
@@ -61,6 +65,7 @@ const setLiveGenerator = (generator) => {
|
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
PDS.addEventListener('pds:ready', (event) => {
|
|
68
|
+
console.log('[PDS Storybook] pds:ready event', event?.detail || event);
|
|
64
69
|
if (event?.detail?.generator) {
|
|
65
70
|
setLiveGenerator(event.detail.generator);
|
|
66
71
|
}
|
|
@@ -68,6 +73,7 @@ PDS.addEventListener('pds:ready', (event) => {
|
|
|
68
73
|
|
|
69
74
|
// Wrap top-level await in IIFE for production build compatibility
|
|
70
75
|
(async () => {
|
|
76
|
+
console.log('[PDS Storybook] init start');
|
|
71
77
|
PDS.initializing = true;
|
|
72
78
|
|
|
73
79
|
// NEVER apply global styles on init - only apply in story decorator
|
|
@@ -102,7 +108,14 @@ PDS.addEventListener('pds:ready', (event) => {
|
|
|
102
108
|
// Always override mode to 'live' regardless of user config to prevent style injection failures
|
|
103
109
|
pdsOptions.mode = 'live';
|
|
104
110
|
|
|
105
|
-
|
|
111
|
+
let initResult;
|
|
112
|
+
try {
|
|
113
|
+
initResult = await PDS.start(pdsOptions);
|
|
114
|
+
console.log('[PDS Storybook] PDS.start resolved', initResult);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.error('[PDS Storybook] PDS.start failed', error);
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
106
119
|
setLiveGenerator(initResult?.generator);
|
|
107
120
|
PDS.initializing = false;
|
|
108
121
|
|
package/dist/pds-reference.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-02-04T10:
|
|
2
|
+
"generatedAt": "2026-02-04T10:47:36.284Z",
|
|
3
3
|
"sources": {
|
|
4
4
|
"customElements": "custom-elements.json",
|
|
5
5
|
"ontology": "src\\js\\pds-core\\pds-ontology.js",
|
|
@@ -6791,12 +6791,12 @@
|
|
|
6791
6791
|
"packages\\pds-storybook\\stories\\utilities\\Backdrop.stories.js"
|
|
6792
6792
|
]
|
|
6793
6793
|
},
|
|
6794
|
-
"
|
|
6795
|
-
"slug": "
|
|
6796
|
-
"storyTitle": "
|
|
6797
|
-
"category":
|
|
6798
|
-
"name": "
|
|
6799
|
-
"description": "The
|
|
6794
|
+
"headline": {
|
|
6795
|
+
"slug": "headline",
|
|
6796
|
+
"storyTitle": "Headline",
|
|
6797
|
+
"category": null,
|
|
6798
|
+
"name": "Headline",
|
|
6799
|
+
"description": "The \\",
|
|
6800
6800
|
"tags": [
|
|
6801
6801
|
"alert",
|
|
6802
6802
|
"confirm",
|
|
@@ -6822,40 +6822,7 @@
|
|
|
6822
6822
|
"prompt"
|
|
6823
6823
|
]
|
|
6824
6824
|
},
|
|
6825
|
-
"stories": [
|
|
6826
|
-
{
|
|
6827
|
-
"exportName": "BareConfirm",
|
|
6828
|
-
"name": "Are you sure?",
|
|
6829
|
-
"id": "utilities-pds-ask--bare-confirm",
|
|
6830
|
-
"tags": [],
|
|
6831
|
-
"description": null,
|
|
6832
|
-
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6833
|
-
},
|
|
6834
|
-
{
|
|
6835
|
-
"exportName": "QuickConfirm",
|
|
6836
|
-
"name": "Boolean confirm flow",
|
|
6837
|
-
"id": "utilities-pds-ask--quick-confirm",
|
|
6838
|
-
"tags": [],
|
|
6839
|
-
"description": null,
|
|
6840
|
-
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6841
|
-
},
|
|
6842
|
-
{
|
|
6843
|
-
"exportName": "formSubdialog",
|
|
6844
|
-
"name": "Embed a pds-form subform",
|
|
6845
|
-
"id": "utilities-pds-ask--form-subdialog",
|
|
6846
|
-
"tags": [],
|
|
6847
|
-
"description": null,
|
|
6848
|
-
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6849
|
-
},
|
|
6850
|
-
{
|
|
6851
|
-
"exportName": "MiniForm",
|
|
6852
|
-
"name": "Mini form submission",
|
|
6853
|
-
"id": "utilities-pds-ask--mini-form",
|
|
6854
|
-
"tags": [],
|
|
6855
|
-
"description": null,
|
|
6856
|
-
"source": "packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6857
|
-
}
|
|
6858
|
-
],
|
|
6825
|
+
"stories": [],
|
|
6859
6826
|
"files": [
|
|
6860
6827
|
"packages\\pds-storybook\\stories\\utils\\PdsAsk.stories.js"
|
|
6861
6828
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pure-ds/storybook",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.54",
|
|
4
4
|
"description": "Storybook showcase for Pure Design System with live configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"pds:build-icons": "pds-build-icons"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@pure-ds/core": "^0.5.
|
|
41
|
+
"@pure-ds/core": "^0.5.54"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import { presets } from '
|
|
2
|
+
import { presets } from '@pds-src/js/pds-core/pds-config.js';
|
|
3
3
|
import { highlight, getCurrentTheme, preloadShiki } from '../utils/shiki.js';
|
|
4
4
|
import { attachStoryLinkHandlers } from '../utils/navigation.js';
|
|
5
5
|
|