@marianmeres/stuic 1.31.0 → 1.32.0

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.
@@ -144,6 +144,8 @@ export class AlertConfirmPromptConfig {
144
144
  error: void 0,
145
145
  spinner: void 0
146
146
  };
147
+ // conveniently hoisted THC option, since all content is rendered via THC
148
+ static forceAsHtml = void 0;
147
149
  }
148
150
  const _isFn = (v) => typeof v === "function";
149
151
  </script>
@@ -153,6 +155,13 @@ const clog = createClog("AlertConfirmPrompt");
153
155
  export let acp;
154
156
  $:
155
157
  dialog = $acp[0];
158
+ let forceAsHtml = void 0;
159
+ $:
160
+ if (dialog) {
161
+ forceAsHtml = dialog.forceAsHtml ?? AlertConfirmPromptConfig.forceAsHtml;
162
+ } else {
163
+ forceAsHtml = void 0;
164
+ }
156
165
  let _dialogEl;
157
166
  let _formEl;
158
167
  let value = null;
@@ -329,7 +338,7 @@ $:
329
338
  data-acp-variant={dialog?.variant}
330
339
  data-acp-is-pending={isPending}
331
340
  >
332
- <Thc thc={dialog.title} />
341
+ <Thc thc={dialog.title} {forceAsHtml} />
333
342
  </h1>
334
343
  {#if dialog.content}
335
344
  <div
@@ -338,7 +347,7 @@ $:
338
347
  data-acp-variant={dialog?.variant}
339
348
  data-acp-is-pending={isPending}
340
349
  >
341
- <Thc thc={dialog.content} />
350
+ <Thc thc={dialog.content} {forceAsHtml} />
342
351
  </div>
343
352
  {/if}
344
353
  {#if dialog.type === PROMPT}
@@ -399,7 +408,7 @@ $:
399
408
  data-acp-is-pending={isPending}
400
409
  disabled={isPending}
401
410
  >
402
- <Thc thc={dialog.labelCancel} />
411
+ <Thc thc={dialog.labelCancel} {forceAsHtml} />
403
412
  </Button>
404
413
  </li>
405
414
  {/if}
@@ -426,7 +435,7 @@ $:
426
435
  data-acp-is-pending={isPending}
427
436
  disabled={isPending}
428
437
  >
429
- <Thc thc={dialog.labelCustom} />
438
+ <Thc thc={dialog.labelCustom} {forceAsHtml} />
430
439
  </Button>
431
440
  </li>
432
441
  {/if}
@@ -447,7 +456,7 @@ $:
447
456
  disabled={isPending}
448
457
  variant="primary"
449
458
  >
450
- <Thc thc={dialog.labelOk} />
459
+ <Thc thc={dialog.labelOk} {forceAsHtml} />
451
460
  </Button>
452
461
  </li>
453
462
  </menu>
@@ -81,6 +81,7 @@ export declare class AlertConfirmPromptConfig {
81
81
  error: undefined;
82
82
  spinner: undefined;
83
83
  };
84
+ static forceAsHtml: undefined;
84
85
  }
85
86
  declare const __propDef: {
86
87
  props: {
@@ -37,6 +37,7 @@ export interface AlertConfirmPromptOptions extends Record<string, any> {
37
37
  button: string;
38
38
  spinnerBox: string;
39
39
  }>;
40
+ forceAsHtml?: boolean;
40
41
  }
41
42
  export declare const createAlertConfirmPromptStore: () => {
42
43
  subscribe: (cb: import("@marianmeres/store").Subscribe<AlertConfirmPromptOptions[]>) => import("@marianmeres/store").Unsubscribe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",