@pure-ds/core 0.5.31 → 0.5.32
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/.github/copilot-instructions.md +1 -1
- package/INTELLISENSE.md +1 -1
- package/custom-elements.json +179 -0
- package/dist/types/public/assets/js/pds-configurator.d.ts +2 -0
- package/dist/types/public/assets/js/pds-configurator.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-manager.d.ts +141 -426
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +3 -4
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-fab.d.ts +82 -0
- package/dist/types/public/assets/pds/components/pds-fab.d.ts.map +1 -0
- package/dist/types/src/js/common/ask.d.ts +6 -6
- package/dist/types/src/js/common/ask.d.ts.map +1 -1
- package/dist/types/src/js/common/common.d.ts +9 -0
- package/dist/types/src/js/common/common.d.ts.map +1 -1
- package/dist/types/src/js/pds-configurator.d.ts +2 -0
- package/dist/types/src/js/pds-configurator.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers-meta.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enums.d.ts +9 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-ontology.d.ts +146 -158
- package/dist/types/src/js/pds-core/pds-ontology.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +3 -2
- package/packages/pds-cli/bin/templates/bootstrap/pds.config.js +2 -2
- package/public/assets/js/app.js +311 -203
- package/public/assets/js/pds-manager.js +297 -189
- package/public/assets/js/pds.js +10 -53
- package/public/assets/pds/components/pds-calendar.js +1 -1
- package/public/assets/pds/components/pds-fab.js +598 -0
- package/public/assets/pds/components/pds-form.js +1 -1
- package/public/assets/pds/components/pds-icon.js +10 -10
- package/public/assets/pds/components/pds-toaster.js +15 -15
- package/public/assets/pds/vscode-custom-data.json +23 -0
- package/readme.md +21 -4
- package/src/js/pds-core/pds-config.js +1 -8
- package/src/js/pds-core/pds-enhancers-meta.js +20 -5
- package/src/js/pds-core/pds-enhancers.js +45 -2
- package/src/js/pds-core/pds-enums.js +9 -0
- package/src/js/pds-core/pds-generator.js +245 -143
- package/src/js/pds-core/pds-live.js +2 -0
- package/src/js/pds-core/pds-ontology.js +47 -20
- package/src/js/pds-core/pds-query.js +1 -1
- package/src/js/pds-core/pds-start-helpers.js +2 -6
- package/src/js/pds.js +8 -0
|
@@ -312,6 +312,7 @@ export async function startLive(PDS, config, { emitReady, applyResolvedTheme, se
|
|
|
312
312
|
// 5) Set up AutoDefiner + run enhancers (defaults merged with user)
|
|
313
313
|
let autoDefiner = null;
|
|
314
314
|
let mergedEnhancers = [];
|
|
315
|
+
|
|
315
316
|
try {
|
|
316
317
|
const res = await setupAutoDefinerAndEnhancers({
|
|
317
318
|
autoDefineBaseURL: derivedAutoDefineBaseURL,
|
|
@@ -327,6 +328,7 @@ export async function startLive(PDS, config, { emitReady, applyResolvedTheme, se
|
|
|
327
328
|
}, { baseEnhancers: defaultPDSEnhancers });
|
|
328
329
|
autoDefiner = res.autoDefiner;
|
|
329
330
|
mergedEnhancers = res.mergedEnhancers || [];
|
|
331
|
+
|
|
330
332
|
} catch (error) {
|
|
331
333
|
generatorConfig?.log?.("error", "❌ Failed to initialize AutoDefiner/Enhancers:", error);
|
|
332
334
|
}
|
|
@@ -73,11 +73,19 @@ export const ontology = {
|
|
|
73
73
|
category: "theming"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
id: "
|
|
77
|
-
name: "
|
|
78
|
-
description: "Contextual
|
|
79
|
-
selectors: [".
|
|
80
|
-
tags: ["feedback", "message", "notification", "status"],
|
|
76
|
+
id: "callout",
|
|
77
|
+
name: "Callout",
|
|
78
|
+
description: "Contextual information and notification messages",
|
|
79
|
+
selectors: [".callout", ".callout-info", ".callout-success", ".callout-warning", ".callout-danger", ".callout-error", ".callout-dismissible"],
|
|
80
|
+
tags: ["feedback", "message", "notification", "status", "information"],
|
|
81
|
+
category: "feedback"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "empty-state",
|
|
85
|
+
name: "Empty State",
|
|
86
|
+
description: "Empty state layout for missing data or onboarding",
|
|
87
|
+
selectors: [".empty-state"],
|
|
88
|
+
tags: ["empty", "no-data", "zero", "placeholder", "onboarding", "state"],
|
|
81
89
|
category: "feedback"
|
|
82
90
|
},
|
|
83
91
|
{
|
|
@@ -198,6 +206,14 @@ export const ontology = {
|
|
|
198
206
|
tags: ["panel", "overlay", "sidebar"],
|
|
199
207
|
category: "overlay"
|
|
200
208
|
},
|
|
209
|
+
{
|
|
210
|
+
id: "pds-fab",
|
|
211
|
+
name: "FAB",
|
|
212
|
+
description: "Floating Action Button with expandable satellite actions",
|
|
213
|
+
selectors: ["pds-fab"],
|
|
214
|
+
tags: ["button", "action", "floating", "interactive"],
|
|
215
|
+
category: "action"
|
|
216
|
+
},
|
|
201
217
|
{
|
|
202
218
|
id: "pds-upload",
|
|
203
219
|
name: "Upload",
|
|
@@ -475,7 +491,7 @@ export const ontology = {
|
|
|
475
491
|
categories: {
|
|
476
492
|
feedback: {
|
|
477
493
|
description: "User feedback and status indicators",
|
|
478
|
-
primitives: ["
|
|
494
|
+
primitives: ["callout", "badge", "empty-state"],
|
|
479
495
|
components: ["pds-toaster"]
|
|
480
496
|
},
|
|
481
497
|
form: {
|
|
@@ -510,6 +526,11 @@ export const ontology = {
|
|
|
510
526
|
theming: {
|
|
511
527
|
description: "Colors, surfaces, and visual theming",
|
|
512
528
|
primitives: ["surface"]
|
|
529
|
+
},
|
|
530
|
+
action: {
|
|
531
|
+
description: "Interactive actions and buttons",
|
|
532
|
+
primitives: ["button"],
|
|
533
|
+
components: ["pds-fab"]
|
|
513
534
|
}
|
|
514
535
|
},
|
|
515
536
|
|
|
@@ -539,13 +560,18 @@ export const ontology = {
|
|
|
539
560
|
overflow: ["truncate", "scroll", "hidden", "text"],
|
|
540
561
|
paragraph: ["text", "typography", "content", "body"],
|
|
541
562
|
content: ["text", "typography", "body", "article"],
|
|
563
|
+
empty: ["empty-state", "placeholder", "zero", "no-data", "onboarding", "callout", "card", "icon", "button"],
|
|
564
|
+
"empty state": ["empty-state", "empty", "no-data", "zero", "onboarding"],
|
|
565
|
+
"no data": ["empty-state", "empty", "zero", "placeholder"],
|
|
542
566
|
|
|
543
567
|
// Forms & Inputs
|
|
544
568
|
form: ["input", "field", "label", "button", "fieldset", "pds-form", "pds-upload", "pds-richtext", "pds-calendar", "required", "validation", "submit"],
|
|
545
569
|
input: ["form", "field", "text", "label", "required", "validation"],
|
|
546
570
|
field: ["form", "input", "label", "required"],
|
|
547
|
-
button: ["btn", "interactive", "action", "submit", "form", "btn-primary", "btn-secondary", "btn-working"],
|
|
548
|
-
btn: ["button", "interactive", "action"],
|
|
571
|
+
button: ["btn", "interactive", "action", "submit", "form", "btn-primary", "btn-secondary", "btn-working", "pds-fab", "floating"],
|
|
572
|
+
btn: ["button", "interactive", "action", "pds-fab"],
|
|
573
|
+
fab: ["pds-fab", "floating", "button", "action", "menu"],
|
|
574
|
+
floating: ["fab", "pds-fab", "button", "action"],
|
|
549
575
|
toggle: ["switch", "checkbox", "boolean", "form", "interactive"],
|
|
550
576
|
switch: ["toggle", "checkbox", "boolean"],
|
|
551
577
|
slider: ["range", "input", "form"],
|
|
@@ -577,18 +603,19 @@ export const ontology = {
|
|
|
577
603
|
tab: ["tabs", "pds-tabstrip", "panel"],
|
|
578
604
|
link: ["navigation", "anchor", "href", "routing"],
|
|
579
605
|
|
|
580
|
-
// Feedback & Notifications (alert
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
606
|
+
// Feedback & Notifications (callout is the primary term, alert is kept as alias for backwards compatibility)
|
|
607
|
+
callout: ["notification", "feedback", "message", "status", "toast", "information", "alert", "warning", "error", "info", "success", "danger"],
|
|
608
|
+
alert: ["callout", "notification", "feedback", "message", "status", "toast", "modal", "dialog", "pds-ask", "confirm", "warning", "error", "info", "success", "danger"],
|
|
609
|
+
notification: ["callout", "toast", "pds-toaster", "feedback", "message", "popup", "alert"],
|
|
610
|
+
toast: ["pds-toaster", "notification", "callout", "feedback", "popup", "snackbar", "alert"],
|
|
611
|
+
feedback: ["callout", "notification", "toast", "status", "badge", "validation", "error", "success", "alert"],
|
|
612
|
+
message: ["callout", "notification", "feedback", "dialog", "toast", "alert"],
|
|
613
|
+
status: ["badge", "callout", "indicator", "feedback", "state", "alert"],
|
|
614
|
+
error: ["callout", "danger", "validation", "feedback", "warning", "alert"],
|
|
615
|
+
success: ["callout", "feedback", "badge", "status", "check", "alert"],
|
|
616
|
+
warning: ["callout", "caution", "feedback", "status", "alert"],
|
|
617
|
+
info: ["callout", "information", "feedback", "status", "alert"],
|
|
618
|
+
danger: ["callout", "error", "feedback", "destructive", "delete", "alert"],
|
|
592
619
|
badge: ["status", "pill", "tag", "chip", "indicator", "label"],
|
|
593
620
|
pill: ["badge", "tag", "chip"],
|
|
594
621
|
tag: ["badge", "pill", "chip", "label"],
|
|
@@ -43,7 +43,7 @@ export class PDSQuery {
|
|
|
43
43
|
modal: ['modal', 'dialog', 'popup', 'overlay'],
|
|
44
44
|
drawer: ['drawer', 'sidebar', 'panel'],
|
|
45
45
|
tab: ['tab', 'tabstrip'],
|
|
46
|
-
toast: ['toast', 'notification', '
|
|
46
|
+
toast: ['toast', 'notification', 'callout', 'message', 'alert'],
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
// Question patterns
|
|
@@ -355,12 +355,8 @@ export async function setupAutoDefinerAndEnhancers(options, { baseEnhancers = []
|
|
|
355
355
|
|
|
356
356
|
if (isLitComponent && isMissingLitError) {
|
|
357
357
|
console.error(
|
|
358
|
-
`❌ PDS component <${tag}> requires Lit but #pds/lit is not in import map
|
|
359
|
-
|
|
360
|
-
`<script type="importmap">\n` +
|
|
361
|
-
` { "imports": { "#pds/lit": "./path/to/lit.js" } }\n` +
|
|
362
|
-
`</script>\n` +
|
|
363
|
-
`See: https://github.com/pure-ds/core#lit-components`
|
|
358
|
+
`❌ PDS component <${tag}> requires Lit but #pds/lit is not in import map.
|
|
359
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`
|
|
364
360
|
);
|
|
365
361
|
} else {
|
|
366
362
|
console.warn(
|
package/src/js/pds.js
CHANGED
|
@@ -50,8 +50,10 @@ import {
|
|
|
50
50
|
createStylesheet,
|
|
51
51
|
} from "./pds-core/pds-runtime.js";
|
|
52
52
|
import { registry } from "./pds-core/pds-registry.js";
|
|
53
|
+
import { enums } from "./pds-core/pds-enums.js";
|
|
53
54
|
import { ask } from "./common/ask.js";
|
|
54
55
|
import { toast } from "./common/toast.js";
|
|
56
|
+
import * as common from "./common/common.js";
|
|
55
57
|
import { defaultPDSEnhancers } from "./pds-core/pds-enhancers.js";
|
|
56
58
|
import { resolvePublicAssetURL } from "./pds-core/pds-paths.js";
|
|
57
59
|
import {
|
|
@@ -108,6 +110,9 @@ async function __loadRuntimeConfig(assetRootURL, config = {}) {
|
|
|
108
110
|
/** Singleton runtime registry. Use `registry.setLiveMode()` to enable live mode or `registry.setStaticMode()` for static assets */
|
|
109
111
|
PDS.registry = registry;
|
|
110
112
|
|
|
113
|
+
/** Expose enums in static and live modes */
|
|
114
|
+
PDS.enums = enums;
|
|
115
|
+
|
|
111
116
|
/** Adopt a set of layered stylesheets into a ShadowRoot */
|
|
112
117
|
PDS.adoptLayers = adoptLayers;
|
|
113
118
|
|
|
@@ -121,6 +126,7 @@ PDS.createStylesheet = createStylesheet;
|
|
|
121
126
|
PDS.isLiveMode = () => registry.isLive;
|
|
122
127
|
PDS.ask = ask;
|
|
123
128
|
PDS.toast = toast;
|
|
129
|
+
PDS.common = common;
|
|
124
130
|
|
|
125
131
|
function __emitPDSReady(detail) {
|
|
126
132
|
const hasCustomEvent = typeof CustomEvent === "function";
|
|
@@ -324,6 +330,7 @@ PDS.defaultEnhancers = defaultPDSEnhancers;
|
|
|
324
330
|
async function start(config) {
|
|
325
331
|
const mode = (config && config.mode) || "live";
|
|
326
332
|
const { mode: _omit, ...rest } = config || {};
|
|
333
|
+
|
|
327
334
|
if (mode === "static") return staticInit(rest);
|
|
328
335
|
const assetRootURL = resolveRuntimeAssetRoot(rest, { resolvePublicAssetURL });
|
|
329
336
|
const managerUrl =
|
|
@@ -451,6 +458,7 @@ async function staticInit(config) {
|
|
|
451
458
|
defaultLog: __defaultLog,
|
|
452
459
|
});
|
|
453
460
|
const userEnhancers = normalized.enhancers;
|
|
461
|
+
|
|
454
462
|
|
|
455
463
|
// 2) Derive static asset URLs from the normalized public root
|
|
456
464
|
const baseStaticPaths = {
|