@kubex/zinc 1.1.40 → 1.1.41

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.
@@ -47,79 +47,6 @@
47
47
  }
48
48
  ]
49
49
  },
50
- {
51
- "kind": "javascript-module",
52
- "path": "components/action-bar/action-bar.js",
53
- "declarations": [
54
- {
55
- "kind": "class",
56
- "description": "",
57
- "name": "ZnActionBar",
58
- "cssProperties": [
59
- {
60
- "description": "An example CSS custom property.",
61
- "name": "--example"
62
- }
63
- ],
64
- "cssParts": [
65
- {
66
- "description": "The component's base wrapper.",
67
- "name": "base"
68
- }
69
- ],
70
- "slots": [
71
- {
72
- "description": "The default slot.",
73
- "name": ""
74
- },
75
- {
76
- "description": "An example slot.",
77
- "name": "example"
78
- }
79
- ],
80
- "members": [
81
- {
82
- "kind": "field",
83
- "name": "localize",
84
- "privacy": "private",
85
- "readonly": true,
86
- "default": "new LocalizeController(this)"
87
- }
88
- ],
89
- "events": [
90
- {
91
- "description": "Emitted as an example.",
92
- "name": "zn-event-name"
93
- }
94
- ],
95
- "superclass": {
96
- "name": "ZincElement",
97
- "module": "/src/internal/zinc-element"
98
- },
99
- "summary": "Short summary of the component's intended use.",
100
- "tagNameWithoutPrefix": "action-bar",
101
- "tagName": "zn-action-bar",
102
- "customElement": true,
103
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
104
- "documentation": "https://zinc.style/components/action-bar",
105
- "status": "experimental",
106
- "since": "1.0",
107
- "dependencies": [
108
- "zn-example"
109
- ]
110
- }
111
- ],
112
- "exports": [
113
- {
114
- "kind": "js",
115
- "name": "default",
116
- "declaration": {
117
- "name": "ZnActionBar",
118
- "module": "components/action-bar/action-bar.js"
119
- }
120
- }
121
- ]
122
- },
123
50
  {
124
51
  "kind": "javascript-module",
125
52
  "path": "components/alert/alert.js",
@@ -296,6 +223,79 @@
296
223
  }
297
224
  ]
298
225
  },
226
+ {
227
+ "kind": "javascript-module",
228
+ "path": "components/action-bar/action-bar.js",
229
+ "declarations": [
230
+ {
231
+ "kind": "class",
232
+ "description": "",
233
+ "name": "ZnActionBar",
234
+ "cssProperties": [
235
+ {
236
+ "description": "An example CSS custom property.",
237
+ "name": "--example"
238
+ }
239
+ ],
240
+ "cssParts": [
241
+ {
242
+ "description": "The component's base wrapper.",
243
+ "name": "base"
244
+ }
245
+ ],
246
+ "slots": [
247
+ {
248
+ "description": "The default slot.",
249
+ "name": ""
250
+ },
251
+ {
252
+ "description": "An example slot.",
253
+ "name": "example"
254
+ }
255
+ ],
256
+ "members": [
257
+ {
258
+ "kind": "field",
259
+ "name": "localize",
260
+ "privacy": "private",
261
+ "readonly": true,
262
+ "default": "new LocalizeController(this)"
263
+ }
264
+ ],
265
+ "events": [
266
+ {
267
+ "description": "Emitted as an example.",
268
+ "name": "zn-event-name"
269
+ }
270
+ ],
271
+ "superclass": {
272
+ "name": "ZincElement",
273
+ "module": "/src/internal/zinc-element"
274
+ },
275
+ "summary": "Short summary of the component's intended use.",
276
+ "tagNameWithoutPrefix": "action-bar",
277
+ "tagName": "zn-action-bar",
278
+ "customElement": true,
279
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
280
+ "documentation": "https://zinc.style/components/action-bar",
281
+ "status": "experimental",
282
+ "since": "1.0",
283
+ "dependencies": [
284
+ "zn-example"
285
+ ]
286
+ }
287
+ ],
288
+ "exports": [
289
+ {
290
+ "kind": "js",
291
+ "name": "default",
292
+ "declaration": {
293
+ "name": "ZnActionBar",
294
+ "module": "components/action-bar/action-bar.js"
295
+ }
296
+ }
297
+ ]
298
+ },
299
299
  {
300
300
  "kind": "javascript-module",
301
301
  "path": "components/animated-button/animated-button.js",
@@ -11343,6 +11343,46 @@
11343
11343
  "default": "''",
11344
11344
  "attribute": "ai-path"
11345
11345
  },
