@molecule/app-list-item-row-svelte 1.1.1 → 1.2.1

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-17T04:21:40.230Z
6
+ Generated: 2026-11-18T19:30:11.638Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-list-item-row-svelte
@@ -75,6 +75,8 @@ interface ListItemRowProps {
75
75
  leading?: Snippet | string | number
76
76
  /** Optional right-side actions (buttons, action menu). A snippet renders inline. */
77
77
  actions?: Snippet | string | number
78
+ /** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
79
+ toggle?: OptimisticToggleButtonProps
78
80
  /**
79
81
  * Called when the row is activated. The whole row is clickable through a
80
82
  * transparent native button over it, named by the title; the inner controls
@@ -8,6 +8,7 @@
8
8
  -->
9
9
  <script lang="ts">
10
10
  import { getClassMap } from '@molecule/app-ui'
11
+ import { OptimisticToggleButton } from '@molecule/app-ui-svelte'
11
12
 
12
13
  import type { ListItemRowProps } from './types.js'
13
14
 
@@ -17,6 +18,7 @@
17
18
  metadata,
18
19
  leading,
19
20
  actions,
21
+ toggle,
20
22
  onClick,
21
23
  selected,
22
24
  disabled,
@@ -62,7 +64,7 @@
62
64
  {/if}
63
65
  {#if leading}
64
66
  <div class={cm.shrink0}>
65
- {#if typeof leading === 'function'}{@render leading()}{:else}{leading}{/if}
67
+ {#if typeof leading === 'function'}{@render leading?.()}{:else}{leading}{/if}
66
68
  </div>
67
69
  {/if}
68
70
  <div class={cm.cn(cm.flex1, cm.stack(0))}>
@@ -70,22 +72,27 @@
70
72
  id={onClick ? nameId : undefined}
71
73
  class={cm.cn(cm.textSize('sm'), cm.fontWeight('semibold'))}
72
74
  >
73
- {#if typeof title === 'function'}{@render title()}{:else}{title}{/if}
75
+ {#if typeof title === 'function'}{@render title?.()}{:else}{title}{/if}
74
76
  </div>
75
77
  {#if subtitle}
76
78
  <div class={cm.textSize('sm')}>
77
- {#if typeof subtitle === 'function'}{@render subtitle()}{:else}{subtitle}{/if}
79
+ {#if typeof subtitle === 'function'}{@render subtitle?.()}{:else}{subtitle}{/if}
78
80
  </div>
79
81
  {/if}
80
82
  {#if metadata}
81
83
  <div class={cm.textSize('xs')}>
82
- {#if typeof metadata === 'function'}{@render metadata()}{:else}{metadata}{/if}
84
+ {#if typeof metadata === 'function'}{@render metadata?.()}{:else}{metadata}{/if}
83
85
  </div>
84
86
  {/if}
85
87
  </div>
86
- {#if actions}
88
+ {#if toggle || actions}
87
89
  <div class={cm.cn(cm.shrink0, cm.position('relative'))}>
88
- {#if typeof actions === 'function'}{@render actions()}{:else}{actions}{/if}
90
+ {#if toggle}
91
+ <OptimisticToggleButton {...toggle} />
92
+ {/if}
93
+ {#if actions}
94
+ {#if typeof actions === 'function'}{@render actions?.()}{:else}{actions}{/if}
95
+ {/if}
89
96
  </div>
90
97
  {/if}
91
98
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemRow.svelte.d.ts","sourceRoot":"","sources":["../src/ListItemRow.svelte"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAoEnD,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ListItemRow.svelte.d.ts","sourceRoot":"","sources":["../src/ListItemRow.svelte"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA2EnD,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
package/dist/types.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * @module
5
5
  */
6
6
  import type { Snippet } from 'svelte';
7
+ import type { OptimisticToggleButtonProps } from '@molecule/app-ui-svelte';
7
8
  /** Props accepted by the {@link ListItemRow} component. */
8
9
  export interface ListItemRowProps {
9
10
  /** Title — first line. A snippet renders inline. */
@@ -16,6 +17,8 @@ export interface ListItemRowProps {
16
17
  leading?: Snippet | string | number;
17
18
  /** Optional right-side actions (buttons, action menu). A snippet renders inline. */
18
19
  actions?: Snippet | string | number;
20
+ /** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
21
+ toggle?: OptimisticToggleButtonProps;
19
22
  /**
20
23
  * Called when the row is activated. The whole row is clickable through a
21
24
  * transparent native button over it, named by the title; the inner controls
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACpC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACnC,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACnC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAE1E,2DAA2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACpC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACnC,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACnC,oGAAoG;IACpG,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACnC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-list-item-row-svelte",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "description": "Thumbnail + title + subtitle + metadata + actions row (nav lists, mobile menus)",
5
5
  "homepage": "https://www.molecule.dev/packages/app-list-item-row-svelte",
6
6
  "type": "module",
@@ -57,13 +57,13 @@
57
57
  "@molecule/app-framework-conformance": "0.0.0",
58
58
  "@molecule/app-i18n": "1.2.2",
59
59
  "@molecule/app-icons": "1.0.4",
60
- "@molecule/app-svelte": "3.7.1",
61
- "@molecule/app-ui": "1.4.0",
62
- "@molecule/app-ui-svelte": "1.1.6",
60
+ "@molecule/app-svelte": "3.13.0",
61
+ "@molecule/app-ui": "1.5.0",
62
+ "@molecule/app-ui-svelte": "1.4.1",
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",