@pure-ds/core 0.6.9 → 0.6.11
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/custom-elements.json +865 -35
- package/dist/types/pds.d.ts +31 -0
- package/dist/types/public/assets/js/pds-manager.d.ts +100 -2
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-form.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-live-converter.d.ts +8 -0
- package/dist/types/public/assets/pds/components/pds-live-converter.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts +1 -195
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-live-importer.d.ts +2 -0
- package/dist/types/public/assets/pds/components/pds-live-importer.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-live-template-canvas.d.ts +2 -0
- package/dist/types/public/assets/pds/components/pds-live-template-canvas.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts +0 -2
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts +20 -0
- package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts +1 -1
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-treeview.d.ts +37 -0
- package/dist/types/public/assets/pds/components/pds-treeview.d.ts.map +1 -0
- package/dist/types/src/js/common/toast.d.ts +8 -0
- package/dist/types/src/js/common/toast.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-config.d.ts +1306 -13
- 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-generator.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts +2 -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.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +1 -4
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds-live-manager/conversion-service.d.ts +66 -0
- package/dist/types/src/js/pds-live-manager/conversion-service.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-manager/import-contract.d.ts +15 -0
- package/dist/types/src/js/pds-live-manager/import-contract.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-manager/import-history-service.d.ts +32 -0
- package/dist/types/src/js/pds-live-manager/import-history-service.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-manager/import-service.d.ts +21 -0
- package/dist/types/src/js/pds-live-manager/import-service.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-manager/template-service.d.ts +17 -0
- package/dist/types/src/js/pds-live-manager/template-service.d.ts.map +1 -0
- package/dist/types/src/js/pds-manager.d.ts +4 -0
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +7 -3
- package/packages/pds-cli/README.md +51 -0
- package/packages/pds-cli/bin/pds-import.js +176 -0
- package/packages/pds-cli/bin/pds-static.js +31 -1
- package/packages/pds-cli/bin/postinstall.mjs +17 -8
- package/public/assets/js/app.js +23 -147
- package/public/assets/js/pds-manager.js +481 -248
- package/public/assets/js/pds.js +16 -16
- package/public/assets/pds/components/pds-form.js +124 -27
- package/public/assets/pds/components/pds-live-converter.js +47 -0
- package/public/assets/pds/components/pds-live-edit.js +1626 -211
- package/public/assets/pds/components/pds-live-importer.js +772 -0
- package/public/assets/pds/components/pds-live-template-canvas.js +171 -0
- package/public/assets/pds/components/pds-omnibox.js +146 -20
- package/public/assets/pds/components/pds-scrollrow.js +56 -1
- package/public/assets/pds/components/pds-toaster.js +50 -5
- package/public/assets/pds/components/pds-treeview.js +972 -0
- package/public/assets/pds/custom-elements.json +865 -35
- package/public/assets/pds/pds-css-complete.json +7 -7
- package/public/assets/pds/pds.css-data.json +5 -35
- package/public/assets/pds/templates/commerce-scroll-explorer.html +115 -0
- package/public/assets/pds/templates/content-brand-showcase.html +110 -0
- package/public/assets/pds/templates/feedback-ops-dashboard.html +91 -0
- package/public/assets/pds/templates/release-readiness-radar.html +69 -0
- package/public/assets/pds/templates/support-command-center.html +92 -0
- package/public/assets/pds/templates/templates.json +53 -0
- package/public/assets/pds/templates/workspace-settings-lab.html +131 -0
- package/public/assets/pds/vscode-custom-data.json +54 -4
- package/readme.md +34 -0
- package/src/js/pds-core/pds-config.js +831 -40
- package/src/js/pds-core/pds-enhancers-meta.js +11 -0
- package/src/js/pds-core/pds-enhancers.js +259 -5
- package/src/js/pds-core/pds-generator.js +353 -52
- package/src/js/pds-core/pds-live.js +630 -15
- package/src/js/pds-core/pds-ontology.js +6 -0
- package/src/js/pds-core/pds-start-helpers.js +14 -6
- package/src/js/pds-live-manager/conversion-service.js +3136 -0
- package/src/js/pds-live-manager/import-contract.js +57 -0
- package/src/js/pds-live-manager/import-history-service.js +145 -0
- package/src/js/pds-live-manager/import-service.js +255 -0
- package/src/js/pds-live-manager/tailwind-conversion-rules.json +383 -0
- package/src/js/pds-live-manager/template-service.js +170 -0
- package/src/js/pds.d.ts +31 -0
- package/src/js/pds.js +71 -60
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-config.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-config.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-config.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-config.js"],"names":[],"mappings":"AAm5CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCC;AAED,qEAEC;AAED;;UAUC;AAED;;UAUC;AA2nCD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AoB"}
|
|
@@ -1 +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;;;;
|
|
1
|
+
{"version":3,"file":"pds-enhancers-meta.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-enhancers-meta.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;IAyHE"}
|
|
@@ -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":"AA6yBA;;;;;GAKG;AACH;;;IAGI;AAzxBJ,mDAmBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"AAi4KA;;;;;;;;;GASG;AACH,8CALW,MAAM,YAEd;IAAyB,WAAW,GAA5B,MAAM;CACd,GAAU;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,CAyPpH;AAED;;;;;;;GAOG;AACH,0CAJW,KAAK,CAAC,MAAM,CAAC,YACb,MAAM,GACJ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEC;IAGD,oBAEC;IAwxBD,qBAEC;IACD,yBAEC;IACD,yBAEC;IACD,wBAEC;IACD,yBAMC;IAED;;;;;;OAMG;IACH,oBA6JC;IAGD,4BAEC;IACD,gCAEC;IACD,gCAEC;IACD,+BAEC;IAmBD;;;OAGG;IACH;;;;;;MAoBC;;CAkBF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export function startLive(PDS: any, config: any, { emitReady, applyResolvedTheme, setupSystemListenerIfNeeded }: {
|
|
1
|
+
export function startLive(PDS: any, config: any, { emitReady, emitConfigChanged, applyResolvedTheme, setupSystemListenerIfNeeded }: {
|
|
2
2
|
emitReady: any;
|
|
3
|
+
emitConfigChanged: any;
|
|
3
4
|
applyResolvedTheme: any;
|
|
4
5
|
setupSystemListenerIfNeeded: any;
|
|
5
6
|
}): Promise<{
|
|
@@ -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":"AA43BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2QC;0BAnoCyB,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-ontology.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-ontology.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-ontology.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-ontology.js"],"names":[],"mappings":"AA+vBA;;;;;;GAMG;AACH,iDALW,WAAW,iBAEnB;IAAwB,QAAQ,EAAxB,MAAM;CACd,GAAU,MAAO,IAAI,CAmKvB;AAED;;;GAGG;AACH,mCAFa,MAAM,EAAE,CAQpB;AAED;;;;;GAKG;AACH,sCAJW,MAAM,kBAEJ,KAAQ,CAoCpB;AAED;;;;GAIG;AACH,wCAHW,MAAM,OAUhB;AAED;;;GAGG;AACH,8BAFa,MAAM,EAAE,CAWpB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export function ensureAbsoluteAssetURL(value: any, options?: {}): any;
|
|
2
2
|
export function attachFoucListener(PDS: any): void;
|
|
3
3
|
export function stripFunctions(obj: any): any;
|
|
4
|
-
export function normalizeInitConfig(inputConfig
|
|
5
|
-
presets: any;
|
|
6
|
-
defaultLog: any;
|
|
7
|
-
}): {
|
|
4
|
+
export function normalizeInitConfig(inputConfig?: {}, options?: {}, { presets, defaultLog, validateDesignConfig, validateInitConfig }?: {}): {
|
|
8
5
|
generatorConfig: {
|
|
9
6
|
design: any;
|
|
10
7
|
preset: any;
|
|
@@ -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":"AAmBA,sEAgCC;AAiBD,mDASC;AA6BD,8CAsBC;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkJC;AAGD;;;;;;;;EAmCC;AAED;;QASC;AAGD;;;;;GA+HC;AA1bM,qDAGI"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function describeTailwindConversionRules(): {
|
|
2
|
+
directMappings: any;
|
|
3
|
+
ignoredPatterns: any;
|
|
4
|
+
nonPdsClassPatterns: any;
|
|
5
|
+
rulesJsonPath: string;
|
|
6
|
+
};
|
|
7
|
+
export function inferPdsDesignFromHtml(input?: {}): {
|
|
8
|
+
source: string;
|
|
9
|
+
type: string;
|
|
10
|
+
confidence: number;
|
|
11
|
+
issues: {
|
|
12
|
+
severity: string;
|
|
13
|
+
message: string;
|
|
14
|
+
path: string;
|
|
15
|
+
}[];
|
|
16
|
+
designPatch: any;
|
|
17
|
+
template: any;
|
|
18
|
+
meta: any;
|
|
19
|
+
};
|
|
20
|
+
export function convertHtmlLikeInputToPdsTemplate(input?: {}): {
|
|
21
|
+
source: string;
|
|
22
|
+
type: string;
|
|
23
|
+
confidence: number;
|
|
24
|
+
issues: {
|
|
25
|
+
severity: string;
|
|
26
|
+
message: string;
|
|
27
|
+
path: string;
|
|
28
|
+
}[];
|
|
29
|
+
designPatch: any;
|
|
30
|
+
template: any;
|
|
31
|
+
meta: any;
|
|
32
|
+
};
|
|
33
|
+
export function convertTailwindHtmlToPds(input?: {}): {
|
|
34
|
+
source: string;
|
|
35
|
+
type: string;
|
|
36
|
+
confidence: number;
|
|
37
|
+
issues: {
|
|
38
|
+
severity: string;
|
|
39
|
+
message: string;
|
|
40
|
+
path: string;
|
|
41
|
+
}[];
|
|
42
|
+
designPatch: any;
|
|
43
|
+
template: any;
|
|
44
|
+
meta: any;
|
|
45
|
+
};
|
|
46
|
+
export function convertBrandGuidelinesToPatch(input?: {}): {
|
|
47
|
+
source: string;
|
|
48
|
+
type: string;
|
|
49
|
+
confidence: number;
|
|
50
|
+
issues: {
|
|
51
|
+
severity: string;
|
|
52
|
+
message: string;
|
|
53
|
+
path: string;
|
|
54
|
+
}[];
|
|
55
|
+
designPatch: any;
|
|
56
|
+
template: any;
|
|
57
|
+
meta: any;
|
|
58
|
+
};
|
|
59
|
+
export namespace TAILWIND_TO_PDS_RULES {
|
|
60
|
+
export { ignoredPatterns };
|
|
61
|
+
export { nonPdsClassPatterns };
|
|
62
|
+
}
|
|
63
|
+
declare const ignoredPatterns: any;
|
|
64
|
+
declare const nonPdsClassPatterns: any;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=conversion-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversion-service.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-live-manager/conversion-service.js"],"names":[],"mappings":"AA8vEA;;;;;EAgBC;AAuhBD;;;;;;;;;;;;EAiKC;AAED;;;;;;;;;;;;EA6CC;AAED;;;;;;;;;;;;EAyBC;AAED;;;;;;;;;;;;EA6CC;;;;;AAtjGC,mCAKO;AAEP,uCAIO"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function createImportResult(input?: {}): {
|
|
2
|
+
source: string;
|
|
3
|
+
type: string;
|
|
4
|
+
confidence: number;
|
|
5
|
+
issues: {
|
|
6
|
+
severity: string;
|
|
7
|
+
message: string;
|
|
8
|
+
path: string;
|
|
9
|
+
}[];
|
|
10
|
+
designPatch: any;
|
|
11
|
+
template: any;
|
|
12
|
+
meta: any;
|
|
13
|
+
};
|
|
14
|
+
export function isImportResult(value: any): boolean;
|
|
15
|
+
//# sourceMappingURL=import-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-contract.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-live-manager/import-contract.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;EAqBC;AAED,oDAUC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function saveLiveImportHistory(input?: {}): Promise<{
|
|
2
|
+
createdAt: number;
|
|
3
|
+
createdAtIso: string;
|
|
4
|
+
sourceType: string;
|
|
5
|
+
importMode: string;
|
|
6
|
+
source: string;
|
|
7
|
+
type: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
fileSize: number;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
fileContents: string;
|
|
12
|
+
convertedHtml: string;
|
|
13
|
+
confidence: number;
|
|
14
|
+
notes: string[];
|
|
15
|
+
issues: {
|
|
16
|
+
severity: string;
|
|
17
|
+
message: string;
|
|
18
|
+
}[];
|
|
19
|
+
coverage: any;
|
|
20
|
+
unknownTailwindTokens: string[];
|
|
21
|
+
appliedRules: string[];
|
|
22
|
+
importStyleSheetInjected: boolean;
|
|
23
|
+
templateName: string;
|
|
24
|
+
designPatch: any;
|
|
25
|
+
meta: any;
|
|
26
|
+
resultSnapshot: any;
|
|
27
|
+
id: any;
|
|
28
|
+
}>;
|
|
29
|
+
export function listLiveImportHistory(options?: {}): Promise<any>;
|
|
30
|
+
export function getLiveImportHistoryEntry(id: any): Promise<any>;
|
|
31
|
+
export function clearLiveImportHistory(): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=import-history-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-history-service.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-live-manager/import-history-service.js"],"names":[],"mappings":"AAkGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUC;AAED,kEAYC;AAED,iEAWC;AAED,wDAOC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function getLiveImportSources(): {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}[];
|
|
5
|
+
export function runLiveImport(request?: {}): Promise<{
|
|
6
|
+
source: string;
|
|
7
|
+
type: string;
|
|
8
|
+
confidence: number;
|
|
9
|
+
issues: {
|
|
10
|
+
severity: string;
|
|
11
|
+
message: string;
|
|
12
|
+
path: string;
|
|
13
|
+
}[];
|
|
14
|
+
designPatch: any;
|
|
15
|
+
template: any;
|
|
16
|
+
meta: any;
|
|
17
|
+
}>;
|
|
18
|
+
import { listLiveTemplates } from "./template-service.js";
|
|
19
|
+
import { loadLiveTemplateCatalog } from "./template-service.js";
|
|
20
|
+
export { listLiveTemplates, loadLiveTemplateCatalog };
|
|
21
|
+
//# sourceMappingURL=import-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-service.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-live-manager/import-service.js"],"names":[],"mappings":"AAmHA;;;IASC;AAED;;;;;;;;;;;;GA6HC;kCAtPM,uBAAuB;wCAAvB,uBAAuB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function loadLiveTemplateCatalog(options?: {}): Promise<any>;
|
|
2
|
+
export function listLiveTemplates(options?: {}): Promise<any>;
|
|
3
|
+
export function getLiveTemplateById(templateId: any, options?: {}): Promise<any>;
|
|
4
|
+
export function buildTemplateImportResult(templateId: any, options?: {}): Promise<{
|
|
5
|
+
source: string;
|
|
6
|
+
type: string;
|
|
7
|
+
confidence: number;
|
|
8
|
+
issues: {
|
|
9
|
+
severity: string;
|
|
10
|
+
message: string;
|
|
11
|
+
path: string;
|
|
12
|
+
}[];
|
|
13
|
+
designPatch: any;
|
|
14
|
+
template: any;
|
|
15
|
+
meta: any;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=template-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-service.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-live-manager/template-service.js"],"names":[],"mappings":"AAmHA,oEAQC;AAED,8DAUC;AAED,iFAOC;AAED;;;;;;;;;;;;GAuBC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { startLive } from "./pds-core/pds-live.js";
|
|
2
2
|
export { loadGoogleFont } from "./common/font-loader.js";
|
|
3
|
+
export { getLiveImportSources, loadLiveTemplateCatalog, listLiveTemplates, runLiveImport } from "./pds-live-manager/import-service.js";
|
|
4
|
+
export { saveLiveImportHistory, listLiveImportHistory, getLiveImportHistoryEntry, clearLiveImportHistory } from "./pds-live-manager/import-history-service.js";
|
|
5
|
+
export { convertTailwindHtmlToPds, convertBrandGuidelinesToPatch, describeTailwindConversionRules } from "./pds-live-manager/conversion-service.js";
|
|
6
|
+
export { createImportResult, isImportResult } from "./pds-live-manager/import-contract.js";
|
|
3
7
|
//# sourceMappingURL=pds-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"AAuOA,mDAsBC;AAGD,4DAuCC;;;;;;;;;;;;;;;;;;;;;;;;;cA9Qa,OAAO,4BAA4B,EAAE,WAAW;;;;iBAChD,CAAC,SAAS,CAAC,EAAE,OAAO,6BAA6B,EAAE,SAAS,KAAK,IAAI;;;;iBACrE,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,gBAAgB,CAAC,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;;;;qBAChG,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;;;;sBAC7E,CAAC,GAAG,EAAC,MAAM,KAAK,aAAa;;AAW3C,+BAA+B;AAC/B,kBADW,MAAM,GAAG,OAAO,CACD;AArC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;GAIG;AACH;CAAoC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pure-ds/core",
|
|
3
3
|
"shortname": "pds",
|
|
4
|
-
"version": "0.6.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.6.11",
|
|
5
|
+
"description": "Why develop a Design System when you can generate one?",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/Pure-Web-Foundation/pure-ds.git"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"pds-build": "packages/pds-cli/bin/pds-static.js",
|
|
30
30
|
"pds-sync-assets": "packages/pds-cli/bin/sync-assets.js",
|
|
31
31
|
"pds-build-icons": "packages/pds-cli/bin/pds-build-icons.js",
|
|
32
|
+
"pds-import": "packages/pds-cli/bin/pds-import.js",
|
|
32
33
|
"pds-setup-copilot": "packages/pds-cli/bin/pds-setup-copilot.js",
|
|
33
34
|
"pds-init-config": "packages/pds-cli/bin/pds-init-config.js",
|
|
34
35
|
"pds-bootstrap": "packages/pds-cli/bin/pds-bootstrap.js"
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"dist/types/",
|
|
48
49
|
"public/assets/js/",
|
|
49
50
|
"public/assets/pds/components/",
|
|
51
|
+
"public/assets/pds/templates/",
|
|
50
52
|
"public/assets/pds/external/",
|
|
51
53
|
"public/assets/pds/vscode-custom-data.json",
|
|
52
54
|
"public/assets/pds/pds.css-data.json",
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
"packages/pds-cli/lib/",
|
|
59
61
|
"src/js/pds.d.ts",
|
|
60
62
|
"src/js/pds.js",
|
|
63
|
+
"src/js/pds-live-manager/",
|
|
61
64
|
"src/js/pds-core/",
|
|
62
65
|
"custom-elements.json",
|
|
63
66
|
"custom-elements-manifest.config.js",
|
|
@@ -81,6 +84,7 @@
|
|
|
81
84
|
"pds:bootstrap": "node packages/pds-cli/bin/pds-bootstrap.js",
|
|
82
85
|
"pds:manifest": "node packages/pds-cli/bin/generate-manifest.js",
|
|
83
86
|
"pds:css-data": "node packages/pds-cli/bin/generate-css-data.js",
|
|
87
|
+
"pds:import": "node packages/pds-cli/bin/pds-import.js",
|
|
84
88
|
"pds:dx": "node packages/pds-cli/bin/pds-dx.js",
|
|
85
89
|
"storybook:generate": "cd packages/pds-storybook && npm run generate-stories",
|
|
86
90
|
"storybook:dev": "cd packages/pds-storybook && npm run storybook:dev",
|
|
@@ -103,7 +107,7 @@
|
|
|
103
107
|
},
|
|
104
108
|
"dependencies": {
|
|
105
109
|
"lit": "^3.3.1",
|
|
106
|
-
"pure-web": "1.1.
|
|
110
|
+
"pure-web": "1.1.32"
|
|
107
111
|
},
|
|
108
112
|
"customElements": "custom-elements.json"
|
|
109
113
|
}
|
|
@@ -13,3 +13,54 @@ Notes:
|
|
|
13
13
|
- Output includes constructable stylesheet modules (pds-*.css.js) and plain CSS files.
|
|
14
14
|
|
|
15
15
|
This CLI is intentionally tiny and uses the repository's `pds-api` and `fs-writer` utilities.
|
|
16
|
+
|
|
17
|
+
## pds-import
|
|
18
|
+
|
|
19
|
+
`pds-import` runs the same import pipeline used by live edit and writes a JSON result file.
|
|
20
|
+
|
|
21
|
+
### Modes
|
|
22
|
+
|
|
23
|
+
- `convert-only`: converts source input to PDS-friendly HTML only
|
|
24
|
+
- `adopt-design-and-convert`: converts HTML and also infers a design patch (`designPatch`)
|
|
25
|
+
|
|
26
|
+
### Usage
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# HTML conversion only
|
|
30
|
+
pds-import \
|
|
31
|
+
--type tailwind-html \
|
|
32
|
+
--mode convert-only \
|
|
33
|
+
--source ./input.html \
|
|
34
|
+
--out ./out/import-result.json
|
|
35
|
+
|
|
36
|
+
# Convert HTML + infer/adopt styles
|
|
37
|
+
pds-import \
|
|
38
|
+
--type tailwind-html \
|
|
39
|
+
--mode adopt-design-and-convert \
|
|
40
|
+
--source ./input.html \
|
|
41
|
+
--out ./out/import-result.json
|
|
42
|
+
|
|
43
|
+
# Brand guideline text + style adoption
|
|
44
|
+
pds-import \
|
|
45
|
+
--type brand-guidelines \
|
|
46
|
+
--mode adopt-design-and-convert \
|
|
47
|
+
--source ./brand.txt \
|
|
48
|
+
--out ./out/brand-import.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Output locations
|
|
52
|
+
|
|
53
|
+
- `--out <path>` (required): writes the full import result JSON to the provided path
|
|
54
|
+
- `--html-out <path>` (optional): writes `result.template.html` to that file (if template exists)
|
|
55
|
+
- `--design-out <path>` (optional): writes `result.designPatch` JSON to that file
|
|
56
|
+
|
|
57
|
+
All output paths are resolved relative to your current working directory and parent directories are created automatically.
|
|
58
|
+
|
|
59
|
+
### Result shape
|
|
60
|
+
|
|
61
|
+
The full JSON (`--out`) includes:
|
|
62
|
+
|
|
63
|
+
- `template.html` for converted markup (when available)
|
|
64
|
+
- `designPatch` for inferred style config updates (mode-dependent)
|
|
65
|
+
- `issues[]` and `confidence`
|
|
66
|
+
- `meta.validationBlocked` when style adoption is rejected by accessibility checks
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { mkdir, readFile, writeFile } from 'fs/promises';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
6
|
+
import { runLiveImport, listLiveTemplates, getLiveImportSources } from '../../../src/js/pds-live-manager/import-service.js';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
function help() {
|
|
12
|
+
console.log(`pds-import — Import and convert external design inputs for PDS
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
pds-import --type tailwind-html --mode convert-only --source ./input.html --out ./pds-import.json
|
|
16
|
+
pds-import --type tailwind-html --mode adopt-design-and-convert --source ./input.html --out ./pds-import.json
|
|
17
|
+
pds-import --type brand-guidelines --mode adopt-design-and-convert --source ./brand.txt --out ./brand-import.json
|
|
18
|
+
pds-import --type template --template marketing-hero --out ./template-import.json
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
--type <value> Import type: tailwind-html | brand-guidelines | template
|
|
22
|
+
--mode <value> Import mode: convert-only | adopt-design-and-convert
|
|
23
|
+
--source <path> Source file path for tailwind-html or brand-guidelines
|
|
24
|
+
--text <value> Inline input text instead of source file
|
|
25
|
+
--template <id> Template id when --type=template
|
|
26
|
+
--config <path> Optional PDS config file (.json/.js/.mjs) to govern conversion rules
|
|
27
|
+
--describe-rules Print Tailwind→PDS conversion rulebook and exit
|
|
28
|
+
--out <path> Output JSON file path (required)
|
|
29
|
+
--html-out <path> Optional output path for converted template HTML (if present)
|
|
30
|
+
--design-out <path> Optional output path for design patch JSON (if present)
|
|
31
|
+
--list List available sources and templates
|
|
32
|
+
--help Show this help message
|
|
33
|
+
`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function normalizeImportMode(value) {
|
|
37
|
+
const raw = String(value || '').trim().toLowerCase();
|
|
38
|
+
if (raw === 'adopt-design-and-convert') return raw;
|
|
39
|
+
return 'convert-only';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function writeTextOutput(absPath, contents) {
|
|
43
|
+
await mkdir(path.dirname(absPath), { recursive: true });
|
|
44
|
+
await writeFile(absPath, contents, 'utf8');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function parseArgs(argv) {
|
|
48
|
+
const args = { _: [] };
|
|
49
|
+
for (let i = 2; i < argv.length; i += 1) {
|
|
50
|
+
const current = argv[i];
|
|
51
|
+
if (current.startsWith('--')) {
|
|
52
|
+
const key = current.slice(2);
|
|
53
|
+
const next = argv[i + 1];
|
|
54
|
+
if (!next || next.startsWith('--')) {
|
|
55
|
+
args[key] = true;
|
|
56
|
+
} else {
|
|
57
|
+
args[key] = next;
|
|
58
|
+
i += 1;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
args._.push(current);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return args;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function loadInput(args) {
|
|
68
|
+
if (typeof args.text === 'string') return args.text;
|
|
69
|
+
if (typeof args.source === 'string') {
|
|
70
|
+
const sourcePath = path.resolve(process.cwd(), args.source);
|
|
71
|
+
return readFile(sourcePath, 'utf8');
|
|
72
|
+
}
|
|
73
|
+
return '';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function loadConfig(args) {
|
|
77
|
+
if (typeof args.config !== 'string' || !args.config.trim()) return null;
|
|
78
|
+
|
|
79
|
+
const configPath = path.resolve(process.cwd(), args.config);
|
|
80
|
+
const ext = path.extname(configPath).toLowerCase();
|
|
81
|
+
|
|
82
|
+
if (ext === '.json') {
|
|
83
|
+
const raw = await readFile(configPath, 'utf8');
|
|
84
|
+
return JSON.parse(raw);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {
|
|
88
|
+
const mod = await import(pathToFileURL(configPath).href);
|
|
89
|
+
return mod?.config || mod?.default || null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
throw new Error('Unsupported --config format. Use .json, .js, .mjs, or .cjs');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function main() {
|
|
96
|
+
const args = parseArgs(process.argv);
|
|
97
|
+
|
|
98
|
+
if (args.help) {
|
|
99
|
+
help();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (args.list) {
|
|
104
|
+
console.log('Sources:');
|
|
105
|
+
getLiveImportSources().forEach((source) => {
|
|
106
|
+
console.log(`- ${source.id}: ${source.name}`);
|
|
107
|
+
});
|
|
108
|
+
console.log('Templates:');
|
|
109
|
+
(await listLiveTemplates()).forEach((template) => {
|
|
110
|
+
console.log(`- ${template.id}: ${template.name} [${template.icon || 'layout'}]`);
|
|
111
|
+
if (template.description) {
|
|
112
|
+
console.log(` ${template.description}`);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (args['describe-rules']) {
|
|
119
|
+
const rulesPath = path.resolve(__dirname, '../../../src/js/pds-live-manager/tailwind-conversion-rules.json');
|
|
120
|
+
const rulesJson = await readFile(rulesPath, 'utf8');
|
|
121
|
+
console.log(rulesJson);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const type = String(args.type || '').trim();
|
|
126
|
+
const outPath = String(args.out || '').trim();
|
|
127
|
+
const mode = normalizeImportMode(args.mode);
|
|
128
|
+
|
|
129
|
+
if (!type || !outPath) {
|
|
130
|
+
console.error('❌ Missing required arguments --type and --out');
|
|
131
|
+
help();
|
|
132
|
+
process.exitCode = 2;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const request = {
|
|
137
|
+
sourceType: type,
|
|
138
|
+
importMode: mode,
|
|
139
|
+
templateId: args.template,
|
|
140
|
+
input: await loadInput(args),
|
|
141
|
+
config: await loadConfig(args),
|
|
142
|
+
cwd: process.cwd(),
|
|
143
|
+
caller: path.relative(process.cwd(), __dirname),
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const result = await runLiveImport(request);
|
|
147
|
+
const absOutPath = path.resolve(process.cwd(), outPath);
|
|
148
|
+
|
|
149
|
+
await writeTextOutput(absOutPath, JSON.stringify(result, null, 2) + '\n');
|
|
150
|
+
console.log(`✅ Wrote import result to ${absOutPath}`);
|
|
151
|
+
|
|
152
|
+
if (typeof args['html-out'] === 'string' && String(args['html-out']).trim()) {
|
|
153
|
+
const html = String(result?.template?.html || '');
|
|
154
|
+
const absHtmlOutPath = path.resolve(process.cwd(), String(args['html-out']).trim());
|
|
155
|
+
await writeTextOutput(absHtmlOutPath, html);
|
|
156
|
+
console.log(`✅ Wrote converted HTML to ${absHtmlOutPath}`);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (typeof args['design-out'] === 'string' && String(args['design-out']).trim()) {
|
|
160
|
+
const designPatch = result?.designPatch && typeof result.designPatch === 'object'
|
|
161
|
+
? result.designPatch
|
|
162
|
+
: {};
|
|
163
|
+
const absDesignOutPath = path.resolve(process.cwd(), String(args['design-out']).trim());
|
|
164
|
+
await writeTextOutput(absDesignOutPath, JSON.stringify(designPatch, null, 2) + '\n');
|
|
165
|
+
console.log(`✅ Wrote design patch to ${absDesignOutPath}`);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const issueCount = Array.isArray(result?.issues) ? result.issues.length : 0;
|
|
169
|
+
const validationBlocked = Boolean(result?.meta?.validationBlocked || result?.meta?.validation?.ok === false);
|
|
170
|
+
console.log(`ℹ️ mode=${mode} confidence=${Math.round((result?.confidence || 0) * 100)}% issues=${issueCount} blocked=${validationBlocked}`);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
main().catch((error) => {
|
|
174
|
+
console.error('❌ pds-import failed:', error?.message || error);
|
|
175
|
+
process.exit(1);
|
|
176
|
+
});
|
|
@@ -466,6 +466,21 @@ async function main(options = {}) {
|
|
|
466
466
|
log(`⚠️ Failed to copy lit.js: ${e?.message || e}`, 'yellow');
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
+
// 4d) Copy template catalog and HTML files into target/templates
|
|
470
|
+
try {
|
|
471
|
+
const templateSource = path.join(repoRoot, 'public', 'assets', 'pds', 'templates');
|
|
472
|
+
if (!existsSync(templateSource)) {
|
|
473
|
+
log('⚠️ No templates source found; skipping templates copy', 'yellow');
|
|
474
|
+
} else {
|
|
475
|
+
const templatesDir = path.join(targetDir, 'templates');
|
|
476
|
+
await mkdir(templatesDir, { recursive: true });
|
|
477
|
+
await copyDirectory(templateSource, templatesDir);
|
|
478
|
+
log(`✅ Copied templates → ${path.relative(process.cwd(), templatesDir)}`, 'green');
|
|
479
|
+
}
|
|
480
|
+
} catch (e) {
|
|
481
|
+
log(`⚠️ Failed to copy templates: ${e?.message || e}`, 'yellow');
|
|
482
|
+
}
|
|
483
|
+
|
|
469
484
|
// 5) Generate CSS layers into target/styles
|
|
470
485
|
log('🧬 Generating styles...', 'bold');
|
|
471
486
|
const { Generator } = await loadGenerator();
|
|
@@ -576,6 +591,15 @@ async function main(options = {}) {
|
|
|
576
591
|
'default';
|
|
577
592
|
const runtimePresetId = slugify(runtimePresetLabel || 'default') || 'default';
|
|
578
593
|
const runtimeDesign = clone(stripFunctions(generatorOptions?.design || {}));
|
|
594
|
+
const configModule = await loadPdsConfigModule();
|
|
595
|
+
const runtimeSchemaPayload =
|
|
596
|
+
typeof configModule?.buildDesignConfigFormSchema === 'function'
|
|
597
|
+
? configModule.buildDesignConfigFormSchema(runtimeDesign)
|
|
598
|
+
: configModule?.PDS_DEFAULT_CONFIG_FORM_SCHEMA || null;
|
|
599
|
+
const runtimeEditorMetadata =
|
|
600
|
+
typeof configModule?.getDesignConfigEditorMetadata === 'function'
|
|
601
|
+
? configModule.getDesignConfigEditorMetadata(runtimeDesign)
|
|
602
|
+
: configModule?.PDS_DEFAULT_CONFIG_EDITOR_METADATA || {};
|
|
579
603
|
const runtimeConfig = {
|
|
580
604
|
exportedAt: new Date().toISOString(),
|
|
581
605
|
staticRoot: assetUrlRoot,
|
|
@@ -591,7 +615,13 @@ async function main(options = {}) {
|
|
|
591
615
|
components: `${assetUrlRoot}styles/pds-components.css.js`,
|
|
592
616
|
utilities: `${assetUrlRoot}styles/pds-utilities.css.js`,
|
|
593
617
|
styles: `${assetUrlRoot}styles/pds-styles.css.js`,
|
|
594
|
-
}
|
|
618
|
+
},
|
|
619
|
+
metadata: {
|
|
620
|
+
configRelations: clone(configModule?.PDS_CONFIG_RELATIONS || {}),
|
|
621
|
+
configSpec: clone(configModule?.PDS_DESIGN_CONFIG_SPEC || null),
|
|
622
|
+
configEditorMetadata: clone(runtimeEditorMetadata || {}),
|
|
623
|
+
configFormSchema: clone(runtimeSchemaPayload || null),
|
|
624
|
+
},
|
|
595
625
|
};
|
|
596
626
|
|
|
597
627
|
const runtimeConfigPath = path.join(targetDir, 'pds-runtime-config.json');
|
|
@@ -121,18 +121,27 @@ async function ensureBuildScript(consumerRoot) {
|
|
|
121
121
|
|
|
122
122
|
consumerPkg.scripts = consumerPkg.scripts || {};
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
const requiredScripts = {
|
|
125
|
+
'pds:build': 'pds-build',
|
|
126
|
+
'pds:import': 'pds-import',
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
let changed = false;
|
|
130
|
+
for (const [scriptName, scriptCommand] of Object.entries(requiredScripts)) {
|
|
131
|
+
if (!consumerPkg.scripts[scriptName]) {
|
|
132
|
+
consumerPkg.scripts[scriptName] = scriptCommand;
|
|
133
|
+
console.log(`🧩 Added "${scriptName}" script to consumer package.json`);
|
|
134
|
+
changed = true;
|
|
135
|
+
} else {
|
|
136
|
+
console.log(`🔧 Script "${scriptName}" already present in consumer package.json`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
126
139
|
|
|
127
|
-
if (
|
|
128
|
-
consumerPkg.scripts[desiredScriptName] = desiredScriptCmd;
|
|
140
|
+
if (changed) {
|
|
129
141
|
await writeFile(consumerPkgPath, JSON.stringify(consumerPkg, null, 2) + '\n');
|
|
130
|
-
console.log(`🧩 Added "${desiredScriptName}" script to consumer package.json`);
|
|
131
|
-
} else {
|
|
132
|
-
console.log(`🔧 Script "${desiredScriptName}" already present in consumer package.json`);
|
|
133
142
|
}
|
|
134
143
|
} catch (e) {
|
|
135
|
-
console.warn('⚠️ Could not ensure
|
|
144
|
+
console.warn('⚠️ Could not ensure PDS scripts in consumer package.json:', e.message);
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
147
|
|