@pure-ds/core 0.7.57 → 0.7.58

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.
@@ -224,6 +224,18 @@
224
224
  "text": "CustomEvent"
225
225
  }
226
226
  },
227
+ {
228
+ "name": "day-click",
229
+ "type": {
230
+ "text": "CustomEvent"
231
+ }
232
+ },
233
+ {
234
+ "name": "task-click",
235
+ "type": {
236
+ "text": "CustomEvent"
237
+ }
238
+ },
227
239
  {
228
240
  "name": "month-rendered",
229
241
  "type": {
@@ -237,6 +249,14 @@
237
249
  {
238
250
  "description": "Dispatched when the visible month/year changes",
239
251
  "name": "pds-calendar#month-change"
252
+ },
253
+ {
254
+ "description": "Dispatched when a day cell is selected from the calendar grid",
255
+ "name": "pds-calendar#day-click"
256
+ },
257
+ {
258
+ "description": "Dispatched when a task item is clicked",
259
+ "name": "pds-calendar#task-click"
240
260
  }
241
261
  ],
242
262
  "attributes": [
@@ -1145,6 +1165,10 @@
1145
1165
  {
1146
1166
  "description": "Animation duration (default: 420ms)",
1147
1167
  "name": "--transition-duration"
1168
+ },
1169
+ {
1170
+ "description": "FAB z-index when used inside pds-drawer (default: var(--z-popover))",
1171
+ "name": "--z-fab-in-drawer"
1148
1172
  }
1149
1173
  ],
1150
1174
  "cssParts": [
@@ -1204,19 +1228,48 @@
1204
1228
  {
1205
1229
  "kind": "field",
1206
1230
  "name": "startAngle",
1207
- "description": "Starting angle in degrees (0=right, 90=down, 180=left, 270=up)\r\nIf not specified, the angle is auto-detected based on the FAB's corner position:\r\n- Bottom-right: 180° (fly left/up)\r\n- Bottom-left: 315° (fly right/up)\r\n- Top-right: 225° (fly left/down)\r\n- Top-left: 45° (fly right/down)",
1231
+ "description": "Starting angle in degrees (0=right, 90=down, 180=left, 270=up)\r\nIf not specified, the angle is auto-detected based on the FAB's corner position:\r\n- Bottom-right: 180-� (fly left/up)\r\n- Bottom-left: 315-� (fly right/up)\r\n- Top-right: 225-� (fly left/down)\r\n- Top-left: 45-� (fly right/down)",
1208
1232
  "type": {
1209
1233
  "text": "number"
1210
1234
  },
1211
1235
  "default": "180 (or auto-detected)",
1212
1236
  "attribute": "start-angle"
1213
1237
  },
1238
+ {
1239
+ "kind": "field",
1240
+ "name": "behavior",
1241
+ "description": "Interaction mode for satellite menu.\r\n- click: toggles satellites when main FAB is clicked\r\n- hover: opens on hover/focus and closes when pointer leaves safe area",
1242
+ "type": {
1243
+ "text": "'click'|'hover'"
1244
+ },
1245
+ "default": "click",
1246
+ "attribute": "behavior"
1247
+ },
1248
+ {
1249
+ "kind": "field",
1250
+ "name": "mode",
1251
+ "description": "Layout mode for host positioning.\r\n- fixed: FAB is anchored to viewport bottom-right\r\n- inline: FAB participates in normal document flow",
1252
+ "type": {
1253
+ "text": "'fixed'|'inline'"
1254
+ },
1255
+ "default": "fixed",
1256
+ "attribute": "mode"
1257
+ },
1258
+ {
1259
+ "kind": "field",
1260
+ "name": "fabClass",
1261
+ "description": "Space-separated class list forwarded to the internal button.\r\nUse this instead of host classes for btn-* and icon-only.",
1262
+ "type": {
1263
+ "text": "string"
1264
+ },
1265
+ "attribute": "fab-class"
1266
+ },
1214
1267
  {
1215
1268
  "kind": "field",
1216
1269
  "name": "satellites",
1217
1270
  "description": "Array of satellite button configurations",
1218
1271
  "type": {
1219
- "text": "Array<{key: string, icon?: string, label?: string, action?: string}>"
1272
+ "text": "Array<{key: string, icon?: string, iconColor?: string, bgColor?: string, iconSize?: string, label?: string, action?: string}>"
1220
1273
  }
1221
1274
  }
1222
1275
  ],
@@ -1258,12 +1311,38 @@
1258
1311
  },
