@taggor/contract 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/artifact-keys.d.ts +169 -0
- package/dist/artifact-keys.d.ts.map +1 -0
- package/dist/artifact-keys.js +195 -0
- package/dist/artifact-keys.js.map +1 -0
- package/dist/assets.d.ts +72 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +94 -0
- package/dist/assets.js.map +1 -0
- package/dist/bounded-path.d.ts +29 -0
- package/dist/bounded-path.d.ts.map +1 -0
- package/dist/bounded-path.js +57 -0
- package/dist/bounded-path.js.map +1 -0
- package/dist/bounded.d.ts +47 -0
- package/dist/bounded.d.ts.map +1 -0
- package/dist/bounded.js +93 -0
- package/dist/bounded.js.map +1 -0
- package/dist/build-diagnostic.d.ts +89 -0
- package/dist/build-diagnostic.d.ts.map +1 -0
- package/dist/build-diagnostic.js +91 -0
- package/dist/build-diagnostic.js.map +1 -0
- package/dist/component-types.d.ts +61 -0
- package/dist/component-types.d.ts.map +1 -0
- package/dist/component-types.js +277 -0
- package/dist/component-types.js.map +1 -0
- package/dist/consent-text.d.ts +31 -0
- package/dist/consent-text.d.ts.map +1 -0
- package/dist/consent-text.js +41 -0
- package/dist/consent-text.js.map +1 -0
- package/dist/contract-version.d.ts +150 -0
- package/dist/contract-version.d.ts.map +1 -0
- package/dist/contract-version.js +198 -0
- package/dist/contract-version.js.map +1 -0
- package/dist/credential-fields.d.ts +31 -0
- package/dist/credential-fields.d.ts.map +1 -0
- package/dist/credential-fields.js +36 -0
- package/dist/credential-fields.js.map +1 -0
- package/dist/css-tokens.d.ts +46 -0
- package/dist/css-tokens.d.ts.map +1 -0
- package/dist/css-tokens.js +189 -0
- package/dist/css-tokens.js.map +1 -0
- package/dist/css-value.d.ts +42 -0
- package/dist/css-value.d.ts.map +1 -0
- package/dist/css-value.js +78 -0
- package/dist/css-value.js.map +1 -0
- package/dist/data-api.d.ts +127 -0
- package/dist/data-api.d.ts.map +1 -0
- package/dist/data-api.js +167 -0
- package/dist/data-api.js.map +1 -0
- package/dist/denylist-keys.d.ts +19 -0
- package/dist/denylist-keys.d.ts.map +1 -0
- package/dist/denylist-keys.js +48 -0
- package/dist/denylist-keys.js.map +1 -0
- package/dist/diagnostic-catalog.d.ts +1402 -0
- package/dist/diagnostic-catalog.d.ts.map +1 -0
- package/dist/diagnostic-catalog.js +1311 -0
- package/dist/diagnostic-catalog.js.map +1 -0
- package/dist/dom-members.snapshot.d.ts +33 -0
- package/dist/dom-members.snapshot.d.ts.map +1 -0
- package/dist/dom-members.snapshot.js +760 -0
- package/dist/dom-members.snapshot.js.map +1 -0
- package/dist/early-loading.d.ts +27 -0
- package/dist/early-loading.d.ts.map +1 -0
- package/dist/early-loading.js +44 -0
- package/dist/early-loading.js.map +1 -0
- package/dist/error-catalog.d.ts +749 -0
- package/dist/error-catalog.d.ts.map +1 -0
- package/dist/error-catalog.js +720 -0
- package/dist/error-catalog.js.map +1 -0
- package/dist/executable-config.d.ts +35 -0
- package/dist/executable-config.d.ts.map +1 -0
- package/dist/executable-config.js +44 -0
- package/dist/executable-config.js.map +1 -0
- package/dist/freeze.d.ts +17 -0
- package/dist/freeze.d.ts.map +1 -0
- package/dist/freeze.js +29 -0
- package/dist/freeze.js.map +1 -0
- package/dist/gunzip.d.ts +33 -0
- package/dist/gunzip.d.ts.map +1 -0
- package/dist/gunzip.js +330 -0
- package/dist/gunzip.js.map +1 -0
- package/dist/hostname.d.ts +74 -0
- package/dist/hostname.d.ts.map +1 -0
- package/dist/hostname.js +215 -0
- package/dist/hostname.js.map +1 -0
- package/dist/human-actions.d.ts +49 -0
- package/dist/human-actions.d.ts.map +1 -0
- package/dist/human-actions.js +272 -0
- package/dist/human-actions.js.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema.d.ts +108 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +240 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/key-checksum.d.ts +33 -0
- package/dist/key-checksum.d.ts.map +1 -0
- package/dist/key-checksum.js +67 -0
- package/dist/key-checksum.js.map +1 -0
- package/dist/libraries.d.ts +60 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +120 -0
- package/dist/libraries.js.map +1 -0
- package/dist/limit-catalog.d.ts +371 -0
- package/dist/limit-catalog.d.ts.map +1 -0
- package/dist/limit-catalog.js +414 -0
- package/dist/limit-catalog.js.map +1 -0
- package/dist/limits.d.ts +167 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +175 -0
- package/dist/limits.js.map +1 -0
- package/dist/locale-tag.d.ts +21 -0
- package/dist/locale-tag.d.ts.map +1 -0
- package/dist/locale-tag.js +21 -0
- package/dist/locale-tag.js.map +1 -0
- package/dist/make-diagnostic.d.ts +74 -0
- package/dist/make-diagnostic.d.ts.map +1 -0
- package/dist/make-diagnostic.js +100 -0
- package/dist/make-diagnostic.js.map +1 -0
- package/dist/manifest-compat-diagnostics.d.ts +23 -0
- package/dist/manifest-compat-diagnostics.d.ts.map +1 -0
- package/dist/manifest-compat-diagnostics.js +150 -0
- package/dist/manifest-compat-diagnostics.js.map +1 -0
- package/dist/manifest-compat.d.ts +58 -0
- package/dist/manifest-compat.d.ts.map +1 -0
- package/dist/manifest-compat.js +377 -0
- package/dist/manifest-compat.js.map +1 -0
- package/dist/manifest.d.ts +1769 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +421 -0
- package/dist/manifest.js.map +1 -0
- package/dist/metering.d.ts +126 -0
- package/dist/metering.d.ts.map +1 -0
- package/dist/metering.js +147 -0
- package/dist/metering.js.map +1 -0
- package/dist/migrate.d.ts +70 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +159 -0
- package/dist/migrate.js.map +1 -0
- package/dist/names.d.ts +37 -0
- package/dist/names.d.ts.map +1 -0
- package/dist/names.js +55 -0
- package/dist/names.js.map +1 -0
- package/dist/overage-pricing.d.ts +89 -0
- package/dist/overage-pricing.d.ts.map +1 -0
- package/dist/overage-pricing.js +170 -0
- package/dist/overage-pricing.js.map +1 -0
- package/dist/plan-ids.d.ts +10 -0
- package/dist/plan-ids.d.ts.map +1 -0
- package/dist/plan-ids.js +8 -0
- package/dist/plan-ids.js.map +1 -0
- package/dist/plan-limits.d.ts +138 -0
- package/dist/plan-limits.d.ts.map +1 -0
- package/dist/plan-limits.js +112 -0
- package/dist/plan-limits.js.map +1 -0
- package/dist/plan-pricing.d.ts +145 -0
- package/dist/plan-pricing.d.ts.map +1 -0
- package/dist/plan-pricing.js +172 -0
- package/dist/plan-pricing.js.map +1 -0
- package/dist/plan-usage.d.ts +112 -0
- package/dist/plan-usage.d.ts.map +1 -0
- package/dist/plan-usage.js +134 -0
- package/dist/plan-usage.js.map +1 -0
- package/dist/preview-token.d.ts +52 -0
- package/dist/preview-token.d.ts.map +1 -0
- package/dist/preview-token.js +106 -0
- package/dist/preview-token.js.map +1 -0
- package/dist/prop-names.d.ts +51 -0
- package/dist/prop-names.d.ts.map +1 -0
- package/dist/prop-names.js +150 -0
- package/dist/prop-names.js.map +1 -0
- package/dist/prop-type-docs.d.ts +20 -0
- package/dist/prop-type-docs.d.ts.map +1 -0
- package/dist/prop-type-docs.js +89 -0
- package/dist/prop-type-docs.js.map +1 -0
- package/dist/prop-types.d.ts +97 -0
- package/dist/prop-types.d.ts.map +1 -0
- package/dist/prop-types.js +299 -0
- package/dist/prop-types.js.map +1 -0
- package/dist/props.d.ts +996 -0
- package/dist/props.d.ts.map +1 -0
- package/dist/props.js +183 -0
- package/dist/props.js.map +1 -0
- package/dist/proto-guard.d.ts +29 -0
- package/dist/proto-guard.d.ts.map +1 -0
- package/dist/proto-guard.js +79 -0
- package/dist/proto-guard.js.map +1 -0
- package/dist/runtime-errors.d.ts +42 -0
- package/dist/runtime-errors.d.ts.map +1 -0
- package/dist/runtime-errors.js +42 -0
- package/dist/runtime-errors.js.map +1 -0
- package/dist/runtime-pointers.d.ts +58 -0
- package/dist/runtime-pointers.d.ts.map +1 -0
- package/dist/runtime-pointers.js +84 -0
- package/dist/runtime-pointers.js.map +1 -0
- package/dist/secret-scan.d.ts +191 -0
- package/dist/secret-scan.d.ts.map +1 -0
- package/dist/secret-scan.js +542 -0
- package/dist/secret-scan.js.map +1 -0
- package/dist/semver.d.ts +89 -0
- package/dist/semver.d.ts.map +1 -0
- package/dist/semver.js +400 -0
- package/dist/semver.js.map +1 -0
- package/dist/server-key.d.ts +68 -0
- package/dist/server-key.d.ts.map +1 -0
- package/dist/server-key.js +150 -0
- package/dist/server-key.js.map +1 -0
- package/dist/site-manifest-keys.d.ts +107 -0
- package/dist/site-manifest-keys.d.ts.map +1 -0
- package/dist/site-manifest-keys.js +146 -0
- package/dist/site-manifest-keys.js.map +1 -0
- package/dist/site-manifest.d.ts +286 -0
- package/dist/site-manifest.d.ts.map +1 -0
- package/dist/site-manifest.js +100 -0
- package/dist/site-manifest.js.map +1 -0
- package/dist/source-archive.d.ts +119 -0
- package/dist/source-archive.d.ts.map +1 -0
- package/dist/source-archive.js +644 -0
- package/dist/source-archive.js.map +1 -0
- package/dist/source-package-corpus.d.ts +55 -0
- package/dist/source-package-corpus.d.ts.map +1 -0
- package/dist/source-package-corpus.js +303 -0
- package/dist/source-package-corpus.js.map +1 -0
- package/dist/source-package.d.ts +227 -0
- package/dist/source-package.d.ts.map +1 -0
- package/dist/source-package.js +361 -0
- package/dist/source-package.js.map +1 -0
- package/dist/source-secrets.d.ts +21 -0
- package/dist/source-secrets.d.ts.map +1 -0
- package/dist/source-secrets.js +43 -0
- package/dist/source-secrets.js.map +1 -0
- package/dist/ssr-cap.d.ts +61 -0
- package/dist/ssr-cap.d.ts.map +1 -0
- package/dist/ssr-cap.js +107 -0
- package/dist/ssr-cap.js.map +1 -0
- package/dist/ssr-kv.d.ts +18 -0
- package/dist/ssr-kv.d.ts.map +1 -0
- package/dist/ssr-kv.js +18 -0
- package/dist/ssr-kv.js.map +1 -0
- package/dist/ssr-version-ledger.d.ts +53 -0
- package/dist/ssr-version-ledger.d.ts.map +1 -0
- package/dist/ssr-version-ledger.js +88 -0
- package/dist/ssr-version-ledger.js.map +1 -0
- package/dist/style-references.d.ts +58 -0
- package/dist/style-references.d.ts.map +1 -0
- package/dist/style-references.js +241 -0
- package/dist/style-references.js.map +1 -0
- package/dist/tag-name.d.ts +87 -0
- package/dist/tag-name.d.ts.map +1 -0
- package/dist/tag-name.js +222 -0
- package/dist/tag-name.js.map +1 -0
- package/dist/tar-writer.d.ts +74 -0
- package/dist/tar-writer.d.ts.map +1 -0
- package/dist/tar-writer.js +148 -0
- package/dist/tar-writer.js.map +1 -0
- package/dist/testing.d.ts +11 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +11 -0
- package/dist/testing.js.map +1 -0
- package/dist/text-codec.d.ts +36 -0
- package/dist/text-codec.d.ts.map +1 -0
- package/dist/text-codec.js +32 -0
- package/dist/text-codec.js.map +1 -0
- package/dist/url-value.d.ts +41 -0
- package/dist/url-value.d.ts.map +1 -0
- package/dist/url-value.js +147 -0
- package/dist/url-value.js.map +1 -0
- package/dist/usage-guard.d.ts +99 -0
- package/dist/usage-guard.d.ts.map +1 -0
- package/dist/usage-guard.js +104 -0
- package/dist/usage-guard.js.map +1 -0
- package/dist/usage-mirror.d.ts +55 -0
- package/dist/usage-mirror.d.ts.map +1 -0
- package/dist/usage-mirror.js +52 -0
- package/dist/usage-mirror.js.map +1 -0
- package/dist/value-check.d.ts +88 -0
- package/dist/value-check.d.ts.map +1 -0
- package/dist/value-check.js +279 -0
- package/dist/value-check.js.map +1 -0
- package/dist/value-patterns.d.ts +9 -0
- package/dist/value-patterns.d.ts.map +1 -0
- package/dist/value-patterns.js +17 -0
- package/dist/value-patterns.js.map +1 -0
- package/dist/value-schema.d.ts +796 -0
- package/dist/value-schema.d.ts.map +1 -0
- package/dist/value-schema.js +231 -0
- package/dist/value-schema.js.map +1 -0
- package/dist/zod-free.d.ts +59 -0
- package/dist/zod-free.d.ts.map +1 -0
- package/dist/zod-free.js +57 -0
- package/dist/zod-free.js.map +1 -0
- package/package.json +75 -3
- package/schema/DEPLOYED +12 -0
- package/schema/build-diagnostic.v1.json +63 -0
- package/schema/component-manifest.v1.json +1000 -0
- package/schema/data-api.v1.json +194 -0
- package/schema/library-manifest.v1.json +60 -0
- package/schema/published/SHA256SUMS +36 -0
- package/schema/published/build-diagnostic/v1.10.json +83 -0
- package/schema/published/build-diagnostic/v1.3.json +83 -0
- package/schema/published/build-diagnostic/v1.4.json +83 -0
- package/schema/published/build-diagnostic/v1.5.json +83 -0
- package/schema/published/build-diagnostic/v1.6.json +83 -0
- package/schema/published/build-diagnostic/v1.7.json +83 -0
- package/schema/published/build-diagnostic/v1.8.json +83 -0
- package/schema/published/build-diagnostic/v1.9.json +83 -0
- package/schema/published/component-manifest/v1.10.json +1443 -0
- package/schema/published/component-manifest/v1.3.json +1411 -0
- package/schema/published/component-manifest/v1.4.json +1419 -0
- package/schema/published/component-manifest/v1.5.json +1437 -0
- package/schema/published/component-manifest/v1.6.json +1437 -0
- package/schema/published/component-manifest/v1.7.json +1437 -0
- package/schema/published/component-manifest/v1.8.json +1437 -0
- package/schema/published/component-manifest/v1.9.json +1437 -0
- package/schema/published/data-api/v1.10.json +282 -0
- package/schema/published/data-api/v1.3.json +281 -0
- package/schema/published/data-api/v1.4.json +281 -0
- package/schema/published/data-api/v1.5.json +281 -0
- package/schema/published/data-api/v1.6.json +281 -0
- package/schema/published/data-api/v1.7.json +281 -0
- package/schema/published/data-api/v1.8.json +282 -0
- package/schema/published/data-api/v1.9.json +282 -0
- package/schema/published/library-manifest/v1.10.json +68 -0
- package/schema/published/library-manifest/v1.5.json +68 -0
- package/schema/published/library-manifest/v1.6.json +68 -0
- package/schema/published/library-manifest/v1.7.json +68 -0
- package/schema/published/library-manifest/v1.8.json +68 -0
- package/schema/published/library-manifest/v1.9.json +68 -0
- package/schema/published/taggor-config/v1.10.json +56 -0
- package/schema/published/taggor-config/v1.5.json +56 -0
- package/schema/published/taggor-config/v1.6.json +56 -0
- package/schema/published/taggor-config/v1.7.json +56 -0
- package/schema/published/taggor-config/v1.8.json +56 -0
- package/schema/published/taggor-config/v1.9.json +56 -0
- package/schema/taggor-config.v1.json +39 -0
package/dist/ssr-kv.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@taggor/contract/ssr-kv` (SSR spike, ADR 0066, no ticket): the KV layouts and key formats of
|
|
3
|
+
* server rendering that the edge imports as values: the plan cap mark and the `ssr:off` switches
|
|
4
|
+
* (`ssr-cap.ts`), the version-day ledger (`ssr-version-ledger.ts`), and the per-site server key
|
|
5
|
+
* with its checksum (`server-key.ts`, `key-checksum.ts`). Like `zod-free`, nothing reachable from
|
|
6
|
+
* here imports Zod (zod-free.test.ts walks the graph).
|
|
7
|
+
*
|
|
8
|
+
* Why a subpath of its own and not `zod-free`: the browser runtime bundles `zod-free`, and its size
|
|
9
|
+
* gate sits on the hard ceiling of ADR 0061. Every name re-exported by that barrel changes how
|
|
10
|
+
* esbuild's minifier names the runtime's identifiers, even when tree shaking drops the module, and
|
|
11
|
+
* these exports alone cost the runtime 3 B gz. The runtime never needs them, so they live here.
|
|
12
|
+
* `@taggor/contract` (the root) re-exports the same names for the API.
|
|
13
|
+
*/
|
|
14
|
+
export { SSR_CAP_MARK_TTL_SECONDS, SSR_CAP_MARK_VERSION, SSR_OFF_KV_KEY, parseSsrCapMark, ssrSiteOffKvKey, ssrCapKvKey, ssrCapMarkFor, ssrCapRefusal, type SsrCapInput, type SsrCapMark, type SsrCapRefusal, } from "./ssr-cap.js";
|
|
15
|
+
export { SSR_VERSION_DAY_PREFIX, SSR_VERSION_DAY_TTL_SECONDS, parseSsrVersionDayKey, ssrVersionDayKey, ssrVersionMonthPrefix, versionDaysOf, type SsrVersionDay, type VersionDayCount, type VersionDays, } from "./ssr-version-ledger.js";
|
|
16
|
+
export { BASE62_ALPHABET, KEY_CHECKSUM_LENGTH, crc32, keyChecksum, toBase62, } from "./key-checksum.js";
|
|
17
|
+
export { SERVER_KEYS_KV_PREFIX, SERVER_KEYS_PER_SITE, SERVER_KEYS_VALUE_VERSION, SERVER_KEY_BODY_LENGTH, SERVER_KEY_DISPLAY_LENGTH, SERVER_KEY_DISPLAY_PATTERN, SERVER_KEY_MODES, formatServerKey, parseServerKey, parseServerKeysValue, serverKeyFromAuthorization, serverKeyPrefix, serverKeysKvKey, serverKeysValue, type ParsedServerKey, type ServerKeyMode, } from "./server-key.js";
|
|
18
|
+
//# sourceMappingURL=ssr-kv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-kv.d.ts","sourceRoot":"","sources":["../src/ssr-kv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EACX,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,eAAe,EACf,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC"}
|
package/dist/ssr-kv.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@taggor/contract/ssr-kv` (SSR spike, ADR 0066, no ticket): the KV layouts and key formats of
|
|
3
|
+
* server rendering that the edge imports as values: the plan cap mark and the `ssr:off` switches
|
|
4
|
+
* (`ssr-cap.ts`), the version-day ledger (`ssr-version-ledger.ts`), and the per-site server key
|
|
5
|
+
* with its checksum (`server-key.ts`, `key-checksum.ts`). Like `zod-free`, nothing reachable from
|
|
6
|
+
* here imports Zod (zod-free.test.ts walks the graph).
|
|
7
|
+
*
|
|
8
|
+
* Why a subpath of its own and not `zod-free`: the browser runtime bundles `zod-free`, and its size
|
|
9
|
+
* gate sits on the hard ceiling of ADR 0061. Every name re-exported by that barrel changes how
|
|
10
|
+
* esbuild's minifier names the runtime's identifiers, even when tree shaking drops the module, and
|
|
11
|
+
* these exports alone cost the runtime 3 B gz. The runtime never needs them, so they live here.
|
|
12
|
+
* `@taggor/contract` (the root) re-exports the same names for the API.
|
|
13
|
+
*/
|
|
14
|
+
export { SSR_CAP_MARK_TTL_SECONDS, SSR_CAP_MARK_VERSION, SSR_OFF_KV_KEY, parseSsrCapMark, ssrSiteOffKvKey, ssrCapKvKey, ssrCapMarkFor, ssrCapRefusal, } from "./ssr-cap.js";
|
|
15
|
+
export { SSR_VERSION_DAY_PREFIX, SSR_VERSION_DAY_TTL_SECONDS, parseSsrVersionDayKey, ssrVersionDayKey, ssrVersionMonthPrefix, versionDaysOf, } from "./ssr-version-ledger.js";
|
|
16
|
+
export { BASE62_ALPHABET, KEY_CHECKSUM_LENGTH, crc32, keyChecksum, toBase62, } from "./key-checksum.js";
|
|
17
|
+
export { SERVER_KEYS_KV_PREFIX, SERVER_KEYS_PER_SITE, SERVER_KEYS_VALUE_VERSION, SERVER_KEY_BODY_LENGTH, SERVER_KEY_DISPLAY_LENGTH, SERVER_KEY_DISPLAY_PATTERN, SERVER_KEY_MODES, formatServerKey, parseServerKey, parseServerKeysValue, serverKeyFromAuthorization, serverKeyPrefix, serverKeysKvKey, serverKeysValue, } from "./server-key.js";
|
|
18
|
+
//# sourceMappingURL=ssr-kv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-kv.js","sourceRoot":"","sources":["../src/ssr-kv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,GAId,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,GAId,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,WAAW,EACX,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,eAAe,EACf,eAAe,GAGhB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** The prefix of every ledger key. */
|
|
2
|
+
export declare const SSR_VERSION_DAY_PREFIX = "ssrv:";
|
|
3
|
+
/**
|
|
4
|
+
* How long an entry lives: 100 days, so a month is still whole when the month after it is closed
|
|
5
|
+
* for billing (and the Analytics Engine keeps its points about three months, the same horizon).
|
|
6
|
+
*/
|
|
7
|
+
export declare const SSR_VERSION_DAY_TTL_SECONDS: number;
|
|
8
|
+
/** One ledger entry: a site rendered a version on the server on a UTC day. */
|
|
9
|
+
export interface SsrVersionDay {
|
|
10
|
+
readonly siteKey: string;
|
|
11
|
+
/** `YYYY-MM-DD`, UTC. */
|
|
12
|
+
readonly day: string;
|
|
13
|
+
readonly versionHash: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The KV key of one entry.
|
|
17
|
+
* Inputs: a site key, a `YYYY-MM-DD` day and a version hash (64 lowercase hex). Output: the key.
|
|
18
|
+
* Errors: `TypeError` when any part is malformed (keys never carry caller text). Side effects: none.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ssrVersionDayKey(siteKey: string, day: string, versionHash: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The prefix that lists one site's entries of one UTC month.
|
|
23
|
+
* Inputs: a site key and any instant of the month. Output: `ssrv:<siteKey>:<YYYY-MM>-`. Errors:
|
|
24
|
+
* `TypeError` for a malformed site key. Side effects: none.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ssrVersionMonthPrefix(siteKey: string, month: Date): string;
|
|
27
|
+
/**
|
|
28
|
+
* Reads an entry back from its key.
|
|
29
|
+
* Inputs: a KV key name. Output: the entry, or `null` for a key that is not a well-formed ledger
|
|
30
|
+
* key (skipped by readers, never guessed). Errors: none. Side effects: none.
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseSsrVersionDayKey(key: string): SsrVersionDay | null;
|
|
33
|
+
/** The distinct versions of one day, across the sites given. */
|
|
34
|
+
export interface VersionDayCount {
|
|
35
|
+
readonly day: string;
|
|
36
|
+
readonly versions: number;
|
|
37
|
+
}
|
|
38
|
+
/** A workspace's version-days of a period. */
|
|
39
|
+
export interface VersionDays {
|
|
40
|
+
/** The sum over the days of the distinct versions rendered that day: the billing unit. */
|
|
41
|
+
readonly total: number;
|
|
42
|
+
/** One line per day with at least one version, earliest first. */
|
|
43
|
+
readonly days: readonly VersionDayCount[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Folds ledger entries into version-days: per UTC day, the distinct version hashes of all the
|
|
47
|
+
* entries (a version two sites of the same workspace rendered on the same day counts once, as the
|
|
48
|
+
* vendor's Worker is one), then the sum over the days.
|
|
49
|
+
* Inputs: the entries of the workspace's sites (any order, duplicates allowed). Output: the total
|
|
50
|
+
* and the lines per day. Errors: none. Pure.
|
|
51
|
+
*/
|
|
52
|
+
export declare function versionDaysOf(entries: readonly Pick<SsrVersionDay, "day" | "versionHash">[]): VersionDays;
|
|
53
|
+
//# sourceMappingURL=ssr-version-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-version-ledger.d.ts","sourceRoot":"","sources":["../src/ssr-version-ledger.ts"],"names":[],"mappings":"AAoBA,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,2BAA2B,QAAqB,CAAC;AAK9D,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAK1F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,CAG1E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAOvE;AAED,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,aAAa,CAAC,EAAE,GAC7D,WAAW,CAWb"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SSR version-day ledger (spike, ADR 0066, no ticket): the exact record of which component
|
|
3
|
+
* versions each site rendered on the server on each UTC day. It is USAGE, never a limit: the
|
|
4
|
+
* vendor bills one isolated Worker per distinct Worker (one per version) created per day, and the
|
|
5
|
+
* owner will price "version-days" later (pay-as-you-go). Nothing reads it to refuse anything.
|
|
6
|
+
* Zod-free: the edge writes it and the API reads it.
|
|
7
|
+
*
|
|
8
|
+
* Why not the Analytics Engine points (`ssr_render`, metering.ts): the Analytics Engine samples by
|
|
9
|
+
* index (the site key) at write and at read time and does not promise to keep a rare value of a
|
|
10
|
+
* field outside the index, so a version rendered once on a busy site can vanish from a distinct
|
|
11
|
+
* count. A version left out is a version not billed, so the count comes from here instead.
|
|
12
|
+
*
|
|
13
|
+
* Layout, in the edge's `MANIFESTS` KV (no new binding): one key per site, day and version,
|
|
14
|
+
* `ssrv:<siteKey>:<YYYY-MM-DD>:<sha256 hex>`, value `"1"`, expiring after
|
|
15
|
+
* `SSR_VERSION_DAY_TTL_SECONDS`. One key per entry makes every write idempotent (two colos writing
|
|
16
|
+
* the same version on the same day write the same key), so no read-modify-write can lose an entry.
|
|
17
|
+
* A month of one site is one prefix (`ssrVersionMonthPrefix`).
|
|
18
|
+
*/
|
|
19
|
+
import { isSiteKey } from "./site-manifest-keys.js";
|
|
20
|
+
/** The prefix of every ledger key. */
|
|
21
|
+
export const SSR_VERSION_DAY_PREFIX = "ssrv:";
|
|
22
|
+
/**
|
|
23
|
+
* How long an entry lives: 100 days, so a month is still whole when the month after it is closed
|
|
24
|
+
* for billing (and the Analytics Engine keeps its points about three months, the same horizon).
|
|
25
|
+
*/
|
|
26
|
+
export const SSR_VERSION_DAY_TTL_SECONDS = 100 * 24 * 60 * 60;
|
|
27
|
+
const HEX64 = /^[0-9a-f]{64}$/;
|
|
28
|
+
const DAY = /^\d{4}-\d{2}-\d{2}$/;
|
|
29
|
+
/**
|
|
30
|
+
* The KV key of one entry.
|
|
31
|
+
* Inputs: a site key, a `YYYY-MM-DD` day and a version hash (64 lowercase hex). Output: the key.
|
|
32
|
+
* Errors: `TypeError` when any part is malformed (keys never carry caller text). Side effects: none.
|
|
33
|
+
*/
|
|
34
|
+
export function ssrVersionDayKey(siteKey, day, versionHash) {
|
|
35
|
+
if (!isSiteKey(siteKey))
|
|
36
|
+
throw new TypeError("not a site key");
|
|
37
|
+
if (!DAY.test(day))
|
|
38
|
+
throw new TypeError("not a day");
|
|
39
|
+
if (!HEX64.test(versionHash))
|
|
40
|
+
throw new TypeError("not a version hash");
|
|
41
|
+
return `${SSR_VERSION_DAY_PREFIX}${siteKey}:${day}:${versionHash}`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The prefix that lists one site's entries of one UTC month.
|
|
45
|
+
* Inputs: a site key and any instant of the month. Output: `ssrv:<siteKey>:<YYYY-MM>-`. Errors:
|
|
46
|
+
* `TypeError` for a malformed site key. Side effects: none.
|
|
47
|
+
*/
|
|
48
|
+
export function ssrVersionMonthPrefix(siteKey, month) {
|
|
49
|
+
if (!isSiteKey(siteKey))
|
|
50
|
+
throw new TypeError("not a site key");
|
|
51
|
+
return `${SSR_VERSION_DAY_PREFIX}${siteKey}:${month.toISOString().slice(0, 7)}-`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Reads an entry back from its key.
|
|
55
|
+
* Inputs: a KV key name. Output: the entry, or `null` for a key that is not a well-formed ledger
|
|
56
|
+
* key (skipped by readers, never guessed). Errors: none. Side effects: none.
|
|
57
|
+
*/
|
|
58
|
+
export function parseSsrVersionDayKey(key) {
|
|
59
|
+
if (!key.startsWith(SSR_VERSION_DAY_PREFIX))
|
|
60
|
+
return null;
|
|
61
|
+
const parts = key.slice(SSR_VERSION_DAY_PREFIX.length).split(":");
|
|
62
|
+
if (parts.length !== 3)
|
|
63
|
+
return null;
|
|
64
|
+
const [siteKey, day, versionHash] = parts;
|
|
65
|
+
if (!isSiteKey(siteKey) || !DAY.test(day) || !HEX64.test(versionHash))
|
|
66
|
+
return null;
|
|
67
|
+
return { siteKey, day, versionHash };
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Folds ledger entries into version-days: per UTC day, the distinct version hashes of all the
|
|
71
|
+
* entries (a version two sites of the same workspace rendered on the same day counts once, as the
|
|
72
|
+
* vendor's Worker is one), then the sum over the days.
|
|
73
|
+
* Inputs: the entries of the workspace's sites (any order, duplicates allowed). Output: the total
|
|
74
|
+
* and the lines per day. Errors: none. Pure.
|
|
75
|
+
*/
|
|
76
|
+
export function versionDaysOf(entries) {
|
|
77
|
+
const byDay = new Map();
|
|
78
|
+
for (const entry of entries) {
|
|
79
|
+
const versions = byDay.get(entry.day) ?? new Set();
|
|
80
|
+
versions.add(entry.versionHash);
|
|
81
|
+
byDay.set(entry.day, versions);
|
|
82
|
+
}
|
|
83
|
+
const days = [...byDay]
|
|
84
|
+
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
85
|
+
.map(([day, versions]) => ({ day, versions: versions.size }));
|
|
86
|
+
return { total: days.reduce((n, line) => n + line.versions, 0), days };
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=ssr-version-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr-version-ledger.js","sourceRoot":"","sources":["../src/ssr-version-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,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QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAChE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Most issues `checkStyleReferences` returns; each undeclared name is reported once. */
|
|
2
|
+
export declare const STYLE_CHECK_MAX_ISSUES = 50;
|
|
3
|
+
/** Why a style reference was refused. */
|
|
4
|
+
export type StyleReferenceCode =
|
|
5
|
+
/** `::part(name)` or `[part=name]` names a part `parts` does not declare. */
|
|
6
|
+
"undeclared-part"
|
|
7
|
+
/** `var(--name)` reads a variable `cssVars` does not declare and the CSS does not define. */
|
|
8
|
+
| "undeclared-css-var"
|
|
9
|
+
/**
|
|
10
|
+
* `[part]`, `[part|=…]`, `[part^=…]`, `[part$=…]`, `[part*=…]` or a case-insensitive `i` match:
|
|
11
|
+
* a selector that matches parts by pattern, undeclared ones included (TAG-408, from the TAG-206
|
|
12
|
+
* security review). Only `[part=name]` and `[part~=name]` name a part.
|
|
13
|
+
*/
|
|
14
|
+
| "part-pattern";
|
|
15
|
+
/** One undeclared reference, at its first occurrence. */
|
|
16
|
+
export interface StyleReferenceIssue {
|
|
17
|
+
readonly code: StyleReferenceCode;
|
|
18
|
+
/** The part or custom property name (escapes decoded), bounded for logs and the portal. */
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** Index of the stylesheet in the list given (0 when one string was given). */
|
|
21
|
+
readonly sheet: number;
|
|
22
|
+
/** 1-based line and column (in UTF-16 code units) of the reference in that stylesheet. */
|
|
23
|
+
readonly line: number;
|
|
24
|
+
readonly column: number;
|
|
25
|
+
/** What is wrong and how to fix it, in English. */
|
|
26
|
+
readonly message: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The manifest fields the check reads: the declared `parts` and `cssVars` maps (only their own
|
|
30
|
+
* keys matter). A `ComponentManifest` and the SDK's manifest draft both fit.
|
|
31
|
+
*/
|
|
32
|
+
export interface StyleDeclarations {
|
|
33
|
+
readonly parts?: Readonly<Record<string, unknown>> | undefined;
|
|
34
|
+
readonly cssVars?: Readonly<Record<string, unknown>> | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Where each line of a stylesheet starts, with the line breaks of CSS Syntax §3.3: `\n`, `\f`
|
|
38
|
+
* and a `\r` not followed by `\n` (CRLF counts once). `cssLineStarts(css)[n - 1]` is the offset
|
|
39
|
+
* of line `n`, the numbering `checkStyleReferences` reports (TAG-423: the builder quotes the line).
|
|
40
|
+
*
|
|
41
|
+
* Inputs: CSS text. Output: the 0-based offsets, the first one `0`, ascending. Errors: never
|
|
42
|
+
* throws. Side effects: none. Linear in the length.
|
|
43
|
+
*/
|
|
44
|
+
export declare function cssLineStarts(css: string): number[];
|
|
45
|
+
/**
|
|
46
|
+
* Lists the parts and CSS variables a component's CSS uses without declaring them.
|
|
47
|
+
*
|
|
48
|
+
* Inputs: the component's CSS (one text or the list of stylesheets it adopts) and its declarations
|
|
49
|
+
* (`parts`, `cssVars`; a parsed `ComponentManifest` fits). A variable counts as declared when it is
|
|
50
|
+
* an own key of `cssVars` or is defined by any of the stylesheets (`--name: …` as a declaration,
|
|
51
|
+
* or `@property --name`). Output: one issue per undeclared name, at its first occurrence, in
|
|
52
|
+
* stylesheet and source order, at most `STYLE_CHECK_MAX_ISSUES`; empty when everything is
|
|
53
|
+
* declared. Text inside comments, strings and `url(…)` is ignored; escapes are decoded and
|
|
54
|
+
* function names compared ASCII case-insensitively, as browsers do. Errors: never throws.
|
|
55
|
+
* Side effects: none.
|
|
56
|
+
*/
|
|
57
|
+
export declare function checkStyleReferences(css: string | readonly string[], declarations: StyleDeclarations): readonly StyleReferenceIssue[];
|
|
58
|
+
//# sourceMappingURL=style-references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-references.d.ts","sourceRoot":"","sources":["../src/style-references.ts"],"names":[],"mappings":"AAoBA,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,yCAAyC;AACzC,MAAM,MAAM,kBAAkB;AAC5B,6EAA6E;AAC3E,iBAAiB;AACnB,6FAA6F;GAC3F,oBAAoB;AACtB;;;;GAIG;GACD,cAAc,CAAC;AAEnB,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CAClE;AAwHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CASnD;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EAC/B,YAAY,EAAE,iBAAiB,GAC9B,SAAS,mBAAmB,EAAE,CAmDhC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style references of a component (TAG-206): the theming surface a component's CSS uses must be the one
|
|
3
|
+
* its manifest declares. `checkStyleReferences` lists every `var(--name)` that is neither a
|
|
4
|
+
* declared `cssVars` entry nor a custom property the same CSS defines, and every part the CSS
|
|
5
|
+
* names (`::part(name)`, `[part=name]`, `[part~=name]`) that `parts` does not declare, and (TAG-408)
|
|
6
|
+
* every `[part]` selector that matches parts by pattern (`[part]`, `[part^=…]`, `[part=x i]`);
|
|
7
|
+
* `style(--name…)` counts as a use of `--name`, like `var(--name)`. The builder
|
|
8
|
+
* (TAG-401/TAG-405) calls it on the component's styles and refuses the build when it reports
|
|
9
|
+
* anything, so a host page can rely on the declared variables and parts staying the component's
|
|
10
|
+
* whole styling API.
|
|
11
|
+
*
|
|
12
|
+
* The CSS is untrusted (golden rule 5): it is only read by a small tokenizer that follows the
|
|
13
|
+
* CSS Syntax Level 3 rules that matter here (raw NUL read as U+FFFD, comments, strings, escapes, `url(` tokens,
|
|
14
|
+
* identifiers and functions, ASCII case-insensitive function names), runs in linear time and
|
|
15
|
+
* memory, never evaluates anything and never throws. Names quoted in messages are bounded with
|
|
16
|
+
* `boundedSegment` (TAG-220). Zod-free, so any consumer, the runtime included, may import it.
|
|
17
|
+
*/
|
|
18
|
+
import { boundedSegment } from "./bounded-path.js";
|
|
19
|
+
import { asciiLower, tokenizeCss } from "./css-tokens.js";
|
|
20
|
+
/** Most issues `checkStyleReferences` returns; each undeclared name is reported once. */
|
|
21
|
+
export const STYLE_CHECK_MAX_ISSUES = 50;
|
|
22
|
+
/** Index of the next token after `from` that is not whitespace, or -1. */
|
|
23
|
+
function nextSignificant(tokens, from) {
|
|
24
|
+
for (let i = from + 1; i < tokens.length; i += 1) {
|
|
25
|
+
if (tokens[i]?.type !== "whitespace")
|
|
26
|
+
return i;
|
|
27
|
+
}
|
|
28
|
+
return -1;
|
|
29
|
+
}
|
|
30
|
+
/** Index of the last token before `from` that is not whitespace, or -1. */
|
|
31
|
+
function previousSignificant(tokens, from) {
|
|
32
|
+
for (let i = from - 1; i >= 0; i -= 1) {
|
|
33
|
+
if (tokens[i]?.type !== "whitespace")
|
|
34
|
+
return i;
|
|
35
|
+
}
|
|
36
|
+
return -1;
|
|
37
|
+
}
|
|
38
|
+
const isDelim = (token, value) => token?.type === "delim" && token.value === value;
|
|
39
|
+
/** Attribute matchers other than `=` and `~=`: they match a part by pattern (TAG-408). */
|
|
40
|
+
const PATTERN_MATCHERS = new Set(["|", "^", "$", "*"]);
|
|
41
|
+
/**
|
|
42
|
+
* Where the attribute name starts, past a namespace prefix (`*|part`, `|part`, `svg|part`; review
|
|
43
|
+
* of TAG-408, L2): `first` is the first significant token after `[`. A `|` right before `=` is the
|
|
44
|
+
* `|=` matcher, not a prefix, so `[part|=x]` keeps `part` as the name.
|
|
45
|
+
*/
|
|
46
|
+
function attributeNameAt(tokens, first) {
|
|
47
|
+
const token = tokens[first];
|
|
48
|
+
const isBar = (at) => isDelim(tokens[at], "|") && !isDelim(tokens[at + 1], "=");
|
|
49
|
+
if (isDelim(token, "|") && !isDelim(tokens[first + 1], "="))
|
|
50
|
+
return first + 1;
|
|
51
|
+
if ((isDelim(token, "*") || token?.type === "ident") && isBar(first + 1))
|
|
52
|
+
return first + 2;
|
|
53
|
+
return first;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* What a `[part…]` attribute selector starting at `open` (the `[`) matches: the part names it
|
|
57
|
+
* names, or `pattern` when it matches parts by presence, prefix, suffix, substring or without
|
|
58
|
+
* case (TAG-408), or nothing when it is not about `part`.
|
|
59
|
+
*/
|
|
60
|
+
function attributeParts(tokens, open) {
|
|
61
|
+
const nameAt = attributeNameAt(tokens, nextSignificant(tokens, open));
|
|
62
|
+
const name = tokens[nameAt];
|
|
63
|
+
if (name?.type !== "ident" || asciiLower(name.value) !== "part")
|
|
64
|
+
return [];
|
|
65
|
+
let operatorAt = nextSignificant(tokens, nameAt);
|
|
66
|
+
const operator = tokens[operatorAt];
|
|
67
|
+
if (isDelim(operator, "]") || operator === undefined)
|
|
68
|
+
return "pattern";
|
|
69
|
+
if (operator.type === "delim" &&
|
|
70
|
+
PATTERN_MATCHERS.has(operator.value) &&
|
|
71
|
+
isDelim(tokens[operatorAt + 1], "=")) {
|
|
72
|
+
return "pattern";
|
|
73
|
+
}
|
|
74
|
+
const includes = isDelim(operator, "~") && isDelim(tokens[operatorAt + 1], "=");
|
|
75
|
+
if (includes)
|
|
76
|
+
operatorAt += 1;
|
|
77
|
+
else if (!isDelim(operator, "="))
|
|
78
|
+
return [];
|
|
79
|
+
const valueAt = nextSignificant(tokens, operatorAt);
|
|
80
|
+
const value = tokens[valueAt];
|
|
81
|
+
if (value?.type !== "ident" && value?.type !== "string")
|
|
82
|
+
return [];
|
|
83
|
+
// `[part=x i]` also matches `X`, `x` written in any case: a part `parts` may not declare.
|
|
84
|
+
const flag = tokens[nextSignificant(tokens, valueAt)];
|
|
85
|
+
if (flag?.type === "ident" && asciiLower(flag.value) === "i")
|
|
86
|
+
return "pattern";
|
|
87
|
+
const words = value.value.split(/[ \t\n\r\f]+/).filter((word) => word !== "");
|
|
88
|
+
// `~=` with a space in the value matches nothing; `=` matches the exact list.
|
|
89
|
+
return includes && words.length !== 1 ? [] : words;
|
|
90
|
+
}
|
|
91
|
+
/** The references and the locally defined custom properties of one stylesheet. */
|
|
92
|
+
function scanSheet(css, sheet, references, defined) {
|
|
93
|
+
const tokens = tokenizeCss(css);
|
|
94
|
+
tokens.forEach((token, i) => {
|
|
95
|
+
// `style(--x…)` (container style queries, `if()`) reads `--x` as `var(--x)` does (TAG-408).
|
|
96
|
+
if (token.type === "function" &&
|
|
97
|
+
(asciiLower(token.value) === "var" || asciiLower(token.value) === "style")) {
|
|
98
|
+
const name = tokens[nextSignificant(tokens, i)];
|
|
99
|
+
if (name?.type === "ident" && name.value.startsWith("--")) {
|
|
100
|
+
references.push({ kind: "css-var", name: name.value, sheet, offset: name.offset });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (token.type === "function" &&
|
|
104
|
+
asciiLower(token.value) === "part" &&
|
|
105
|
+
isDelim(tokens[i - 1], ":") &&
|
|
106
|
+
isDelim(tokens[i - 2], ":")) {
|
|
107
|
+
for (let j = nextSignificant(tokens, i); j !== -1; j = nextSignificant(tokens, j)) {
|
|
108
|
+
const part = tokens[j];
|
|
109
|
+
if (part?.type !== "ident")
|
|
110
|
+
break;
|
|
111
|
+
references.push({ kind: "part", name: part.value, sheet, offset: part.offset });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else if (isDelim(token, "[")) {
|
|
115
|
+
const parts = attributeParts(tokens, i);
|
|
116
|
+
if (parts === "pattern") {
|
|
117
|
+
references.push({ kind: "part-pattern", name: "[part]", sheet, offset: token.offset });
|
|
118
|
+
}
|
|
119
|
+
for (const name of parts === "pattern" ? [] : parts) {
|
|
120
|
+
references.push({ kind: "part", name, sheet, offset: token.offset });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else if (token.type === "ident" && token.value.startsWith("--")) {
|
|
124
|
+
const before = tokens[previousSignificant(tokens, i)];
|
|
125
|
+
const declares = (before === undefined || isDelim(before, "{") || isDelim(before, ";")) &&
|
|
126
|
+
isDelim(tokens[nextSignificant(tokens, i)], ":");
|
|
127
|
+
const registers = before?.type === "at-keyword" && asciiLower(before.value) === "property";
|
|
128
|
+
if (declares || registers)
|
|
129
|
+
defined.add(token.value);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Where each line of a stylesheet starts, with the line breaks of CSS Syntax §3.3: `\n`, `\f`
|
|
135
|
+
* and a `\r` not followed by `\n` (CRLF counts once). `cssLineStarts(css)[n - 1]` is the offset
|
|
136
|
+
* of line `n`, the numbering `checkStyleReferences` reports (TAG-423: the builder quotes the line).
|
|
137
|
+
*
|
|
138
|
+
* Inputs: CSS text. Output: the 0-based offsets, the first one `0`, ascending. Errors: never
|
|
139
|
+
* throws. Side effects: none. Linear in the length.
|
|
140
|
+
*/
|
|
141
|
+
export function cssLineStarts(css) {
|
|
142
|
+
const starts = [0];
|
|
143
|
+
for (let i = 0; i < css.length; i += 1) {
|
|
144
|
+
const c = css.charCodeAt(i);
|
|
145
|
+
if (c === 0x0a || c === 0x0c || (c === 0x0d && css.charCodeAt(i + 1) !== 0x0a)) {
|
|
146
|
+
starts.push(i + 1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return starts;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* 1-based line and column of `offset`, by binary search over the sheet's line starts: one linear
|
|
153
|
+
* pass per sheet for all its findings, instead of a scan from the start per finding (50 findings
|
|
154
|
+
* at the end of a 1 MB sheet were 50 MB of scanning, TAG-423).
|
|
155
|
+
*/
|
|
156
|
+
function position(starts, offset) {
|
|
157
|
+
let low = 0;
|
|
158
|
+
let high = starts.length - 1;
|
|
159
|
+
while (low < high) {
|
|
160
|
+
const middle = Math.ceil((low + high) / 2);
|
|
161
|
+
if ((starts[middle] ?? 0) <= offset)
|
|
162
|
+
low = middle;
|
|
163
|
+
else
|
|
164
|
+
high = middle - 1;
|
|
165
|
+
}
|
|
166
|
+
return { line: low + 1, column: offset - (starts[low] ?? 0) + 1 };
|
|
167
|
+
}
|
|
168
|
+
function issueMessage(code, name, where) {
|
|
169
|
+
switch (code) {
|
|
170
|
+
case "undeclared-part":
|
|
171
|
+
return `part "${name}" (${where}) is not declared: add it to the manifest's "parts" or stop styling it`;
|
|
172
|
+
case "undeclared-css-var":
|
|
173
|
+
return `CSS variable "${name}" (${where}) is not declared: add it to the manifest's "cssVars" with a type and a default, or define it in the component's own CSS`;
|
|
174
|
+
case "part-pattern":
|
|
175
|
+
return `a [part] selector (${where}) matches parts by pattern, undeclared ones included: name each declared part with [part=name] or [part~=name]`;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Lists the parts and CSS variables a component's CSS uses without declaring them.
|
|
180
|
+
*
|
|
181
|
+
* Inputs: the component's CSS (one text or the list of stylesheets it adopts) and its declarations
|
|
182
|
+
* (`parts`, `cssVars`; a parsed `ComponentManifest` fits). A variable counts as declared when it is
|
|
183
|
+
* an own key of `cssVars` or is defined by any of the stylesheets (`--name: …` as a declaration,
|
|
184
|
+
* or `@property --name`). Output: one issue per undeclared name, at its first occurrence, in
|
|
185
|
+
* stylesheet and source order, at most `STYLE_CHECK_MAX_ISSUES`; empty when everything is
|
|
186
|
+
* declared. Text inside comments, strings and `url(…)` is ignored; escapes are decoded and
|
|
187
|
+
* function names compared ASCII case-insensitively, as browsers do. Errors: never throws.
|
|
188
|
+
* Side effects: none.
|
|
189
|
+
*/
|
|
190
|
+
export function checkStyleReferences(css, declarations) {
|
|
191
|
+
const sheets = typeof css === "string" ? [css] : css;
|
|
192
|
+
const references = [];
|
|
193
|
+
const defined = new Set();
|
|
194
|
+
sheets.forEach((text, sheet) => {
|
|
195
|
+
scanSheet(text, sheet, references, defined);
|
|
196
|
+
});
|
|
197
|
+
const parts = declarations.parts ?? {};
|
|
198
|
+
const cssVars = declarations.cssVars ?? {};
|
|
199
|
+
const reported = new Set();
|
|
200
|
+
const lineStarts = new Map();
|
|
201
|
+
const issues = [];
|
|
202
|
+
for (const reference of references) {
|
|
203
|
+
if (issues.length === STYLE_CHECK_MAX_ISSUES)
|
|
204
|
+
break;
|
|
205
|
+
const declared = reference.kind === "part-pattern"
|
|
206
|
+
? false
|
|
207
|
+
: reference.kind === "part"
|
|
208
|
+
? Object.hasOwn(parts, reference.name)
|
|
209
|
+
: Object.hasOwn(cssVars, reference.name) || defined.has(reference.name);
|
|
210
|
+
// Each pattern selector is reported, at its own position: there is no name to group them by.
|
|
211
|
+
const key = reference.kind === "part-pattern"
|
|
212
|
+
? `${reference.kind}:${String(reference.sheet)}:${String(reference.offset)}`
|
|
213
|
+
: `${reference.kind}:${reference.name}`;
|
|
214
|
+
if (declared || reported.has(key))
|
|
215
|
+
continue;
|
|
216
|
+
reported.add(key);
|
|
217
|
+
const code = reference.kind === "part"
|
|
218
|
+
? "undeclared-part"
|
|
219
|
+
: reference.kind === "part-pattern"
|
|
220
|
+
? "part-pattern"
|
|
221
|
+
: "undeclared-css-var";
|
|
222
|
+
let starts = lineStarts.get(reference.sheet);
|
|
223
|
+
if (starts === undefined) {
|
|
224
|
+
starts = cssLineStarts(sheets[reference.sheet] ?? "");
|
|
225
|
+
lineStarts.set(reference.sheet, starts);
|
|
226
|
+
}
|
|
227
|
+
const { line, column } = position(starts, reference.offset);
|
|
228
|
+
const name = boundedSegment(reference.name);
|
|
229
|
+
const where = `${sheets.length > 1 ? `stylesheet ${String(reference.sheet)}, ` : ""}line ${String(line)}, column ${String(column)}`;
|
|
230
|
+
issues.push({
|
|
231
|
+
code,
|
|
232
|
+
name,
|
|
233
|
+
sheet: reference.sheet,
|
|
234
|
+
line,
|
|
235
|
+
column,
|
|
236
|
+
message: issueMessage(code, name, where),
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
return issues;
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=style-references.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-references.js","sourceRoot":"","sources":["../src/style-references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,WAAW,EAA0B,MAAM,iBAAiB,CAAC;AAElF,yFAAyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AA6CzC,0EAA0E;AAC1E,SAAS,eAAe,CAAC,MAAwB,EAAE,IAAY;IAC7D,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACjD,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,YAAY;YAAE,OAAO,CAAC,CAAC;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KAAK;YACtB,IAAI;YACJ,MAAM;YACN,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;SACzC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom element tag rules of component contract v1 (TAG-201, extended by TAG-204): the tag pattern,
|
|
3
|
+
* the reserved names and prefix, the optional workspace tag prefix, and the explanation plus a
|
|
4
|
+
* valid suggestion for any refused name.
|
|
5
|
+
*
|
|
6
|
+
* The accepted set is a strict ASCII subset of the HTML "valid custom element name" (lowercase
|
|
7
|
+
* letters, digits and single hyphens, starting with a letter, at least one hyphen), minus the names
|
|
8
|
+
* the HTML spec reserves and the `taggor-` prefix. Everything here is pure: uniqueness inside a
|
|
9
|
+
* workspace and the workspace prefix are enforced by the API when a component is created (TAG-908);
|
|
10
|
+
* what the runtime does when a tag is already defined on the page is ADR 0018.
|
|
11
|
+
*/
|
|
12
|
+
import * as z from "zod";
|
|
13
|
+
/**
|
|
14
|
+
* Names the HTML spec reserves even though they contain a hyphen (they are SVG and MathML
|
|
15
|
+
* elements); `customElements.define` throws for them.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RESERVED_TAG_NAMES: readonly ["annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph"];
|
|
18
|
+
/** Prefix kept for elements Taggor itself defines (for example the generic tag of TAG-320). */
|
|
19
|
+
export declare const RESERVED_TAG_PREFIX = "taggor-";
|
|
20
|
+
/** Custom element name: ASCII subset of the HTML spec, hyphen required, deny lists applied. */
|
|
21
|
+
export declare const TAG_NAME_PATTERN: RegExp;
|
|
22
|
+
/**
|
|
23
|
+
* Workspace tag prefix, written without the trailing hyphen (`acme` → tags `acme-…`): kebab-case,
|
|
24
|
+
* starting with a letter, and never `taggor` or `taggor-…`, which would produce reserved tags.
|
|
25
|
+
*/
|
|
26
|
+
export declare const WORKSPACE_TAG_PREFIX_PATTERN: RegExp;
|
|
27
|
+
/** Why a tag is refused. One tag can have several problems. */
|
|
28
|
+
export type TagNameProblem = "empty" | "too-long" | "invalid-start" | "invalid-character" | "invalid-hyphens" | "missing-hyphen" | "reserved-name" | "reserved-prefix" | "missing-workspace-prefix";
|
|
29
|
+
/** Result of `checkTagName`; never throws. */
|
|
30
|
+
export type TagNameCheck = {
|
|
31
|
+
readonly ok: true;
|
|
32
|
+
} | {
|
|
33
|
+
readonly ok: false;
|
|
34
|
+
readonly problems: readonly TagNameProblem[];
|
|
35
|
+
/** English, for API `detail`, CLI and MCP output; states the problems and the suggestion. */
|
|
36
|
+
readonly message: string;
|
|
37
|
+
/** A tag that passes the same check (with the same workspace prefix). */
|
|
38
|
+
readonly suggestion: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Says whether a tag belongs to a workspace prefix (`acme-finance-simulator` with `acme`).
|
|
42
|
+
*
|
|
43
|
+
* Inputs: the tag and the workspace prefix (without the trailing hyphen), or `undefined` when the
|
|
44
|
+
* workspace has none, in which case every tag matches. Output: boolean. It does not check the rest
|
|
45
|
+
* of the tag rules (use `checkTagName`). Errors: none. Side effects: none.
|
|
46
|
+
*/
|
|
47
|
+
export declare function tagMatchesWorkspacePrefix(tag: string, workspacePrefix: string | undefined): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Lists every rule a tag breaks, in a stable order.
|
|
50
|
+
*
|
|
51
|
+
* Inputs: the tag and, optionally, the workspace prefix (assumed valid). Output: the problems, empty
|
|
52
|
+
* when the tag is accepted (the result agrees with `TAG_NAME_PATTERN` plus the length limit and the
|
|
53
|
+
* prefix). Errors: none. Side effects: none.
|
|
54
|
+
*/
|
|
55
|
+
export declare function tagNameProblems(tag: string, workspacePrefix?: string): TagNameProblem[];
|
|
56
|
+
/**
|
|
57
|
+
* Turns any string into a valid tag close to it: `simulator` → `x-simulator`, `Simulação` →
|
|
58
|
+
* `x-simulacao`, `taggor-chat` → `x-chat`, with prefix `acme`: `simulator` → `acme-simulator`.
|
|
59
|
+
*
|
|
60
|
+
* Inputs: any string and, optionally, a workspace prefix accepted by `workspaceTagPrefixSchema`.
|
|
61
|
+
* Output: a tag accepted by `checkTagName(output, workspacePrefix)`; a tag that is already
|
|
62
|
+
* accepted comes back unchanged. Errors: throws `RangeError` when the workspace prefix itself is
|
|
63
|
+
* invalid (a caller bug: prefixes are validated when the workspace is saved). Side effects: none.
|
|
64
|
+
*/
|
|
65
|
+
export declare function suggestTagName(input: string, workspacePrefix?: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Checks a tag against every rule, including the workspace prefix when there is one. This is the
|
|
68
|
+
* check the API runs when a component is created (TAG-908, `invalid_tag_name` with the message in
|
|
69
|
+
* `detail`); uniqueness inside the workspace needs storage and stays in the API.
|
|
70
|
+
*
|
|
71
|
+
* Inputs: the tag and, optionally, a workspace prefix accepted by `workspaceTagPrefixSchema`.
|
|
72
|
+
* Output: `{ ok: true }`, or the problems, an English message and a suggestion that passes this
|
|
73
|
+
* same check. Errors: throws `RangeError` only for an invalid workspace prefix. Side effects: none.
|
|
74
|
+
*/
|
|
75
|
+
export declare function checkTagName(tag: string, workspacePrefix?: string): TagNameCheck;
|
|
76
|
+
/**
|
|
77
|
+
* Custom element tag of a manifest. Workspace prefixes are checked by the API (TAG-908), not here:
|
|
78
|
+
* the same manifest serves several workspaces (templates). The error message says what is wrong and
|
|
79
|
+
* suggests a valid tag.
|
|
80
|
+
*/
|
|
81
|
+
export declare const tagNameSchema: z.ZodString;
|
|
82
|
+
/**
|
|
83
|
+
* Optional tag prefix of a workspace (`acme`, so tags look like `acme-finance-simulator`). Saved
|
|
84
|
+
* with the workspace settings by the API; the manifest never carries it.
|
|
85
|
+
*/
|
|
86
|
+
export declare const workspaceTagPrefixSchema: z.ZodString;
|
|
87
|
+
//# sourceMappingURL=tag-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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