11346
+ {
11347
+ "kind": "field",
11348
+ "name": "storeKey",
11349
+ "type": {
11350
+ "text": "string"
11351
+ },
11352
+ "default": "\"\"",
11353
+ "description": "Caches unsent content while typing and restores it when the editor next loads,\nso agent replies in tickets/chats survive reloads and navigation. Use a key\nunique to the conversation (e.g. the ticket ID). The cache is cleared on submit.",
11354
+ "attribute": "store-key",
11355
+ "reflects": true
11356
+ },
11357
+ {
11358
+ "kind": "field",
11359
+ "name": "storeTtl",
11360
+ "type": {
11361
+ "text": "number"
11362
+ },
11363
+ "default": "86400",
11364
+ "description": "Cached-content expiry in seconds. Defaults to 1 day.",
11365
+ "attribute": "store-ttl",
11366
+ "reflects": true
11367
+ },
11368
+ {
11369
+ "kind": "field",
11370
+ "name": "localStorage",
11371
+ "type": {
11372
+ "text": "boolean"
11373
+ },
11374
+ "description": "Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts.",
11375
+ "attribute": "local-storage",
11376
+ "reflects": true
11377
+ },
11378
+ {
11379
+ "kind": "field",
11380
+ "name": "_store",
11381
+ "type": {
11382
+ "text": "Store"
11383
+ },
11384
+ "privacy": "protected"
11385
+ },
11346
11386
  {
11347
11387
  "kind": "field",
11348
11388
  "name": "quillElement",
@@ -11434,6 +11474,29 @@
11434
11474
  "name": "_handleTextChange",
11435
11475
  "privacy": "private"
11436
11476
  },
11477
+ {
11478
+ "kind": "method",
11479
+ "name": "_isEmpty",
11480
+ "privacy": "private",
11481
+ "parameters": [
11482
+ {
11483
+ "name": "value",
11484
+ "type": {
11485
+ "text": "string"
11486
+ }
11487
+ }
11488
+ ]
11489
+ },
11490
+ {
11491
+ "kind": "method",
11492
+ "name": "_cacheContent",
11493
+ "privacy": "private"
11494
+ },
11495
+ {
11496
+ "kind": "method",
11497
+ "name": "_clearCachedContent",
11498
+ "privacy": "private"
11499
+ },
11437
11500
  {
11438
11501
  "kind": "method",
11439
11502
  "name": "_getQuillKeyboardBindings",
@@ -11608,6 +11671,32 @@
11608
11671
  },
11609
11672
  "default": "''",
11610
11673
  "fieldName": "aiPath"
11674
+ },
11675
+ {
11676
+ "name": "store-key",
11677
+ "type": {
11678
+ "text": "string"
11679
+ },
11680
+ "default": "\"\"",
11681
+ "description": "Caches unsent content while typing and restores it when the editor next loads,\nso agent replies in tickets/chats survive reloads and navigation. Use a key\nunique to the conversation (e.g. the ticket ID). The cache is cleared on submit.",
11682
+ "fieldName": "storeKey"
11683
+ },
11684
+ {
11685
+ "name": "store-ttl",
11686
+ "type": {
11687
+ "text": "number"
11688
+ },
11689
+ "default": "86400",
11690
+ "description": "Cached-content expiry in seconds. Defaults to 1 day.",
11691
+ "fieldName": "storeTtl"
11692
+ },
11693
+ {
11694
+ "name": "local-storage",
11695
+ "type": {
11696
+ "text": "boolean"
11697
+ },
11698
+ "description": "Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts.",
11699
+ "fieldName": "localStorage"
11611
11700
  }
11612
11701
  ],
