@taggor/contract 0.0.0-stage → 0.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.
Files changed (343) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/artifact-keys.d.ts +169 -0
  5. package/dist/artifact-keys.d.ts.map +1 -0
  6. package/dist/artifact-keys.js +195 -0
  7. package/dist/artifact-keys.js.map +1 -0
  8. package/dist/assets.d.ts +72 -0
  9. package/dist/assets.d.ts.map +1 -0
  10. package/dist/assets.js +94 -0
  11. package/dist/assets.js.map +1 -0
  12. package/dist/bounded-path.d.ts +29 -0
  13. package/dist/bounded-path.d.ts.map +1 -0
  14. package/dist/bounded-path.js +57 -0
  15. package/dist/bounded-path.js.map +1 -0
  16. package/dist/bounded.d.ts +47 -0
  17. package/dist/bounded.d.ts.map +1 -0
  18. package/dist/bounded.js +93 -0
  19. package/dist/bounded.js.map +1 -0
  20. package/dist/build-diagnostic.d.ts +89 -0
  21. package/dist/build-diagnostic.d.ts.map +1 -0
  22. package/dist/build-diagnostic.js +91 -0
  23. package/dist/build-diagnostic.js.map +1 -0
  24. package/dist/component-types.d.ts +61 -0
  25. package/dist/component-types.d.ts.map +1 -0
  26. package/dist/component-types.js +277 -0
  27. package/dist/component-types.js.map +1 -0
  28. package/dist/consent-text.d.ts +31 -0
  29. package/dist/consent-text.d.ts.map +1 -0
  30. package/dist/consent-text.js +41 -0
  31. package/dist/consent-text.js.map +1 -0
  32. package/dist/contract-version.d.ts +150 -0
  33. package/dist/contract-version.d.ts.map +1 -0
  34. package/dist/contract-version.js +198 -0
  35. package/dist/contract-version.js.map +1 -0
  36. package/dist/credential-fields.d.ts +31 -0
  37. package/dist/credential-fields.d.ts.map +1 -0
  38. package/dist/credential-fields.js +36 -0
  39. package/dist/credential-fields.js.map +1 -0
  40. package/dist/css-tokens.d.ts +46 -0
  41. package/dist/css-tokens.d.ts.map +1 -0
  42. package/dist/css-tokens.js +189 -0
  43. package/dist/css-tokens.js.map +1 -0
  44. package/dist/css-value.d.ts +42 -0
  45. package/dist/css-value.d.ts.map +1 -0
  46. package/dist/css-value.js +78 -0
  47. package/dist/css-value.js.map +1 -0
  48. package/dist/data-api.d.ts +127 -0
  49. package/dist/data-api.d.ts.map +1 -0
  50. package/dist/data-api.js +167 -0
  51. package/dist/data-api.js.map +1 -0
  52. package/dist/denylist-keys.d.ts +19 -0
  53. package/dist/denylist-keys.d.ts.map +1 -0
  54. package/dist/denylist-keys.js +48 -0
  55. package/dist/denylist-keys.js.map +1 -0
  56. package/dist/diagnostic-catalog.d.ts +1402 -0
  57. package/dist/diagnostic-catalog.d.ts.map +1 -0
  58. package/dist/diagnostic-catalog.js +1311 -0
  59. package/dist/diagnostic-catalog.js.map +1 -0
  60. package/dist/dom-members.snapshot.d.ts +33 -0
  61. package/dist/dom-members.snapshot.d.ts.map +1 -0
  62. package/dist/dom-members.snapshot.js +760 -0
  63. package/dist/dom-members.snapshot.js.map +1 -0
  64. package/dist/early-loading.d.ts +27 -0
  65. package/dist/early-loading.d.ts.map +1 -0
  66. package/dist/early-loading.js +44 -0
  67. package/dist/early-loading.js.map +1 -0
  68. package/dist/error-catalog.d.ts +749 -0
  69. package/dist/error-catalog.d.ts.map +1 -0
  70. package/dist/error-catalog.js +720 -0
  71. package/dist/error-catalog.js.map +1 -0
  72. package/dist/executable-config.d.ts +35 -0
  73. package/dist/executable-config.d.ts.map +1 -0
  74. package/dist/executable-config.js +44 -0
  75. package/dist/executable-config.js.map +1 -0
  76. package/dist/freeze.d.ts +17 -0
  77. package/dist/freeze.d.ts.map +1 -0
  78. package/dist/freeze.js +29 -0
  79. package/dist/freeze.js.map +1 -0
  80. package/dist/gunzip.d.ts +33 -0
  81. package/dist/gunzip.d.ts.map +1 -0
  82. package/dist/gunzip.js +330 -0
  83. package/dist/gunzip.js.map +1 -0
  84. package/dist/hostname.d.ts +74 -0
  85. package/dist/hostname.d.ts.map +1 -0
  86. package/dist/hostname.js +215 -0
  87. package/dist/hostname.js.map +1 -0
  88. package/dist/human-actions.d.ts +49 -0
  89. package/dist/human-actions.d.ts.map +1 -0
  90. package/dist/human-actions.js +272 -0
  91. package/dist/human-actions.js.map +1 -0
  92. package/dist/index.d.ts +73 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +73 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/json-schema.d.ts +108 -0
  97. package/dist/json-schema.d.ts.map +1 -0
  98. package/dist/json-schema.js +240 -0
  99. package/dist/json-schema.js.map +1 -0
  100. package/dist/key-checksum.d.ts +33 -0
  101. package/dist/key-checksum.d.ts.map +1 -0
  102. package/dist/key-checksum.js +67 -0
  103. package/dist/key-checksum.js.map +1 -0
  104. package/dist/libraries.d.ts +60 -0
  105. package/dist/libraries.d.ts.map +1 -0
  106. package/dist/libraries.js +120 -0
  107. package/dist/libraries.js.map +1 -0
  108. package/dist/limit-catalog.d.ts +381 -0
  109. package/dist/limit-catalog.d.ts.map +1 -0
  110. package/dist/limit-catalog.js +429 -0
  111. package/dist/limit-catalog.js.map +1 -0
  112. package/dist/limits.d.ts +167 -0
  113. package/dist/limits.d.ts.map +1 -0
  114. package/dist/limits.js +175 -0
  115. package/dist/limits.js.map +1 -0
  116. package/dist/locale-tag.d.ts +21 -0
  117. package/dist/locale-tag.d.ts.map +1 -0
  118. package/dist/locale-tag.js +21 -0
  119. package/dist/locale-tag.js.map +1 -0
  120. package/dist/make-diagnostic.d.ts +74 -0
  121. package/dist/make-diagnostic.d.ts.map +1 -0
  122. package/dist/make-diagnostic.js +100 -0
  123. package/dist/make-diagnostic.js.map +1 -0
  124. package/dist/manifest-compat-diagnostics.d.ts +23 -0
  125. package/dist/manifest-compat-diagnostics.d.ts.map +1 -0
  126. package/dist/manifest-compat-diagnostics.js +150 -0
  127. package/dist/manifest-compat-diagnostics.js.map +1 -0
  128. package/dist/manifest-compat.d.ts +58 -0
  129. package/dist/manifest-compat.d.ts.map +1 -0
  130. package/dist/manifest-compat.js +377 -0
  131. package/dist/manifest-compat.js.map +1 -0
  132. package/dist/manifest.d.ts +1769 -0
  133. package/dist/manifest.d.ts.map +1 -0
  134. package/dist/manifest.js +421 -0
  135. package/dist/manifest.js.map +1 -0
  136. package/dist/metering.d.ts +126 -0
  137. package/dist/metering.d.ts.map +1 -0
  138. package/dist/metering.js +147 -0
  139. package/dist/metering.js.map +1 -0
  140. package/dist/migrate.d.ts +70 -0
  141. package/dist/migrate.d.ts.map +1 -0
  142. package/dist/migrate.js +159 -0
  143. package/dist/migrate.js.map +1 -0
  144. package/dist/money.d.ts +41 -0
  145. package/dist/money.d.ts.map +1 -0
  146. package/dist/money.js +52 -0
  147. package/dist/money.js.map +1 -0
  148. package/dist/names.d.ts +37 -0
  149. package/dist/names.d.ts.map +1 -0
  150. package/dist/names.js +55 -0
  151. package/dist/names.js.map +1 -0
  152. package/dist/overage-pricing.d.ts +89 -0
  153. package/dist/overage-pricing.d.ts.map +1 -0
  154. package/dist/overage-pricing.js +170 -0
  155. package/dist/overage-pricing.js.map +1 -0
  156. package/dist/plan-ids.d.ts +10 -0
  157. package/dist/plan-ids.d.ts.map +1 -0
  158. package/dist/plan-ids.js +8 -0
  159. package/dist/plan-ids.js.map +1 -0
  160. package/dist/plan-limits.d.ts +138 -0
  161. package/dist/plan-limits.d.ts.map +1 -0
  162. package/dist/plan-limits.js +112 -0
  163. package/dist/plan-limits.js.map +1 -0
  164. package/dist/plan-pricing.d.ts +145 -0
  165. package/dist/plan-pricing.d.ts.map +1 -0
  166. package/dist/plan-pricing.js +172 -0
  167. package/dist/plan-pricing.js.map +1 -0
  168. package/dist/plan-usage.d.ts +112 -0
  169. package/dist/plan-usage.d.ts.map +1 -0
  170. package/dist/plan-usage.js +134 -0
  171. package/dist/plan-usage.js.map +1 -0
  172. package/dist/preview-token.d.ts +52 -0
  173. package/dist/preview-token.d.ts.map +1 -0
  174. package/dist/preview-token.js +106 -0
  175. package/dist/preview-token.js.map +1 -0
  176. package/dist/prop-names.d.ts +51 -0
  177. package/dist/prop-names.d.ts.map +1 -0
  178. package/dist/prop-names.js +150 -0
  179. package/dist/prop-names.js.map +1 -0
  180. package/dist/prop-type-docs.d.ts +20 -0
  181. package/dist/prop-type-docs.d.ts.map +1 -0
  182. package/dist/prop-type-docs.js +89 -0
  183. package/dist/prop-type-docs.js.map +1 -0
  184. package/dist/prop-types.d.ts +97 -0
  185. package/dist/prop-types.d.ts.map +1 -0
  186. package/dist/prop-types.js +299 -0
  187. package/dist/prop-types.js.map +1 -0
  188. package/dist/props.d.ts +996 -0
  189. package/dist/props.d.ts.map +1 -0
  190. package/dist/props.js +183 -0
  191. package/dist/props.js.map +1 -0
  192. package/dist/proto-guard.d.ts +29 -0
  193. package/dist/proto-guard.d.ts.map +1 -0
  194. package/dist/proto-guard.js +79 -0
  195. package/dist/proto-guard.js.map +1 -0
  196. package/dist/runtime-errors.d.ts +42 -0
  197. package/dist/runtime-errors.d.ts.map +1 -0
  198. package/dist/runtime-errors.js +42 -0
  199. package/dist/runtime-errors.js.map +1 -0
  200. package/dist/runtime-pointers.d.ts +58 -0
  201. package/dist/runtime-pointers.d.ts.map +1 -0
  202. package/dist/runtime-pointers.js +84 -0
  203. package/dist/runtime-pointers.js.map +1 -0
  204. package/dist/secret-scan.d.ts +191 -0
  205. package/dist/secret-scan.d.ts.map +1 -0
  206. package/dist/secret-scan.js +542 -0
  207. package/dist/secret-scan.js.map +1 -0
  208. package/dist/semver.d.ts +89 -0
  209. package/dist/semver.d.ts.map +1 -0
  210. package/dist/semver.js +400 -0
  211. package/dist/semver.js.map +1 -0
  212. package/dist/server-key.d.ts +68 -0
  213. package/dist/server-key.d.ts.map +1 -0
  214. package/dist/server-key.js +150 -0
  215. package/dist/server-key.js.map +1 -0
  216. package/dist/site-manifest-keys.d.ts +107 -0
  217. package/dist/site-manifest-keys.d.ts.map +1 -0
  218. package/dist/site-manifest-keys.js +146 -0
  219. package/dist/site-manifest-keys.js.map +1 -0
  220. package/dist/site-manifest.d.ts +286 -0
  221. package/dist/site-manifest.d.ts.map +1 -0
  222. package/dist/site-manifest.js +100 -0
  223. package/dist/site-manifest.js.map +1 -0
  224. package/dist/source-archive.d.ts +119 -0
  225. package/dist/source-archive.d.ts.map +1 -0
  226. package/dist/source-archive.js +644 -0
  227. package/dist/source-archive.js.map +1 -0
  228. package/dist/source-package-corpus.d.ts +55 -0
  229. package/dist/source-package-corpus.d.ts.map +1 -0
  230. package/dist/source-package-corpus.js +303 -0
  231. package/dist/source-package-corpus.js.map +1 -0
  232. package/dist/source-package.d.ts +227 -0
  233. package/dist/source-package.d.ts.map +1 -0
  234. package/dist/source-package.js +361 -0
  235. package/dist/source-package.js.map +1 -0
  236. package/dist/source-secrets.d.ts +21 -0
  237. package/dist/source-secrets.d.ts.map +1 -0
  238. package/dist/source-secrets.js +43 -0
  239. package/dist/source-secrets.js.map +1 -0
  240. package/dist/ssr-cap.d.ts +61 -0
  241. package/dist/ssr-cap.d.ts.map +1 -0
  242. package/dist/ssr-cap.js +107 -0
  243. package/dist/ssr-cap.js.map +1 -0
  244. package/dist/ssr-kv.d.ts +18 -0
  245. package/dist/ssr-kv.d.ts.map +1 -0
  246. package/dist/ssr-kv.js +18 -0
  247. package/dist/ssr-kv.js.map +1 -0
  248. package/dist/ssr-version-ledger.d.ts +53 -0
  249. package/dist/ssr-version-ledger.d.ts.map +1 -0
  250. package/dist/ssr-version-ledger.js +88 -0
  251. package/dist/ssr-version-ledger.js.map +1 -0
  252. package/dist/style-references.d.ts +58 -0
  253. package/dist/style-references.d.ts.map +1 -0
  254. package/dist/style-references.js +241 -0
  255. package/dist/style-references.js.map +1 -0
  256. package/dist/tag-name.d.ts +87 -0
  257. package/dist/tag-name.d.ts.map +1 -0
  258. package/dist/tag-name.js +222 -0
  259. package/dist/tag-name.js.map +1 -0
  260. package/dist/tar-writer.d.ts +74 -0
  261. package/dist/tar-writer.d.ts.map +1 -0
  262. package/dist/tar-writer.js +148 -0
  263. package/dist/tar-writer.js.map +1 -0
  264. package/dist/testing.d.ts +11 -0
  265. package/dist/testing.d.ts.map +1 -0
  266. package/dist/testing.js +11 -0
  267. package/dist/testing.js.map +1 -0
  268. package/dist/text-codec.d.ts +36 -0
  269. package/dist/text-codec.d.ts.map +1 -0
  270. package/dist/text-codec.js +32 -0
  271. package/dist/text-codec.js.map +1 -0
  272. package/dist/url-value.d.ts +41 -0
  273. package/dist/url-value.d.ts.map +1 -0
  274. package/dist/url-value.js +147 -0
  275. package/dist/url-value.js.map +1 -0
  276. package/dist/usage-guard.d.ts +99 -0
  277. package/dist/usage-guard.d.ts.map +1 -0
  278. package/dist/usage-guard.js +104 -0
  279. package/dist/usage-guard.js.map +1 -0
  280. package/dist/usage-mirror.d.ts +55 -0
  281. package/dist/usage-mirror.d.ts.map +1 -0
  282. package/dist/usage-mirror.js +52 -0
  283. package/dist/usage-mirror.js.map +1 -0
  284. package/dist/value-check.d.ts +88 -0
  285. package/dist/value-check.d.ts.map +1 -0
  286. package/dist/value-check.js +279 -0
  287. package/dist/value-check.js.map +1 -0
  288. package/dist/value-patterns.d.ts +9 -0
  289. package/dist/value-patterns.d.ts.map +1 -0
  290. package/dist/value-patterns.js +17 -0
  291. package/dist/value-patterns.js.map +1 -0
  292. package/dist/value-schema.d.ts +796 -0
  293. package/dist/value-schema.d.ts.map +1 -0
  294. package/dist/value-schema.js +231 -0
  295. package/dist/value-schema.js.map +1 -0
  296. package/dist/zod-free.d.ts +60 -0
  297. package/dist/zod-free.d.ts.map +1 -0
  298. package/dist/zod-free.js +59 -0
  299. package/dist/zod-free.js.map +1 -0
  300. package/package.json +75 -3
  301. package/schema/DEPLOYED +12 -0
  302. package/schema/build-diagnostic.v1.json +63 -0
  303. package/schema/component-manifest.v1.json +1000 -0
  304. package/schema/data-api.v1.json +194 -0
  305. package/schema/library-manifest.v1.json +60 -0
  306. package/schema/published/SHA256SUMS +36 -0
  307. package/schema/published/build-diagnostic/v1.10.json +83 -0
  308. package/schema/published/build-diagnostic/v1.3.json +83 -0
  309. package/schema/published/build-diagnostic/v1.4.json +83 -0
  310. package/schema/published/build-diagnostic/v1.5.json +83 -0
  311. package/schema/published/build-diagnostic/v1.6.json +83 -0
  312. package/schema/published/build-diagnostic/v1.7.json +83 -0
  313. package/schema/published/build-diagnostic/v1.8.json +83 -0
  314. package/schema/published/build-diagnostic/v1.9.json +83 -0
  315. package/schema/published/component-manifest/v1.10.json +1443 -0
  316. package/schema/published/component-manifest/v1.3.json +1411 -0
  317. package/schema/published/component-manifest/v1.4.json +1419 -0
  318. package/schema/published/component-manifest/v1.5.json +1437 -0
  319. package/schema/published/component-manifest/v1.6.json +1437 -0
  320. package/schema/published/component-manifest/v1.7.json +1437 -0
  321. package/schema/published/component-manifest/v1.8.json +1437 -0
  322. package/schema/published/component-manifest/v1.9.json +1437 -0
  323. package/schema/published/data-api/v1.10.json +282 -0
  324. package/schema/published/data-api/v1.3.json +281 -0
  325. package/schema/published/data-api/v1.4.json +281 -0
  326. package/schema/published/data-api/v1.5.json +281 -0
  327. package/schema/published/data-api/v1.6.json +281 -0
  328. package/schema/published/data-api/v1.7.json +281 -0
  329. package/schema/published/data-api/v1.8.json +282 -0
  330. package/schema/published/data-api/v1.9.json +282 -0
  331. package/schema/published/library-manifest/v1.10.json +68 -0
  332. package/schema/published/library-manifest/v1.5.json +68 -0
  333. package/schema/published/library-manifest/v1.6.json +68 -0
  334. package/schema/published/library-manifest/v1.7.json +68 -0
  335. package/schema/published/library-manifest/v1.8.json +68 -0
  336. package/schema/published/library-manifest/v1.9.json +68 -0
  337. package/schema/published/taggor-config/v1.10.json +56 -0
  338. package/schema/published/taggor-config/v1.5.json +56 -0
  339. package/schema/published/taggor-config/v1.6.json +56 -0
  340. package/schema/published/taggor-config/v1.7.json +56 -0
  341. package/schema/published/taggor-config/v1.8.json +56 -0
  342. package/schema/published/taggor-config/v1.9.json +56 -0
  343. package/schema/taggor-config.v1.json +39 -0
