@molecule/app-list-item-row-svelte 1.1.1 → 1.2.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.
- package/README.md +3 -1
- package/dist/ListItemRow.svelte +9 -2
- package/dist/ListItemRow.svelte.d.ts.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
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-
|
|
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
|
package/dist/ListItemRow.svelte
CHANGED
|
@@ -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,
|
|
@@ -83,9 +85,14 @@
|
|
|
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
|
|
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":"
|
|
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
|
package/dist/types.d.ts.map
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "1.2.0",
|
|
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,9 +57,9 @@
|
|
|
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.
|
|
60
|
+
"@molecule/app-svelte": "3.7.2",
|
|
61
61
|
"@molecule/app-ui": "1.4.0",
|
|
62
|
-
"@molecule/app-ui-svelte": "1.1.
|
|
62
|
+
"@molecule/app-ui-svelte": "1.1.7",
|
|
63
63
|
"@sveltejs/package": "3.0.2",
|
|
64
64
|
"@sveltejs/vite-plugin-svelte": "7.1.2",
|
|
65
65
|
"@types/node": "26.6.5",
|