@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.
@@ -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
- const initResult = await PDS.start(pdsOptions);
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-02-04T10:05:30.206Z",
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
- "pds-ask": {
6795
- "slug": "pds-ask",
6796
- "storyTitle": "Utilities/PDS ask",
6797
- "category": "Utilities",
6798
- "name": "PDS ask",
6799
- "description": "The `PDS.ask()` helper wraps the native `<dialog>` element with PDS styling and a promise-based API.\nUse it to collect quick confirmations or to stage entire forms before committing data back to the host application.",
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.52",
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.52"
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 '../../../../src/js/pds-core/pds-config.js';
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
 
@@ -1,5 +1,5 @@
1
1
  import { html } from 'lit';
2
- import { ask as askFallback } from '../../../../src/js/common/ask.js';
2
+ import { ask as askFallback } from '@pds-src/js/common/ask.js';
3
3
  import { toastFormData } from './toast-utils.js';
4
4
 
5
5
  const ensureAsk = () => {