@pure-ds/core 0.5.4 → 0.5.6
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/dist/types/pds.d.ts +2 -0
- package/dist/types/public/assets/js/pds-manager.d.ts +2 -2
- package/dist/types/public/assets/js/pds.d.ts +2 -2
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers-meta.d.ts +13 -0
- package/dist/types/src/js/pds-core/pds-enhancers-meta.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts +0 -15
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds-static.js +12 -0
- package/public/assets/js/app.js +24 -78
- package/public/assets/js/pds-manager.js +8 -8
- package/public/assets/js/pds.js +9 -63
- package/src/js/pds-core/pds-enhancers-meta.js +104 -0
- package/src/js/pds-core/pds-enhancers.js +9 -106
- package/src/js/pds-core/pds-live.js +2 -0
- package/src/js/pds.d.ts +2 -0
- package/src/js/pds.js +81 -3
package/dist/types/pds.d.ts
CHANGED
|
@@ -168,6 +168,8 @@ export class PDS extends EventTarget {
|
|
|
168
168
|
static isLiveMode: () => boolean;
|
|
169
169
|
static findComponentForElement?: (el: Element) => ComponentDef | null;
|
|
170
170
|
static presets?: Record<string, any>;
|
|
171
|
+
static enhancerMetadata?: Array<{ selector: string; description?: string; demoHtml?: string }>;
|
|
172
|
+
static defaultEnhancers?: Array<any>;
|
|
171
173
|
static ontology?: any;
|
|
172
174
|
static enums?: Record<string, any>;
|
|
173
175
|
static common?: Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
declare function
|
|
1
|
+
export { nt as startLive };
|
|
2
|
+
declare function nt(n: any, t: any, { emitReady: e, applyResolvedTheme: a, setupSystemListenerIfNeeded: r }: {
|
|
3
3
|
emitReady: any;
|
|
4
4
|
applyResolvedTheme: any;
|
|
5
5
|
setupSystemListenerIfNeeded: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
declare var
|
|
1
|
+
export { b as PDS };
|
|
2
|
+
declare var b: {
|
|
3
3
|
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
4
4
|
dispatchEvent(event: Event): boolean;
|
|
5
5
|
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":";AA+BooB;;;;EAAQ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDS Enhancer Metadata (live mode only)
|
|
3
|
+
*
|
|
4
|
+
* This file contains description and demoHtml for runtime inspection tools.
|
|
5
|
+
* It is intentionally kept separate from pds-enhancers.js to keep the
|
|
6
|
+
* production pds.js bundle lean.
|
|
7
|
+
*/
|
|
8
|
+
export const defaultPDSEnhancerMetadata: {
|
|
9
|
+
selector: string;
|
|
10
|
+
description: string;
|
|
11
|
+
demoHtml: string;
|
|
12
|
+
}[];
|
|
13
|
+
//# sourceMappingURL=pds-enhancers-meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-enhancers-meta.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers-meta.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;IA+FE"}
|
|
@@ -7,21 +7,6 @@
|
|
|
7
7
|
export const defaultPDSEnhancers: {
|
|
8
8
|
run: typeof enhanceAccordion;
|
|
9
9
|
selector: string;
|
|
10
|
-
description: string;
|
|
11
|
-
demoHtml: string;
|
|
12
|
-
}[];
|
|
13
|
-
/**
|
|
14
|
-
* Metadata-only export for build tools and documentation.
|
|
15
|
-
* This is semantically identical to enhancerDefinitions but exported
|
|
16
|
-
* for tooling that wants to explicitly access metadata without run functions.
|
|
17
|
-
*
|
|
18
|
-
* Build tools can safely import defaultPDSEnhancers too - Node.js won't
|
|
19
|
-
* execute browser-only DOM code in the run functions.
|
|
20
|
-
*/
|
|
21
|
-
export const defaultPDSEnhancerMetadata: {
|
|
22
|
-
selector: string;
|
|
23
|
-
description: string;
|
|
24
|
-
demoHtml: string;
|
|
25
10
|
}[];
|
|
26
11
|
declare function enhanceAccordion(elem: any): void;
|
|
27
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers.js"],"names":[],"mappings":"AAyZA;;;;;GAKG;AACH;;;IAGI;AAvYJ,mDAeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"AAyMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6NC;0BAlayB,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -541,9 +541,21 @@ async function main(options = {}) {
|
|
|
541
541
|
|
|
542
542
|
// 10) Write runtime config helper for auto-discovery
|
|
543
543
|
try {
|
|
544
|
+
const runtimePresetLabel =
|
|
545
|
+
(generatorOptions && generatorOptions.preset) ||
|
|
546
|
+
(config && config.preset) ||
|
|
547
|
+
'default';
|
|
548
|
+
const runtimePresetId = slugify(runtimePresetLabel || 'default') || 'default';
|
|
549
|
+
const runtimeDesign = clone(stripFunctions(generatorOptions?.design || {}));
|
|
544
550
|
const runtimeConfig = {
|
|
545
551
|
exportedAt: new Date().toISOString(),
|
|
546
552
|
staticRoot: assetUrlRoot,
|
|
553
|
+
presetId: runtimePresetId,
|
|
554
|
+
preset: runtimePresetLabel,
|
|
555
|
+
config: {
|
|
556
|
+
preset: runtimePresetLabel,
|
|
557
|
+
design: runtimeDesign,
|
|
558
|
+
},
|
|
547
559
|
paths: {
|
|
548
560
|
tokens: `${assetUrlRoot}styles/pds-tokens.css.js`,
|
|
549
561
|
primitives: `${assetUrlRoot}styles/pds-primitives.css.js`,
|