@pure-ds/core 0.7.2 → 0.7.4
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 +1 -0
- package/dist/types/public/assets/js/pds-auto-definer.d.ts +9 -4
- package/dist/types/public/assets/js/pds-auto-definer.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-manager.d.ts +21 -21
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +3 -3
- package/dist/types/public/assets/js/pds.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-start-helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds-static.js +5 -1
- package/packages/pds-cli/bin/sync-assets.js +7 -1
- package/public/assets/js/app.js +4 -4
- package/public/assets/js/pds-auto-definer.js +306 -1
- package/public/assets/js/pds-manager.js +37 -37
- package/public/assets/js/pds.js +2 -2
- package/public/assets/pds/components/pds-scrollrow.js +2 -4
- package/public/assets/pds/core/pds-manager.js +37 -37
- package/public/assets/pds/core.js +2 -2
- package/readme.md +2 -0
- package/src/js/pds-core/pds-live.js +0 -3
- package/src/js/pds-core/pds-start-helpers.js +73 -27
- package/src/js/pds.d.ts +1 -0
- package/src/js/pds.js +0 -4
- package/public/assets/pds/core/pds-auto-definer.js +0 -1
package/dist/types/pds.d.ts
CHANGED
|
@@ -300,6 +300,7 @@ export class PDS extends EventTarget {
|
|
|
300
300
|
preset?: string;
|
|
301
301
|
design?: any;
|
|
302
302
|
autoDefine?: {
|
|
303
|
+
/** AutoDefiner is bundled with PDS core; external moduleURL overrides are not supported. */
|
|
303
304
|
baseURL?: string;
|
|
304
305
|
predefine?: string[];
|
|
305
306
|
mapper?: (tag: string) => string | undefined | null | false;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export var AutoDefiner: {
|
|
2
|
+
new (options?: {}): {
|
|
3
|
+
stop(): void;
|
|
4
|
+
flush: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Dynamically load and (idempotently) define a set of web components by tag name.
|
|
8
|
+
*/
|
|
9
|
+
define(...args: any[]): Promise<{
|
|
5
10
|
tag: any;
|
|
6
11
|
status: string;
|
|
7
12
|
}[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-auto-definer.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-auto-definer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-auto-definer.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-auto-definer.js"],"names":[],"mappings":"AA8CA;;;;;IA+ME;;OAEG;;;;;EA8CH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare function
|
|
2
|
-
declare function
|
|
1
|
+
declare function Ia(): Promise<void>;
|
|
2
|
+
declare function qt(r?: {}): {
|
|
3
3
|
source: string;
|
|
4
4
|
type: string;
|
|
5
5
|
confidence: number;
|
|
@@ -12,7 +12,7 @@ declare function Ut(r?: {}): {
|
|
|
12
12
|
template: any;
|
|
13
13
|
meta: any;
|
|
14
14
|
};
|
|
15
|
-
declare function
|
|
15
|
+
declare function ct(r?: {}): {
|
|
16
16
|
source: string;
|
|
17
17
|
type: string;
|
|
18
18
|
confidence: number;
|
|
@@ -25,7 +25,7 @@ declare function lt(r?: {}): {
|
|
|
25
25
|
template: any;
|
|
26
26
|
meta: any;
|
|
27
27
|
};
|
|
28
|
-
declare function
|
|
28
|
+
declare function O(r?: {}): {
|
|
29
29
|
source: string;
|
|
30
30
|
type: string;
|
|
31
31
|
confidence: number;
|
|
@@ -38,23 +38,23 @@ declare function B(r?: {}): {
|
|
|
38
38
|
template: any;
|
|
39
39
|
meta: any;
|
|
40
40
|
};
|
|
41
|
-
declare function
|
|
41
|
+
declare function na(): {
|
|
42
42
|
directMappings: any;
|
|
43
43
|
ignoredPatterns: any;
|
|
44
44
|
nonPdsClassPatterns: any;
|
|
45
45
|
rulesJsonPath: string;
|
|
46
46
|
};
|
|
47
|
-
declare function
|
|
48
|
-
declare function
|
|
47
|
+
declare function Pa(r: any): Promise<any>;
|
|
48
|
+
declare function za(): {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
51
|
}[];
|
|
52
|
-
declare function
|
|
53
|
-
declare function
|
|
54
|
-
declare function
|
|
55
|
-
declare function
|
|
52
|
+
declare function Jn(r: any): boolean;
|
|
53
|
+
declare function Fa(r?: {}): Promise<any>;
|
|
54
|
+
declare function $r(r?: {}): Promise<any>;
|
|
55
|
+
declare function fr(r: any, e?: {}): Promise<any>;
|
|
56
56
|
declare function et(r?: {}): Promise<any>;
|
|
57
|
-
declare function
|
|
57
|
+
declare function Ea(r?: {}): Promise<{
|
|
58
58
|
source: string;
|
|
59
59
|
type: string;
|
|
60
60
|
confidence: number;
|
|
@@ -67,7 +67,7 @@ declare function za(r?: {}): Promise<{
|
|
|
67
67
|
template: any;
|
|
68
68
|
meta: any;
|
|
69
69
|
}>;
|
|
70
|
-
declare function
|
|
70
|
+
declare function Ra(r?: {}): Promise<{
|
|
71
71
|
createdAt: number;
|
|
72
72
|
createdAtIso: string;
|
|
73
73
|
sourceType: string;
|
|
@@ -95,7 +95,7 @@ declare function Aa(r?: {}): Promise<{
|
|
|
95
95
|
resultSnapshot: any;
|
|
96
96
|
id: any;
|
|
97
97
|
}>;
|
|
98
|
-
declare function
|
|
98
|
+
declare function qn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyResolvedTheme: o, setupSystemListenerIfNeeded: a }: {
|
|
99
99
|
emitReady: any;
|
|
100
100
|
emitConfigChanged: any;
|
|
101
101
|
applyResolvedTheme: any;
|
|
@@ -541,7 +541,7 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
541
541
|
externalPath: any;
|
|
542
542
|
};
|
|
543
543
|
};
|
|
544
|
-
"__#private@#
|
|
544
|
+
"__#private@#z"(e?: {}): {
|
|
545
545
|
light: number;
|
|
546
546
|
dark: number;
|
|
547
547
|
};
|
|
@@ -823,7 +823,7 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
823
823
|
heroSpacing: string;
|
|
824
824
|
footerSpacing: string;
|
|
825
825
|
};
|
|
826
|
-
"__#private@#
|
|
826
|
+
"__#private@#M"(e?: {}, t?: {}): {
|
|
827
827
|
sm: any;
|
|
828
828
|
md: any;
|
|
829
829
|
lg: any;
|
|
@@ -837,7 +837,7 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
837
837
|
normal: string;
|
|
838
838
|
slow: string;
|
|
839
839
|
};
|
|
840
|
-
"__#private@#
|
|
840
|
+
"__#private@#U"(e: any): {
|
|
841
841
|
dropdown: any;
|
|
842
842
|
sticky: any;
|
|
843
843
|
fixed: any;
|
|
@@ -847,7 +847,7 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
847
847
|
tooltip: any;
|
|
848
848
|
notification: any;
|
|
849
849
|
};
|
|
850
|
-
"__#private@#
|
|
850
|
+
"__#private@#H"(e: any): {
|
|
851
851
|
set: any;
|
|
852
852
|
weight: any;
|
|
853
853
|
defaultSize: string;
|
|
@@ -1117,8 +1117,8 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
1117
1117
|
"__#private@#Se"(): void;
|
|
1118
1118
|
"__#private@#$e"(): string;
|
|
1119
1119
|
"__#private@#Ce"(): string;
|
|
1120
|
-
"__#private@#ze"(): string;
|
|
1121
1120
|
"__#private@#Me"(): string;
|
|
1121
|
+
"__#private@#ze"(): string;
|
|
1122
1122
|
"__#private@#Ee"(): void;
|
|
1123
1123
|
"__#private@#Te"(): void;
|
|
1124
1124
|
get tokensCSS(): any;
|
|
@@ -1479,7 +1479,7 @@ declare function Hn(r: any, e: any, { emitReady: t, emitConfigChanged: n, applyR
|
|
|
1479
1479
|
debug: boolean;
|
|
1480
1480
|
};
|
|
1481
1481
|
theme: string;
|
|
1482
|
-
autoDefiner:
|
|
1482
|
+
autoDefiner: {};
|
|
1483
1483
|
}>;
|
|
1484
|
-
export {
|
|
1484
|
+
export { Ia as clearLiveImportHistory, qt as convertBrandGuidelinesToPatch, ct as convertTailwindHtmlToPds, O as createImportResult, na as describeTailwindConversionRules, Pa as getLiveImportHistoryEntry, za as getLiveImportSources, Jn as isImportResult, Fa as listLiveImportHistory, $r as listLiveTemplates, fr as loadGoogleFont, et as loadLiveTemplateCatalog, Ea as runLiveImport, Ra as saveLiveImportHistory, qn as startLive };
|
|
1485
1485
|
//# sourceMappingURL=pds-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-manager.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-manager.js"],"names":[],"mappings":"AA6jHg2b,qCAAwH;AAAjsO;;;;;;;;;;;;EAAwsB;AAA9kC;;;;;;;;;;;;EAAsY;
|
|
1
|
+
{"version":3,"file":"pds-manager.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-manager.js"],"names":[],"mappings":"AA6jHg2b,qCAAwH;AAAjsO;;;;;;;;;;;;EAAwsB;AAA9kC;;;;;;;;;;;;EAAsY;AAfh8I;;;;;;;;;;;;EAAkW;AAc58D;;;;;EAAoO;AACmtZ,0CAA4L;AAAvtJ;;;IAAoS;AAfpvN,qCAA4H;AAe2lV,0CAAoR;AAfnwR,0CAAkK;AAtEjwH,kDAAq8B;AAsEkkF,0CAAwF;AAe4gJ;;;;;;;;;;;;GAAi5D;AAA07D;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwJ;AAnBjna;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI+xD"}
|
|
@@ -3,7 +3,7 @@ declare var o: {
|
|
|
3
3
|
dispatchEvent(event: Event): boolean;
|
|
4
4
|
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
5
5
|
};
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
export { o as PDS,
|
|
6
|
+
declare function at(e: any): void;
|
|
7
|
+
declare function it(e: any): void;
|
|
8
|
+
export { o as PDS, at as applyResolvedTheme, it as setupSystemListenerIfNeeded };
|
|
9
9
|
//# sourceMappingURL=pds.d.ts.map
|
|
@@ -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":"AACojD;;;;EAAQ;AAA2/G,kCAAiX;AAAA,kCAAupB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"AA43BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"AA43BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2QC;0BAnoCyB,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-start-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-start-helpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-start-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-start-helpers.js"],"names":[],"mappings":"AAqBA,sEAgCC;AAiBD,mDASC;AA6BD,8CAsBC;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkJC;AAGD;;;;;;;;EAmCC;AAED;;QASC;AAGD;;;;;GA+KC;AA1eM,qDAGI"}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* (or via npm script: npm run pds:static)
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { readFile, writeFile, mkdir, readdir, copyFile, stat } from 'fs/promises';
|
|
19
|
+
import { readFile, writeFile, mkdir, readdir, copyFile, stat, unlink } from 'fs/promises';
|
|
20
20
|
import { existsSync } from 'fs';
|
|
21
21
|
import path from 'path';
|
|
22
22
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
@@ -451,6 +451,10 @@ async function main(options = {}) {
|
|
|
451
451
|
const coreDir = path.join(targetDir, 'core');
|
|
452
452
|
log(`📁 Copying core runtime modules → ${path.relative(process.cwd(), coreDir)}`,'bold');
|
|
453
453
|
await copyDirectory(coreRuntimeSource, coreDir);
|
|
454
|
+
await Promise.all([
|
|
455
|
+
unlink(path.join(coreDir, 'pds-auto-definer.js')).catch(() => {}),
|
|
456
|
+
unlink(path.join(coreDir, 'pds-auto-definer.js.map')).catch(() => {}),
|
|
457
|
+
]);
|
|
454
458
|
}
|
|
455
459
|
|
|
456
460
|
const managerSource = path.join(repoRoot, 'public/assets/js/pds-manager.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { readFile, writeFile, mkdir, copyFile, readdir, stat } from 'fs/promises';
|
|
3
|
+
import { readFile, writeFile, mkdir, copyFile, readdir, stat, unlink } from 'fs/promises';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
@@ -226,6 +226,12 @@ async function syncAssets(options = {}) {
|
|
|
226
226
|
console.log('📁 Syncing core runtime modules...');
|
|
227
227
|
}
|
|
228
228
|
await syncDirectory(coreSource, coreTargetDir, 'core/');
|
|
229
|
+
|
|
230
|
+
const staleCoreFiles = [
|
|
231
|
+
path.join(coreTargetDir, 'pds-auto-definer.js'),
|
|
232
|
+
path.join(coreTargetDir, 'pds-auto-definer.js.map'),
|
|
233
|
+
];
|
|
234
|
+
await Promise.all(staleCoreFiles.map((file) => unlink(file).catch(() => {})));
|
|
229
235
|
}
|
|
230
236
|
} catch {
|
|
231
237
|
if (verbose) {
|
package/public/assets/js/app.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var ge=Object.defineProperty;var be=(e,t)=>{for(var s in t)ge(e,s,{get:t[s],enumerable:!0})};var F=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(s){console.error(`[PDS Registry] Failed to load static ${t}:`,s),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let n=new CSSStyleSheet;return n.replaceSync("/* Failed to load "+t+" */"),n}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},_=new F;async function Y(e,t=[],s=null){try{let n=s?.primitivesStylesheet?s.primitivesStylesheet:await _.getStylesheet("primitives");e.adoptedStyleSheets=[n,...t]}catch(n){let a=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,n),e.adoptedStyleSheets=t}}async function Z(e,t=["primitives"],s=[],n=null){try{let o=(await Promise.all(t.map(async c=>{if(n)switch(c){case"tokens":return n.tokensStylesheet;case"primitives":return n.primitivesStylesheet;case"components":return n.componentsStylesheet;case"utilities":return n.utilitiesStylesheet;default:break}return _.getStylesheet(c)}))).filter(c=>c!==null);e.adoptedStyleSheets=[...o,...s]}catch(a){let o=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,a),e.adoptedStyleSheets=s}}function ee(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var te={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var B={};be(B,{deepMerge:()=>se,fragmentFromTemplateLike:()=>we,isObject:()=>P,parseHTML:()=>W});function P(e){return e&&typeof e=="object"&&!Array.isArray(e)}function se(e,t){let s={...e};return P(e)&&P(t)&&Object.keys(t).forEach(n=>{P(t[n])?n in e?s[n]=se(e[n],t[n]):Object.assign(s,{[n]:t[n]}):Object.assign(s,{[n]:t[n]})}),s}function we(e){let t=Array.isArray(e?.strings)?e.strings:[],s=Array.isArray(e?.values)?e.values:[],n=new Set,a=[],o=/(\s)(\.[\w-]+)=\s*$/;for(let i=0;i<t.length;i+=1){let l=t[i]??"",p=l.match(o);if(p&&i<s.length){let u=p[2].slice(1),f=`pds-val-${i}`;l=l.replace(o,`$1data-pds-prop="${u}:${f}"`),n.add(i)}a.push(l),i<s.length&&!n.has(i)&&a.push(`<!--pds-val-${i}-->`)}let c=document.createElement("template");c.innerHTML=a.join("");let m=(i,l)=>{let p=i.parentNode;if(!p)return;if(l==null){p.removeChild(i);return}let b=u=>{if(u!=null){if(u instanceof Node){p.insertBefore(u,i);return}if(Array.isArray(u)){u.forEach(f=>b(f));return}p.insertBefore(document.createTextNode(String(u)),i)}};b(l),p.removeChild(i)},v=document.createTreeWalker(c.content,NodeFilter.SHOW_COMMENT),S=[];for(;v.nextNode();){let i=v.currentNode;i?.nodeValue?.startsWith("pds-val-")&&S.push(i)}return S.forEach(i=>{let l=Number(i.nodeValue.replace("pds-val-",""));m(i,s[l])}),c.content.querySelectorAll("*").forEach(i=>{let l=i.getAttribute("data-pds-prop");if(!l)return;let[p,b]=l.split(":"),u=Number(String(b).replace("pds-val-",""));p&&Number.isInteger(u)&&(i[p]=s[u]),i.removeAttribute("data-pds-prop")}),c.content}function W(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}var re="pds",Se=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ne=/^[a-z]:/i;function A(e=""){return e.endsWith("/")?e:`${e}/`}function Ee(e="",t=re){let s=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(s)?s:`${s}/${t}`}function ve(e){return e.replace(/^\.\/+/,"")}function Le(e){return ne.test(e)?e.replace(ne,"").replace(/^\/+/,""):e}function _e(e){return e.startsWith("public/")?e.substring(7):e}function M(e,t={}){let s=t.segment||re,n=t.defaultRoot||`/assets/${s}/`,a=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!a||typeof a!="string")return A(n);let o=a.trim();return o?(o=o.replace(/\\/g,"/"),o=Ee(o,s),o=A(o),Se.test(o)?o:(o=ve(o),o=Le(o),o.startsWith("/")||(o=_e(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(c,m)=>m===0?c:"/")),A(o))):A(n)}var ke=/^[a-z][a-z0-9+\-.]*:\/\//i,x=(()=>{try{return import.meta.url}catch{return}})(),T=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function U(e,t={}){if(!e||ke.test(e))return e;let{preferModule:s=!0}=t,n=()=>{if(!x)return null;try{return new URL(e,x).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(s?n()||a():a()||n())||e}var oe=(()=>{if(x)try{let e=new URL(x);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",x).href}catch{return}})(),ie=!1;function ae(e){ie||typeof document>"u"||(ie=!0,e.addEventListener("pds:ready",t=>{let s=t.detail?.mode;s&&document.documentElement.classList.add(`pds-${s}`,"pds-ready")}))}function ce({manageTheme:e,themeStorageKey:t,applyResolvedTheme:s,setupSystemListenerIfNeeded:n}){let a="light",o=null;if(e&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{s?.(o),n?.(o)}catch{}o?o==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=o:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:o}}function C(e,{resolvePublicAssetURL:t}){let s=!!(e?.public?.root||e?.static?.root),n=t(e);return!s&&oe&&(n=oe),T(U(n))}async function de(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:s="/auto-define/",autoDefinePreload:n=[],autoDefineMapper:a=null,autoDefinerModuleURL:o=null,enhancers:c=[],autoDefineOverrides:m=null,autoDefinePreferModule:v=!0}=e,S=(()=>{let i=new Map;return(t||[]).forEach(l=>i.set(l.selector,l)),(c||[]).forEach(l=>i.set(l.selector,l)),Array.from(i.values())})(),y=null;if(typeof window<"u"&&typeof document<"u"){let i=null;try{if(!o||typeof o!="string")throw new Error("AutoDefiner module URL is not configured");let d=await import(o);i=d?.AutoDefiner||d?.default?.AutoDefiner||d?.default||null}catch(d){console.warn("AutoDefiner not available:",d?.message||d)}let l=d=>{switch(d){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${d}.js`}},{mapper:p,...b}=m&&typeof m=="object"?m:{},f={baseURL:s&&T(U(s,{preferModule:v})),predefine:n,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:S,onError:(d,h)=>{if(typeof d=="string"&&d.startsWith("pds-")){let L=["pds-form","pds-drawer"].includes(d),z=h?.message?.includes("#pds/lit")||h?.message?.includes("Failed to resolve module specifier");L&&z?console.error(`\u274C PDS component <${d}> requires Lit but #pds/lit is not in import map.
|
|
2
|
-
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${d}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${d}>:`,h)},...b,mapper:d=>{if(customElements.get(d))return null;if(typeof a=="function")try{let h=a(d);return h===void 0?l(d):h}catch(h){return console.warn("Custom autoDefine.mapper error; falling back to default:",h?.message||h),l(d)}return l(d)}};i&&(y=new i(f),n.length>0&&typeof i.define=="function"&&await i.define(...n,{baseURL:s,mapper:f.mapper,onError:f.onError}))}return{autoDefiner:y,mergedEnhancers:S}}var H=["light","dark"],V=new Set(H);function Ae(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):H).filter(n=>V.has(n));return s.length?s:H}function K(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(V.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(V.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function le(e,t){let s=K(t);return Ae(e).includes(s)}var G=class extends EventTarget{},r=new G;r.initializing=!1;r.currentPreset=null;r.debug=!1;var I=null,$=null,N=null,O=null;function j(e,t){return t&&typeof t=="string"?t:`${C(r.currentConfig||{},{resolvePublicAssetURL:M})}core/${e}`}async function xe(){return Array.isArray(r.defaultEnhancers)&&r.defaultEnhancers.length>0?r.defaultEnhancers:(O||(O=import(j("pds-enhancers.js",r.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return r.defaultEnhancers=s,s}).catch(t=>{throw O=null,t})),O)}async function De(){return typeof r.ask=="function"&&r.ask!==ue?r.ask:($||($=import(j("pds-ask.js",r.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return r.ask=s,s}).catch(t=>{throw $=null,t})),$)}async function R(){return typeof r.toast=="function"&&r.toast!==k?r.toast:(N||(N=import(j("pds-toast.js",r.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return r.toast=s,s}).catch(t=>{throw N=null,t})),N)}async function ue(...e){return(await De())(...e)}async function k(...e){return(await R())(...e)}k.success=async(...e)=>(await R()).success(...e);k.error=async(...e)=>(await R()).error(...e);k.warning=async(...e)=>(await R()).warning(...e);k.info=async(...e)=>(await R()).info(...e);var pe=function(e="log",t,...s){let n=!!(r.registry&&!r.registry.isLive),a=(this?.debug||this?.design?.debug||r.debug||!1)===!0;if(n){if(!r.debug)return}else if(!a&&e!=="error"&&e!=="warn")return;let o=console[e]||console.log;s.length>0?o(t,...s):o(t)};function Q(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>Q(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let a=Q(n);a!==void 0&&(t[s]=a)}return t}async function je(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}r.registry=_;r.enums=te;r.adoptLayers=Z;r.adoptPrimitives=Y;r.parse=W;r.createStylesheet=ee;r.isLiveMode=()=>_.isLive;r.ask=ue;r.toast=k;r.common=B;r.AutoComplete=null;r.loadAutoComplete=async()=>{if(r.AutoComplete&&typeof r.AutoComplete.connect=="function")return r.AutoComplete;let e=j("pds-autocomplete.js",r.currentConfig?.autoCompleteURL);return I||(I=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return r.AutoComplete=s,s}).catch(t=>{throw I=null,t})),I};function me(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");r.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function fe(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");r.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var q="pure-ds-theme",E=null,D=null;function J(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function X(e){try{if(E&&D){try{typeof E.removeEventListener=="function"?E.removeEventListener("change",D):typeof E.removeListener=="function"&&E.removeListener(D)}catch{}E=null,D=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let a=n?.matches===void 0?t.matches:n.matches;try{let o=a?"dark":"light";document.documentElement.setAttribute("data-theme",o),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:o,source:"system"}}))}catch{}};E=t,D=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}Object.defineProperty(r,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(q)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=r.currentConfig?.design||null,s=K(e);if(t&&!le(t,s)){let n=t?.name||r.currentPreset?.name||r.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),r.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(q):localStorage.setItem(q,e),J(e),X(e),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});r.defaultEnhancers=[];async function Re(e){let t=e&&e.mode||"live",{mode:s,...n}=e||{};if(t==="static")return Pe(n);let a=C(n,{resolvePublicAssetURL:M}),o=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",a).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:c}=await import(o);return c(r,n,{emitReady:me,emitConfigChanged:fe,applyResolvedTheme:J,setupSystemListenerIfNeeded:X})}r.start=Re;async function Pe(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",a=e.staticPaths??{},o=C(e,{resolvePublicAssetURL:M}),c=e&&e.autoDefine||null,m;c&&c.baseURL?m=T(U(c.baseURL,{preferModule:!1})):m=`${o}components/`;let v=c&&Array.isArray(c.predefine)&&c.predefine||[],S=c&&typeof c.mapper=="function"&&c.mapper||null;try{ae(r);let{resolvedTheme:y}=ce({manageTheme:s,themeStorageKey:n,applyResolvedTheme:J,setupSystemListenerIfNeeded:X}),i=await je(o,e),l=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],p=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},b={tokens:`${o}styles/pds-tokens.css.js`,primitives:`${o}styles/pds-primitives.css.js`,components:`${o}styles/pds-components.css.js`,utilities:`${o}styles/pds-utilities.css.js`,styles:`${o}styles/pds-styles.css.js`},u=i?.paths||{};if(a={...b,...u,...a},r.registry.setStaticMode(a),t&&typeof document<"u")try{let g=await r.registry.getStylesheet("styles");if(g){g._pds=!0;let L=(document.adoptedStyleSheets||[]).filter(z=>z._pds!==!0);document.adoptedStyleSheets=[...L,g],fe({mode:"static",source:"static:styles-applied"})}}catch(g){pe.call(r,"warn","Failed to apply static styles:",g)}let f=null,d=[];try{let g=await xe(),L=await de({autoDefineBaseURL:m,autoDefinePreload:v,autoDefineMapper:S,autoDefinerModuleURL:j("pds-auto-definer.js",c?.moduleURL||r.currentConfig?.autoDefinerURL),enhancers:l,autoDefineOverrides:c||null,autoDefinePreferModule:!(c&&c.baseURL)},{baseEnhancers:g});f=L.autoDefiner,d=L.mergedEnhancers||[]}catch(g){pe.call(r,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",g)}let h=Q(e);return r.currentConfig=Object.freeze({mode:"static",...structuredClone(h),design:structuredClone(p.design||{}),preset:p.preset,theme:y,enhancers:d}),me({mode:"static",config:p,theme:y,autoDefiner:f}),{config:p,theme:y,autoDefiner:f}}catch(y){throw r.dispatchEvent(new CustomEvent("pds:error",{detail:{error:y}})),y}}var he={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster","pds-form"]},log(e,t,...s){console[e](t,...s)}};var w={name:"@pure-ds/core",shortname:"pds",version:"0.7.2",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.32"},customElements:"custom-elements.json"};await r.start(he);var ye=typeof w.repository=="string"?w.repository:w.repository?.url,Te=ye?ye.replace(/^git\+/,"").replace(/\.git$/,""):"",et=w.homepage||Te,tt=w.bugs?.url||"";document.body.innerHTML=`
|
|
1
|
+
var Pe=Object.defineProperty;var Me=(e,t)=>{for(var s in t)Pe(e,s,{get:t[s],enumerable:!0})};var Y=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(s){console.error(`[PDS Registry] Failed to load static ${t}:`,s),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let n=new CSSStyleSheet;return n.replaceSync("/* Failed to load "+t+" */"),n}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},M=new Y;async function pe(e,t=[],s=null){try{let n=s?.primitivesStylesheet?s.primitivesStylesheet:await M.getStylesheet("primitives");e.adoptedStyleSheets=[n,...t]}catch(n){let d=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${d}> failed to adopt primitives:`,n),e.adoptedStyleSheets=t}}async function me(e,t=["primitives"],s=[],n=null){try{let r=(await Promise.all(t.map(async c=>{if(n)switch(c){case"tokens":return n.tokensStylesheet;case"primitives":return n.primitivesStylesheet;case"components":return n.componentsStylesheet;case"utilities":return n.utilitiesStylesheet;default:break}return M.getStylesheet(c)}))).filter(c=>c!==null);e.adoptedStyleSheets=[...r,...s]}catch(d){let r=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,d),e.adoptedStyleSheets=s}}function fe(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var he={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var ee={};Me(ee,{deepMerge:()=>ye,fragmentFromTemplateLike:()=>Te,isObject:()=>O,parseHTML:()=>Z});function O(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ye(e,t){let s={...e};return O(e)&&O(t)&&Object.keys(t).forEach(n=>{O(t[n])?n in e?s[n]=ye(e[n],t[n]):Object.assign(s,{[n]:t[n]}):Object.assign(s,{[n]:t[n]})}),s}function Te(e){let t=Array.isArray(e?.strings)?e.strings:[],s=Array.isArray(e?.values)?e.values:[],n=new Set,d=[],r=/(\s)(\.[\w-]+)=\s*$/;for(let i=0;i<t.length;i+=1){let b=t[i]??"",m=b.match(r);if(m&&i<s.length){let g=m[2].slice(1),v=`pds-val-${i}`;b=b.replace(r,`$1data-pds-prop="${g}:${v}"`),n.add(i)}d.push(b),i<s.length&&!n.has(i)&&d.push(`<!--pds-val-${i}-->`)}let c=document.createElement("template");c.innerHTML=d.join("");let E=(i,b)=>{let m=i.parentNode;if(!m)return;if(b==null){m.removeChild(i);return}let S=g=>{if(g!=null){if(g instanceof Node){m.insertBefore(g,i);return}if(Array.isArray(g)){g.forEach(v=>S(v));return}m.insertBefore(document.createTextNode(String(g)),i)}};S(b),m.removeChild(i)},L=document.createTreeWalker(c.content,NodeFilter.SHOW_COMMENT),f=[];for(;L.nextNode();){let i=L.currentNode;i?.nodeValue?.startsWith("pds-val-")&&f.push(i)}return f.forEach(i=>{let b=Number(i.nodeValue.replace("pds-val-",""));E(i,s[b])}),c.content.querySelectorAll("*").forEach(i=>{let b=i.getAttribute("data-pds-prop");if(!b)return;let[m,S]=b.split(":"),g=Number(String(S).replace("pds-val-",""));m&&Number.isInteger(g)&&(i[m]=s[g]),i.removeAttribute("data-pds-prop")}),c.content}function Z(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}var ge="pds",Ue=/^([a-z][a-z0-9+\-.]*:)?\/\//i,be=/^[a-z]:/i;function C(e=""){return e.endsWith("/")?e:`${e}/`}function Ce(e="",t=ge){let s=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(s)?s:`${s}/${t}`}function $e(e){return e.replace(/^\.\/+/,"")}function Ie(e){return be.test(e)?e.replace(be,"").replace(/^\/+/,""):e}function Ne(e){return e.startsWith("public/")?e.substring(7):e}function z(e,t={}){let s=t.segment||ge,n=t.defaultRoot||`/assets/${s}/`,d=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!d||typeof d!="string")return C(n);let r=d.trim();return r?(r=r.replace(/\\/g,"/"),r=Ce(r,s),r=C(r),Ue.test(r)?r:(r=$e(r),r=Ie(r),r.startsWith("/")||(r=Ne(r),r.startsWith("/")||(r=`/${r}`),r=r.replace(/\/+/g,(c,E)=>E===0?c:"/")),C(r))):C(n)}async function Oe(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let s=e,{baseURL:n,mapper:d=f=>`${f}.js`,onError:r=(f,a)=>console.error(`[defineWebComponents] ${f}:`,a)}=t,c=n?new URL(n,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),E=f=>f.toLowerCase().replace(/(^|-)([a-z])/g,(a,i,b)=>b.toUpperCase()),L=async f=>{try{if(customElements.get(f))return{tag:f,status:"already-defined"};let a=d(f),b=await import(a instanceof URL?a.href:new URL(a,c).href),m=b?.default??b?.[E(f)];if(!m){if(customElements.get(f))return{tag:f,status:"self-defined"};throw new Error(`No export found for ${f}. Expected default export or named export "${E(f)}".`)}return customElements.get(f)?{tag:f,status:"race-already-defined"}:(customElements.define(f,m),{tag:f,status:"defined"})}catch(a){throw r(f,a),a}};return Promise.all(s.map(L))}var F=class{constructor(t={}){let{baseURL:s,mapper:n,onError:d,predicate:r=()=>!0,attributeModule:c="data-module",root:E=document,scanExisting:L=!0,debounceMs:f=16,observeShadows:a=!0,enhancers:i=[],patchAttachShadow:b=!0}=t,m=new Set,S=new Set,g=new Set,v=new Map,k=new WeakMap,x=new WeakMap,w=0,h=!1,y=null,j=l=>{if(!l||!i.length)return;let p=x.get(l);p||(p=new Set,x.set(l,p));for(let u of i)if(!(!u.selector||!u.run)&&!p.has(u.selector))try{l.matches&&l.matches(u.selector)&&(u.run(l),p.add(u.selector))}catch(_){console.warn(`[AutoDefiner] Error applying enhancer for selector "${u.selector}":`,_)}},U=(l,p)=>{if(!h&&!(!l||!l.includes("-"))&&!customElements.get(l)&&!S.has(l)&&!g.has(l)){if(p&&p.getAttribute){let u=p.getAttribute(c);u&&!v.has(l)&&v.set(l,u)}m.add(l),J()}},J=()=>{w||(w=setTimeout(de,f))},D=l=>{if(l){if(l.nodeType===1){let p=l,u=p.tagName?.toLowerCase();u&&u.includes("-")&&!customElements.get(u)&&r(u,p)&&U(u,p),j(p),a&&p.shadowRoot&&X(p.shadowRoot)}l.querySelectorAll&&l.querySelectorAll("*").forEach(p=>{let u=p.tagName?.toLowerCase();u&&u.includes("-")&&!customElements.get(u)&&r(u,p)&&U(u,p),j(p),a&&p.shadowRoot&&X(p.shadowRoot)})}},X=l=>{if(!l||k.has(l))return;D(l);let p=new MutationObserver(u=>{for(let _ of u)_.addedNodes?.forEach(P=>{D(P)}),_.type==="attributes"&&_.target&&D(_.target)});p.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[c,...i.map(u=>u.selector).filter(u=>u.startsWith("data-"))]}),k.set(l,p)};async function de(){if(clearTimeout(w),w=0,!m.size)return;let l=Array.from(m);m.clear(),l.forEach(p=>S.add(p));try{let p=u=>v.get(u)??(n?n(u):`${u}.js`);await Oe(...l,{baseURL:s,mapper:p,onError:(u,_)=>{g.add(u),d?.(u,_)}})}catch{}finally{l.forEach(p=>S.delete(p))}}let le=E===document?document.documentElement:E,ue=new MutationObserver(l=>{for(let p of l)p.addedNodes?.forEach(u=>{D(u)}),p.type==="attributes"&&p.target&&D(p.target)});if(ue.observe(le,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[c,...i.map(l=>l.selector).filter(l=>l.startsWith("data-"))]}),a&&b&&Element.prototype.attachShadow){let l=Element.prototype.attachShadow;Element.prototype.attachShadow=function(u){let _=l.call(this,u);if(u&&u.mode==="open"){X(_);let P=this.tagName?.toLowerCase();P&&P.includes("-")&&!customElements.get(P)&&U(P,this)}return _},y=()=>Element.prototype.attachShadow=l}return L&&D(le),{stop(){h=!0,ue.disconnect(),y&&y(),w&&(clearTimeout(w),w=0),k.forEach(l=>l.disconnect())},flush:de}}static async define(...t){let s={};t.length&&typeof t[t.length-1]=="object"&&(s=t.pop()||{});let n=t,{baseURL:d,mapper:r=a=>`${a}.js`,onError:c=(a,i)=>console.error(`[defineWebComponents] ${a}:`,i)}=s,E=d?new URL(d,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),L=a=>a.toLowerCase().replace(/(^|-)([a-z])/g,(i,b,m)=>m.toUpperCase()),f=async a=>{try{if(customElements.get(a))return{tag:a,status:"already-defined"};let i=r(a),m=await import(i instanceof URL?i.href:new URL(i,E).href),S=m?.default??m?.[L(a)];if(!S){if(customElements.get(a))return{tag:a,status:"self-defined"};throw new Error(`No export found for ${a}. Expected default export or named export "${L(a)}".`)}return customElements.get(a)?{tag:a,status:"race-already-defined"}:(customElements.define(a,S),{tag:a,status:"defined"})}catch(i){throw c(a,i),i}};return Promise.all(n.map(f))}};var ze=/^[a-z][a-z0-9+\-.]*:\/\//i,$=(()=>{try{return import.meta.url}catch{return}})(),W=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function B(e,t={}){if(!e||ze.test(e))return e;let{preferModule:s=!0}=t,n=()=>{if(!$)return null;try{return new URL(e,$).href}catch{return null}},d=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(s?n()||d():d()||n())||e}var we=(()=>{if($)try{let e=new URL($);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",$).href}catch{return}})(),Ee=!1;function Se(e){Ee||typeof document>"u"||(Ee=!0,e.addEventListener("pds:ready",t=>{let s=t.detail?.mode;s&&document.documentElement.classList.add(`pds-${s}`,"pds-ready")}))}function ve({manageTheme:e,themeStorageKey:t,applyResolvedTheme:s,setupSystemListenerIfNeeded:n}){let d="light",r=null;if(e&&typeof window<"u"){try{r=localStorage.getItem(t)||null}catch{r=null}try{s?.(r),n?.(r)}catch{}r?r==="system"?d=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":d=r:d=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:d,storedTheme:r}}function q(e,{resolvePublicAssetURL:t}){let s=!!(e?.public?.root||e?.static?.root),n=t(e);return!s&&we&&(n=we),W(B(n))}async function Le(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:s="/auto-define/",autoDefinePreload:n=[],autoDefineMapper:d=null,enhancers:r=[],autoDefineOverrides:c=null,autoDefinePreferModule:E=!0}=e,L=(()=>{let a=new Map;return(t||[]).forEach(i=>a.set(i.selector,i)),(r||[]).forEach(i=>a.set(i.selector,i)),Array.from(a.values())})(),f=null;if(typeof window<"u"&&typeof document<"u"){let a=F,i=h=>{switch(h){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${h}.js`}},{mapper:b,enhancers:m,...S}=c&&typeof c=="object"?c:{},g=m?Array.isArray(m)?m:typeof m=="object"?Object.values(m):[]:[],v=(()=>{let h=new Map;return(L||[]).forEach(y=>{y?.selector&&h.set(y.selector,y)}),(g||[]).forEach(y=>{if(!y?.selector)return;let j=h.get(y.selector)||null;h.set(y.selector,{...j||{},...y,run:typeof y?.run=="function"?y.run:j?.run})}),Array.from(h.values())})(),x={baseURL:s&&W(B(s,{preferModule:E})),predefine:n,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:v,onError:(h,y)=>{if(typeof h=="string"&&h.startsWith("pds-")){let U=["pds-form","pds-drawer"].includes(h),J=y?.message?.includes("#pds/lit")||y?.message?.includes("Failed to resolve module specifier");U&&J?console.error(`\u274C PDS component <${h}> requires Lit but #pds/lit is not in import map.
|
|
2
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${h}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${h}>:`,y)},...S,mapper:h=>{if(customElements.get(h))return null;if(typeof d=="function")try{let y=d(h);return y===void 0?i(h):y}catch(y){return console.warn("Custom autoDefine.mapper error; falling back to default:",y?.message||y),i(h)}return i(h)}};if(!!(typeof window<"u"&&window.__PDS_DEBUG_AUTODEFINE__||c?.debugAutoDefine)){let h=v.filter(y=>typeof y?.run!="function").map(y=>y?.selector).filter(Boolean);console.info("[PDS][AutoDefiner] enhancer summary",{baseEnhancers:(t||[]).length,userEnhancers:(r||[]).length,overrideEnhancers:g.length,resolvedEnhancers:v.length,missingRun:h})}f=new a(x),n.length>0&&typeof a.define=="function"&&await a.define(...n,{baseURL:s,mapper:x.mapper,onError:x.onError})}return{autoDefiner:f,mergedEnhancers:L}}var te=["light","dark"],se=new Set(te);function Fe(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):te).filter(n=>se.has(n));return s.length?s:te}function ne(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(se.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(se.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function _e(e,t){let s=ne(t);return Fe(e).includes(s)}var oe=class extends EventTarget{},o=new oe;o.initializing=!1;o.currentPreset=null;o.debug=!1;var H=null,V=null,K=null,G=null;function Q(e,t){return t&&typeof t=="string"?t:`${q(o.currentConfig||{},{resolvePublicAssetURL:z})}core/${e}`}async function We(){return Array.isArray(o.defaultEnhancers)&&o.defaultEnhancers.length>0?o.defaultEnhancers:(G||(G=import(Q("pds-enhancers.js",o.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return o.defaultEnhancers=s,s}).catch(t=>{throw G=null,t})),G)}async function Be(){return typeof o.ask=="function"&&o.ask!==xe?o.ask:(V||(V=import(Q("pds-ask.js",o.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return o.ask=s,s}).catch(t=>{throw V=null,t})),V)}async function N(){return typeof o.toast=="function"&&o.toast!==T?o.toast:(K||(K=import(Q("pds-toast.js",o.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return o.toast=s,s}).catch(t=>{throw K=null,t})),K)}async function xe(...e){return(await Be())(...e)}async function T(...e){return(await N())(...e)}T.success=async(...e)=>(await N()).success(...e);T.error=async(...e)=>(await N()).error(...e);T.warning=async(...e)=>(await N()).warning(...e);T.info=async(...e)=>(await N()).info(...e);var Ae=function(e="log",t,...s){let n=!!(o.registry&&!o.registry.isLive),d=(this?.debug||this?.design?.debug||o.debug||!1)===!0;if(n){if(!o.debug)return}else if(!d&&e!=="error"&&e!=="warn")return;let r=console[e]||console.log;s.length>0?r(t,...s):r(t)};function ie(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>ie(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let d=ie(n);d!==void 0&&(t[s]=d)}return t}async function qe(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}o.registry=M;o.enums=he;o.adoptLayers=me;o.adoptPrimitives=pe;o.parse=Z;o.createStylesheet=fe;o.isLiveMode=()=>M.isLive;o.ask=xe;o.toast=T;o.common=ee;o.AutoComplete=null;o.loadAutoComplete=async()=>{if(o.AutoComplete&&typeof o.AutoComplete.connect=="function")return o.AutoComplete;let e=Q("pds-autocomplete.js",o.currentConfig?.autoCompleteURL);return H||(H=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return o.AutoComplete=s,s}).catch(t=>{throw H=null,t})),H};function ke(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");o.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function Re(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");o.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var re="pure-ds-theme",R=null,I=null;function ae(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function ce(e){try{if(R&&I){try{typeof R.removeEventListener=="function"?R.removeEventListener("change",I):typeof R.removeListener=="function"&&R.removeListener(I)}catch{}R=null,I=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let d=n?.matches===void 0?t.matches:n.matches;try{let r=d?"dark":"light";document.documentElement.setAttribute("data-theme",r),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"system"}}))}catch{}};R=t,I=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}Object.defineProperty(o,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(re)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=o.currentConfig?.design||null,s=ne(e);if(t&&!_e(t,s)){let n=t?.name||o.currentPreset?.name||o.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),o.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(re):localStorage.setItem(re,e),ae(e),ce(e),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});o.defaultEnhancers=[];async function He(e){let t=e&&e.mode||"live",{mode:s,...n}=e||{};if(t==="static")return Ve(n);let d=q(n,{resolvePublicAssetURL:z}),r=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",d).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:c}=await import(r);return c(o,n,{emitReady:ke,emitConfigChanged:Re,applyResolvedTheme:ae,setupSystemListenerIfNeeded:ce})}o.start=He;async function Ve(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",d=e.staticPaths??{},r=q(e,{resolvePublicAssetURL:z}),c=e&&e.autoDefine||null,E;c&&c.baseURL?E=W(B(c.baseURL,{preferModule:!1})):E=`${r}components/`;let L=c&&Array.isArray(c.predefine)&&c.predefine||[],f=c&&typeof c.mapper=="function"&&c.mapper||null;try{Se(o);let{resolvedTheme:a}=ve({manageTheme:s,themeStorageKey:n,applyResolvedTheme:ae,setupSystemListenerIfNeeded:ce}),i=await qe(r,e),b=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],m=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},S={tokens:`${r}styles/pds-tokens.css.js`,primitives:`${r}styles/pds-primitives.css.js`,components:`${r}styles/pds-components.css.js`,utilities:`${r}styles/pds-utilities.css.js`,styles:`${r}styles/pds-styles.css.js`},g=i?.paths||{};if(d={...S,...g,...d},o.registry.setStaticMode(d),t&&typeof document<"u")try{let w=await o.registry.getStylesheet("styles");if(w){w._pds=!0;let h=(document.adoptedStyleSheets||[]).filter(y=>y._pds!==!0);document.adoptedStyleSheets=[...h,w],Re({mode:"static",source:"static:styles-applied"})}}catch(w){Ae.call(o,"warn","Failed to apply static styles:",w)}let v=null,k=[];try{let w=await We(),h=await Le({autoDefineBaseURL:E,autoDefinePreload:L,autoDefineMapper:f,enhancers:b,autoDefineOverrides:c||null,autoDefinePreferModule:!(c&&c.baseURL)},{baseEnhancers:w});v=h.autoDefiner,k=h.mergedEnhancers||[]}catch(w){Ae.call(o,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",w)}let x=ie(e);return o.currentConfig=Object.freeze({mode:"static",...structuredClone(x),design:structuredClone(m.design||{}),preset:m.preset,theme:a,enhancers:k}),ke({mode:"static",config:m,theme:a,autoDefiner:v}),{config:m,theme:a,autoDefiner:v}}catch(a){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:a}})),a}}var je={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster","pds-form"]},log(e,t,...s){console[e](t,...s)}};var A={name:"@pure-ds/core",shortname:"pds",version:"0.7.4",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.32"},customElements:"custom-elements.json"};await o.start(je);var De=typeof A.repository=="string"?A.repository:A.repository?.url,Ge=De?De.replace(/^git\+/,"").replace(/\.git$/,""):"",bt=A.homepage||Ge,gt=A.bugs?.url||"";document.body.innerHTML=`
|
|
3
3
|
<pds-toaster id="global-toaster"></pds-toaster>
|
|
4
4
|
|
|
5
5
|
<div class="container text-center">
|
|
6
6
|
<img src="/assets/img/pds-logo.svg" alt="PDS Logo" width="64" height="64" />
|
|
7
7
|
<header class="container section">
|
|
8
|
-
<h1>${
|
|
9
|
-
<small class="text-muted">${
|
|
8
|
+
<h1>${A.name} ${A.version}</h1>
|
|
9
|
+
<small class="text-muted">${A.description}</small>
|
|
10
10
|
</header>
|
|
11
11
|
</div>
|
|
12
12
|
`;
|