1259
1312
  {
1260
1313
  "name": "start-angle",
1261
- "description": "Starting angle in degrees (0=right, 90=down, 180=left, 270=up)\r\nIf not specified, the angle is auto-detected based on the FAB's corner position:\r\n- Bottom-right: 180° (fly left/up)\r\n- Bottom-left: 315° (fly right/up)\r\n- Top-right: 225° (fly left/down)\r\n- Top-left: 45° (fly right/down)",
1314
+ "description": "Starting angle in degrees (0=right, 90=down, 180=left, 270=up)\r\nIf not specified, the angle is auto-detected based on the FAB's corner position:\r\n- Bottom-right: 180-� (fly left/up)\r\n- Bottom-left: 315-� (fly right/up)\r\n- Top-right: 225-� (fly left/down)\r\n- Top-left: 45-� (fly right/down)",
1262
1315
  "type": {
1263
1316
  "text": "number"
1264
1317
  },
1265
1318
  "default": "180 (or auto-detected)",
1266
1319
  "fieldName": "startAngle"
1320
+ },
1321
+ {
1322
+ "name": "behavior",
1323
+ "description": "Interaction mode for opening satellites (default: click)",
1324
+ "type": {
1325
+ "text": "\"click\"|\"hover\""
1326
+ },
1327
+ "default": "click",
1328
+ "fieldName": "behavior"
1329
+ },
1330
+ {
1331
+ "name": "mode",
1332
+ "description": "Layout mode for FAB positioning (default: fixed)",
1333
+ "type": {
1334
+ "text": "\"fixed\"|\"inline\""
1335
+ },
1336
+ "default": "fixed",
1337
+ "fieldName": "mode"
1338
+ },
1339
+ {
1340
+ "name": "fab-class",
1341
+ "description": "Space-separated class list forwarded to the internal button.\r\nUse this instead of host classes for btn-* and icon-only.",
1342
+ "type": {
1343
+ "text": "string"
1344
+ },
1345
+ "fieldName": "fabClass"
1267
1346
  }
1268
1347
  ],
1269
1348
  "superclass": {
@@ -4692,7 +4771,7 @@
4692
4771
  "description": "Toast configuration",
4693
4772
  "optional": true,
4694
4773
  "type": {
4695
- "text": "@param {\"information\"|\"success\"|\"warning\"|\"error\"} [options.type=\"information\"] - Toast type\n * @param {number} [options.duration] - Duration in ms (auto-calculated if not provided)\n * @param {boolean} [options.closable=true] - Whether toast can be closed manually\n * @param {boolean} [options.persistent=false] - If true, toast doesn't auto-dismiss\n * "
4774
+ "text": "@param {\"information\"|\"success\"|\"warning\"|\"error\"} [options.type=\"information\"] - Toast type\n * @param {string} [options.title] - Optional heading text (falls back to type-based title when empty)\n * @param {number} [options.duration] - Duration in ms (auto-calculated if not provided)\n * @param {boolean} [options.closable=true] - Whether toast can be closed manually\n * @param {boolean} [options.persistent=false] - If true, toast doesn't auto-dismiss\n * @param {boolean} [options.returnToastElement=false] - If true, return the toast element instead of toast ID\n * "
4696
4775
  }
4697
4776
  }
4698
4777
  ],