11613
11702
  "superclass": {
@@ -40086,7 +40175,7 @@
40086
40175
  "package": {
40087
40176
  "name": "@kubex/zinc",
40088
40177
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
40089
- "version": "1.1.40",
40178
+ "version": "1.1.41",
40090
40179
  "author": "",
40091
40180
  "license": "MIT"
40092
40181
  }
@@ -13,17 +13,6 @@
13
13
  }
14
14
  ]
15
15
  },
16
- {
17
- "name": "zn-action-bar",
18
- "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
19
- "attributes": [],
20
- "references": [
21
- {
22
- "name": "Documentation",
23
- "url": "https://zinc.style/components/action-bar"
24
- }
25
- ]
26
- },
27
16
  {
28
17
  "name": "zn-alert",
29
18
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
@@ -63,6 +52,17 @@
63
52
  }
64
53
  ]
65
54
  },
55
+ {
56
+ "name": "zn-action-bar",
57
+ "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
58
+ "attributes": [],
59
+ "references": [
60
+ {
61
+ "name": "Documentation",
62
+ "url": "https://zinc.style/components/action-bar"
63
+ }
64
+ ]
65
+ },
66
66
  {
67
67
  "name": "zn-animated-button",
68
68
  "description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
@@ -1429,7 +1429,22 @@
1429
1429
  { "name": "emojis", "values": [] },
1430
1430
  { "name": "code", "values": [] },
1431
1431
  { "name": "ai", "values": [] },
1432
- { "name": "ai-path", "values": [] }
1432
+ { "name": "ai-path", "values": [] },
1433
+ {
1434
+ "name": "store-key",
1435
+ "description": "Caches unsent content while typing and restores it when the editor next loads,\nso agent replies in tickets/chats survive reloads and navigation. Use a key\nunique to the conversation (e.g. the ticket ID). The cache is cleared on submit.",
1436
+ "values": []
1437
+ },
1438
+ {
1439
+ "name": "store-ttl",
1440
+ "description": "Cached-content expiry in seconds. Defaults to 1 day.",
1441
+ "values": []
1442
+ },
1443
+ {
1444
+ "name": "local-storage",
1445
+ "description": "Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts.",
1446
+ "values": []
1447
+ }
1433
1448
  ],
1434
1449
  "references": [
1435
1450
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.40",
4
+ "version": "1.1.41",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -15,28 +15,6 @@
15
15
  "events": [],
16
16
  "js": { "properties": [], "events": [] }
17
17
  },
18
- {
19
- "name": "zn-action-bar",
20
- "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
21
- "doc-url": "",
22
- "attributes": [],
23
- "slots": [
24
- { "name": "", "description": "The default slot." },
25
- { "name": "example", "description": "An example slot." }
26
- ],
27
- "events": [
28
- { "name": "zn-event-name", "description": "Emitted as an example." }
29
- ],
30
- "js": {
31
- "properties": [],
32
- "events": [
33
- {
34
- "name": "zn-event-name",
35
- "description": "Emitted as an example."
36
- }
37
- ]
38
- }
39
- },
40
18
  {
41
19
  "name": "zn-alert",
42
20
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
@@ -100,6 +78,28 @@
100
78
  ]
101
79
  }
102
80
  },
81
+ {
82
+ "name": "zn-action-bar",
83
+ "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
84
+ "doc-url": "",
85
+ "attributes": [],
86
+ "slots": [
87
+ { "name": "", "description": "The default slot." },
88
+ { "name": "example", "description": "An example slot." }
89
+ ],
90
+ "events": [
91
+ { "name": "zn-event-name", "description": "Emitted as an example." }
92
+ ],
93
+ "js": {
94
+ "properties": [],
95
+ "events": [
96
+ {
97
+ "name": "zn-event-name",
98
+ "description": "Emitted as an example."
99
+ }
100
+ ]
101
+ }
102
+ },
103
103
  {
104
104
  "name": "zn-animated-button",
105
105
  "description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
@@ -3289,6 +3289,21 @@
3289
3289
  {
3290
3290
  "name": "ai-path",
3291
3291
  "value": { "type": "string", "default": "''" }
3292
+ },
3293
+ {
3294
+ "name": "store-key",
3295
+ "description": "Caches unsent content while typing and restores it when the editor next loads,\nso agent replies in tickets/chats survive reloads and navigation. Use a key\nunique to the conversation (e.g. the ticket ID). The cache is cleared on submit.",
3296
+ "value": { "type": "string", "default": "\"\"" }
3297
+ },
3298
+ {
3299
+ "name": "store-ttl",
3300
+ "description": "Cached-content expiry in seconds. Defaults to 1 day.",
3301
+ "value": { "type": "number", "default": "86400" }
3302
+ },
3303
+ {
3304
+ "name": "local-storage",
3305
+ "description": "Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts.",
3306
+ "value": { "type": "boolean" }
3292
3307
  }
3293
3308
  ],
