@molecule/app-legal-pages-solid 0.0.1-stage → 1.1.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 +530 -4
- package/dist/ContentPageShell.d.ts.map +1 -1
- package/dist/ContentPageShell.jsx +26 -23
- package/dist/ContentPageShell.jsx.map +1 -1
- package/dist/LegalModalLinks.d.ts.map +1 -1
- package/dist/LegalModalLinks.jsx +11 -3
- package/dist/LegalModalLinks.jsx.map +1 -1
- package/dist/PrivacyPage.d.ts +1 -1
- package/dist/PrivacyPage.d.ts.map +1 -1
- package/dist/PrivacyPage.jsx +11 -9
- package/dist/PrivacyPage.jsx.map +1 -1
- package/dist/TermsPage.d.ts +1 -1
- package/dist/TermsPage.d.ts.map +1 -1
- package/dist/TermsPage.jsx +11 -9
- package/dist/TermsPage.jsx.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,11 +1,537 @@
|
|
|
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-24T08:58:54.360Z
|
|
7
|
+
-->
|
|
8
|
+
|
|
1
9
|
# @molecule/app-legal-pages-solid
|
|
2
10
|
|
|
3
|
-
Solid page scaffolds for Terms, Privacy, and PlanUpdated
|
|
11
|
+
Solid page scaffolds for Terms, Privacy, and PlanUpdated.
|
|
12
|
+
|
|
13
|
+
Exports:
|
|
14
|
+
|
|
15
|
+
- Drop-in pages: `<TermsPage>`, `<PrivacyPage>` (boilerplate bodies with
|
|
16
|
+
configurable i18n keys), `<PlanUpdatedPage>` (post-checkout confirmation).
|
|
17
|
+
- Bonded-content pages: `<LegalContentPage kind="privacy" | "terms">` — renders
|
|
18
|
+
the SAME legal HTML as the footer modals (`content.privacyPolicy` /
|
|
19
|
+
`content.termsOfService` from `@molecule/app-locales-legal-default`), inside
|
|
20
|
+
the branded `<ContentPageShell>`.
|
|
21
|
+
- In-place modals: `<LegalModalLinks>` + `useLegalModals()` — Privacy/Terms
|
|
22
|
+
triggers that open modals instead of navigating.
|
|
23
|
+
- Primitives: `<ContentPageShell>` (hero band + surface card),
|
|
24
|
+
`<LegalPageLayout>`, `<LegalPageSection>`.
|
|
25
|
+
|
|
26
|
+
This is the Solid counterpart of `@molecule/app-legal-pages-react`: the same
|
|
27
|
+
export names, the same props (React names), the same ClassMap tokens and the
|
|
28
|
+
same DOM for the same input. Switching framework is a change of package name
|
|
29
|
+
in the imports only.
|
|
30
|
+
|
|
31
|
+
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
32
|
+
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
33
|
+
> package's source — edit `src/index.ts` JSDoc, not this file.
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { ContentPageShell, LegalPageLayout, LegalPageSection, TermsPage } from '@molecule/app-legal-pages-solid'
|
|
39
|
+
|
|
40
|
+
// Drop-in Terms page (boilerplate body):
|
|
41
|
+
<TermsPage />
|
|
42
|
+
|
|
43
|
+
// Custom Terms page with structured sections:
|
|
44
|
+
<ContentPageShell eyebrow="Legal" title="Terms of Service" subtitle="Last updated June 2025">
|
|
45
|
+
<LegalPageLayout title="Terms of Service">
|
|
46
|
+
<LegalPageSection title="Acceptance">
|
|
47
|
+
<p>By using this service you agree to these terms.</p>
|
|
48
|
+
</LegalPageSection>
|
|
49
|
+
</LegalPageLayout>
|
|
50
|
+
</ContentPageShell>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Type
|
|
54
|
+
|
|
55
|
+
`feature`
|
|
4
56
|
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install @molecule/app-legal-pages-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js
|
|
5
61
|
```
|
|
6
|
-
|
|
62
|
+
|
|
63
|
+
## API
|
|
64
|
+
|
|
65
|
+
### Interfaces
|
|
66
|
+
|
|
67
|
+
#### `ContentPageShellProps`
|
|
68
|
+
|
|
69
|
+
Props accepted by the {@link ContentPageShell} component.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
interface ContentPageShellProps {
|
|
73
|
+
/** `data-mol-id` applied to the hero band for AI-agent selectors. */
|
|
74
|
+
dataMolId?: string
|
|
75
|
+
/** Small uppercase label above the title (e.g. "Legal", "Billing"). */
|
|
76
|
+
eyebrow?: JSX.Element
|
|
77
|
+
/**
|
|
78
|
+
* Page title, rendered in the app's headline font inside the hero band.
|
|
79
|
+
* Omit to skip the hero entirely (e.g. for content that renders its own
|
|
80
|
+
* heading, like a pricing tier grid).
|
|
81
|
+
*/
|
|
82
|
+
title?: JSX.Element
|
|
83
|
+
/** Optional supporting line under the title (e.g. "Last updated …"). */
|
|
84
|
+
subtitle?: JSX.Element
|
|
85
|
+
/** App-specific top navigation, rendered above the hero. */
|
|
86
|
+
header?: JSX.Element
|
|
87
|
+
/** App-specific footer, rendered below the content. */
|
|
88
|
+
footer?: JSX.Element
|
|
89
|
+
/** Page body. Rendered inside a surface card unless `bare` is set. */
|
|
90
|
+
children?: JSX.Element
|
|
91
|
+
/**
|
|
92
|
+
* When true, the body is rendered without the surface card wrapper — for
|
|
93
|
+
* content that brings its own surfaces (e.g. a pricing tier grid).
|
|
94
|
+
*/
|
|
95
|
+
bare?: boolean
|
|
96
|
+
/** Container width passed to ClassMap `container({ size })`. Defaults to `'md'`. */
|
|
97
|
+
containerSize?: 'sm' | 'md' | 'lg' | 'xl'
|
|
98
|
+
}
|
|
7
99
|
```
|
|
8
100
|
|
|
9
|
-
|
|
101
|
+
#### `LegalContentPageProps`
|
|
102
|
+
|
|
103
|
+
Props accepted by the {@link LegalContentPage} component.
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
interface LegalContentPageProps {
|
|
107
|
+
/** Which legal document to render. */
|
|
108
|
+
kind: LegalKind
|
|
109
|
+
/** App name interpolated into the policy body (privacy uses `{{appName}}`). */
|
|
110
|
+
appName?: string
|
|
111
|
+
/**
|
|
112
|
+
* Lazy-loader for the legal HTML (pass `loadContent` from the app's
|
|
113
|
+
* `src/config.ts`, which re-exports it from
|
|
114
|
+
* `@molecule/app-locales-legal-default`). Called once on mount so the
|
|
115
|
+
* standalone page shows the **same** bonded content as the footer modal.
|
|
116
|
+
*/
|
|
117
|
+
loadContent?: (key: 'privacyPolicy' | 'termsOfService') => Promise<void> | void
|
|
118
|
+
/** App-specific top navigation, rendered above the hero. */
|
|
119
|
+
header?: JSX.Element
|
|
120
|
+
/** App-specific footer, rendered below the content. */
|
|
121
|
+
footer?: JSX.Element
|
|
122
|
+
/** i18n key for the small uppercase eyebrow. Defaults to `nav.legal`. */
|
|
123
|
+
eyebrowKey?: string
|
|
124
|
+
/** Default eyebrow text. Defaults to `Legal`. */
|
|
125
|
+
eyebrowDefault?: string
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### `UseLegalModalsOptions`
|
|
130
|
+
|
|
131
|
+
Shared options for the legal-modal hook + component.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
interface UseLegalModalsOptions {
|
|
135
|
+
/** App name interpolated into the privacy AND terms bodies (`{{appName}}`). */
|
|
136
|
+
appName?: string
|
|
137
|
+
/**
|
|
138
|
+
* Lazy-loader for the legal HTML — pass `loadContent` from the app's
|
|
139
|
+
* `src/config.ts`. Called right before a modal opens so the bonded
|
|
140
|
+
* content is present on first render.
|
|
141
|
+
*/
|
|
142
|
+
loadContent?: (key: 'privacyPolicy' | 'termsOfService') => Promise<void> | void
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### `LegalModalsApi`
|
|
147
|
+
|
|
148
|
+
Imperative API returned by {@link useLegalModals}.
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
interface LegalModalsApi {
|
|
152
|
+
/** Open the Privacy Policy modal (loads content first). */
|
|
153
|
+
openPrivacy: () => Promise<void>
|
|
154
|
+
/** Open the Terms of Service modal (loads content first). */
|
|
155
|
+
openTerms: () => Promise<void>
|
|
156
|
+
/**
|
|
157
|
+
* The two `<Modal>` elements — render `{modals}` once anywhere in the tree.
|
|
158
|
+
* Solid JSX props stay reactive, so the pair follows the open state.
|
|
159
|
+
*/
|
|
160
|
+
modals: JSX.Element
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### `LegalModalLinksProps`
|
|
165
|
+
|
|
166
|
+
Props accepted by the {@link LegalModalLinks} component.
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
interface LegalModalLinksProps extends UseLegalModalsOptions {
|
|
170
|
+
/** className applied to each trigger `<button>` (match the footer's link style). */
|
|
171
|
+
linkClassName?: string
|
|
172
|
+
/** Which links to render. Defaults to `'both'`. */
|
|
173
|
+
show?: 'both' | 'privacy' | 'terms'
|
|
174
|
+
/** Override the Privacy label (defaults to i18n `footer.privacyPolicy`). */
|
|
175
|
+
privacyLabel?: JSX.Element
|
|
176
|
+
/** Override the Terms label (defaults to i18n `footer.termsOfService`). */
|
|
177
|
+
termsLabel?: JSX.Element
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### `LegalPageLayoutProps`
|
|
182
|
+
|
|
183
|
+
Props accepted by the {@link LegalPageLayout} component.
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
interface LegalPageLayoutProps {
|
|
187
|
+
/** `data-mol-id` for AI agent selectors. */
|
|
188
|
+
dataMolId?: string
|
|
189
|
+
/** Rendered heading text (usually `t('...')`). */
|
|
190
|
+
title: JSX.Element
|
|
191
|
+
/** Body content — paragraphs, `<LegalPageSection>`s, etc. */
|
|
192
|
+
children?: JSX.Element
|
|
193
|
+
/** ClassMap `container({size})` value. Defaults to `'md'`. */
|
|
194
|
+
containerSize?: 'sm' | 'md' | 'lg' | 'xl'
|
|
195
|
+
/** Stack gap between body children passed to ClassMap `stack()`. Defaults to 4. */
|
|
196
|
+
stackGap?: SpacingScale
|
|
197
|
+
/** Override the main wrapper's className (used by apps with custom chrome). */
|
|
198
|
+
mainClassName?: string
|
|
199
|
+
/** Override the body wrapper's className. */
|
|
200
|
+
bodyClassName?: string
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### `LegalPageSectionProps`
|
|
205
|
+
|
|
206
|
+
Props accepted by the {@link LegalPageSection} component.
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
interface LegalPageSectionProps {
|
|
210
|
+
/** Rendered heading text. */
|
|
211
|
+
title: JSX.Element
|
|
212
|
+
/** Section body — one or more paragraphs. */
|
|
213
|
+
children?: JSX.Element
|
|
214
|
+
/** Stack gap between heading and body (ClassMap `stack()`). Defaults to 2. */
|
|
215
|
+
stackGap?: SpacingScale
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
#### `PlanUpdatedPageProps`
|
|
220
|
+
|
|
221
|
+
Props accepted by the {@link PlanUpdatedPage} component.
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
interface PlanUpdatedPageProps {
|
|
225
|
+
/** i18n key for the primary message heading. */
|
|
226
|
+
messageKey?: string
|
|
227
|
+
/** Default message when the key is missing. */
|
|
228
|
+
messageDefault?: string
|
|
229
|
+
/** i18n key for the secondary heading. */
|
|
230
|
+
thankYouKey?: string
|
|
231
|
+
/** Default thank-you text when the key is missing. */
|
|
232
|
+
thankYouDefault?: string
|
|
233
|
+
/** i18n key for the action-button label. */
|
|
234
|
+
actionKey?: string
|
|
235
|
+
/** Default action label when the key is missing. */
|
|
236
|
+
actionDefault?: string
|
|
237
|
+
/** Href the action button navigates to. Defaults to `/`. */
|
|
238
|
+
actionHref?: string
|
|
239
|
+
/**
|
|
240
|
+
* Provider name to verify the purchase with when the return URL carries no
|
|
241
|
+
* `provider` parameter. Verification is skipped when neither names one.
|
|
242
|
+
*/
|
|
243
|
+
provider?: string
|
|
244
|
+
/**
|
|
245
|
+
* Set `false` to render the confirmation without verifying the purchase —
|
|
246
|
+
* only for apps that grant the plan some other way.
|
|
247
|
+
*/
|
|
248
|
+
verify?: boolean
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
#### `PrivacyPageProps`
|
|
253
|
+
|
|
254
|
+
Props accepted by the {@link PrivacyPage} component.
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
interface PrivacyPageProps {
|
|
258
|
+
/** i18n key for the page heading. Defaults to `privacy.title`. */
|
|
259
|
+
titleKey?: string
|
|
260
|
+
/** Default for the heading when the key is missing. Defaults to `"Privacy"`. */
|
|
261
|
+
titleDefault?: string
|
|
262
|
+
/** i18n key for the single-paragraph intro (ignored when `children` is passed). */
|
|
263
|
+
introKey?: string
|
|
264
|
+
/** Default intro body when the key is missing. */
|
|
265
|
+
introDefault?: string
|
|
266
|
+
/** Optional override body — use when the page has real content. */
|
|
267
|
+
children?: JSX.Element
|
|
268
|
+
/** Stack gap between body children. */
|
|
269
|
+
stackGap?: SpacingScale
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### `TermsPageProps`
|
|
274
|
+
|
|
275
|
+
Props accepted by the {@link TermsPage} component.
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
interface TermsPageProps {
|
|
279
|
+
/** i18n key for the page heading. Defaults to `terms.title`. */
|
|
280
|
+
titleKey?: string
|
|
281
|
+
/** Default for the heading when the i18n key is missing. Defaults to `"Terms"`. */
|
|
282
|
+
titleDefault?: string
|
|
283
|
+
/** i18n key for the single-paragraph intro (ignored when `children` is passed). */
|
|
284
|
+
introKey?: string
|
|
285
|
+
/** Default intro body when the key is missing. */
|
|
286
|
+
introDefault?: string
|
|
287
|
+
/** Optional override body — use when the page has real content, not boilerplate. */
|
|
288
|
+
children?: JSX.Element
|
|
289
|
+
/** Stack gap between body children. */
|
|
290
|
+
stackGap?: SpacingScale
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Types
|
|
295
|
+
|
|
296
|
+
#### `LegalKind`
|
|
297
|
+
|
|
298
|
+
Which legal document a `LegalContentPage` renders.
|
|
299
|
+
|
|
300
|
+
```typescript
|
|
301
|
+
type LegalKind = 'privacy' | 'terms'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Functions
|
|
305
|
+
|
|
306
|
+
#### `ContentPageShell(props)`
|
|
307
|
+
|
|
308
|
+
Branded shell for public content pages (Privacy, Terms, Pricing,
|
|
309
|
+
PlanUpdated, …).
|
|
310
|
+
|
|
311
|
+
Renders the app's own `header`/`footer` slots around a themed hero band
|
|
312
|
+
(eyebrow + title + subtitle) and a surface-card content area. Everything
|
|
313
|
+
is driven by theme tokens (`--mol-color-*`) and the app's font utility
|
|
314
|
+
classes (`font-display` for the title, `font-body`/`font-label` for the
|
|
315
|
+
rest), so each app's palette and typography are applied automatically
|
|
316
|
+
without per-app overrides.
|
|
317
|
+
|
|
318
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `ContentPageShell` —
|
|
319
|
+
the same props (React names), the same ClassMap tokens and the same DOM for
|
|
320
|
+
the same input.
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
function ContentPageShell(props: ContentPageShellProps): JSX.Element
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
- `props` — Component props (see {@link ContentPageShellProps}).
|
|
327
|
+
|
|
328
|
+
**Returns:** The rendered content-page shell.
|
|
329
|
+
|
|
330
|
+
#### `LegalContentPage(props)`
|
|
331
|
+
|
|
332
|
+
Standalone Privacy / Terms page that renders the **same** bonded legal
|
|
333
|
+
HTML the footer modal shows (`content.privacyPolicy` /
|
|
334
|
+
`content.termsOfService` from `@molecule/app-locales-legal-default`),
|
|
335
|
+
wrapped in the branded `ContentPageShell`.
|
|
336
|
+
|
|
337
|
+
This keeps the in-place footer modal and the standalone `/privacy`,
|
|
338
|
+
`/terms` routes perfectly in sync — one source of legal copy, two
|
|
339
|
+
surfaces.
|
|
340
|
+
|
|
341
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `LegalContentPage` —
|
|
342
|
+
the same props (React names), the same DOM for the same input.
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
function LegalContentPage(props: LegalContentPageProps): JSX.Element
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
- `props` — Component props (see {@link LegalContentPageProps}).
|
|
349
|
+
|
|
350
|
+
**Returns:** The rendered legal content page.
|
|
351
|
+
|
|
352
|
+
#### `useLegalModals(options)`
|
|
353
|
+
|
|
354
|
+
Headless hook powering in-place Privacy/Terms modals. Use it when the
|
|
355
|
+
triggers live in different parts of a bespoke footer (or a signup page);
|
|
356
|
+
render `{modals}` once and wire `openPrivacy`/`openTerms` to your own
|
|
357
|
+
links/buttons.
|
|
358
|
+
|
|
359
|
+
The modal body is the SAME bonded HTML the `LegalContentPage` standalone
|
|
360
|
+
routes render (`content.privacyPolicy` / `content.termsOfService`), so every
|
|
361
|
+
legal surface stays in sync.
|
|
362
|
+
|
|
363
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `useLegalModals` —
|
|
364
|
+
the same options; the element pair's props stay reactive, so it follows the
|
|
365
|
+
open state.
|
|
366
|
+
|
|
367
|
+
```typescript
|
|
368
|
+
function useLegalModals(options?: UseLegalModalsOptions): LegalModalsApi
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
- `options` — See {@link UseLegalModalsOptions}.
|
|
372
|
+
|
|
373
|
+
**Returns:** The imperative {@link LegalModalsApi}.
|
|
374
|
+
|
|
375
|
+
#### `LegalModalLinks(props)`
|
|
376
|
+
|
|
377
|
+
Drop-in Privacy/Terms links that open IN-PLACE modals instead of
|
|
378
|
+
navigating — for bespoke footers and signup pages.
|
|
379
|
+
|
|
380
|
+
Renders the trigger button(s) + the modals together, so it suits the
|
|
381
|
+
common case where the two legal links are adjacent. For separated
|
|
382
|
+
triggers, use `useLegalModals` directly.
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
function LegalModalLinks(props: LegalModalLinksProps): JSX.Element
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
- `props` — Component props (see {@link LegalModalLinksProps}).
|
|
389
|
+
|
|
390
|
+
**Returns:** The trigger button(s) and their modals.
|
|
391
|
+
|
|
392
|
+
#### `LegalPageLayout(props)`
|
|
393
|
+
|
|
394
|
+
Canonical Terms / Privacy layout shell.
|
|
395
|
+
|
|
396
|
+
`<main data-mol-id={...} class="container py-12">
|
|
397
|
+
<h1>{title}</h1>
|
|
398
|
+
<div class="prose stack">{children}</div>
|
|
399
|
+
</main>`
|
|
400
|
+
|
|
401
|
+
Use this as the content shell for legal pages. Custom chrome (landing
|
|
402
|
+
top-nav, admin sidebar, etc.) should wrap the shell at the call site.
|
|
403
|
+
|
|
404
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `LegalPageLayout` —
|
|
405
|
+
the same props (React names), the same DOM for the same input.
|
|
406
|
+
|
|
407
|
+
```typescript
|
|
408
|
+
function LegalPageLayout(props: LegalPageLayoutProps): JSX.Element
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
- `props` — Component props (see {@link LegalPageLayoutProps}).
|
|
412
|
+
|
|
413
|
+
**Returns:** The rendered legal page layout.
|
|
414
|
+
|
|
415
|
+
#### `LegalPageSection(props)`
|
|
416
|
+
|
|
417
|
+
One sub-section of a legal page (`h2` + body) styled for use inside
|
|
418
|
+
`LegalPageLayout`.
|
|
419
|
+
|
|
420
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `LegalPageSection` —
|
|
421
|
+
the same props (React names), the same DOM for the same input.
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
function LegalPageSection(props: LegalPageSectionProps): JSX.Element
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
- `props` — Component props (see {@link LegalPageSectionProps}).
|
|
428
|
+
|
|
429
|
+
**Returns:** The rendered legal page section.
|
|
430
|
+
|
|
431
|
+
#### `PlanUpdatedPage(props)`
|
|
432
|
+
|
|
433
|
+
"Plan updated" confirmation screen.
|
|
434
|
+
|
|
435
|
+
Waits for auth state to initialize, then shows a two-line confirmation
|
|
436
|
+
with a single return-home action. i18n keys are configurable so apps
|
|
437
|
+
can match their existing locale shape.
|
|
438
|
+
|
|
439
|
+
This is also where a hosted checkout's purchase is CONFIRMED: the provider
|
|
440
|
+
returns the buyer here with the payment id in the query, and
|
|
441
|
+
`useVerifyPaymentReturn` posts it to
|
|
442
|
+
`/users/:id/verify-payment/:provider` from the app origin, where the
|
|
443
|
+
session cookie applies. The page shows a spinner while that is in flight and
|
|
444
|
+
a retry if it fails, so a failed confirmation never reads as a thank-you.
|
|
445
|
+
|
|
446
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `PlanUpdatedPage` —
|
|
447
|
+
the same props (React names), the same DOM for the same input.
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
function PlanUpdatedPage(props: PlanUpdatedPageProps): JSX.Element
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
- `props` — Component props (see {@link PlanUpdatedPageProps}).
|
|
454
|
+
|
|
455
|
+
**Returns:** The rendered plan-updated confirmation page.
|
|
456
|
+
|
|
457
|
+
#### `PrivacyPage(props)`
|
|
458
|
+
|
|
459
|
+
Default Privacy-policy page scaffold.
|
|
460
|
+
|
|
461
|
+
With no props, renders the canonical boilerplate Privacy page. Pass
|
|
462
|
+
`children` to render real content.
|
|
463
|
+
|
|
464
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `PrivacyPage` — the
|
|
465
|
+
same props (React names), the same DOM for the same input.
|
|
466
|
+
|
|
467
|
+
```typescript
|
|
468
|
+
function PrivacyPage(props: PrivacyPageProps): JSX.Element
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
- `props` — Component props (see {@link PrivacyPageProps}).
|
|
472
|
+
|
|
473
|
+
**Returns:** The rendered privacy page.
|
|
474
|
+
|
|
475
|
+
#### `TermsPage(props)`
|
|
476
|
+
|
|
477
|
+
Default Terms-of-service page scaffold.
|
|
478
|
+
|
|
479
|
+
With no props, renders the canonical boilerplate Terms
|
|
480
|
+
(`<main><h1>{t('terms.title')}</h1><p>{t('terms.intro')}</p></main>`).
|
|
481
|
+
Pass `children` to render real content (e.g. `LegalPageSection`s).
|
|
482
|
+
|
|
483
|
+
Solid counterpart of `@molecule/app-legal-pages-react`'s `TermsPage` — the
|
|
484
|
+
same props (React names), the same DOM for the same input.
|
|
485
|
+
|
|
486
|
+
```typescript
|
|
487
|
+
function TermsPage(props: TermsPageProps): JSX.Element
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
- `props` — Component props (see {@link TermsPageProps}).
|
|
491
|
+
|
|
492
|
+
**Returns:** The rendered terms page.
|
|
493
|
+
|
|
494
|
+
## Injection Notes
|
|
495
|
+
|
|
496
|
+
### Requirements
|
|
497
|
+
|
|
498
|
+
Peer dependencies:
|
|
499
|
+
|
|
500
|
+
- `@molecule/app-solid` ^3.14.0
|
|
501
|
+
- `@molecule/app-ui` ^1.3.11
|
|
502
|
+
- `@molecule/app-ui-solid` ^1.1.0
|
|
503
|
+
- `solid-js` ^1.8.0
|
|
504
|
+
|
|
505
|
+
### Runtime Dependencies
|
|
506
|
+
|
|
507
|
+
- `@molecule/app-solid`
|
|
508
|
+
- `@molecule/app-ui`
|
|
509
|
+
- `@molecule/app-ui-solid`
|
|
510
|
+
- `solid-js`
|
|
10
511
|
|
|
11
|
-
|
|
512
|
+
- **`appName` is HTML-escaped before interpolation.** The legal bodies are
|
|
513
|
+
rendered as HTML (`innerHTML`); an `appName` carrying markup is escaped to
|
|
514
|
+
inert entities first, so it can never execute inside the legal content.
|
|
515
|
+
- `LegalContentPage` / `useLegalModals` render bonded HTML that defaults to an
|
|
516
|
+
EMPTY string until the locale module is registered — pass your app's
|
|
517
|
+
`loadContent` (from `src/config.ts`, re-exporting
|
|
518
|
+
`@molecule/app-locales-legal-default`) or the page/modal body will be blank.
|
|
519
|
+
- `PlanUpdatedPage` requires BOTH the app's router (it renders `Link`) and
|
|
520
|
+
wired auth state from `@molecule/app-solid` — without an auth provider it
|
|
521
|
+
shows a spinner forever (`state.initialized` never flips). The rest of the
|
|
522
|
+
package is router-free.
|
|
523
|
+
- **Name collision:** `PlanUpdatedPage` is also exported by
|
|
524
|
+
`@molecule/app-pricing-page-react` (the pricing-page-flavored success page),
|
|
525
|
+
and a standalone `<PlanUpdated>` lives in
|
|
526
|
+
`@molecule/app-plan-updated-page-react`. THIS package's `<PlanUpdatedPage>`
|
|
527
|
+
is the legal-pages-kit confirmation page — import it from
|
|
528
|
+
`@molecule/app-legal-pages-solid` when you use this kit's other pages.
|
|
529
|
+
- `ContentPageShell`'s hero reads `var(--mol-color-primary)` and
|
|
530
|
+
`var(--mol-color-background)` with no fallback, and uses Tailwind theme
|
|
531
|
+
utilities (`font-display`, `bg-background`, `border-outline-variant`) — the
|
|
532
|
+
app theme must define the `--mol-color-` override tokens and font utilities
|
|
533
|
+
or the hero band renders unstyled.
|
|
534
|
+
- `TermsPage`/`PrivacyPage` default keys (`terms.title`, `terms.intro`,
|
|
535
|
+
`privacy.title`, `privacy.intro`) and the `nav.legal` eyebrow ship in no
|
|
536
|
+
locale bond — the English `defaultValue`s render unless your app defines
|
|
537
|
+
those keys (all keys are overridable via props).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageShell.d.ts","sourceRoot":"","sources":["../src/ContentPageShell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"ContentPageShell.d.ts","sourceRoot":"","sources":["../src/ContentPageShell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,UAAU,CAAA;AAK/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAcvD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,qBAAqB,CAwE7D,CAAA"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import { Show } from 'solid-js';
|
|
8
|
+
import { PresentWhileNode, ResolveNode } from '@molecule/app-solid';
|
|
8
9
|
import { getClassMap } from '@molecule/app-ui';
|
|
9
10
|
/** React's inline style for the hero band, in Solid's kebab-case style keys. */
|
|
10
11
|
const HERO_STYLE = {
|
|
@@ -38,29 +39,31 @@ export const ContentPageShell = (props) => {
|
|
|
38
39
|
const containerSize = () => props.containerSize ?? 'md';
|
|
39
40
|
return (<div class={cm.cn(cm.flex({ direction: 'col' }), cm.minH('screen'), cm.legalPagesShell)}>
|
|
40
41
|
{props.header}
|
|
41
|
-
<
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
<ResolveNode node={props.title}>
|
|
43
|
+
{(title, hasTitle) => (<Show when={hasTitle()}>
|
|
44
|
+
{/* A `<section>`, not `<header>`: the app's own top bar (the `header`
|
|
45
|
+
slot above) is the page's single banner — a second `<header>` here
|
|
46
|
+
reads as a duplicated app bar to audits, users, and assistive tech. */}
|
|
47
|
+
<section data-mol-id={props.dataMolId} class={cm.cn(cm.legalPagesHero, cm.sp('px', 6), cm.sp('py', 16))} style={HERO_STYLE}>
|
|
48
|
+
<div aria-hidden="true" class={cm.legalPagesHeroGlow} style={GLOW_STYLE}/>
|
|
49
|
+
<div class={cm.cn(cm.container({ size: containerSize() }), cm.legalPagesHeroContent)}>
|
|
50
|
+
<PresentWhileNode node={props.eyebrow}>
|
|
51
|
+
{(eyebrow) => (<p class={cm.cn(cm.textSize('xs'), cm.fontWeight('bold'), cm.sp('mb', 3), cm.legalPagesHeroEyebrow)}>
|
|
52
|
+
{eyebrow()}
|
|
53
|
+
</p>)}
|
|
54
|
+
</PresentWhileNode>
|
|
55
|
+
<h1 class={cm.cn(cm.textSize('4xl'), cm.fontWeight('extrabold'), cm.legalPagesHeroTitle)}>
|
|
56
|
+
{title()}
|
|
57
|
+
</h1>
|
|
58
|
+
<PresentWhileNode node={props.subtitle}>
|
|
59
|
+
{(subtitle) => (<p class={cm.cn(cm.textSize('base'), cm.sp('mt', 3), cm.legalPagesHeroSubtitle)}>
|
|
60
|
+
{subtitle()}
|
|
61
|
+
</p>)}
|
|
62
|
+
</PresentWhileNode>
|
|
63
|
+
</div>
|
|
64
|
+
</section>
|
|
65
|
+
</Show>)}
|
|
66
|
+
</ResolveNode>
|
|
64
67
|
|
|
65
68
|
<main class={cm.cn(cm.flex1, cm.sp('px', 6), cm.sp('py', 10))}>
|
|
66
69
|
<div class={cm.cn(cm.container({ size: containerSize() }))}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageShell.jsx","sourceRoot":"","sources":["../src/ContentPageShell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAI9C,gFAAgF;AAChF,MAAM,UAAU,GAAG;IACjB,UAAU,EACR,4IAA4I;IAC9I,eAAe,EAAE,2EAA2E;CAC7F,CAAA;AAED,kFAAkF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CACf,CAAC,CAAC,CAAC,CACF,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CACrE;cAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;YAAA,EAAE,GAAG,CAAC,CACP,CACH;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,IAAI,CAEN;;MAAA,CAAC,KAAK,CAAC,MAAM,CACf;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegalModalLinks.d.ts","sourceRoot":"","sources":["../src/LegalModalLinks.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,UAAU,CAAA;AAM7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAG7F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,cAAc,CA0DlF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"LegalModalLinks.d.ts","sourceRoot":"","sources":["../src/LegalModalLinks.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,UAAU,CAAA;AAM7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAG7F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,cAAc,CA0DlF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,oBAAoB,CAqC3D,CAAA"}
|
package/dist/LegalModalLinks.jsx
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import { createSignal, Show } from 'solid-js';
|
|
8
|
-
import { useTranslation } from '@molecule/app-solid';
|
|
8
|
+
import { ResolveNode, useTranslation } from '@molecule/app-solid';
|
|
9
9
|
import { getClassMap } from '@molecule/app-ui';
|
|
10
10
|
import { Modal } from '@molecule/app-ui-solid';
|
|
11
11
|
import { escapeHtml } from './utilities.js';
|
|
@@ -77,12 +77,20 @@ export const LegalModalLinks = (props) => {
|
|
|
77
77
|
return (<>
|
|
78
78
|
<Show when={show() !== 'terms'}>
|
|
79
79
|
<button type="button" class={props.linkClassName} onClick={openPrivacy}>
|
|
80
|
-
{props.privacyLabel
|
|
80
|
+
<ResolveNode node={props.privacyLabel}>
|
|
81
|
+
{(privacyLabel, hasPrivacyLabel) => (<Show when={hasPrivacyLabel()} fallback={t('footer.privacyPolicy', {}, { defaultValue: 'Privacy Policy' })}>
|
|
82
|
+
{privacyLabel()}
|
|
83
|
+
</Show>)}
|
|
84
|
+
</ResolveNode>
|
|
81
85
|
</button>
|
|
82
86
|
</Show>
|
|
83
87
|
<Show when={show() !== 'privacy'}>
|
|
84
88
|
<button type="button" class={props.linkClassName} onClick={openTerms}>
|
|
85
|
-
{props.termsLabel
|
|
89
|
+
<ResolveNode node={props.termsLabel}>
|
|
90
|
+
{(termsLabel, hasTermsLabel) => (<Show when={hasTermsLabel()} fallback={t('footer.termsOfService', {}, { defaultValue: 'Terms of Service' })}>
|
|
91
|
+
{termsLabel()}
|
|
92
|
+
</Show>)}
|
|
93
|
+
</ResolveNode>
|
|
86
94
|
</button>
|
|
87
95
|
</Show>
|
|
88
96
|
{modals}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegalModalLinks.jsx","sourceRoot":"","sources":["../src/LegalModalLinks.tsx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AS,CAAC,CACnE;UAAA,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAClC;YAAA,CAAC,CAAC,UAAU,EAAE,aAAa,EAAE,EAAE,CAAC,CAC9B,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC,CACtB,QAAQ,CAAC,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAE/E;gBAAA,CAAC,UAAU,EAAE,CACf;cAAA,EAAE,IAAI,CAAC,CACR,CACH;UAAA,EAAE,WAAW,CACf;QAAA,EAAE,MAAM,CACV;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,MAAM,CACT;IAAA,GAAG,CACJ,CAAA;AACH,CAAC,CAAA"}
|
package/dist/PrivacyPage.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyPage.d.ts","sourceRoot":"","sources":["../src/PrivacyPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PrivacyPage.d.ts","sourceRoot":"","sources":["../src/PrivacyPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,UAAU,CAAA;AAK/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAsCnD,CAAA"}
|
package/dist/PrivacyPage.jsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { Show } from 'solid-js';
|
|
7
|
-
import { useTranslation } from '@molecule/app-solid';
|
|
7
|
+
import { ResolveNode, useTranslation } from '@molecule/app-solid';
|
|
8
8
|
import { LegalPageLayout } from './LegalPageLayout.jsx';
|
|
9
9
|
/**
|
|
10
10
|
* Default Privacy-policy page scaffold.
|
|
@@ -23,14 +23,16 @@ export const PrivacyPage = (props) => {
|
|
|
23
23
|
return (<LegalPageLayout dataMolId="page-privacy" title={t(props.titleKey ?? 'privacy.title', {}, {
|
|
24
24
|
defaultValue: props.titleDefault ?? 'Privacy',
|
|
25
25
|
})} stackGap={props.stackGap}>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
<ResolveNode node={props.children}>
|
|
27
|
+
{(content, hasContent) => (<Show when={hasContent()} fallback={<p>
|
|
28
|
+
{t(props.introKey ?? 'privacy.intro', {}, {
|
|
29
|
+
defaultValue: props.introDefault ??
|
|
30
|
+
'This is the Privacy page. Replace this placeholder with real content.',
|
|
31
|
+
})}
|
|
32
|
+
</p>}>
|
|
33
|
+
{content()}
|
|
34
|
+
</Show>)}
|
|
35
|
+
</ResolveNode>
|
|
34
36
|
</LegalPageLayout>);
|
|
35
37
|
};
|
|
36
38
|
//# sourceMappingURL=PrivacyPage.jsx.map
|
package/dist/PrivacyPage.jsx.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyPage.jsx","sourceRoot":"","sources":["../src/PrivacyPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"PrivacyPage.jsx","sourceRoot":"","sources":["../src/PrivacyPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAgC,CAAC,KAAK,EAAE,EAAE;IAChE,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,OAAO,CACL,CAAC,eAAe,CACd,SAAS,CAAC,cAAc,CACxB,KAAK,CAAC,CAAC,CAAC,CACN,KAAK,CAAC,QAAQ,IAAI,eAAe,EACjC,EAAE,EACF;YACE,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,SAAS;SAC9C,CACF,CAAC,CACF,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAEzB;MAAA,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAChC;QAAA,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,CACxB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,CACnB,QAAQ,CAAC,CACP,CAAC,CAAC,CACA;gBAAA,CAAC,CAAC,CACA,KAAK,CAAC,QAAQ,IAAI,eAAe,EACjC,EAAE,EACF;oBACE,YAAY,EACV,KAAK,CAAC,YAAY;wBAClB,uEAAuE;iBAC1E,CACF,CACH;cAAA,EAAE,CAAC,CACL,CAAC,CAED;YAAA,CAAC,OAAO,EAAE,CACZ;UAAA,EAAE,IAAI,CAAC,CACR,CACH;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,eAAe,CAAC,CACnB,CAAA;AACH,CAAC,CAAA"}
|
package/dist/TermsPage.d.ts
CHANGED
package/dist/TermsPage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsPage.d.ts","sourceRoot":"","sources":["../src/TermsPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TermsPage.d.ts","sourceRoot":"","sources":["../src/TermsPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,UAAU,CAAA;AAK/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,EAAE,SAAS,CAAC,cAAc,CAsC/C,CAAA"}
|
package/dist/TermsPage.jsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { Show } from 'solid-js';
|
|
7
|
-
import { useTranslation } from '@molecule/app-solid';
|
|
7
|
+
import { ResolveNode, useTranslation } from '@molecule/app-solid';
|
|
8
8
|
import { LegalPageLayout } from './LegalPageLayout.jsx';
|
|
9
9
|
/**
|
|
10
10
|
* Default Terms-of-service page scaffold.
|
|
@@ -24,14 +24,16 @@ export const TermsPage = (props) => {
|
|
|
24
24
|
return (<LegalPageLayout dataMolId="page-terms" title={t(props.titleKey ?? 'terms.title', {}, {
|
|
25
25
|
defaultValue: props.titleDefault ?? 'Terms',
|
|
26
26
|
})} stackGap={props.stackGap}>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
<ResolveNode node={props.children}>
|
|
28
|
+
{(content, hasContent) => (<Show when={hasContent()} fallback={<p>
|
|
29
|
+
{t(props.introKey ?? 'terms.intro', {}, {
|
|
30
|
+
defaultValue: props.introDefault ??
|
|
31
|
+
'This is the Terms page. Replace this placeholder with real content.',
|
|
32
|
+
})}
|
|
33
|
+
</p>}>
|
|
34
|
+
{content()}
|
|
35
|
+
</Show>)}
|
|
36
|
+
</ResolveNode>
|
|
35
37
|
</LegalPageLayout>);
|
|
36
38
|
};
|
|
37
39
|
//# sourceMappingURL=TermsPage.jsx.map
|
package/dist/TermsPage.jsx.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsPage.jsx","sourceRoot":"","sources":["../src/TermsPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"TermsPage.jsx","sourceR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
"name": "@molecule/app-legal-pages-solid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Solid page scaffolds for Terms, Privacy, and PlanUpdated (i18n-driven, customizable keys)",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-legal-pages-solid",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@molecule/app-solid": "^3.
|
|
46
|
+
"@molecule/app-solid": "^3.14.0",
|
|
47
47
|
"@molecule/app-ui": "^1.3.11",
|
|
48
48
|
"@molecule/app-ui-solid": "^1.1.0",
|
|
49
49
|
"solid-js": "^1.8.0"
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@molecule/app-framework-conformance": "0.0.0",
|
|
53
53
|
"@molecule/app-i18n": "1.2.2",
|
|
54
54
|
"@molecule/app-icons": "1.0.4",
|
|
55
|
-
"@molecule/app-solid": "3.
|
|
56
|
-
"@molecule/app-ui": "1.
|
|
57
|
-
"@molecule/app-ui-solid": "1.
|
|
55
|
+
"@molecule/app-solid": "3.15.0",
|
|
56
|
+
"@molecule/app-ui": "1.5.0",
|
|
57
|
+
"@molecule/app-ui-solid": "1.4.0",
|
|
58
58
|
"@types/node": "26.6.5",
|
|
59
|
-
"jsdom": "
|
|
59
|
+
"jsdom": "31.0.1",
|
|
60
60
|
"solid-js": "1.9.17",
|
|
61
61
|
"typescript": "6.0.3",
|
|
62
62
|
"vite-plugin-solid": "2.11.15",
|