@@ -0,0 +1,106 @@
1
+ /**
2
+ * The private preview token (TAG-415): the capability in `https://<preview host>/p/<token>` that
3
+ * lets anyone holding the link see ONE build's bundle for seven days. The API signs it when a
4
+ * client reads a succeeded build of its own workspace; the edge verifies it without a database
5
+ * (threat T-57: the edge has no Postgres binding, so the token carries everything it needs).
6
+ * Pure and import-free on purpose, like the other files the API and the edge share: the HMAC
7
+ * itself is injected (`PreviewSigner`), each Worker brings its own Web Crypto adapter.
8
+ *
9
+ * Format: `v1.<buildId>.<bundleSha256>.<contractVersion with dashes>.<expiresAt>.<mac>`; `expiresAt` is whole seconds since the
10
+ * epoch, `mac` is the hex HMAC-SHA-256 of `taggor-preview-v1\n<buildId>\n<bundleSha256>\n<contractVersion>\n<expiresAt>`
11
+ * under the preview signing key (a secret of the API and the edge). Every field is validated against a fixed pattern
12
+ * before the MAC is checked or the value is used, so a token never reaches an R2 key or a page
13
+ * with a character the patterns do not allow. The expiry is the build's finish time plus seven
14
+ * days (`previewExpiry`), so the same build always gets the same link.
15
+ */
16
+ import { SHA256_HEX_PATTERN } from "./artifact-keys.js";
17
+ /** How long a preview link lives after its build finished: seven days. */
18
+ export const PREVIEW_TTL_MS = 7 * 24 * 60 * 60 * 1000;
19
+ const VERSION = "v1";
20
+ const BUILD_ID = /^[a-z]{2,8}_[0-9a-z]{10,40}$/;
21
+ const SHA256 = new RegExp(SHA256_HEX_PATTERN);
22
+ const CONTRACT_VERSION = /^(0|[1-9][0-9]{0,2})\.(0|[1-9][0-9]{0,2})\.(0|[1-9][0-9]{0,2})$/;
23
+ const EXPIRY = /^[1-9][0-9]{0,11}$/;
24
+ const MAC_HEX = /^[0-9a-f]{64}$/;
25
+ /** Longest token `verifyPreviewToken` looks at; anything longer is refused unread. */
26
+ export const PREVIEW_TOKEN_MAX_LENGTH = 256;
27
+ const toHex = (bytes) => [...bytes].map((byte) => byte.toString(16).padStart(2, "0")).join("");
28
+ const fromHex = (hex) => Uint8Array.from(hex.match(/../g) ?? [], (pair) => Number.parseInt(pair, 16));
29
+ const messageOf = (claims) => `taggor-preview-${VERSION}\n${claims.buildId}\n${claims.bundleSha256}\n${claims.contractVersion}\n${String(claims.expiresAt)}`;
30
+ /**
31
+ * The expiry of a build's link.
32
+ * Inputs: when the build finished, in milliseconds since the epoch. Output: whole seconds since
33
+ * the epoch, `PREVIEW_TTL_MS` later (rounded up). Errors: none. Side effects: none.
34
+ */
35
+ export function previewExpiry(finishedAtMs) {
36
+ return Math.ceil((finishedAtMs + PREVIEW_TTL_MS) / 1000);
37
+ }
38
+ /**
39
+ * Whether claims are well formed: a build id, a SHA-256 and a positive whole-second expiry.
40
+ * Inputs: any claims. Output: a boolean. Errors: none. Side effects: none.
41
+ */
42
+ export function isPreviewClaims(claims) {
43
+ return (BUILD_ID.test(claims.buildId) &&
44
+ SHA256.test(claims.bundleSha256) &&
45
+ CONTRACT_VERSION.test(claims.contractVersion) &&
46
+ Number.isSafeInteger(claims.expiresAt) &&
47
+ EXPIRY.test(String(claims.expiresAt)));
48
+ }
49
+ /**
50
+ * Signs a token.
51
+ * Inputs: the signer and the claims. Output: the token. Errors: `TypeError` for malformed
52
+ * claims (a bug in the caller); rejects with the signer. Side effects: none.
53
+ */
54
+ export async function issuePreviewToken(signer, claims) {
55
+ if (!isPreviewClaims(claims))
56
+ throw new TypeError("malformed preview claims");
57
+ const mac = toHex(await signer.sign(messageOf(claims)));
58
+ return [
59
+ VERSION,
60
+ claims.buildId,
61
+ claims.bundleSha256,
62
+ claims.contractVersion.replaceAll(".", "-"),
63
+ String(claims.expiresAt),
64
+ mac,
65
+ ].join(".");
66
+ }
67
+ /**
68
+ * Verifies a token taken from a URL.
69
+ * Inputs: the signer, the token (untrusted) and the current time in milliseconds. Output: the
70
+ * claims, or `undefined` for a token that is malformed, tampered with, signed under another key
71
+ * or expired: the caller answers all of them with the same 404. Errors: none thrown; a signer
72
+ * failure also gives `undefined` (fail closed). Side effects: none.
73
+ */
74
+ export async function verifyPreviewToken(signer, token, nowMs) {
75
+ if (token.length > PREVIEW_TOKEN_MAX_LENGTH)
76
+ return undefined;
77
+ const parts = token.split(".");
78
+ const [version, buildId, bundleSha256, dashed, expiry, mac] = parts;
79
+ if (parts.length !== 6 ||
80
+ version !== VERSION ||
81
+ buildId === undefined ||
82
+ bundleSha256 === undefined ||
83
+ dashed === undefined ||
84
+ expiry === undefined ||
85
+ mac === undefined ||
86
+ !MAC_HEX.test(mac)) {
87
+ return undefined;
88
+ }
89
+ const claims = {
90
+ buildId,
91
+ bundleSha256,
92
+ contractVersion: dashed.replaceAll("-", "."),
93
+ expiresAt: Number(expiry),
94
+ };
95
+ if (!isPreviewClaims(claims) || String(claims.expiresAt) !== expiry)
96
+ return undefined;
97
+ try {
98
+ if (!(await signer.verify(messageOf(claims), fromHex(mac))))
99
+ return undefined;
100
+ }
101
+ catch {
102
+ return undefined;
103
+ }
104
+ return claims.expiresAt * 1000 > nowMs ? claims : undefined;
105
+ }
106
+ //# sourceMappingURL=preview-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-token.js","sourceRoot":"","sources":["../src/preview-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AA0BtD,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAChD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAC9C,MAAM,gBAAgB,GAAG,iEAAiE,CAAC;AAC3F,MAAM,MAAM,GAAG,oBAAoB,CAAC;AACpC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAEjC,sFAAsF;AACtF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C,MAAM,KAAK,GAA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AM,CAAC,MAAM,CAAC;KAC1B,CAAC;IACF,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,MAAM;QAAE,OAAO,SAAS,CAAC;IACtF,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;IAChF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Members the runtime's custom element class defines itself: the lifecycle and form-associated
3
+ * callbacks, and the static members the Custom Elements spec reads from the class.
4
+ */
5
+ export declare const CUSTOM_ELEMENT_MEMBERS: readonly ["adoptedCallback", "attributeChangedCallback", "connectedCallback", "connectedMoveCallback", "disabledFeatures", "disconnectedCallback", "formAssociated", "formAssociatedCallback", "formDisabledCallback", "formResetCallback", "formStateRestoreCallback", "observedAttributes"];
6
+ /**
7
+ * The form field API of a form field component's element (TAG-324, a manifest with
8
+ * `formAssociated: true`), as on an `<input>`: the runtime defines these accessors on the element
9
+ * class and forwards them to the element's `ElementInternals` (`value` is the last text the component
10
+ * submits, `""` when none), and the generated `<tag>.d.ts` types them. Not reserved: a prop may
11
+ * share a name (`value` as the initial value, like `<input value>`); its attribute still feeds the
12
+ * prop, the getter is the field's and the setter sets the prop.
13
+ */
14
+ export declare const FORM_FIELD_ACCESSORS: readonly ["value", "form", "validationMessage", "validity"];
15
+ /** The form field methods of a form field component's element (TAG-324), forwarded the same way. */
16
+ export declare const FORM_FIELD_METHODS: readonly ["checkValidity", "reportValidity"];
17
+ /**
18
+ * Global HTML attributes with a native effect on any element (HTML Living Standard, "global
19
+ * attributes", plus `part`/`exportparts` from CSS Shadow Parts, `role` from ARIA, Chrome's
20
+ * `virtualkeyboardpolicy` and, since TAG-304, the proposed `focusgroup` (Open UI) and
21
+ * `headingoffset`/`headingreset` (WHATWG heading levels)). `aria-*`, `data-*` and `on*` are refused
22
+ * by the prop name pattern.
23
+ */
24
+ export declare const NATIVE_GLOBAL_ATTRIBUTES: readonly ["accesskey", "autocapitalize", "autocorrect", "autofocus", "class", "contenteditable", "dir", "draggable", "enterkeyhint", "exportparts", "focusgroup", "headingoffset", "headingreset", "hidden", "id", "inert", "inputmode", "is", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "nonce", "part", "popover", "role", "slot", "spellcheck", "style", "tabindex", "title", "translate", "virtualkeyboardpolicy", "writingsuggestions"];
25
+ /**
26
+ * Derives the HTML attribute of a prop: lowerCamelCase to kebab-case (`maxValue` → `max-value`).
27
+ *
28
+ * Inputs: a prop name accepted by `PROP_NAME_PATTERN`. Output: the attribute name. The mapping is
29
+ * injective for valid prop names, so two props never share an attribute. Errors: none. Side
30
+ * effects: none.
31
+ */
32
+ export declare function propAttributeName(propName: string): string;
33
+ /**
34
+ * Inverse of `propAttributeName`: kebab-case attribute to lowerCamelCase prop (`max-value` →
35
+ * `maxValue`). The runtime uses it in `attributeChangedCallback` (TAG-303).
36
+ *
37
+ * Inputs: any attribute name. Output: the prop name it would belong to; the caller still looks
38
+ * it up among the declared props, so a name that maps to no prop is simply ignored. Errors: none.
39
+ * Side effects: none.
40
+ */
41
+ export declare function attributePropName(attributeName: string): string;
42
+ /**
43
+ * Prop names that would shadow a member of the host element (browser snapshot, lifecycle
44
+ * callbacks, `Object.prototype`) or own a global attribute with a native effect. Sorted, unique,
45
+ * only names that the prefix and shape rules do not already refuse. The runtime (TAG-304) also
46
+ * refuses any name found on the live `HTMLElement.prototype`.
47
+ */
48
+ export declare const RESERVED_PROP_NAMES: readonly string[];
49
+ /** Prop name: lowerCamelCase, not an event handler (`on…`), ARIA or data attribute, nor reserved. */
50
+ export declare const PROP_NAME_PATTERN: RegExp;
51
+ //# sourceMappingURL=prop-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-names.d.ts","sourceRoot":"","sources":["../src/prop-names.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,+RAaxB,CAAC;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,6DAKtB,CAAC;AAEZ,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,8CAA8D,CAAC;AAE9F;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,scAqC1B,CAAC;AAOZ;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE/D;AAuBD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAA0C,CAAC;AAQ5F,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,EAAE,MAA0C,CAAC"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Prop name rules of component contract v1 without Zod (TAG-201, reserved list derived by TAG-205):
3
+ * the reserved names, the prop name pattern and the prop ↔ attribute mapping. The runtime may
4
+ * import this module's values through `@taggor/contract/zod-free`.
5
+ *
6
+ * A prop is installed as a property and an attribute of the host element, so its name must not
7
+ * shadow anything the element already has. The reserved list is derived, not typed by hand, from:
8
+ * the browser snapshots of the prototype chain (`dom-members.snapshot.ts`: Chrome, and Firefox
9
+ * since TAG-304), the custom element
10
+ * lifecycle callbacks and static members (not on `HTMLElement.prototype`, but the runtime's class
11
+ * defines them), and the global attributes with a native effect, compared by `propAttributeName`
12
+ * (a prop `contenteditable` would own the attribute `contenteditable`). Names already refused by
13
+ * the pattern's own rules (`on…`, `aria…`, `data…`, anything not lowerCamelCase) stay out of the
14
+ * list to keep the generated JSON Schema pattern short.
15
+ */
16
+ import { DOM_MEMBER_SNAPSHOT, FIREFOX_DOM_MEMBER_SNAPSHOT } from "./dom-members.snapshot.js";
17
+ /**
18
+ * Members the runtime's custom element class defines itself: the lifecycle and form-associated
19
+ * callbacks, and the static members the Custom Elements spec reads from the class.
20
+ */
21
+ export const CUSTOM_ELEMENT_MEMBERS = Object.freeze([
22
+ "adoptedCallback",
23
+ "attributeChangedCallback",
24
+ "connectedCallback",
25
+ "connectedMoveCallback",
26
+ "disabledFeatures",
27
+ "disconnectedCallback",
28
+ "formAssociated",
29
+ "formAssociatedCallback",
30
+ "formDisabledCallback",
31
+ "formResetCallback",
32
+ "formStateRestoreCallback",
33
+ "observedAttributes",
34
+ ]);
35
+ /**
36
+ * The form field API of a form field component's element (TAG-324, a manifest with
37
+ * `formAssociated: true`), as on an `<input>`: the runtime defines these accessors on the element
38
+ * class and forwards them to the element's `ElementInternals` (`value` is the last text the component
39
+ * submits, `""` when none), and the generated `<tag>.d.ts` types them. Not reserved: a prop may
40
+ * share a name (`value` as the initial value, like `<input value>`); its attribute still feeds the
41
+ * prop, the getter is the field's and the setter sets the prop.
42
+ */
43
+ export const FORM_FIELD_ACCESSORS = Object.freeze([
44
+ "value",
45
+ "form",
46
+ "validationMessage",
47
+ "validity",
48
+ ]);
49
+ /** The form field methods of a form field component's element (TAG-324), forwarded the same way. */
50
+ export const FORM_FIELD_METHODS = Object.freeze(["checkValidity", "reportValidity"]);
51
+ /**
52
+ * Global HTML attributes with a native effect on any element (HTML Living Standard, "global
53
+ * attributes", plus `part`/`exportparts` from CSS Shadow Parts, `role` from ARIA, Chrome's
54
+ * `virtualkeyboardpolicy` and, since TAG-304, the proposed `focusgroup` (Open UI) and
55
+ * `headingoffset`/`headingreset` (WHATWG heading levels)). `aria-*`, `data-*` and `on*` are refused
56
+ * by the prop name pattern.
57
+ */
58
+ export const NATIVE_GLOBAL_ATTRIBUTES = Object.freeze([
59
+ "accesskey",
60
+ "autocapitalize",
61
+ "autocorrect",
62
+ "autofocus",
63
+ "class",
64
+ "contenteditable",
65
+ "dir",
66
+ "draggable",
67
+ "enterkeyhint",
68
+ "exportparts",
69
+ "focusgroup",
70
+ "headingoffset",
71
+ "headingreset",
72
+ "hidden",
73
+ "id",
74
+ "inert",
75
+ "inputmode",
76
+ "is",
77
+ "itemid",
78
+ "itemprop",
79
+ "itemref",
80
+ "itemscope",
81
+ "itemtype",
82
+ "lang",
83
+ "nonce",
84
+ "part",
85
+ "popover",
86
+ "role",
87
+ "slot",
88
+ "spellcheck",
89
+ "style",
90
+ "tabindex",
91
+ "title",
92
+ "translate",
93
+ "virtualkeyboardpolicy",
94
+ "writingsuggestions",
95
+ ]);
96
+ /** Shape of a prop name, before the deny rules. */
97
+ const PROP_NAME_SHAPE = /^[a-z][a-zA-Z0-9]*$/;
98
+ /** Names the pattern refuses by prefix: event handlers, ARIA and data attributes. */
99
+ const PREFIX_DENIED = /^(?:on|(?:aria|data)[A-Z0-9])/;
100
+ /**
101
+ * Derives the HTML attribute of a prop: lowerCamelCase to kebab-case (`maxValue` → `max-value`).
102
+ *
103
+ * Inputs: a prop name accepted by `PROP_NAME_PATTERN`. Output: the attribute name. The mapping is
104
+ * injective for valid prop names, so two props never share an attribute. Errors: none. Side
105
+ * effects: none.
106
+ */
107
+ export function propAttributeName(propName) {
108
+ return propName.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
109
+ }
110
+ /**
111
+ * Inverse of `propAttributeName`: kebab-case attribute to lowerCamelCase prop (`max-value` →
112
+ * `maxValue`). The runtime uses it in `attributeChangedCallback` (TAG-303).
113
+ *
114
+ * Inputs: any attribute name. Output: the prop name it would belong to; the caller still looks
115
+ * it up among the declared props, so a name that maps to no prop is simply ignored. Errors: none.
116
+ * Side effects: none.
117
+ */
118
+ export function attributePropName(attributeName) {
119
+ return attributeName.replace(/-([a-z0-9])/g, (_match, next) => next.toUpperCase());
120
+ }
121
+ /** Every member name of one browser snapshot, all prototypes together. */
122
+ function snapshotMembers(snapshot) {
123
+ return Object.values(snapshot.prototypes).flat();
124
+ }
125
+ function deriveReservedNames() {
126
+ const candidates = [
127
+ // The union of the browsers' snapshots (TAG-304): Firefox has `setCapture` and others.
128
+ ...[DOM_MEMBER_SNAPSHOT, FIREFOX_DOM_MEMBER_SNAPSHOT].flatMap(snapshotMembers),
129
+ ...CUSTOM_ELEMENT_MEMBERS,
130
+ ...NATIVE_GLOBAL_ATTRIBUTES.map(attributePropName),
131
+ ];
132
+ const kept = candidates.filter((name) => PROP_NAME_SHAPE.test(name) && !PREFIX_DENIED.test(name));
133
+ return Object.freeze([...new Set(kept)].sort());
134
+ }
135
+ // `@__PURE__` on both calls, which take no arguments (esbuild keeps the arguments of a pure call
136
+ // it drops): a bundle that reads neither constant (the runtime's attribute mapping) drops both and
137
+ // the DOM snapshot with them, about 2 KB gz (TAG-303; criterion of TAG-2208).
138
+ /**
139
+ * Prop names that would shadow a member of the host element (browser snapshot, lifecycle
140
+ * callbacks, `Object.prototype`) or own a global attribute with a native effect. Sorted, unique,
141
+ * only names that the prefix and shape rules do not already refuse. The runtime (TAG-304) also
142
+ * refuses any name found on the live `HTMLElement.prototype`.
143
+ */
144
+ export const RESERVED_PROP_NAMES = /* @__PURE__ */ deriveReservedNames();
145
+ function propNamePattern() {
146
+ return new RegExp(`^(?!on)(?!(?:aria|data)[A-Z0-9])(?!(?:${RESERVED_PROP_NAMES.join("|")})$)[a-z][a-zA-Z0-9]*$`);
147
+ }
148
+ /** Prop name: lowerCamelCase, not an event handler (`on…`), ARIA or data attribute, nor reserved. */
149
+ export const PROP_NAME_PATTERN = /* @__PURE__ */ propNamePattern();
150
+ //# sourceMappingURL=prop-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-names.js","sourceRoot":"","sources":["../src/prop-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAA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C,uBAAuB,CAC9F,CAAC;AACJ,CAAC;AAED,qGAAqG;AACrG,MAAM,CAAC,MAAM,iBAAiB,GAAW,eAAe,CAAC,eAAe,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { PropType } from "./props.js";
2
+ /** A text in each supported locale. */
3
+ export interface LocalizedText {
4
+ readonly "pt-BR": string;
5
+ readonly en: string;
6
+ }
7
+ /** Description of one prop type. */
8
+ export interface PropTypeDoc {
9
+ /** Attribute text accepted. */
10
+ readonly attribute: LocalizedText;
11
+ /** Value the component receives. */
12
+ readonly value: LocalizedText;
13
+ }
14
+ /**
15
+ * One description per prop type; a test fails if a catalog type has none.
16
+ *
17
+ * Inputs: none. Output: frozen texts. Errors: none. Side effects: none.
18
+ */
19
+ export declare const PROP_TYPE_DOCS: Readonly<Record<PropType, PropTypeDoc>>;
20
+ //# sourceMappingURL=prop-type-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-type-docs.d.ts","sourceRoot":"","sources":["../src/prop-type-docs.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B;AAKD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,CAyEjE,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Human descriptions of the prop type catalog (TAG-205), in pt-BR and en: what attribute text each
3
+ * type accepts and what value results. SPEC.md's table is generated from this and from
4
+ * `propTypeCatalog` (`pnpm --filter @taggor/contract gen`); the builder and the docs site (en) read
5
+ * the same text. Kept apart from the catalog so the runtime bundle never carries prose.
6
+ */
7
+ import { MANIFEST_LIMITS } from "./limits.js";
8
+ const json = String(MANIFEST_LIMITS.propJsonMaxLength);
9
+ const depth = String(MANIFEST_LIMITS.valueSchemaDepth);
10
+ /**
11
+ * One description per prop type; a test fails if a catalog type has none.
12
+ *
13
+ * Inputs: none. Output: frozen texts. Errors: none. Side effects: none.
14
+ */
15
+ export const PROP_TYPE_DOCS = Object.freeze({
16
+ string: {
17
+ attribute: {
18
+ "pt-BR": "o texto como veio, dentro de `minLength`/`maxLength` e do `format`",
19
+ en: "the text as is, within `minLength`/`maxLength` and the `format`",
20
+ },
21
+ value: { "pt-BR": "a mesma string", en: "the same string" },
22
+ },
23
+ number: {
24
+ attribute: {
25
+ "pt-BR": `decimal (\`-1.5\`, \`2e3\`; sem \`+\`, espaços, hex, \`Infinity\`), até ${String(MANIFEST_LIMITS.numberTextMaxLength)} caracteres, dentro de \`min\`/\`max\`/\`integer\``,
26
+ en: `decimal (\`-1.5\`, \`2e3\`; no \`+\`, spaces, hex, \`Infinity\`), up to ${String(MANIFEST_LIMITS.numberTextMaxLength)} characters, within \`min\`/\`max\`/\`integer\``,
27
+ },
28
+ value: {
29
+ "pt-BR": "`number` finito (`step` é só dica; `-0` vira `0`)",
30
+ en: "finite `number` (`step` is a hint only; `-0` becomes `0`)",
31
+ },
32
+ },
33
+ boolean: {
34
+ attribute: {
35
+ "pt-BR": 'presença do atributo, qualquer texto (até `"false"`)',
36
+ en: 'attribute presence, any text (even `"false"`)',
37
+ },
38
+ value: { "pt-BR": "`true`; ausente = `false`", en: "`true`; absent = `false`" },
39
+ },
40
+ enum: {
41
+ attribute: { "pt-BR": "exatamente um dos `values`", en: "exactly one of the `values`" },
42
+ value: { "pt-BR": "a mesma string", en: "the same string" },
43
+ },
44
+ color: {
45
+ attribute: {
46
+ "pt-BR": `valor CSS da allowlist, até ${String(MANIFEST_LIMITS.colorMaxLength)} caracteres, parênteses balanceados`,
47
+ en: `CSS value from the allowlist, up to ${String(MANIFEST_LIMITS.colorMaxLength)} characters, balanced parentheses`,
48
+ },
49
+ value: {
50
+ "pt-BR": "a mesma string (o runtime exige também `CSS.supports`)",
51
+ en: "the same string (the runtime also requires `CSS.supports`)",
52
+ },
53
+ },
54
+ url: {
55
+ attribute: {
56
+ "pt-BR": `\`https://\`, \`http://\` ou \`mailto:\` minúsculo conforme \`protocols\`, ASCII imprimível sem espaço, aspas, \`<>\`, crase ou \`\\\`, até ${String(MANIFEST_LIMITS.urlMaxLength)} caracteres, aceito por \`new URL()\`, sem userinfo; \`mailto:\` com um endereço e só \`subject\`/\`body\``,
57
+ en: `lowercase \`https://\`, \`http://\` or \`mailto:\` as \`protocols\` allows, printable ASCII without space, quotes, \`<>\`, backtick or \`\\\`, up to ${String(MANIFEST_LIMITS.urlMaxLength)} characters, accepted by \`new URL()\`, no userinfo; \`mailto:\` with one address and only \`subject\`/\`body\``,
58
+ },
59
+ value: { "pt-BR": "a mesma string", en: "the same string" },
60
+ },
61
+ date: {
62
+ attribute: {
63
+ "pt-BR": "data ISO existente `AAAA-MM-DD`, dentro de `min`/`max`",
64
+ en: "existing ISO date `YYYY-MM-DD`, within `min`/`max`",
65
+ },
66
+ value: { "pt-BR": "a mesma string ISO", en: "the same ISO string" },
67
+ },
68
+ array: {
69
+ attribute: {
70
+ "pt-BR": `JSON de até ${json} caracteres e ${depth} níveis, validado por \`items\``,
71
+ en: `JSON up to ${json} characters and ${depth} levels, checked against \`items\``,
72
+ },
73
+ value: {
74
+ "pt-BR": "lista nova; objetos internos só com os campos declarados",
75
+ en: "a new list; inner objects keep only declared fields",
76
+ },
77
+ },
78
+ object: {
79
+ attribute: {
80
+ "pt-BR": `JSON de até ${json} caracteres e ${depth} níveis, validado por \`fields\`/\`required\``,
81
+ en: `JSON up to ${json} characters and ${depth} levels, checked against \`fields\`/\`required\``,
82
+ },
83
+ value: {
84
+ "pt-BR": "objeto novo só com os campos declarados",
85
+ en: "a new object with only the declared fields",
86
+ },
87
+ },
88
+ });
89
+ //# sourceMappingURL=prop-type-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-type-docs.js","sourceRoot":"","sources":["../src/prop-type-docs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiB9C,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;AACvD,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4C,MAAM,CAAC,MAAM,CAAC;IACnF,MAAM,EAAE;QACN,SAAS,EAAE;YACT,OAAO,EAAE,oEAAoE;YAC7E,EAAE,EAAE,iEAAiE;SACtE;QACD,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,iBAAiB,EAAE;KAC5D;IACD,MAAM,EAAE;QACN,SAAS,EAAE;YACT,OAAO,EAAE,2EAA2E,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAAC,oDAAoD;YACnL,EAAE,EAAE,2EAA2E,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAAC,iDAAiD;SAC5K;QACD,KAAK,EAAE;YACL,OAAO,EAAE,mDAAmD;YAC5D,EAAE,EAAE,2DAA2D;SAChE;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAE;YACT,OAAO,EAAE,sDAAsD;YAC/D,EAAE,EAAE,+CAA+C;SACpD;QACD,KAAK,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE,EAAE,0BAA0B,EAAE;KAChF;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE,OAAO,EAAE,4BAA4B,EAAE,EAAE,EAAE,6BAA6B,EAAE;QACvF,KAAK,EAAE,EAAE,O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,0 +1,97 @@
1
+ import type { PropDeclaration, PropType } from "./props.js";
2
+ import { type ValueOutcome, type ValueProblem } from "./value-check.js";
3
+ /** The JS type of the value of each prop type. Dates stay ISO strings (no time zone involved). */
4
+ export interface PropValueTypes {
5
+ string: string;
6
+ number: number;
7
+ boolean: boolean;
8
+ enum: string;
9
+ color: string;
10
+ url: string;
11
+ date: string;
12
+ array: unknown[];
13
+ object: Record<string, unknown>;
14
+ }
15
+ /** The value of a prop of type `T`. */
16
+ export type PropValue<T extends PropType> = PropValueTypes[T];
17
+ /** The declaration of a prop of type `T`. */
18
+ export type PropDeclarationOf<T extends PropType> = Extract<PropDeclaration, {
19
+ type: T;
20
+ }>;
21
+ /**
22
+ * How the attribute is read: `presence` (boolean: present means `true`, whatever the text),
23
+ * `text` (the text itself, checked) or `json` (bounded JSON text, checked against the schema).
24
+ */
25
+ export type AttributeSyntax = "presence" | "text" | "json";
26
+ /** One row of the catalog. All functions are pure and never throw. */
27
+ export interface PropTypeEntry<T extends PropType> {
28
+ readonly type: T;
29
+ readonly attribute: AttributeSyntax;
30
+ /**
31
+ * Whether the runtime writes the value back to the attribute when the property changes. Arrays
32
+ * and objects are never reflected (TAG-304): large JSON in the DOM is slow and leaks to CSS
33
+ * selectors and to page scripts reading attributes.
34
+ */
35
+ readonly reflect: boolean;
36
+ /**
37
+ * Longest attribute text read, in UTF-16 units of the raw text; longer text is refused before
38
+ * any parsing. A bound, not the value limit: string limits are in code points (TAG-224).
39
+ */
40
+ readonly maxAttributeLength: (prop: PropDeclarationOf<T>) => number;
41
+ /** Attribute text (present) → value. Absence is handled by `attributeToValue`. */
42
+ readonly parse: (text: string, prop: PropDeclarationOf<T>) => ValueOutcome<PropValue<T>>;
43
+ /** Any JS value (property assignment, JSON data, default) → accepted fresh value. */
44
+ readonly accept: (value: unknown, prop: PropDeclarationOf<T>) => ValueOutcome<PropValue<T>>;
45
+ /** Accepted value → attribute text, or `null` when the attribute must be absent. */
46
+ readonly serialize: (value: PropValue<T>, prop: PropDeclarationOf<T>) => string | null;
47
+ }
48
+ /** The whole catalog: one entry per prop type, keyed by type. */
49
+ export type PropTypeCatalog = {
50
+ readonly [T in PropType]: PropTypeEntry<T>;
51
+ };
52
+ /**
53
+ * The catalog. Data plus pure functions, frozen in depth (TAG-303: a page script cannot swap an
54
+ * entry's `accept`); iterate it (`Object.values`) to cover every type, so a new type is picked up
55
+ * by every consumer's tests (TAG-303 criterion).
56
+ */
57
+ export declare const propTypeCatalog: PropTypeCatalog;
58
+ /** A coerced prop value; `problem` says why the input was replaced by the default. */
59
+ export type Coerced = {
60
+ readonly value: unknown;
61
+ } | {
62
+ readonly value: unknown;
63
+ readonly problem: ValueProblem;
64
+ };
65
+ /**
66
+ * Attribute → prop value, as the runtime's `attributeChangedCallback` needs it (TAG-303).
67
+ *
68
+ * Inputs: a declaration accepted by `propDeclarationSchema`, and the attribute text or `null` when
69
+ * the attribute is absent. Output: `{ value }` (absent: `false` for `boolean`, otherwise the
70
+ * declared `default` as `accept` returns it, a fresh copy with every `-0` as `0`, possibly
71
+ * `undefined`), or `{ value: default, problem }` when the text is
72
+ * invalid; the runtime logs `problem` in debug mode. A declaration whose `type` is not in the
73
+ * catalog (a newer contract minor) gives `{ value: undefined, problem: "not-allowed" }`. Errors:
74
+ * never throws. Side effects: none.
75
+ */
76
+ export declare function attributeToValue(prop: PropDeclaration, text: string | null): Coerced;
77
+ /**
78
+ * Property (or `<script type="application/json" data-props>` entry) → prop value (TAG-304).
79
+ *
80
+ * Inputs: a declaration and any JS value. Output: `{ value }` with a fresh accepted value,
81
+ * `{ value: default }` for `undefined` or `null` (the property was cleared), or
82
+ * `{ value: default, problem }` for a refused value; the default is delivered as for the attribute
83
+ * (a fresh copy with every `-0` as `0`; `false` for a `boolean` without one). An unknown `type`
84
+ * gives `{ value: undefined, problem: "not-allowed" }`. Errors: never throws (a value or
85
+ * declaration that throws while read gives the default with `malformed`). Side effects: none.
86
+ */
87
+ export declare function propertyToValue(prop: PropDeclaration, value: unknown): Coerced;
88
+ /**
89
+ * Prop value → attribute text, for reflection and for HTML that tools write (builder snippets).
90
+ *
91
+ * Inputs: a declaration and a value the catalog accepts for it. Output: the attribute text, or
92
+ * `null` when the attribute must be removed (`false` booleans, JSON over `propJsonMaxLength`, a
93
+ * type the catalog does not know). The caller decides whether to write it
94
+ * (`propTypeCatalog[type].reflect`). Errors: never throws for accepted values. Side effects: none.
95
+ */
96
+ export declare function valueToAttribute(prop: PropDeclaration, value: unknown): string | null;
97
+ //# sourceMappingURL=prop-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAG1B,kGAAkG;AAClG,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,uCAAuC;AACvC,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,QAAQ,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAE9D,6CAA6C;AAC7C,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,QAAQ,IAAI,OAAO,CAAC,eAAe,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAE1F;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,G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