@@ -4700,7 +4779,27 @@
4700
4779
  "privacy": "public",
4701
4780
  "return": {
4702
4781
  "type": {
4703
- "text": "string"
4782
+ "text": "string|HTMLElement|null"
4783
+ }
4784
+ }
4785
+ },
4786
+ {
4787
+ "kind": "method",
4788
+ "name": "getToastElement",
4789
+ "parameters": [
4790
+ {
4791
+ "name": "toastId",
4792
+ "description": "Toast ID",
4793
+ "type": {
4794
+ "text": "string"
4795
+ }
4796
+ }
4797
+ ],
4798
+ "description": "Get toast element by ID.",
4799
+ "privacy": "public",
4800
+ "return": {
4801
+ "type": {
4802
+ "text": "HTMLElement|null"
4704
4803
  }
4705
4804
  }
4706
4805
  },
@@ -4726,6 +4825,12 @@
4726
4825
  "text": "\"information\"|\"success\"|\"warning\"|\"error\""
4727
4826
  }
4728
4827
  },
4828
+ {
4829
+ "name": "title",
4830
+ "type": {
4831
+ "text": "string|null|undefined"
4832
+ }
4833
+ },
4729
4834
  {
4730
4835
  "name": "closable",
4731
4836
  "type": {
@@ -458,6 +458,24 @@ export class PDS extends EventTarget {
458
458
  */
459
459
  static ask(message: AskMessage, options?: AskOptions): Promise<any>;
460
460
 
461
+ /**
462
+ * Reactive state container class for building reactive components.
463
+ * Fires custom events ('change' and 'change:propertyName') when state properties are modified.
464
+ */
465
+ static State: typeof State;
466
+
467
+ /**
468
+ * Create a reactive component with automatic re-rendering on state changes.
469
+ * Each state mutation will automatically re-render the component.
470
+ */
471
+ static createReactiveComponent: typeof createReactiveComponent;
472
+
473
+ /**
474
+ * Bind a state container to an element, auto-updating specific properties when state changes.
475
+ * Useful for partial updates without full re-renders.
476
+ */
477
+ static bindState: typeof bindState;
478
+
461
479
  /**
462
480
  * Current configuration after PDS.start() completes - read-only, frozen after initialization.
463
481
  * Contains the complete configuration used to initialize PDS, including mode, design, preset, and theme.
@@ -754,3 +772,50 @@ export class SchemaForm extends HTMLElement {
754
772
 
755
773
  export function parse(html: PDSParseInput, ...values: unknown[]): NodeListOf<ChildNode>;
756
774
  export function html(html: PDSParseInput, ...values: unknown[]): DocumentFragment;
775
+
776
+ /**
777
+ * Reactive state container that fires custom events on property mutations.
778
+ * When properties change, it emits "change" and "change:propertyName" events.
779
+ *
780
+ * @example
781
+ * ```javascript
782
+ * const state = new State({ count: 0 });
783
+ * state.on('change:count', (e) => console.log('Count changed to:', e.detail.value));
784
+ * state.count++; // Fires events and updates DOM
785
+ * ```
786
+ */
787
+ export class State<T extends Record<string, any> = Record<string, any>> {
788
+ constructor(initialValue?: T, eventTarget?: EventTarget);
789
+ on(event: string, callback: (e: CustomEvent) => void): this;
790
+ once(event: string, callback: (e: CustomEvent) => void): this;
791
+ off(event: string, callback: (e: CustomEvent) => void): this;
792
+ [key: string]: any;
793
+ }
794
+
795
+ /**
796
+ * Create a reactive component with automatic re-rendering on state changes.
797
+ *
798
+ * @param initialState - Initial state object
799
+ * @param renderFn - Function that takes state and returns a DOM fragment
800
+ * @param container - Container element where the component renders
801
+ * @returns The reactive state proxy
802
+ */
803
+ export function createReactiveComponent<T extends Record<string, any>>(
804
+ initialState: T,
805
+ renderFn: (state: State<T>) => DocumentFragment | Node,
806
+ container: HTMLElement
807
+ ): State<T>;
808
+
809
+ /**
810
+ * Bind a state container to an element, auto-updating specific properties when state changes.
811
+ *
812
+ * @param element - Element to update
813
+ * @param state - Reactive state container
814
+ * @param bindings - Map of property names to update handlers
815
+ * @returns Cleanup function to remove event listeners
816
+ */
817
+ export function bindState<T extends Record<string, any>>(
818
+ element: HTMLElement,
819
+ state: State<T>,
820
+ bindings: Record<keyof T, (el: HTMLElement, value: any, oldValue?: any) => void>
821
+ ): () => void;
@@ -39,4 +39,11 @@ export function parseHTML(html: string | TemplateStringsArray | {
39
39
  strings: string[];
40
40
  values: unknown[];
41
41
  }, ...values: unknown[]): NodeListOf<ChildNode>;
42
+ export function throttle(fn: any, timeoutMs?: number): (...args: any[]) => void;
43
+ export function enQueue(fn: any): void;
44
+ export function isUrl(str: any): boolean;
45
+ export function withTimeout(promise: any, timeoutMs: any, label?: string): any;
46
+ export function escapeForRegExp(value: any): string;
47
+ export function openCenteredWindow(url: any, width: any, height: any): Window;
48
+ export function humanizeIdentifier(value: any): string;
42
49
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/common.js"],"names":[],"mappings":"AAAA,6CAEC;AAED,yDAeG;AAEH;;;;GAIG;AACH,uDAHW;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,GACpC,gBAAgB,CAuK5B;AAED;;;;;;GAMG;AACH,oCAJW,MAAM,GAAG,oBAAoB,GAAG;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,aACnE,OAAO,EAAA,GACR,gBAAgB,CAiB5B;AAED;;;;;;;;;;;;;;GAcG;AACH,gCAJW,MAAM,GAAG,oBAAoB,GAAG;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,aACnE,OAAO,EAAA,GACR,UAAU,CAAC,SAAS,CAAC,CAIjC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/common.js"],"names":[],"mappings":"AAAA,6CAEC;AAED,yDAeG;AAEH;;;;GAIG;AACH,uDAHW;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,GACpC,gBAAgB,CAuK5B;AAED;;;;;;GAMG;AACH,oCAJW,MAAM,GAAG,oBAAoB,GAAG;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,aACnE,OAAO,EAAA,GACR,gBAAgB,CAiB5B;AAED;;;;;;;;;;;;;;GAcG;AACH,gCAJW,MAAM,GAAG,oBAAoB,GAAG;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAC,aACnE,OAAO,EAAA,GACR,UAAU,CAAC,SAAS,CAAC,CAIjC;AAED,wDAE4B,GAAG,WAAI,UAQlC;AAED,uCAEC;AAED,yCAUC;AAED,+EAkBC;AAED,oDAEC;AAED,8EAQC;AAED,uDAUC"}
@@ -1,2 +1,75 @@
1
- export { AutoComplete };
1
+ export class AutoComplete extends EventTarget {
2
+ static connect(event: any, options: any): any;
3
+ static textFilter(options: any, propertyName: any): (item: any) => any;
4
+ constructor(parent: any, textInput: any, settings?: {});
5
+ settings: {
6
+ emptyResultsText: string;
7
+ progressive: boolean;
8
+ maxConcurrentCategories: number;
9
+ categoryTimeoutMs: number;
10
+ };
11
+ container: any;
12
+ input: any;
13
+ categories: any;
14
+ caches: Map<any, any>;
15
+ rowIndex: number;
16
+ results: any[];
17
+ requestToken: number;
18
+ on(a: any, b: any): this;
19
+ attach(): void;
20
+ resultsDiv: HTMLDivElement;
21
+ controller(): {
22
+ show: any;
23
+ hide: any;
24
+ clear: any;
25
+ empty: () => void;
26
+ };
27
+ internalController(): {
28
+ show: any;
29
+ hide: any;
30
+ clear: any;
31
+ empty: () => void;
32
+ };
33
+ moveResult(add: any): void;
34
+ getSelectedDiv(): Element;
35
+ selectResult(div: any): void;
36
+ resultClicked: boolean;
37
+ tabWindow: Window;
38
+ setText(options: any): void;
39
+ resultClick(event: any): void;
40
+ blurHandler(): void;
41
+ clear(): void;
42
+ cacheTmr: NodeJS.Timeout;
43
+ show(): void;
44
+ getViewBounds(): {
45
+ rect: any;
46
+ suggestedDirection: string;
47
+ };
48
+ hide(): void;
49
+ empty(): void;
50
+ inputHandler(event: any): Promise<void>;
51
+ keyDownHandler(event: any): void;
52
+ keyUpHandler(event: any): void;
53
+ focusHandler(event: any): void;
54
+ suggest(value: any, event: any): void;
55
+ sort(results: any, options: any): any;
56
+ resultsHandler(results: any, options: any): void;
57
+ acItems: NodeListOf<Element>;
58
+ handleImageOrIcon(item: any): any;
59
+ formatResultItem(item: any, options: any, catHandler: any): any;
60
+ formatCategoryLabel(category: any): any;
61
+ highlight(str: any, find: any): any;
62
+ resultsSignature(list: any): string;
63
+ getCacheKey(options: any): string;
64
+ getItems(options: any, event: any, hooks?: {}): Promise<any>;
65
+ aborter: AbortController;
66
+ aborterSignal: AbortSignal;
67
+ items(options: any, _event: any, hooks?: {}): Promise<any[]>;
68
+ runCategorySearch(options: any, categoryName: any, categoryHandler: any): Promise<any[]>;
69
+ runCategoriesSequentially(options: any, entries: any, hooks?: {}): Promise<any[]>;
70
+ runCategoriesProgressive(options: any, entries: any, hooks?: {}): Promise<any[]>;
71
+ formatSearch(url: any, options: any): any;
72
+ createQueryParam(options: any): string;
73
+ isMatch(options: any, item: any): any;
74
+ }
2
75
  //# sourceMappingURL=pds-autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/js/pds-autocomplete.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"pds-autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/js/pds-autocomplete.js"],"names":[],"mappings":"AAgBA;IAwBC,8CAYC;IA2uBD,qDACqC,SAAI,SAaxC;IA5xBD,wDAqBC;IAlBA;;;;;MAMC;IAED,eAAuB;IACvB,WAAsB;IAEtB,gBAA2C;IAC3C,sBAAuB;IACvB,iBAAkB;IAClB,eAAiB;IACjB,qBAAqB;IAmBtB,yBAGC;IAED,eA8BC;IA7BA,2BAA+C;IA+BhD;;;;;MAMC;IAED;;;;;MAOC;IAED,2BA2BC;IAED,0BAEC;IAED,6BAkDC;IA7CA,uBAAyB;IAWxB,kBAA4D;IAoC9D,4BAiBC;IAED,8BAEC;IAED,oBAKC;IAED,cAWC;IAHA,yBAEiB;IAGlB,aAuBC;IAED;;;MAOC;IAED,aAEC;IAED,cAGC;IAED,wCAkEC;IAED,iCAeC;IAED,+BAmBC;IAED,+BAGC;IAED,sCAgBC;IAED,sCAcC;IAED,iDAuCC;IALC,6BAA0D;IAO5D,kCAQC;IAED,gEAmBC;IAED,wCAKC;IAED,oCAQC;IAED,oCAQC;IAED,kCASC;IAED,6DAqGC;IA/EA,yBAAoC;IACpC,2BAAwC;IAiNzC,6DAYC;IA7ID,yFAwBC;IAED,kFAwCC;IAED,iFA2DC;IAgBD,0CAKC;IAED,uCAGC;IAED,sCAKC;CAiBD"}
@@ -1 +1 @@
1
- {"version":3,"file":"pds-start-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-start-helpers.js"],"names":[],"mappings":"AAsBA,sEAgCC;AAiBD,mDASC;AA6BD,8CAsBC;AAWD;;;;;;;;;;;;;;EAgJC;AAGD;;;;;;;;EAmCC;AAED;;QASC;AAGD;;;;;GA8JC;AA/dM,qDAGI"}
1
+ {"version":3,"file":"pds-start-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-start-helpers.js"],"names":[],"mappings":"AAqCA,sEAgCC;AAiBD,mDASC;AA6BD,8CAsBC;AAWD;;;;;;;;;;;;;;EAgJC;AAGD;;;;;;;;EAmCC;AAED;;QASC;AAGD;;;;;GA8JC;AA/dM,qDAGI"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Create a stateful component with automatic re-rendering on state changes.
3
+ * Each state mutation will automatically re-render the component.
4
+ *
5
+ * @param {Object} initialState - Initial state object
6
+ * @param {Function} renderFn - Function that takes state and returns a DOM fragment
7
+ * @param {HTMLElement} container - Container element where the component will be rendered
8
+ * @returns {State} - The reactive state proxy
9
+ *
10
+ * @example
11
+ * ```javascript
12
+ * import { html, createReactiveComponent } from '#pds';
13
+ *
14
+ * const state = createReactiveComponent(
15
+ * { count: 0, saving: false },
16
+ * (state) => html`
17
+ * <article class="card">
18
+ * <h3>Count: ${state.count}</h3>
19
+ * <button @click=${() => state.count++}>Increment</button>
20
+ * </article>
21
+ * `,
22
+ * document.body
23
+ * );
24
+ *
25
+ * // Mutations automatically update the DOM
26
+ * state.count++; // DOM updates instantly
27
+ * ```
28
+ */
29
+ export function createReactiveComponent(initialState: any, renderFn: Function, container: HTMLElement): State<any>;
30
+ /**
31
+ * Bind a state container to an element, auto-updating specific attributes/properties
32
+ * when the state changes. Useful for partial updates without full re-renders.
33
+ *
34
+ * @param {HTMLElement} element - Element to update
35
+ * @param {State} state - Reactive state container
36
+ * @param {Object} bindings - Map of property names to update handlers
37
+ * @returns {Function} - Cleanup function to remove event listeners
38
+ *
39
+ * @example
40
+ * ```javascript
41
+ * import { bindState, State } from '#pds';
42
+ *
43
+ * const state = new State({ count: 0, saving: false });
44
+ * const article = document.querySelector('article');
45
+ *
46
+ * const unbind = bindState(article, state, {
47
+ * count: (el, value) => {
48
+ * el.dataset.saves = value;
49
+ * el.querySelector('h3').textContent = `Saves: ${value}`;
50
+ * },
51
+ * saving: (el, value) => {
52
+ * const btn = el.querySelector('button');
53
+ * btn.disabled = value;
54
+ * btn.textContent = value ? 'Saving...' : 'Save';
55
+ * }
56
+ * });
57
+ *
58
+ * // Later cleanup
59
+ * unbind();
60
+ * ```
61
+ */
62
+ export function bindState(element: HTMLElement, state: State<any>, bindings: any): Function;
63
+ /**
64
+ * @module pds-reactive
65
+ * @description A simple reactive state wrapper using JavaScript Proxies.
66
+ * Fires custom events ('change' and 'change:propertyName') when state properties are modified.
67
+ *
68
+ * @example
69
+ * ```javascript
70
+ * import { html, State } from '#pds';
71
+ *
72
+ * const state = new State({ count: 0 });
73
+ *
74
+ * // Listen to all changes
75
+ * state.on('change', (e) => console.log('State changed:', e.detail));
76
+ *
77
+ * // Listen to specific property changes
78
+ * state.on('change:count', (e) => console.log('Count changed to:', e.detail.value));
79
+ *
80
+ * // Mutate state naturally
81
+ * state.count++; // Fires events and updates DOM
82
+ * ```
83
+ */
84
+ /**
85
+ * Represents a reactive state container that fires events on property mutations.
86
+ * All modifications trigger custom DOM events that can be used to update the UI.
87
+ *
88
+ * @class State
89
+ * @template T
90
+ * @param {T} initialValue - The initial state object
91
+ * @param {EventTarget} [eventTarget=document] - Where to dispatch events (defaults to document)
92
+ */
93
+ export class State<T> {
94
+ /**
95
+ * Create a reactive state container
96
+ * @param {Object} initialValue - Initial state object
97
+ * @param {EventTarget} [eventTarget] - Optional event target for dispatching events
98
+ */
99
+ constructor(initialValue?: any, eventTarget?: EventTarget);
100
+ }
101
+ //# sourceMappingURL=pds-reactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pds-reactive.d.ts","sourceRoot":"","sources":["../../../../src/js/pds-reactive.js"],"names":[],"mappings":"AAkKA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,0FAtBW,WAAW,cA0CrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,mCA5BW,WAAW,8CAmDrB;AA3QD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;GAQG;AACH,mBAJa,CAAC;IAKZ;;;;OAIG;IACH,8CAFW,WAAW,EA4HrB;CACF"}
@@ -55,5 +55,8 @@ export function loadLocale(locale: any): Promise<any>;
55
55
  export function setLocale(locale: any, options?: {}): Promise<any>;
56
56
  export function getLocalizationState(): any;
57
57
  export function createJSONLocalization(options?: {}): any;
58
- export { PDS };
58
+ import { State } from "./pds-reactive.js";
59
+ import { createReactiveComponent } from "./pds-reactive.js";
60
+ import { bindState } from "./pds-reactive.js";
61
+ export { PDS, State, createReactiveComponent, bindState };
59
62
  //# sourceMappingURL=pds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"AAgoBA,6DAA6D;AAC7D,4CAAsC;AAGtC,6DAA6D;AAC7D,+CAAyC;AAsIzC,mDAsBC;AAGD,4DAuCC;;;;;;;;;;;;;;;;;;;;;;;;;cApzBa,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;;wBAqCnB,oBAAoB;oBAhCxB,oBAAoB;AAyPxC,sDAOC;AAED,yDAMC;AAED,yDA+CC;AAED,sDAGC;AAED,mEAGC;AAED,4CAUC;AAED,0DA+EC"}
1
+ {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../src/js/pds.js"],"names":[],"mappings":"AAioBA,6DAA6D;AAC7D,4CAAsC;AAGtC,6DAA6D;AAC7D,+CAAyC;AA+IzC,mDAsBC;AAGD,4DAuCC;;;;;;;;;;;;;;;;;;;;;;;;;cA9zBa,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;;wBAqCnB,oBAAoB;oBAhCxB,oBAAoB;AA0PxC,sDAOC;AAED,yDAMC;AAED,yDA+CC;AAED,sDAGC;AAED,mEAGC;AAED,4CAUC;AAED,0DA+EC;sBAlXyD,mBAAmB;wCAAnB,mBAAmB;0BAAnB,mBAAmB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.7.57",
4
+ "version": "0.7.58",
5
5
  "description": "Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -89,7 +89,6 @@
89
89
  "CSS-INTELLISENSE-QUICK-REF.md"
90
90
  ],
91
91
  "scripts": {
92
- "test": "echo \"Error: no test specified\" && exit 1",
93
92
  "dev": "node esbuild-dev.js",
94
93
  "prebuild": "npm run types",
95
94
  "build": "node esbuild-build.js",