@pure-ds/core 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +21 -0
- package/.github/copilot-instructions.md +21 -0
- package/dist/types/public/assets/js/pds-ask.d.ts +1 -2
- package/dist/types/public/assets/js/pds-ask.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-autocomplete.d.ts +36 -25
- 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 +159 -444
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds-toast.d.ts +6 -7
- package/dist/types/public/assets/js/pds-toast.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +3 -4
- 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/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 +2 -2
- package/public/assets/js/pds-manager.js +25 -25
- package/public/assets/js/pds.js +2 -2
- package/public/assets/pds/core/pds-manager.js +25 -25
- package/public/assets/pds/core.js +2 -2
- package/readme.md +44 -2
- package/src/js/pds-core/pds-start-helpers.js +0 -20
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
|
|
@@ -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":"AAuHA,8DAmIC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
new (t: any, e: any, s: any): {
|
|
1
|
+
export var AutoComplete: {
|
|
2
|
+
new (parent: any, textInput: any, settings: any): {
|
|
4
3
|
settings: any;
|
|
5
4
|
container: any;
|
|
6
5
|
input: any;
|
|
7
6
|
categories: any;
|
|
8
7
|
caches: Map<any, any>;
|
|
9
|
-
on(
|
|
8
|
+
on(a: any, b: any): /*elided*/ any;
|
|
10
9
|
attach(): void;
|
|
11
10
|
resultsDiv: HTMLDivElement;
|
|
12
11
|
controller(): {
|
|
@@ -21,14 +20,14 @@ declare var f: {
|
|
|
21
20
|
clear: any;
|
|
22
21
|
empty: () => void;
|
|
23
22
|
};
|
|
24
|
-
moveResult(
|
|
23
|
+
moveResult(add: any): void;
|
|
25
24
|
rowIndex: any;
|
|
26
25
|
getSelectedDiv(): Element;
|
|
27
|
-
selectResult(
|
|
26
|
+
selectResult(div: any): void;
|
|
28
27
|
resultClicked: boolean;
|
|
29
28
|
tabWindow: Window;
|
|
30
|
-
setText(
|
|
31
|
-
resultClick(
|
|
29
|
+
setText(options: any): void;
|
|
30
|
+
resultClick(event: any): void;
|
|
32
31
|
blurHandler(): void;
|
|
33
32
|
clear(): void;
|
|
34
33
|
cacheTmr: NodeJS.Timeout;
|
|
@@ -39,30 +38,42 @@ declare var f: {
|
|
|
39
38
|
};
|
|
40
39
|
hide(): void;
|
|
41
40
|
empty(): void;
|
|
42
|
-
inputHandler(
|
|
43
|
-
keyDownHandler(
|
|
44
|
-
keyUpHandler(
|
|
45
|
-
focusHandler(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
inputHandler(e: any): void;
|
|
42
|
+
keyDownHandler(e: any): void;
|
|
43
|
+
keyUpHandler(e: any): void;
|
|
44
|
+
focusHandler(e: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Shows suggestion box
|
|
47
|
+
* @param {string} value - String to suggest results for
|
|
48
|
+
*/
|
|
49
|
+
suggest(value: string, e: any): void;
|
|
50
|
+
sort(r: any, options: any): any;
|
|
51
|
+
resultsHandler(r: any, options: any): void;
|
|
49
52
|
results: any;
|
|
50
53
|
acItems: NodeListOf<Element>;
|
|
51
|
-
handleImageOrIcon(
|
|
52
|
-
formatResultItem(
|
|
53
|
-
highlight(
|
|
54
|
-
getItems(
|
|
54
|
+
handleImageOrIcon(i: any): any;
|
|
55
|
+
formatResultItem(item: any, options: any, catHandler: any): any;
|
|
56
|
+
highlight(str: any, find: any): any;
|
|
57
|
+
getItems(options: any, e: any): Promise<any>;
|
|
55
58
|
aborter: AbortController;
|
|
56
59
|
aborterSignal: AbortSignal;
|
|
57
|
-
items(
|
|
58
|
-
formatSearch(
|
|
59
|
-
createQueryParam(
|
|
60
|
-
isMatch(
|
|
60
|
+
items(options: any): Promise<any[]>;
|
|
61
|
+
formatSearch(url: any, options: any): any;
|
|
62
|
+
createQueryParam(options: any): string;
|
|
63
|
+
isMatch(options: any, i: any): any;
|
|
61
64
|
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
|
|
62
65
|
dispatchEvent(event: Event): boolean;
|
|
63
66
|
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
|
|
64
67
|
};
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Connector logic to call on @focus events.
|
|
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;
|
|
67
78
|
};
|
|
68
79
|
//# 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":"AA+CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwRE;;;WAGG;uBADQ,MAAM;;;;;;;;;;;;;;;;;;;IA5QjB;;;;;;;OAOG;mBAFQ,GAAC,WACD,GAAC;kDAsfM,MAAC;EAgBnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
run: typeof W;
|
|
1
|
+
export var defaultPDSEnhancers: {
|
|
2
|
+
run: typeof enhanceAccordion;
|
|
4
3
|
selector: string;
|
|
5
4
|
}[];
|
|
6
|
-
declare function
|
|
5
|
+
declare function enhanceAccordion(elem: any): void;
|
|
6
|
+
export {};
|
|
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":"AAwqBA;;;IAII;AAhqBJ,mDAiBC"}
|