@pure-ds/core 0.7.3 → 0.7.5
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 +21 -0
- package/.github/copilot-instructions.md +21 -0
- package/dist/types/pds.d.ts +1 -0
- 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-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/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/package.json +8 -2
- package/packages/pds-cli/bin/pds-bootstrap.js +1 -1
- package/packages/pds-cli/bin/pds-import.js +1 -1
- package/packages/pds-cli/bin/pds-mcp-eval.js +79 -0
- package/packages/pds-cli/bin/pds-mcp-health.js +128 -0
- package/packages/pds-cli/bin/pds-mcp-server.js +140 -0
- package/packages/pds-cli/bin/pds-setup-mcp.js +72 -0
- package/packages/pds-cli/bin/pds-static.js +5 -1
- package/packages/pds-cli/bin/sync-assets.js +7 -1
- package/packages/pds-cli/lib/pds-mcp-core.js +497 -0
- package/packages/pds-cli/lib/pds-mcp-eval-cases.json +72 -0
- package/public/assets/js/app.js +43 -4
- package/public/assets/js/app.js.map +2 -2
- package/public/assets/js/pds-manager.js +35 -2
- package/public/assets/js/pds-manager.js.map +2 -2
- package/public/assets/js/pds.js +35 -2
- package/public/assets/js/pds.js.map +2 -2
- package/public/assets/pds/core/pds-manager.js +35 -2
- package/public/assets/pds/core.js +35 -2
- package/readme.md +44 -0
- package/src/js/pds-core/pds-start-helpers.js +40 -2
- package/src/js/pds.d.ts +1 -0
- package/public/assets/pds/core/pds-auto-definer.js +0 -306
package/.cursorrules
CHANGED
|
@@ -49,6 +49,27 @@ PDS follows the [Pure Web Manifesto](https://pureweb.dev/manifesto): "The browse
|
|
|
49
49
|
2. Otherwise use workspace root paths (pure-ds development)
|
|
50
50
|
3. Prefer reading actual files over guessing - the data is authoritative
|
|
51
51
|
|
|
52
|
+
## 🔌 MCP-First Lookup Protocol (Preferred)
|
|
53
|
+
|
|
54
|
+
If an MCP server named `pure-ds` is available, **use MCP tools first** before generating PDS code.
|
|
55
|
+
|
|
56
|
+
### Required lookup order
|
|
57
|
+
|
|
58
|
+
1. **Tokens** → call `get_tokens`
|
|
59
|
+
2. **Primitives / utilities / selectors** → call `find_utility_class`
|
|
60
|
+
3. **Web component API** → call `get_component_api`
|
|
61
|
+
4. **Enhancer metadata + demoHtml** → call `get_enhancer_metadata`
|
|
62
|
+
5. **Design config deterministic mapping** → call `get_config_relations`
|
|
63
|
+
6. **Final snippet sanity check** → call `validate_pds_snippet`
|
|
64
|
+
|
|
65
|
+
### Non-negotiable rules
|
|
66
|
+
|
|
67
|
+
- Do not invent class names, tokens, attributes, events, or selectors.
|
|
68
|
+
- If a value is not found in MCP results, state it is unavailable and suggest nearest matches.
|
|
69
|
+
- Prefer MCP results over memory, including examples in this file.
|
|
70
|
+
- If MCP is unavailable, fall back to direct SSoT file reads using the paths above.
|
|
71
|
+
- If neither MCP nor file reads are available, provide only conservative guidance and clearly mark uncertainty.
|
|
72
|
+
|
|
52
73
|
---
|
|
53
74
|
|
|
54
75
|
## 📋 pds-form Best Practices
|
|
@@ -49,6 +49,27 @@ PDS follows the [Pure Web Manifesto](https://pureweb.dev/manifesto): "The browse
|
|
|
49
49
|
2. Otherwise use workspace root paths (pure-ds development)
|
|
50
50
|
3. Prefer reading actual files over guessing - the data is authoritative
|
|
51
51
|
|
|
52
|
+
## 🔌 MCP-First Lookup Protocol (Preferred)
|
|
53
|
+
|
|
54
|
+
If an MCP server named `pure-ds` is available, **use MCP tools first** before generating PDS code.
|
|
55
|
+
|
|
56
|
+
### Required lookup order
|
|
57
|
+
|
|
58
|
+
1. **Tokens** → call `get_tokens`
|
|
59
|
+
2. **Primitives / utilities / selectors** → call `find_utility_class`
|
|
60
|
+
3. **Web component API** → call `get_component_api`
|
|
61
|
+
4. **Enhancer metadata + demoHtml** → call `get_enhancer_metadata`
|
|
62
|
+
5. **Design config deterministic mapping** → call `get_config_relations`
|
|
63
|
+
6. **Final snippet sanity check** → call `validate_pds_snippet`
|
|
64
|
+
|
|
65
|
+
### Non-negotiable rules
|
|
66
|
+
|
|
67
|
+
- Do not invent class names, tokens, attributes, events, or selectors.
|
|
68
|
+
- If a value is not found in MCP results, state it is unavailable and suggest nearest matches.
|
|
69
|
+
- Prefer MCP results over memory, including examples in this file.
|
|
70
|
+
- If MCP is unavailable, fall back to direct SSoT file reads using the paths above.
|
|
71
|
+
- If neither MCP nor file reads are available, provide only conservative guidance and clearly mark uncertainty.
|
|
72
|
+
|
|
52
73
|
---
|
|
53
74
|
|
|
54
75
|
## 📋 pds-form Best Practices
|
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 +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,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"}
|