@proveanything/smartlinks 3.0.0-alpha.2 → 3.0.0-alpha.3

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 (151) hide show
  1. package/README.md +741 -741
  2. package/dist/README.md +573 -573
  3. package/dist/adminCardsView.js +55 -55
  4. package/dist/api/bookings.d.ts +49 -2
  5. package/dist/api/bookings.js +59 -2
  6. package/dist/api/index.d.ts +1 -0
  7. package/dist/api/index.js +1 -0
  8. package/dist/api/payments.d.ts +60 -0
  9. package/dist/api/payments.js +94 -0
  10. package/dist/api/realtime.d.ts +3 -0
  11. package/dist/api/realtime.js +10 -2
  12. package/dist/baseline.css +194 -194
  13. package/dist/dataChanged.d.ts +74 -0
  14. package/dist/dataChanged.js +162 -0
  15. package/dist/docs/API_SUMMARY.md +1086 -858
  16. package/dist/docs/admin-cards.md +189 -189
  17. package/dist/docs/agent-tools.md +156 -156
  18. package/dist/docs/ai-tools-and-skills.md +180 -180
  19. package/dist/docs/ai.md +1721 -1721
  20. package/dist/docs/api-versions.md +85 -85
  21. package/dist/docs/app-data-storage.md +277 -277
  22. package/dist/docs/app-docs.md +73 -73
  23. package/dist/docs/app-manifest.md +852 -852
  24. package/dist/docs/app-records-pattern.md +388 -388
  25. package/dist/docs/appConfig.md +550 -550
  26. package/dist/docs/assistant-apps.md +172 -172
  27. package/dist/docs/assistant-context.md +119 -119
  28. package/dist/docs/bookings.md +105 -8
  29. package/dist/docs/caching.md +32 -3
  30. package/dist/docs/comms.md +689 -689
  31. package/dist/docs/connectors.md +340 -340
  32. package/dist/docs/css-baseline.md +133 -133
  33. package/dist/docs/customer-guide.md +70 -70
  34. package/dist/docs/data-changed.md +91 -0
  35. package/dist/docs/deploying-apps.md +340 -340
  36. package/dist/docs/dpp.md +115 -115
  37. package/dist/docs/entitlements.md +90 -90
  38. package/dist/docs/files.md +69 -69
  39. package/dist/docs/host-dependency-contract.md +252 -252
  40. package/dist/docs/iframe-responder.md +11 -0
  41. package/dist/docs/integrations.md +322 -322
  42. package/dist/docs/interactions.md +544 -544
  43. package/dist/docs/item-context.md +181 -181
  44. package/dist/docs/knowledge.md +105 -105
  45. package/dist/docs/lists.md +157 -157
  46. package/dist/docs/lots.md +112 -112
  47. package/dist/docs/loyalty.md +348 -348
  48. package/dist/docs/members.md +183 -183
  49. package/dist/docs/memberships.md +150 -150
  50. package/dist/docs/mobile-admin-container.md +693 -693
  51. package/dist/docs/operations.md +281 -281
  52. package/dist/docs/overview.md +487 -485
  53. package/dist/docs/payments.md +94 -0
  54. package/dist/docs/proof-comms-triggers.md +142 -142
  55. package/dist/docs/proof-ownership-transfer.md +155 -155
  56. package/dist/docs/proof-product-data-scoping.md +462 -462
  57. package/dist/docs/proof-share-grants.md +305 -305
  58. package/dist/docs/realtime.md +149 -139
  59. package/dist/docs/records-admin-pattern.md +304 -304
  60. package/dist/docs/service-accounts.md +64 -64
  61. package/dist/docs/standard-query.md +196 -187
  62. package/dist/docs/tag-codes.md +97 -97
  63. package/dist/docs/tag-ranges.md +106 -106
  64. package/dist/docs/theme-tokens.md +252 -252
  65. package/dist/docs/upgrading-to-3.md +550 -532
  66. package/dist/docs/wallet-passes.md +107 -107
  67. package/dist/docs/websites.md +123 -123
  68. package/dist/http.d.ts +6 -3
  69. package/dist/http.js +48 -19
  70. package/dist/iframeResponder.d.ts +7 -0
  71. package/dist/iframeResponder.js +10 -0
  72. package/dist/index.d.ts +2 -0
  73. package/dist/index.js +2 -0
  74. package/dist/openapi.yaml +426 -3
  75. package/dist/testing/bookingsMemory.d.ts +29 -1
  76. package/dist/testing/bookingsMemory.js +89 -1
  77. package/dist/testing/index.js +4 -1
  78. package/dist/theme-boot.js +82 -82
  79. package/dist/theme.css +75 -75
  80. package/dist/types/appManifest.d.ts +26 -4
  81. package/dist/types/bookings.d.ts +99 -1
  82. package/dist/types/index.d.ts +1 -0
  83. package/dist/types/index.js +1 -0
  84. package/dist/types/payments.d.ts +101 -0
  85. package/dist/types/payments.js +5 -0
  86. package/dist/types/realtime.d.ts +5 -1
  87. package/dist/version.d.ts +1 -1
  88. package/dist/version.js +1 -1
  89. package/docs/API_SUMMARY.md +1086 -858
  90. package/docs/admin-cards.md +189 -189
  91. package/docs/agent-tools.md +156 -156
  92. package/docs/ai-tools-and-skills.md +180 -180
  93. package/docs/ai.md +1721 -1721
  94. package/docs/api-versions.md +85 -85
  95. package/docs/app-data-storage.md +277 -277
  96. package/docs/app-docs.md +73 -73
  97. package/docs/app-manifest.md +852 -852
  98. package/docs/app-records-pattern.md +388 -388
  99. package/docs/appConfig.md +550 -550
  100. package/docs/assistant-apps.md +172 -172
  101. package/docs/assistant-context.md +119 -119
  102. package/docs/bookings.md +105 -8
  103. package/docs/caching.md +32 -3
  104. package/docs/comms.md +689 -689
  105. package/docs/connectors.md +340 -340
  106. package/docs/css-baseline.md +133 -133
  107. package/docs/customer-guide.md +70 -70
  108. package/docs/data-changed.md +91 -0
  109. package/docs/deploying-apps.md +340 -340
  110. package/docs/dpp.md +115 -115
  111. package/docs/entitlements.md +90 -90
  112. package/docs/files.md +69 -69
  113. package/docs/host-dependency-contract.md +252 -252
  114. package/docs/iframe-responder.md +11 -0
  115. package/docs/integrations.md +322 -322
  116. package/docs/interactions.md +544 -544
  117. package/docs/item-context.md +181 -181
  118. package/docs/knowledge.md +105 -105
  119. package/docs/lists.md +157 -157
  120. package/docs/lots.md +112 -112
  121. package/docs/loyalty.md +348 -348
  122. package/docs/members.md +183 -183
  123. package/docs/memberships.md +150 -150
  124. package/docs/mobile-admin-container.md +693 -693
  125. package/docs/operations.md +281 -281
  126. package/docs/overview.md +487 -485
  127. package/docs/payments.md +94 -0
  128. package/docs/proof-comms-triggers.md +142 -142
  129. package/docs/proof-ownership-transfer.md +155 -155
  130. package/docs/proof-product-data-scoping.md +462 -462
  131. package/docs/proof-share-grants.md +305 -305
  132. package/docs/realtime.md +149 -139
  133. package/docs/service-accounts.md +64 -64
  134. package/docs/standard-query.md +196 -187
  135. package/docs/tag-codes.md +97 -97
  136. package/docs/tag-ranges.md +106 -106
  137. package/docs/theme-lookbook.v1.json +120 -120
  138. package/docs/theme-tokens.md +252 -252
  139. package/docs/upgrading-to-3.md +550 -532
  140. package/docs/wallet-passes.md +107 -107
  141. package/docs/websites.md +123 -123
  142. package/openapi.yaml +426 -3
  143. package/package.json +91 -91
  144. package/scripts/headless-check.mjs +87 -87
  145. package/scripts/lib/bare-imports.mjs +57 -57
  146. package/scripts/lib/keyed-app-data.mjs +21 -21
  147. package/scripts/lib/upgrade.mjs +708 -668
  148. package/scripts/publish.mjs +272 -272
  149. package/scripts/register-release.mjs +91 -91
  150. package/scripts/upgrade.mjs +79 -79
  151. package/upgrade/3.json +2 -2
