@pure-ds/core 0.7.1 → 0.7.2
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/.cursorrules +38 -1
- package/.github/copilot-instructions.md +32 -0
- package/custom-elements.json +77 -46
- package/dist/types/public/assets/js/pds-ask.d.ts +2 -1
- package/dist/types/public/assets/js/pds-ask.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-auto-definer.d.ts +4 -9
- package/dist/types/public/assets/js/pds-auto-definer.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-autocomplete.d.ts +25 -36
- package/dist/types/public/assets/js/pds-autocomplete.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-enhancers.d.ts +4 -4
- package/dist/types/public/assets/js/pds-enhancers.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-manager.d.ts +444 -159
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-toast.d.ts +7 -6
- package/dist/types/public/assets/js/pds-toast.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +4 -3
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds-static.js +13 -2
- package/packages/pds-cli/bin/sync-assets.js +34 -0
- package/public/assets/js/app.js +1 -1
- package/public/assets/pds/custom-elements.json +77 -46
- package/public/assets/pds/pds-css-complete.json +2 -2
- package/public/assets/pds/pds.css-data.json +1 -1
- package/public/assets/pds/vscode-custom-data.json +5 -13
package/.cursorrules
CHANGED
|
@@ -186,7 +186,11 @@ form.addEventListener('pw:submit', async (e) => {
|
|
|
186
186
|
});
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
**PDS.toast() is available
|
|
189
|
+
**PDS.toast() is available from the imported `PDS` runtime:**
|
|
190
|
+
|
|
191
|
+
```javascript
|
|
192
|
+
import { PDS } from '#pds';
|
|
193
|
+
```
|
|
190
194
|
|
|
191
195
|
```javascript
|
|
192
196
|
// All toast types
|
|
@@ -362,6 +366,7 @@ This component uses `import { ... } from "#pds/lit"` and **requires** an import
|
|
|
362
366
|
<script type="importmap">
|
|
363
367
|
{
|
|
364
368
|
"imports": {
|
|
369
|
+
"#pds": "/assets/pds/core.js",
|
|
365
370
|
"#pds/lit": "/assets/pds/external/lit.js"
|
|
366
371
|
}
|
|
367
372
|
}
|
|
@@ -431,6 +436,38 @@ form.getFormData(); // May throw error
|
|
|
431
436
|
<span data-label>Enable feature</span>
|
|
432
437
|
</label>
|
|
433
438
|
|
|
439
|
+
<!-- Treeview: lazy node loading -->
|
|
440
|
+
<pds-treeview id="docsTree"></pds-treeview>
|
|
441
|
+
|
|
442
|
+
<script type="module">
|
|
443
|
+
const tree = document.getElementById('docsTree');
|
|
444
|
+
tree.options = {
|
|
445
|
+
// Initial payload can be shallow (e.g., 2 levels)
|
|
446
|
+
source: [
|
|
447
|
+
{
|
|
448
|
+
id: 'docs',
|
|
449
|
+
text: 'Docs',
|
|
450
|
+
hasChildren: true,
|
|
451
|
+
children: [
|
|
452
|
+
{ id: 'guides', text: 'Guides', hasChildren: true },
|
|
453
|
+
{ id: 'components', text: 'Components', hasChildren: true }
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
// Fetch children only when a node is expanded
|
|
458
|
+
getChildren: async ({ nodeId }) => {
|
|
459
|
+
const res = await fetch(`/api/tree?parent=${encodeURIComponent(nodeId)}`);
|
|
460
|
+
return res.ok ? res.json() : [];
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
</script>
|
|
464
|
+
|
|
465
|
+
**Treeview lazy-loading rules:**
|
|
466
|
+
- Mark expandable nodes with `hasChildren: true` when children are not yet included in the initial `source`.
|
|
467
|
+
- Provide `options.getChildren({ node, nodeId, host, options, settings })` for node-level fetch on first expand.
|
|
468
|
+
- Prefer shallow initial payloads (root + immediate children), then fetch deeper levels as users expand.
|
|
469
|
+
- Use `node-load` and `node-load-error` events for telemetry, loading UX, and retries.
|
|
470
|
+
|
|
434
471
|
<form data-required>
|
|
435
472
|
<label><span>Email</span><input type="email" required></label>
|
|
436
473
|
</form>
|
|
@@ -436,6 +436,38 @@ form.getFormData(); // May throw error
|
|
|
436
436
|
<span data-label>Enable feature</span>
|
|
437
437
|
</label>
|
|
438
438
|
|
|
439
|
+
<!-- Treeview: lazy node loading -->
|
|
440
|
+
<pds-treeview id="docsTree"></pds-treeview>
|
|
441
|
+
|
|
442
|
+
<script type="module">
|
|
443
|
+
const tree = document.getElementById('docsTree');
|
|
444
|
+
tree.options = {
|
|
445
|
+
// Initial payload can be shallow (e.g., 2 levels)
|
|
446
|
+
source: [
|
|
447
|
+
{
|
|
448
|
+
id: 'docs',
|
|
449
|
+
text: 'Docs',
|
|
450
|
+
hasChildren: true,
|
|
451
|
+
children: [
|
|
452
|
+
{ id: 'guides', text: 'Guides', hasChildren: true },
|
|
453
|
+
{ id: 'components', text: 'Components', hasChildren: true }
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
// Fetch children only when a node is expanded
|
|
458
|
+
getChildren: async ({ nodeId }) => {
|
|
459
|
+
const res = await fetch(`/api/tree?parent=${encodeURIComponent(nodeId)}`);
|
|
460
|
+
return res.ok ? res.json() : [];
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
</script>
|
|
464
|
+
|
|
465
|
+
**Treeview lazy-loading rules:**
|
|
466
|
+
- Mark expandable nodes with `hasChildren: true` when children are not yet included in the initial `source`.
|
|
467
|
+
- Provide `options.getChildren({ node, nodeId, host, options, settings })` for node-level fetch on first expand.
|
|
468
|
+
- Prefer shallow initial payloads (root + immediate children), then fetch deeper levels as users expand.
|
|
469
|
+
- Use `node-load` and `node-load-error` events for telemetry, loading UX, and retries.
|
|
470
|
+
|
|
439
471
|
<form data-required>
|
|
440
472
|
<label><span>Email</span><input type="email" required></label>
|
|
441
473
|
</form>
|
package/custom-elements.json
CHANGED
|
@@ -1334,6 +1334,34 @@
|
|
|
1334
1334
|
"kind": "method",
|
|
1335
1335
|
"name": "_teardown"
|
|
1336
1336
|
},
|
|
1337
|
+
{
|
|
1338
|
+
"kind": "method",
|
|
1339
|
+
"name": "_enableInteractiveEditing"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"kind": "method",
|
|
1343
|
+
"name": "_disableInteractiveEditing",
|
|
1344
|
+
"parameters": [
|
|
1345
|
+
{
|
|
1346
|
+
"name": "options",
|
|
1347
|
+
"default": "{}"
|
|
1348
|
+
}
|
|
1349
|
+
]
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"kind": "method",
|
|
1353
|
+
"name": "setInteractiveEditingEnabled",
|
|
1354
|
+
"parameters": [
|
|
1355
|
+
{
|
|
1356
|
+
"name": "enabled",
|
|
1357
|
+
"default": "true"
|
|
1358
|
+
}
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"kind": "method",
|
|
1363
|
+
"name": "isInteractiveEditingEnabled"
|
|
1364
|
+
},
|
|
1337
1365
|
{
|
|
1338
1366
|
"kind": "method",
|
|
1339
1367
|
"name": "_handleThemeChanged"
|
|
@@ -1529,6 +1557,14 @@
|
|
|
1529
1557
|
"kind": "method",
|
|
1530
1558
|
"name": "_buildQuickModeDropdown"
|
|
1531
1559
|
},
|
|
1560
|
+
{
|
|
1561
|
+
"kind": "method",
|
|
1562
|
+
"name": "_buildQuickModeContent"
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"kind": "method",
|
|
1566
|
+
"name": "createSharedQuickModeMenuItem"
|
|
1567
|
+
},
|
|
1532
1568
|
{
|
|
1533
1569
|
"kind": "method",
|
|
1534
1570
|
"name": "_openDrawer",
|
|
@@ -1563,6 +1599,14 @@
|
|
|
1563
1599
|
}
|
|
1564
1600
|
]
|
|
1565
1601
|
},
|
|
1602
|
+
{
|
|
1603
|
+
"kind": "method",
|
|
1604
|
+
"name": "openDesignSettings"
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"kind": "method",
|
|
1608
|
+
"name": "resetConfig"
|
|
1609
|
+
},
|
|
1566
1610
|
{
|
|
1567
1611
|
"kind": "method",
|
|
1568
1612
|
"name": "openImportDetailsFromToast",
|
|
@@ -1741,6 +1785,22 @@
|
|
|
1741
1785
|
"text": "null"
|
|
1742
1786
|
},
|
|
1743
1787
|
"default": "null"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"kind": "field",
|
|
1791
|
+
"name": "_interactiveEditingEnabled",
|
|
1792
|
+
"type": {
|
|
1793
|
+
"text": "boolean"
|
|
1794
|
+
},
|
|
1795
|
+
"default": "true"
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"kind": "field",
|
|
1799
|
+
"name": "_interactionListenersAttached",
|
|
1800
|
+
"type": {
|
|
1801
|
+
"text": "boolean"
|
|
1802
|
+
},
|
|
1803
|
+
"default": "false"
|
|
1744
1804
|
}
|
|
1745
1805
|
],
|
|
1746
1806
|
"events": [
|
|
@@ -1897,7 +1957,7 @@
|
|
|
1897
1957
|
"name": "_persistImportHistory",
|
|
1898
1958
|
"parameters": [
|
|
1899
1959
|
{
|
|
1900
|
-
"name": "{ sourceType, result }"
|
|
1960
|
+
"name": "{ sourceType, importMode, result }"
|
|
1901
1961
|
}
|
|
1902
1962
|
]
|
|
1903
1963
|
},
|
|
@@ -1928,6 +1988,9 @@
|
|
|
1928
1988
|
},
|
|
1929
1989
|
{
|
|
1930
1990
|
"name": "fileName"
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
"name": "importMode"
|
|
1931
1994
|
}
|
|
1932
1995
|
]
|
|
1933
1996
|
},
|
|
@@ -1990,6 +2053,14 @@
|
|
|
1990
2053
|
},
|
|
1991
2054
|
"default": "\"\""
|
|
1992
2055
|
},
|
|
2056
|
+
{
|
|
2057
|
+
"kind": "field",
|
|
2058
|
+
"name": "_selectedImportMode",
|
|
2059
|
+
"type": {
|
|
2060
|
+
"text": "string"
|
|
2061
|
+
},
|
|
2062
|
+
"default": "\"convert-only\""
|
|
2063
|
+
},
|
|
1993
2064
|
{
|
|
1994
2065
|
"kind": "field",
|
|
1995
2066
|
"name": "_isImporting",
|
|
@@ -2632,32 +2703,8 @@
|
|
|
2632
2703
|
"declarations": [
|
|
2633
2704
|
{
|
|
2634
2705
|
"kind": "class",
|
|
2635
|
-
"description": "
|
|
2706
|
+
"description": "",
|
|
2636
2707
|
"name": "PdsScrollrow",
|
|
2637
|
-
"cssParts": [
|
|
2638
|
-
{
|
|
2639
|
-
"description": "The scrollable container element",
|
|
2640
|
-
"name": "viewport"
|
|
2641
|
-
},
|
|
2642
|
-
{
|
|
2643
|
-
"description": "The previous/left scroll navigation button",
|
|
2644
|
-
"name": "prev"
|
|
2645
|
-
},
|
|
2646
|
-
{
|
|
2647
|
-
"description": "The next/right scroll navigation button",
|
|
2648
|
-
"name": "next"
|
|
2649
|
-
}
|
|
2650
|
-
],
|
|
2651
|
-
"slots": [
|
|
2652
|
-
{
|
|
2653
|
-
"description": "Scrollable tile content",
|
|
2654
|
-
"name": "default"
|
|
2655
|
-
},
|
|
2656
|
-
{
|
|
2657
|
-
"description": "Optional heading content rendered in the component header",
|
|
2658
|
-
"name": "heading"
|
|
2659
|
-
}
|
|
2660
|
-
],
|
|
2661
2708
|
"members": [
|
|
2662
2709
|
{
|
|
2663
2710
|
"kind": "field",
|
|
@@ -2747,32 +2794,16 @@
|
|
|
2747
2794
|
],
|
|
2748
2795
|
"attributes": [
|
|
2749
2796
|
{
|
|
2750
|
-
"name": "label"
|
|
2751
|
-
"type": {
|
|
2752
|
-
"text": "string"
|
|
2753
|
-
},
|
|
2754
|
-
"description": "Accessible label for the scroll region; also used as fallback heading copy"
|
|
2797
|
+
"name": "label"
|
|
2755
2798
|
},
|
|
2756
2799
|
{
|
|
2757
|
-
"name": "snap"
|
|
2758
|
-
"type": {
|
|
2759
|
-
"text": "\"start\"|\"center\""
|
|
2760
|
-
},
|
|
2761
|
-
"description": "Snap alignment for tiles when scrolling (default: start)"
|
|
2800
|
+
"name": "snap"
|
|
2762
2801
|
},
|
|
2763
2802
|
{
|
|
2764
|
-
"name": "tile-min"
|
|
2765
|
-
"type": {
|
|
2766
|
-
"text": "string"
|
|
2767
|
-
},
|
|
2768
|
-
"description": "Minimum tile width (CSS length, e.g. \"250px\")"
|
|
2803
|
+
"name": "tile-min"
|
|
2769
2804
|
},
|
|
2770
2805
|
{
|
|
2771
|
-
"name": "tile-max"
|
|
2772
|
-
"type": {
|
|
2773
|
-
"text": "string"
|
|
2774
|
-
},
|
|
2775
|
-
"description": "Maximum tile width (CSS length, e.g. \"360px\")"
|
|
2806
|
+
"name": "tile-max"
|
|
2776
2807
|
}
|
|
2777
2808
|
],
|
|
2778
2809
|
"superclass": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-ask.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-ask.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-ask.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-ask.js"],"names":[],"mappings":";AAAokE,iDAwBt3C"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Dynamically load and (idempotently) define a set of web components by tag name.
|
|
8
|
-
*/
|
|
9
|
-
define(...args: any[]): Promise<{
|
|
1
|
+
export { M as AutoDefiner };
|
|
2
|
+
declare var M: {
|
|
3
|
+
new (i?: {}): {};
|
|
4
|
+
define(...i: any[]): Promise<{
|
|
10
5
|
tag: any;
|
|
11
6
|
status: string;
|
|
12
7
|
}[]>;
|
|
@@ -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":";AAA62B;;;;;;EAAgwG"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export { f as AutoComplete };
|
|
2
|
+
declare var f: {
|
|
3
|
+
new (t: any, e: any, s: any): {
|
|
3
4
|
settings: any;
|
|
4
5
|
container: any;
|
|
5
6
|
input: any;
|
|
6
7
|
categories: any;
|
|
7
8
|
caches: Map<any, any>;
|
|
8
|
-
on(
|
|
9
|
+
on(t: any, e: any): /*elided*/ any;
|
|
9
10
|
attach(): void;
|
|
10
11
|
resultsDiv: HTMLDivElement;
|
|
11
12
|
controller(): {
|
|
@@ -20,14 +21,14 @@ export var AutoComplete: {
|
|
|
20
21
|
clear: any;
|
|
21
22
|
empty: () => void;
|
|
22
23
|
};
|
|
23
|
-
moveResult(
|
|
24
|
+
moveResult(t: any): void;
|
|
24
25
|
rowIndex: any;
|
|
25
26
|
getSelectedDiv(): Element;
|
|
26
|
-
selectResult(
|
|
27
|
+
selectResult(t: any): void;
|
|
27
28
|
resultClicked: boolean;
|
|
28
29
|
tabWindow: Window;
|
|
29
|
-
setText(
|
|
30
|
-
resultClick(
|
|
30
|
+
setText(t: any): void;
|
|
31
|
+
resultClick(t: any): void;
|
|
31
32
|
blurHandler(): void;
|
|
32
33
|
clear(): void;
|
|
33
34
|
cacheTmr: NodeJS.Timeout;
|
|
@@ -38,42 +39,30 @@ export var AutoComplete: {
|
|
|
38
39
|
};
|
|
39
40
|
hide(): void;
|
|
40
41
|
empty(): void;
|
|
41
|
-
inputHandler(
|
|
42
|
-
keyDownHandler(
|
|
43
|
-
keyUpHandler(
|
|
44
|
-
focusHandler(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
49
|
-
suggest(value: string, e: any): void;
|
|
50
|
-
sort(r: any, options: any): any;
|
|
51
|
-
resultsHandler(r: any, options: any): void;
|
|
42
|
+
inputHandler(t: any): void;
|
|
43
|
+
keyDownHandler(t: any): void;
|
|
44
|
+
keyUpHandler(t: any): void;
|
|
45
|
+
focusHandler(t: any): void;
|
|
46
|
+
suggest(t: any, e: any): void;
|
|
47
|
+
sort(t: any, e: any): any;
|
|
48
|
+
resultsHandler(t: any, e: any): void;
|
|
52
49
|
results: any;
|
|
53
50
|
acItems: NodeListOf<Element>;
|
|
54
|
-
handleImageOrIcon(
|
|
55
|
-
formatResultItem(
|
|
56
|
-
highlight(
|
|
57
|
-
getItems(
|
|
51
|
+
handleImageOrIcon(t: any): any;
|
|
52
|
+
formatResultItem(t: any, e: any, s: any): any;
|
|
53
|
+
highlight(t: any, e: any): any;
|
|
54
|
+
getItems(t: any, e: any): Promise<any>;
|
|
58
55
|
aborter: AbortController;
|
|
59
56
|
aborterSignal: AbortSignal;
|
|
60
|
-
items(
|
|
61
|
-
formatSearch(
|
|
62
|
-
createQueryParam(
|
|
63
|
-
isMatch(
|
|
57
|
+
items(t: any): Promise<any[]>;
|
|
58
|
+
formatSearch(t: any, e: any): any;
|
|
59
|
+
createQueryParam(t: any): string;
|
|
60
|
+
isMatch(t: any, e: any): any;
|
|
64
61
|
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
65
62
|
dispatchEvent(event: Event): boolean;
|
|
66
63
|
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
67
64
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* Lit example:
|
|
71
|
-
* <input type="search" @focus=${(e) => {AutoComplete.connect(e, this.autoComplete); }} />
|
|
72
|
-
*
|
|
73
|
-
* @param {*} event focus event
|
|
74
|
-
* @param {*} options AutoComplete options
|
|
75
|
-
*/
|
|
76
|
-
connect(event: any, options: any): any;
|
|
77
|
-
textFilter(options: any, propertyName: any): (i: any) => any;
|
|
65
|
+
connect(t: any, e: any): any;
|
|
66
|
+
textFilter(t: any, e: any): (s: any) => any;
|
|
78
67
|
};
|
|
79
68
|
//# sourceMappingURL=pds-autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-autocomplete.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-autocomplete.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-autocomplete.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-autocomplete.js"],"names":[],"mappings":";AACwc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAKqxE,MAAC;EAAkM"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export { J as defaultPDSEnhancers };
|
|
2
|
+
declare var J: {
|
|
3
|
+
run: typeof W;
|
|
3
4
|
selector: string;
|
|
4
5
|
}[];
|
|
5
|
-
declare function
|
|
6
|
-
export {};
|
|
6
|
+
declare function W(t: any): void;
|
|
7
7
|
//# sourceMappingURL=pds-enhancers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-enhancers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-enhancers.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-enhancers.js"],"names":[],"mappings":";AAAmpZ;;;IAAoD;AAA15Y,iCAAqP"}
|