@molecule/app-timeline-svelte 1.1.0 → 1.1.2

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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-21T12:47:37.870Z
6
+ Generated: 2026-11-25T19:00:13.131Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-timeline-svelte
@@ -179,7 +179,7 @@ Peer dependencies:
179
179
 
180
180
  - `@molecule/app-svelte` ^3.5.0
181
181
  - `@molecule/app-ui` ^1.0.1
182
- - `@molecule/app-ui-svelte` ^1.1.0
182
+ - `@molecule/app-ui-svelte` ^1.6.0
183
183
  - `svelte` ^5.0.0
184
184
 
185
185
  ### Runtime Dependencies
@@ -21,14 +21,14 @@
21
21
  {#if typeof emptyState === 'string' || typeof emptyState === 'number'}
22
22
  {emptyState}
23
23
  {:else}
24
- {@render emptyState()}
24
+ {@render emptyState?.()}
25
25
  {/if}
26
26
  {:else}
27
27
  <div class={cm.cn(cm.stack(0 as const), className)}>
28
28
  {#each events as event, i (event.id)}
29
29
  {@const prev = i > 0 ? events[i - 1] : undefined}
30
30
  <div>
31
- {#if renderDateSeparator}{@render renderDateSeparator(event, prev)}{/if}
31
+ {#if renderDateSeparator}{@render renderDateSeparator?.(event, prev)}{/if}
32
32
  <TimelineEvent {event} isLast={i === events.length - 1} />
33
33
  </div>
34
34
  {/each}
@@ -22,5 +22,5 @@
22
22
  className,
23
23
  )}
24
24
  >
25
- <span class={cm.flex1}>{@render children()}</span>
25
+ <span class={cm.flex1}>{@render children?.()}</span>
26
26
  </div>
@@ -22,14 +22,14 @@
22
22
  {#if typeof event.timestamp === 'string' || typeof event.timestamp === 'number'}
23
23
  {event.timestamp}
24
24
  {:else}
25
- {@render event.timestamp()}
25
+ {@render event.timestamp?.()}
26
26
  {/if}
27
27
  </div>
28
28
  <div class={cm.cn(cm.textSize('sm'), cm.fontWeight('semibold'))}>
29
29
  {#if typeof event.title === 'string' || typeof event.title === 'number'}
30
30
  {event.title}
31
31
  {:else}
32
- {@render event.title()}
32
+ {@render event.title?.()}
33
33
  {/if}
34
34
  </div>
35
35
  {#if event.body}
@@ -37,7 +37,7 @@
37
37
  {#if typeof event.body === 'string' || typeof event.body === 'number'}
38
38
  {event.body}
39
39
  {:else}
40
- {@render event.body()}
40
+ {@render event.body?.()}
41
41
  {/if}
42
42
  </div>
43
43
  {/if}
@@ -6,8 +6,8 @@
6
6
  -->
7
7
  <script lang="ts">
8
8
  import { getClassMap } from '@molecule/app-ui'
9
+ import { type CSSStyle, reactStyle } from '@molecule/app-ui-svelte'
9
10
 
10
- import { type CSSStyle, reactStyle } from './style.js'
11
11
  import type { TimelineRailProps } from './types.js'
12
12
 
13
13
  let { marker, connector = true, className }: TimelineRailProps = $props()
@@ -29,7 +29,7 @@
29
29
  {:else if typeof marker === 'string' || typeof marker === 'number'}
30
30
  {marker}
31
31
  {:else}
32
- {@render marker()}
32
+ {@render marker?.()}
33
33
  {/if}
34
34
  </div>
35
35
  {#if connector}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-timeline-svelte",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Svelte chronological timeline with event rails and date markers",
5
5
  "homepage": "https://www.molecule.dev/packages/app-timeline-svelte",
6
6
  "type": "module",
@@ -50,20 +50,20 @@
50
50
  "peerDependencies": {
51
51
  "@molecule/app-svelte": "^3.5.0",
52
52
  "@molecule/app-ui": "^1.0.1",
53
- "@molecule/app-ui-svelte": "^1.1.0",
53
+ "@molecule/app-ui-svelte": "^1.6.0",
54
54
  "svelte": "^5.0.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@molecule/app-framework-conformance": "0.0.0",
58
- "@molecule/app-i18n": "1.2.2",
58
+ "@molecule/app-i18n": "1.3.0",
59
59
  "@molecule/app-icons": "1.0.4",
60
- "@molecule/app-svelte": "3.9.0",
61
- "@molecule/app-ui": "1.5.0",
62
- "@molecule/app-ui-svelte": "1.2.1",
60
+ "@molecule/app-svelte": "3.16.0",
61
+ "@molecule/app-ui": "1.13.0",
62
+ "@molecule/app-ui-svelte": "1.9.0",
63
63
  "@sveltejs/package": "3.0.2",
64
64
  "@sveltejs/vite-plugin-svelte": "7.1.2",
65
65
  "@types/node": "26.6.5",
66
- "jsdom": "30.1.3",
66
+ "jsdom": "31.0.1",
67
67
  "svelte": "5.57.2",
68
68
  "svelte-check": "4.7.7",
69
69
  "typescript": "6.0.3",
package/dist/style.d.ts DELETED
@@ -1,23 +0,0 @@
1
- /**
2
- * Inline style application for the timeline: a Svelte action that applies a
3
- * React-shaped style object the way react-dom does, so the declarations land on
4
- * the element through the CSSOM exactly as React's runtime leaves them.
5
- *
6
- * @module
7
- */
8
- /** Inline style declarations, keyed by their CSS property name. */
9
- export type CSSStyle = Record<string, string | undefined>;
10
- /**
11
- * Svelte action applying a style object the way React does: every entry is
12
- * assigned through the CSSOM property setter, an empty or missing value clears
13
- * the property (which also clears a shorthand's longhands, something
14
- * `removeProperty` does not do), and keys removed by a re-render are cleared.
15
- *
16
- * @param node - The element to style.
17
- * @param style - The style declarations.
18
- * @returns The action with an update that re-applies on prop changes.
19
- */
20
- export declare function reactStyle(node: HTMLElement, style: CSSStyle | undefined): {
21
- update: (next: CSSStyle | undefined) => void;
22
- };
23
- //# sourceMappingURL=style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;AAEzD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,QAAQ,GAAG,SAAS,GAC1B;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAA;CAAE,CAoBlD"}
package/dist/style.js DELETED
@@ -1,40 +0,0 @@
1
- /**
2
- * Inline style application for the timeline: a Svelte action that applies a
3
- * React-shaped style object the way react-dom does, so the declarations land on
4
- * the element through the CSSOM exactly as React's runtime leaves them.
5
- *
6
- * @module
7
- */
8
- /**
9
- * Svelte action applying a style object the way React does: every entry is
10
- * assigned through the CSSOM property setter, an empty or missing value clears
11
- * the property (which also clears a shorthand's longhands, something
12
- * `removeProperty` does not do), and keys removed by a re-render are cleared.
13
- *
14
- * @param node - The element to style.
15
- * @param style - The style declarations.
16
- * @returns The action with an update that re-applies on prop changes.
17
- */
18
- export function reactStyle(node, style) {
19
- const applied = new Set();
20
- const apply = (next) => {
21
- const removed = new Set(applied);
22
- if (next) {
23
- for (const [name, value] of Object.entries(next)) {
24
- removed.delete(name);
25
- const text = value === undefined ? '' : value.trim();
26
- node.style.setProperty(name, text);
27
- if (text)
28
- applied.add(name);
29
- else
30
- applied.delete(name);
31
- }
32
- }
33
- for (const name of removed) {
34
- node.style.setProperty(name, '');
35
- applied.delete(name);
36
- }
37
- };
38
- apply(style);
39
- return { update: apply };
40
- }