@@ -1,106 +1,106 @@
1
- # NFC tag ranges and partners
2
-
3
- For partners and enterprise clients who run their own tag programmes: mint a batch of tags, send them
4
- to a manufacturer with instructions, get the chip UIDs back, then put the tags to work for a client or
5
- product. Ordinary business collections don't use this.
6
-
7
- ## The words
8
-
9
- | Word | Means |
10
- |---|---|
11
- | **Claim set** | A pool of codes on one tap domain and one tag type (NTAG 424 DNA, NTAG 213/215/216, or QR). Most partners need one. |
12
- | **Range** | A named, contiguous block of tags inside a set: "Tap to donate - February", 100 tags, indexes 201-300. |
13
- | **Index** | A tag's place in its set. Ranges never overlap and indexes are never reused. |
14
- | **Partner** | An organisation above collections that owns sets and assigns their tags into collections its people administer. Set up by SmartLinks staff. |
15
-
16
- ## Who can do what
17
-
18
- `scope` is `{ partnerId }` for a partner's sets, or `{ collectionId }` for a collection's own sets.
19
-
20
- | Role | Can |
21
- |---|---|
22
- | Partner owner / admin, or a collection admin | Make sets, mint ranges, download the printer file and instructions, import UIDs, program tags, assign |
23
- | Partner assigner | See ranges and tags (never keys), assign |
24
-
25
- Assigning always needs you to be an admin of the collection the tags go to.
26
-
27
- ## The flow
28
-
29
- ```ts
30
- import { partner, claimSet } from '@proveanything/smartlinks'
31
-
32
- const { items: [p] } = await partner.list() // the partners you belong to
33
- const scope = { partnerId: p.id }
34
- const { items: [set] } = await partner.claimSets(p.id) // or partner.createClaimSet(p.id, { name, tagType: 'ntag424', tapDomain })
35
-
36
- // 1. Mint
37
- const range = await claimSet.ranges.create(scope, set.id, { name: 'Tap to donate - February', quantity: 100 })
38
-
39
- // 2. Send to print: the CSV (carries each tag's key) and the instruction sheet
40
- const file = await claimSet.ranges.exportFile(scope, set.id, range.id) // { filename, csv }
41
- const sheet = await claimSet.ranges.instructions(scope, set.id, range.id, 'pdf') // { filename, base64 }
42
- await claimSet.ranges.update(scope, set.id, range.id, { stage: 'sent', manufacturer: 'Print Co', orderRef: 'PO-123' })
43
-
44
- // 3. Receive: the manufacturer sends back the same file with UID filled in
45
- const check = await claimSet.ranges.importUids(scope, set.id, range.id, { csv: returnedCsv })
46
- // check.rows: ok / index_mismatch / bad_uid / uid_in_use / … ; nothing written yet
47
- await claimSet.ranges.importUids(scope, set.id, range.id, { csv: returnedCsv, commit: true })
48
-
49
- // 4. Assign all of it, or from-to
50
- await claimSet.ranges.assign(scope, set.id, range.id, { collectionId: 'reading-fc', productId: 'scarf', start: 201, end: 250 })
51
- ```
52
-
53
- **Programming on a phone instead of a manufacturer** (Sidekick): `ranges.next()` gives the lowest
54
- tag without a chip, with its URL and key; write it, then `ranges.recordTag(scope, set.id, range.id, code, { uid })` (add `password` for a plain tag's write password).
55
-
56
- To find where a chip or code went, `partner.lookupTags(partner.id, { uid })` or `{ code }` searches every set the partner owns and returns the hits in `items`, each with its set, tag and range, never a key.
57
-
58
- ## Open ranges and groups
59
-
60
- A range's count is fixed when it is minted. Two phone-side jobs don't know their count in advance, so a range
61
- has a `kind`:
62
-
63
- - **`open`**: blank tags programmed on Sidekick one at a time. `ranges.create(scope, set.id, { kind: 'open', name })`
64
- reserves only a start index; each `ranges.next()` hands back a free minted code or mints one more, so
65
- `quantity`/`endIndex` grow as tags are written (`remaining` is null). One open range per set, and nothing can
66
- be minted behind it (`409 RANGE_OPEN`) until `ranges.close(scope, set.id, range.id)` turns it into an ordinary
67
- range (an open range that minted nothing is removed instead).
68
- - **`group`**: tags that already exist, added by tapping, assigned by hand, and moved together later. Assigners may
69
- make one: `ranges.create(scope, set.id, { kind: 'group', name, intendedCollectionId? })`. Each tap goes through
70
- `ranges.addMember(scope, set.id, group.id, { code | uid, collectionId, productId? })`, which stamps the tag with
71
- the group and assigns it with the single-tag rules; `assigned.skipped` says when a tag was left alone (claimed,
72
- or in a collection you don't administer). `ranges.assign(scope, set.id, group.id, { collectionId })` moves every
73
- member in one go; `ranges.removeMember` takes one out. Groups have no printer file, instructions, import or
74
- `next` (`400 NOT_A_RANGE`). Its tags must be codes of the group's set; a chip that is a code elsewhere is
75
- `409 OTHER_SET`.
76
-
77
- Status reads `open` or `group` for these (and `assigned` once every member of a group is assigned).
78
-
79
- ## When a tag fails on the phone
80
-
81
- `errors.report({ app: 'sidekick', operation: 'tag.program', errorCode: 'TAG_LOST', message, entityType: 'tag',
82
- entityId: chipUid, labels: { claimSetId, code, failedStep }, context: { steps, timings, hostLog } })` keeps what
83
- the phone saw in the platform's one error log (never a key: fields that look like one are dropped).
84
- `partner.tagAttempts(partner.id, chipUid)` (in `items`) and the platform's tag lookup read it back, newest first, so a
85
- failing chip can be understood by its UID without the phone's console.
86
-
87
- ## The printer file
88
-
89
- One row per tag, in index order. The manufacturer fills in `UID` and sends the same file back; rows are
90
- matched by `Code`, and `Index` is checked.
91
-
92
- | Tag type | Columns |
93
- |---|---|
94
- | NTAG 424 DNA | `Index, Code, URL, PiccOffset, Key, UID` |
95
- | NTAG 213/215/216 | `Index, Code, URL, MirrorOffset, MirrorPage, MirrorByte, UID` |
96
- | QR | `Index, Code, URL` |
97
-
98
- `URL` is `https://{tap domain}/t/{set}/{code}` plus the placeholder the chip fills on every read
99
- (`?p=` + 32 zeros for 424 SUN, `?m=00000000000000x000000` for the 21x UID and counter mirror). The
100
- offsets are byte positions in the NDEF data, assuming the `https://` URI prefix code and a short record.
101
-
102
- ## Notes
103
-
104
- - Range responses are never cached by the SDK: tags change as they're programmed and several carry keys.
105
- - A tag bound to a proof (minted or claimed) is never moved or cleared by `assign`; it's reported in `skipped`.
106
- - `status` is the stage (`minted`, `sent`, `received`), or `assigned` once every tag is assigned.
1
+ # NFC tag ranges and partners
2
+
3
+ For partners and enterprise clients who run their own tag programmes: mint a batch of tags, send them
4
+ to a manufacturer with instructions, get the chip UIDs back, then put the tags to work for a client or
5
+ product. Ordinary business collections don't use this.
6
+
7
+ ## The words
8
+
9
+ | Word | Means |
10
+ |---|---|
11
+ | **Claim set** | A pool of codes on one tap domain and one tag type (NTAG 424 DNA, NTAG 213/215/216, or QR). Most partners need one. |
12
+ | **Range** | A named, contiguous block of tags inside a set: "Tap to donate - February", 100 tags, indexes 201-300. |
13
+ | **Index** | A tag's place in its set. Ranges never overlap and indexes are never reused. |
14
+ | **Partner** | An organisation above collections that owns sets and assigns their tags into collections its people administer. Set up by SmartLinks staff. |
15
+
16
+ ## Who can do what
17
+
18
+ `scope` is `{ partnerId }` for a partner's sets, or `{ collectionId }` for a collection's own sets.
19
+
20
+ | Role | Can |
21
+ |---|---|
22
+ | Partner owner / admin, or a collection admin | Make sets, mint ranges, download the printer file and instructions, import UIDs, program tags, assign |
23
+ | Partner assigner | See ranges and tags (never keys), assign |
24
+
25
+ Assigning always needs you to be an admin of the collection the tags go to.
26
+
27
+ ## The flow
28
+
29
+ ```ts
30
+ import { partner, claimSet } from '@proveanything/smartlinks'
31
+
32
+ const { items: [p] } = await partner.list() // the partners you belong to
33
+ const scope = { partnerId: p.id }
34
+ const { items: [set] } = await partner.claimSets(p.id) // or partner.createClaimSet(p.id, { name, tagType: 'ntag424', tapDomain })
35
+
36
+ // 1. Mint
37
+ const range = await claimSet.ranges.create(scope, set.id, { name: 'Tap to donate - February', quantity: 100 })
38
+
39
+ // 2. Send to print: the CSV (carries each tag's key) and the instruction sheet
40
+ const file = await claimSet.ranges.exportFile(scope, set.id, range.id) // { filename, csv }
41
+ const sheet = await claimSet.ranges.instructions(scope, set.id, range.id, 'pdf') // { filename, base64 }
42
+ await claimSet.ranges.update(scope, set.id, range.id, { stage: 'sent', manufacturer: 'Print Co', orderRef: 'PO-123' })
43
+
44
+ // 3. Receive: the manufacturer sends back the same file with UID filled in
45
+ const check = await claimSet.ranges.importUids(scope, set.id, range.id, { csv: returnedCsv })
46
+ // check.rows: ok / index_mismatch / bad_uid / uid_in_use / … ; nothing written yet
47
+ await claimSet.ranges.importUids(scope, set.id, range.id, { csv: returnedCsv, commit: true })
48
+
49
+ // 4. Assign all of it, or from-to
50
+ await claimSet.ranges.assign(scope, set.id, range.id, { collectionId: 'reading-fc', productId: 'scarf', start: 201, end: 250 })
51
+ ```
52
+
53
+ **Programming on a phone instead of a manufacturer** (Sidekick): `ranges.next()` gives the lowest
54
+ tag without a chip, with its URL and key; write it, then `ranges.recordTag(scope, set.id, range.id, code, { uid })` (add `password` for a plain tag's write password).
55
+
56
+ To find where a chip or code went, `partner.lookupTags(partner.id, { uid })` or `{ code }` searches every set the partner owns and returns the hits in `items`, each with its set, tag and range, never a key.
57
+
58
+ ## Open ranges and groups
59
+
60
+ A range's count is fixed when it is minted. Two phone-side jobs don't know their count in advance, so a range
61
+ has a `kind`:
62
+
63
+ - **`open`**: blank tags programmed on Sidekick one at a time. `ranges.create(scope, set.id, { kind: 'open', name })`
64
+ reserves only a start index; each `ranges.next()` hands back a free minted code or mints one more, so
65
+ `quantity`/`endIndex` grow as tags are written (`remaining` is null). One open range per set, and nothing can
66
+ be minted behind it (`409 RANGE_OPEN`) until `ranges.close(scope, set.id, range.id)` turns it into an ordinary
67
+ range (an open range that minted nothing is removed instead).
68
+ - **`group`**: tags that already exist, added by tapping, assigned by hand, and moved together later. Assigners may
69
+ make one: `ranges.create(scope, set.id, { kind: 'group', name, intendedCollectionId? })`. Each tap goes through
70
+ `ranges.addMember(scope, set.id, group.id, { code | uid, collectionId, productId? })`, which stamps the tag with
71
+ the group and assigns it with the single-tag rules; `assigned.skipped` says when a tag was left alone (claimed,
72
+ or in a collection you don't administer). `ranges.assign(scope, set.id, group.id, { collectionId })` moves every
73
+ member in one go; `ranges.removeMember` takes one out. Groups have no printer file, instructions, import or
74
+ `next` (`400 NOT_A_RANGE`). Its tags must be codes of the group's set; a chip that is a code elsewhere is
75
+ `409 OTHER_SET`.
76
+
77
+ Status reads `open` or `group` for these (and `assigned` once every member of a group is assigned).
78
+
79
+ ## When a tag fails on the phone
80
+
81
+ `errors.report({ app: 'sidekick', operation: 'tag.program', errorCode: 'TAG_LOST', message, entityType: 'tag',
82
+ entityId: chipUid, labels: { claimSetId, code, failedStep }, context: { steps, timings, hostLog } })` keeps what
83
+ the phone saw in the platform's one error log (never a key: fields that look like one are dropped).
84
+ `partner.tagAttempts(partner.id, chipUid)` (in `items`) and the platform's tag lookup read it back, newest first, so a
85
+ failing chip can be understood by its UID without the phone's console.
86
+
87
+ ## The printer file
88
+
89
+ One row per tag, in index order. The manufacturer fills in `UID` and sends the same file back; rows are
90
+ matched by `Code`, and `Index` is checked.
91
+
92
+ | Tag type | Columns |
93
+ |---|---|
94
+ | NTAG 424 DNA | `Index, Code, URL, PiccOffset, Key, UID` |
95
+ | NTAG 213/215/216 | `Index, Code, URL, MirrorOffset, MirrorPage, MirrorByte, UID` |
96
+ | QR | `Index, Code, URL` |
97
+
98
+ `URL` is `https://{tap domain}/t/{set}/{code}` plus the placeholder the chip fills on every read
99
+ (`?p=` + 32 zeros for 424 SUN, `?m=00000000000000x000000` for the 21x UID and counter mirror). The
100
+ offsets are byte positions in the NDEF data, assuming the `https://` URI prefix code and a short record.
101
+
102
+ ## Notes
103
+
104
+ - Range responses are never cached by the SDK: tags change as they're programmed and several carry keys.
105
+ - A tag bound to a proof (minted or claimed) is never moved or cleared by `assign`; it's reported in `skipped`.
106
+ - `status` is the stage (`minted`, `sent`, `received`), or `assigned` once every tag is assigned.
@@ -1,120 +1,120 @@
1
- {
2
- "tokensVersion": "v1",
3
- "note": "Reference starter themes for the theme-tokens v1 contract (see theme-tokens.md). These seed the Hub lookbook; the AI refines from one of these or generates new value-sets. Each is a plain value map the host expands to --sl-* on the app mount root. All pass WCAG AA for fg/bg and on-accent/accent.",
4
- "themes": [
5
- {
6
- "id": "clean-slate",
7
- "name": "Clean Slate",
8
- "description": "Neutral default — safe, modern, brandable. The fallback identity.",
9
- "values": {
10
- "color-bg": "#ffffff",
11
- "color-surface": "#f7f7f8",
12
- "color-surface-raised": "#ffffff",
13
- "color-fg": "#18181b",
14
- "color-muted": "#71717a",
15
- "color-border": "#e4e4e7",
16
- "color-accent": "#4f46e5",
17
- "color-on-accent": "#ffffff",
18
- "color-accent-soft": "#eef2ff",
19
- "radius-sm": "4px", "radius-md": "8px", "radius-lg": "16px",
20
- "font-heading": "'Inter', ui-sans-serif, system-ui, sans-serif",
21
- "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
22
- }
23
- },
24
- {
25
- "id": "midnight",
26
- "name": "Midnight",
27
- "description": "Dark surface, cool accent. For premium / tech brands.",
28
- "values": {
29
- "color-bg": "#0b0d12",
30
- "color-surface": "#151821",
31
- "color-surface-raised": "#1d212c",
32
- "color-fg": "#e7e9ee",
33
- "color-muted": "#9aa1ad",
34
- "color-border": "#2a2f3a",
35
- "color-accent": "#6ea8fe",
36
- "color-on-accent": "#0b0d12",
37
- "color-accent-soft": "#18233a",
38
- "radius-sm": "5px", "radius-md": "10px", "radius-lg": "18px",
39
- "font-heading": "'Space Grotesk', ui-sans-serif, system-ui, sans-serif",
40
- "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
41
- }
42
- },
43
- {
44
- "id": "warm-editorial",
45
- "name": "Warm Editorial",
46
- "description": "Cream paper, serif headings, terracotta accent. Food, lifestyle, craft.",
47
- "values": {
48
- "color-bg": "#faf7f2",
49
- "color-surface": "#ffffff",
50
- "color-surface-raised": "#ffffff",
51
- "color-fg": "#1a1a1a",
52
- "color-muted": "#6b6b6b",
53
- "color-border": "#e6e0d8",
54
- "color-accent": "#b4531f",
55
- "color-on-accent": "#ffffff",
56
- "color-accent-soft": "#f6e9df",
57
- "radius-sm": "3px", "radius-md": "6px", "radius-lg": "12px",
58
- "font-heading": "'Fraunces', Georgia, serif",
59
- "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
60
- }
61
- },
62
- {
63
- "id": "fresh-mint",
64
- "name": "Fresh Mint",
65
- "description": "Airy light, green accent, soft corners. Wellness, sustainability, outdoors.",
66
- "values": {
67
- "color-bg": "#f6faf7",
68
- "color-surface": "#ffffff",
69
- "color-surface-raised": "#ffffff",
70
- "color-fg": "#14261c",
71
- "color-muted": "#5c7367",
72
- "color-border": "#d9e7de",
73
- "color-accent": "#0f8a5f",
74
- "color-on-accent": "#ffffff",
75
- "color-accent-soft": "#e2f3ea",
76
- "radius-sm": "8px", "radius-md": "14px", "radius-lg": "24px",
77
- "font-heading": "'Poppins', ui-sans-serif, system-ui, sans-serif",
78
- "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
79
- }
80
- },
81
- {
82
- "id": "bold-contrast",
83
- "name": "Bold Contrast",
84
- "description": "Mono, sharp corners, black accent. Streetwear, fashion, high-impact.",
85
- "values": {
86
- "color-bg": "#ffffff",
87
- "color-surface": "#ffffff",
88
- "color-surface-raised": "#ffffff",
89
- "color-fg": "#0a0a0a",
90
- "color-muted": "#5c5c5c",
91
- "color-border": "#0a0a0a",
92
- "color-accent": "#0a0a0a",
93
- "color-on-accent": "#ffffff",
94
- "color-accent-soft": "#f0f0f0",
95
- "radius-sm": "0px", "radius-md": "0px", "radius-lg": "2px",
96
- "font-heading": "'Archivo', ui-sans-serif, system-ui, sans-serif",
97
- "font-body": "'Archivo', ui-sans-serif, system-ui, sans-serif"
98
- }
99
- },
100
- {
101
- "id": "soft-pastel",
102
- "name": "Soft Pastel",
103
- "description": "Gentle lilac, very rounded, friendly. Kids, beauty, playful DTC.",
104
- "values": {
105
- "color-bg": "#fbf7ff",
106
- "color-surface": "#ffffff",
107
- "color-surface-raised": "#ffffff",
108
- "color-fg": "#241b33",
109
- "color-muted": "#7a6f8c",
110
- "color-border": "#ece2f7",
111
- "color-accent": "#7c3aed",
112
- "color-on-accent": "#ffffff",
113
- "color-accent-soft": "#f1e9fe",
114
- "radius-sm": "10px", "radius-md": "18px", "radius-lg": "28px",
115
- "font-heading": "'Quicksand', ui-sans-serif, system-ui, sans-serif",
116
- "font-body": "'Nunito', ui-sans-serif, system-ui, sans-serif"
117
- }
118
- }
119
- ]
120
- }
1
+ {
2
+ "tokensVersion": "v1",
3
+ "note": "Reference starter themes for the theme-tokens v1 contract (see theme-tokens.md). These seed the Hub lookbook; the AI refines from one of these or generates new value-sets. Each is a plain value map the host expands to --sl-* on the app mount root. All pass WCAG AA for fg/bg and on-accent/accent.",
4
+ "themes": [
5
+ {
6
+ "id": "clean-slate",
7
+ "name": "Clean Slate",
8
+ "description": "Neutral default — safe, modern, brandable. The fallback identity.",
9
+ "values": {
10
+ "color-bg": "#ffffff",
11
+ "color-surface": "#f7f7f8",
12
+ "color-surface-raised": "#ffffff",
13
+ "color-fg": "#18181b",
14
+ "color-muted": "#71717a",
15
+ "color-border": "#e4e4e7",
16
+ "color-accent": "#4f46e5",
17
+ "color-on-accent": "#ffffff",
18
+ "color-accent-soft": "#eef2ff",
19
+ "radius-sm": "4px", "radius-md": "8px", "radius-lg": "16px",
20
+ "font-heading": "'Inter', ui-sans-serif, system-ui, sans-serif",
21
+ "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
22
+ }
23
+ },
24
+ {
25
+ "id": "midnight",
26
+ "name": "Midnight",
27
+ "description": "Dark surface, cool accent. For premium / tech brands.",
28
+ "values": {
29
+ "color-bg": "#0b0d12",
30
+ "color-surface": "#151821",
31
+ "color-surface-raised": "#1d212c",
32
+ "color-fg": "#e7e9ee",
33
+ "color-muted": "#9aa1ad",
34
+ "color-border": "#2a2f3a",
35
+ "color-accent": "#6ea8fe",
36
+ "color-on-accent": "#0b0d12",
37
+ "color-accent-soft": "#18233a",
38
+ "radius-sm": "5px", "radius-md": "10px", "radius-lg": "18px",
39
+ "font-heading": "'Space Grotesk', ui-sans-serif, system-ui, sans-serif",
40
+ "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
41
+ }
42
+ },
43
+ {
44
+ "id": "warm-editorial",
45
+ "name": "Warm Editorial",
46
+ "description": "Cream paper, serif headings, terracotta accent. Food, lifestyle, craft.",
47
+ "values": {
48
+ "color-bg": "#faf7f2",
49
+ "color-surface": "#ffffff",
50
+ "color-surface-raised": "#ffffff",
51
+ "color-fg": "#1a1a1a",
52
+ "color-muted": "#6b6b6b",
53
+ "color-border": "#e6e0d8",
54
+ "color-accent": "#b4531f",
55
+ "color-on-accent": "#ffffff",
56
+ "color-accent-soft": "#f6e9df",
57
+ "radius-sm": "3px", "radius-md": "6px", "radius-lg": "12px",
58
+ "font-heading": "'Fraunces', Georgia, serif",
59
+ "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
60
+ }
61
+ },
62
+ {
63
+ "id": "fresh-mint",
64
+ "name": "Fresh Mint",
65
+ "description": "Airy light, green accent, soft corners. Wellness, sustainability, outdoors.",
66
+ "values": {
67
+ "color-bg": "#f6faf7",
68
+ "color-surface": "#ffffff",
69
+ "color-surface-raised": "#ffffff",
70
+ "color-fg": "#14261c",
71
+ "color-muted": "#5c7367",
72
+ "color-border": "#d9e7de",
73
+ "color-accent": "#0f8a5f",
74
+ "color-on-accent": "#ffffff",
75
+ "color-accent-soft": "#e2f3ea",
76
+ "radius-sm": "8px", "radius-md": "14px", "radius-lg": "24px",
77
+ "font-heading": "'Poppins', ui-sans-serif, system-ui, sans-serif",
78
+ "font-body": "'Inter', ui-sans-serif, system-ui, sans-serif"
79
+ }
80
+ },
81
+ {
82
+ "id": "bold-contrast",
83
+ "name": "Bold Contrast",
84
+ "description": "Mono, sharp corners, black accent. Streetwear, fashion, high-impact.",
85
+ "values": {
86
+ "color-bg": "#ffffff",
87
+ "color-surface": "#ffffff",
88
+ "color-surface-raised": "#ffffff",
89
+ "color-fg": "#0a0a0a",
90
+ "color-muted": "#5c5c5c",
91
+ "color-border": "#0a0a0a",
92
+ "color-accent": "#0a0a0a",
93
+ "color-on-accent": "#ffffff",
94
+ "color-accent-soft": "#f0f0f0",
95
+ "radius-sm": "0px", "radius-md": "0px", "radius-lg": "2px",
96
+ "font-heading": "'Archivo', ui-sans-serif, system-ui, sans-serif",
97
+ "font-body": "'Archivo', ui-sans-serif, system-ui, sans-serif"
98
+ }
99
+ },
100
+ {
101
+ "id": "soft-pastel",
102
+ "name": "Soft Pastel",
103
+ "description": "Gentle lilac, very rounded, friendly. Kids, beauty, playful DTC.",
104
+ "values": {
105
+ "color-bg": "#fbf7ff",
106
+ "color-surface": "#ffffff",
107
+ "color-surface-raised": "#ffffff",
108
+ "color-fg": "#241b33",
109
+ "color-muted": "#7a6f8c",
110
+ "color-border": "#ece2f7",
111
+ "color-accent": "#7c3aed",
112
+ "color-on-accent": "#ffffff",
113
+ "color-accent-soft": "#f1e9fe",
114
+ "radius-sm": "10px", "radius-md": "18px", "radius-lg": "28px",
115
+ "font-heading": "'Quicksand', ui-sans-serif, system-ui, sans-serif",
116
+ "font-body": "'Nunito', ui-sans-serif, system-ui, sans-serif"
117
+ }
118
+ }
119
+ ]
120
+ }