@molecule/app-settings-container-svelte 0.0.1-stage → 1.1.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.
Files changed (2) hide show
  1. package/README.md +223 -4
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,230 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-11-21T12:47:16.695Z
7
+ -->
8
+
1
9
  # @molecule/app-settings-container-svelte
2
10
 
3
- Svelte layout for Settings pages (sidebar + content + section cards)
11
+ Svelte Settings-page scaffold (layout chrome only) — the Svelte counterpart
12
+ of `@molecule/app-settings-container-react`, with the same props and the
13
+ same DOM for the same input.
14
+
15
+ Exports:
16
+
17
+ - `SettingsLayout` — two-column [sidebar, content] with an optional `header`
18
+ slot rendered above both.
19
+ - `SettingsSidebar` — controlled side-nav (`items`, `activeId`, `onSelect`,
20
+ optional `footer`); `SettingsSidebarItem` is `{ id, label, icon? }`.
21
+ - `SettingsContent` — stacked wrapper for the right column.
22
+ - `SettingsSection` — Card-wrapped titled section (`title`, `description?`,
23
+ `footer?` action row, `dataMolId?`).
24
+
25
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
26
+ > It is written to be read by coding agents as much as by people, and is generated from this
27
+ > package's source — edit `src/index.ts` JSDoc, not this file.
28
+
29
+ ## Quick Start
30
+
31
+ ```svelte
32
+ <script lang="ts">
33
+ import {
34
+ SettingsContent,
35
+ SettingsLayout,
36
+ SettingsSection,
37
+ SettingsSidebar,
38
+ } from '@molecule/app-settings-container-svelte'
39
+
40
+ const NAV = [
41
+ { id: 'profile', label: 'Profile' },
42
+ { id: 'notifications', label: 'Notifications' },
43
+ ]
44
+
45
+ let active = $state('profile')
46
+ </script>
47
+
48
+ <SettingsLayout>
49
+ {#snippet header()}
50
+ <h1>Settings</h1>
51
+ {/snippet}
52
+ {#snippet sidebar()}
53
+ <SettingsSidebar items={NAV} activeId={active} onSelect={(id) => (active = id)} />
54
+ {/snippet}
55
+ <SettingsContent>
56
+ <SettingsSection title="Profile" description="Update your display name and avatar.">
57
+ <p>Form fields go here.</p>
58
+ </SettingsSection>
59
+ </SettingsContent>
60
+ </SettingsLayout>
61
+ ```
62
+
63
+ ## Type
64
+
65
+ `feature`
66
+
67
+ ## Installation
68
+
69
+ ```bash
70
+ npm install @molecule/app-settings-container-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
71
+ ```
72
+
73
+ ## API
74
+
75
+ ### Interfaces
76
+
77
+ #### `SettingsLayoutProps`
78
+
79
+ Props accepted by the {@link SettingsLayout} component.
80
+
81
+ ```typescript
82
+ interface SettingsLayoutProps {
83
+ /** Left-side navigation (typically `<SettingsSidebar>`). */
84
+ sidebar?: Snippet
85
+ /** Main content area (usually one or more `<SettingsSection>`s) — the default content. */
86
+ children?: Snippet
87
+ /**
88
+ * Optional header (breadcrumb, title, save button) rendered above both
89
+ * columns. NOT sticky — apply your own sticky positioning if needed.
90
+ */
91
+ header?: Snippet
92
+ /** Extra classes on the outer wrapper. */
93
+ className?: string
94
+ /** `data-mol-id` for AI-agent selectors. */
95
+ dataMolId?: string
96
+ }
97
+ ```
98
+
99
+ #### `SettingsContentProps`
100
+
101
+ Props accepted by the {@link SettingsContent} component.
102
+
103
+ ```typescript
104
+ interface SettingsContentProps {
105
+ /** Active section content — the default content. */
106
+ children?: Snippet
107
+ /** Extra classes. */
108
+ className?: string
109
+ }
110
+ ```
111
+
112
+ #### `SettingsSidebarItem`
113
+
114
+ A single navigable item in the settings sidebar.
4
115
 
116
+ ```typescript
117
+ interface SettingsSidebarItem {
118
+ /** Unique id; the active item is the one whose id equals `activeId`. */
119
+ id: string
120
+ /** Visible label — a snippet or plain text. */
121
+ label: Snippet | string
122
+ /** Optional leading icon — a snippet or plain text. */
123
+ icon?: Snippet | string
124
+ }
5
125
  ```
