@marianmeres/stuic 1.103.0 → 1.104.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.
@@ -5,21 +5,19 @@ export const isTHCNotEmpty = (m) => _is(m) || _is(m?.text) || _is(m?.html) || m?
5
5
  <script>export let thc;
6
6
  export let forceAsHtml = false;
7
7
  export let allowCastToStringFallback = true;
8
- export let transform = void 0;
9
- const _transform = (s) => typeof transform === "function" ? transform(s) : s;
10
8
  </script>
11
9
 
12
10
  {#if typeof thc === 'string'}
13
- {#if forceAsHtml}{@html _transform(thc)}{:else}{_transform(thc)}{/if}
11
+ {#if forceAsHtml}{@html thc}{:else}{thc}{/if}
14
12
  {:else if thc?.text}
15
- {#if forceAsHtml}{@html _transform(thc.text)}{:else}{_transform(thc.text)}{/if}
13
+ {#if forceAsHtml}{@html thc.text}{:else}{thc.text}{/if}
16
14
  {:else if thc?.html}
17
- {@html _transform(thc.html)}
15
+ {@html thc.html}
18
16
  {:else if thc?.component}
19
17
  <svelte:component this={thc.component} {...thc?.props || {}} {...$$restProps || {}} />
20
18
  {:else if allowCastToStringFallback}
21
19
  <!-- cast to string as the last resort (if enabled) -->
22
- {_transform(thc)}
20
+ {thc}
23
21
  {:else}
24
22
  <!-- silence -->
25
23
  {/if}
@@ -17,7 +17,6 @@ declare const __propDef: {
17
17
  thc: THC;
18
18
  forceAsHtml?: boolean | undefined;
19
19
  allowCastToStringFallback?: boolean | undefined;
20
- transform?: undefined | ((s: string) => string);
21
20
  };
22
21
  events: {
23
22
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.103.0",
3
+ "version": "1.104.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",