3294
3309
  "slots": [
@@ -3316,6 +3331,21 @@
3316
3331
  { "name": "codeEnabled", "type": "boolean" },
3317
3332
  { "name": "aiEnabled", "type": "boolean" },
3318
3333
  { "name": "aiPath", "type": "string" },
3334
+ {
3335
+ "name": "storeKey",
3336
+ "description": "Caches unsent content while typing and restores it when the editor next loads,\nso agent replies in tickets/chats survive reloads and navigation. Use a key\nunique to the conversation (e.g. the ticket ID). The cache is cleared on submit.",
3337
+ "type": "string"
3338
+ },
3339
+ {
3340
+ "name": "storeTtl",
3341
+ "description": "Cached-content expiry in seconds. Defaults to 1 day.",
3342
+ "type": "number"
3343
+ },
3344
+ {
3345
+ "name": "localStorage",
3346
+ "description": "Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts.",
3347
+ "type": "boolean"
3348
+ },
3319
3349
  { "name": "validity", "type": "ValidityState" },
3320
3350
  { "name": "validationMessage", "type": "string" }
3321
3351
  ],
package/dist/zn.d.ts CHANGED
@@ -6245,6 +6245,7 @@ declare module "components/editor/modules/time-tracking/time-tracking" {
6245
6245
  }
6246
6246
  declare module "components/editor/editor.component" {
6247
6247
  import { type CSSResultGroup, type PropertyValues } from 'lit';
6248
+ import { Store } from "internal/storage";
6248
6249
  import ZincElement from "internal/zinc-element";
6249
6250
  import type { ZincFormControl } from "internal/zinc-element";
6250
6251
  export interface EditorFeatureConfig {
@@ -6297,6 +6298,17 @@ declare module "components/editor/editor.component" {
6297
6298
  codeEnabled: boolean;
6298
6299
  aiEnabled: boolean;
6299
6300
  aiPath: string;
6301
+ /**
6302
+ * Caches unsent content while typing and restores it when the editor next loads,
6303
+ * so agent replies in tickets/chats survive reloads and navigation. Use a key
6304
+ * unique to the conversation (e.g. the ticket ID). The cache is cleared on submit.
6305
+ */
6306
+ storeKey: string;
6307
+ /** Cached-content expiry in seconds. Defaults to 1 day. */
6308
+ storeTtl: number;
6309
+ /** Cache to localStorage instead of sessionStorage, persisting across tabs and browser restarts. */
6310
+ localStorage: boolean;
6311
+ protected _store: Store;
6300
6312
  private quillElement;
6301
6313
  private _content;
6302
6314
  private _selectionRange;
@@ -6306,8 +6318,12 @@ declare module "components/editor/editor.component" {
6306
6318
  getForm(): HTMLFormElement | null;
6307
6319
  reportValidity(): boolean;
6308
6320
  setCustomValidity(message: string): void;
6321
+ connectedCallback(): void;
6309
6322
  protected firstUpdated(_changedProperties: PropertyValues): void;
6310
6323
  private _handleTextChange;
6324
+ private _isEmpty;
6325
+ private _cacheContent;
6326
+ private _clearCachedContent;
6311
6327
  private _getQuillKeyboardBindings;
6312
6328
  private _handleEditorChange;
6313
6329
  private _replaceTextAtSelection;