6
- npm install @molecule/app-settings-container-svelte
126
+
127
+ #### `SettingsSidebarProps`
128
+
129
+ Props accepted by the {@link SettingsSidebar} component.
130
+
131
+ ```typescript
132
+ interface SettingsSidebarProps {
133
+ /** Items to render, in order. */
134
+ items: SettingsSidebarItem[]
135
+ /** The id of the active item (controlled — the caller owns it). */
136
+ activeId: string
137
+ /** Called with the clicked item's id. */
138
+ onSelect: (id: string) => void
139
+ /** Optional footer inside the sidebar (sign-out, plan indicator). */
140
+ footer?: Snippet | string
141
+ /**
142
+ * Accessible name for the `<nav>` region. Overrides the translated /
143
+ * `defaultValue` `'Settings'` (prop > `t()` > default).
144
+ */
145
+ ariaLabel?: string
146
+ /** Extra classes. */
147
+ className?: string
148
+ }
149
+ ```
150
+
151
+ #### `SettingsSectionProps`
152
+
153
+ Props accepted by the {@link SettingsSection} component.
154
+
155
+ ```typescript
156
+ interface SettingsSectionProps {
157
+ /** Section heading — a snippet or plain text. */
158
+ title?: Snippet | string
159
+ /** Optional description under the heading — a snippet or plain text. */
160
+ description?: Snippet | string
161
+ /** Section body — the default content. */
162
+ children?: Snippet
163
+ /** Optional footer row (save button, last-saved indicator) — a snippet or plain text. */
164
+ footer?: Snippet | string
165
+ /** Extra classes on the Card. */
166
+ className?: string
167
+ /** `data-mol-id` for AI-agent selectors. */
168
+ dataMolId?: string
169
+ }
170
+ ```
171
+
172
+ ### Constants
173
+
174
+ #### `SettingsContent`
175
+
176
+ ```typescript
177
+ const SettingsContent: LegacyComponentType
178
+ ```
179
+
180
+ #### `SettingsLayout`
181
+
182
+ ```typescript
183
+ const SettingsLayout: LegacyComponentType
7
184
  ```
8
185
 
9
- Part of the [Molecule](https://www.molecule.dev) package fleet. This page carries the manifest summary; the full generated documentation ships with the package's first committed version.
186
+ #### `SettingsSection`
187
+
188
+ ```typescript
189
+ const SettingsSection: LegacyComponentType
190
+ ```
191
+
192
+ #### `SettingsSidebar`
193
+
194
+ ```typescript
195
+ const SettingsSidebar: LegacyComponentType
196
+ ```
197
+
198
+ ## Injection Notes
199
+
200
+ ### Requirements
201
+
202
+ Peer dependencies:
203
+
204
+ - `@molecule/app-svelte` ^3.5.0
205
+ - `@molecule/app-ui` ^1.0.1
206
+ - `@molecule/app-ui-svelte` ^1.1.0
207
+ - `svelte` ^5.0.0
208
+
209
+ ### Runtime Dependencies
210
+
211
+ - `@molecule/app-svelte`
212
+ - `@molecule/app-ui`
213
+ - `@molecule/app-ui-svelte`
214
+ - `svelte`
215
+
216
+ - The `header` snippet is rendered above the columns but is NOT sticky —
217
+ apply your own sticky positioning if you need it pinned.
218
+ - The two columns do not collapse responsively — swap the sidebar for a
219
+ drawer on small screens yourself.
220
+ - Requires a bonded ClassMap. Labels are your own snippets or text
221
+ (translate upstream); the sidebar nav's `aria-label="Settings"` is
222
+ hardcoded English.
223
+ - Don't confuse with `@molecule/app-settings-panel-svelte`: that package is
224
+ the batteries-included panel (prebuilt Account/Auth/Billing/… sections
225
+ wired to molecule APIs). THIS package is empty layout chrome for building
226
+ your own settings pages.
227
+
228
+ ## Translations
10
229
 
11
- License: Apache-2.0
230
+ Translation strings are provided by `@molecule/app-locales-settings-container`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-settings-container-svelte",
3
- "version": "0.0.1-stage",
3
+ "version": "1.1.0",
4
4
  "description": "Svelte layout for Settings pages (sidebar + content + section cards)",
5
5
  "homepage": "https://www.molecule.dev/packages/app-settings-container-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.2",
61
- "@molecule/app-ui": "1.4.0",
62
- "@molecule/app-ui-svelte": "1.1.7",
60
+ "@molecule/app-svelte": "3.9.0",
61
+ "@molecule/app-ui": "1.5.0",
62
+ "@molecule/app-ui-svelte": "1.2.1",
63
63
  "@sveltejs/package": "3.0.2",
64
64
  "@sveltejs/vite-plugin-svelte": "7.1.2",
65
65
  "@types/node": "26.6.5",