@pithyjs/ssr 0.0.0-stage → 0.1.2-beta.8

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 (156) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +100 -2
  3. package/bin/pithy-ssg.mjs +23 -0
  4. package/dist/browser.d.ts +38 -0
  5. package/dist/browser.d.ts.map +1 -0
  6. package/dist/browser.js +40 -0
  7. package/dist/browser.js.map +1 -0
  8. package/dist/build/cli-args.d.ts +104 -0
  9. package/dist/build/cli-args.d.ts.map +1 -0
  10. package/dist/build/cli-args.js +88 -0
  11. package/dist/build/cli-args.js.map +1 -0
  12. package/dist/build/cli-exit.d.ts +95 -0
  13. package/dist/build/cli-exit.d.ts.map +1 -0
  14. package/dist/build/cli-exit.js +237 -0
  15. package/dist/build/cli-exit.js.map +1 -0
  16. package/dist/build/cli.d.ts +11 -0
  17. package/dist/build/cli.d.ts.map +1 -0
  18. package/dist/build/cli.js +93 -0
  19. package/dist/build/cli.js.map +1 -0
  20. package/dist/build/collect-css.d.ts +168 -0
  21. package/dist/build/collect-css.d.ts.map +1 -0
  22. package/dist/build/collect-css.js +479 -0
  23. package/dist/build/collect-css.js.map +1 -0
  24. package/dist/build/css-live-props.d.ts +89 -0
  25. package/dist/build/css-live-props.d.ts.map +1 -0
  26. package/dist/build/css-live-props.js +704 -0
  27. package/dist/build/css-live-props.js.map +1 -0
  28. package/dist/build/css-purge.d.ts +153 -0
  29. package/dist/build/css-purge.d.ts.map +1 -0
  30. package/dist/build/css-purge.js +463 -0
  31. package/dist/build/css-purge.js.map +1 -0
  32. package/dist/build/index.d.ts +24 -0
  33. package/dist/build/index.d.ts.map +1 -0
  34. package/dist/build/index.js +31 -0
  35. package/dist/build/index.js.map +1 -0
  36. package/dist/build/not-found.d.ts +94 -0
  37. package/dist/build/not-found.d.ts.map +1 -0
  38. package/dist/build/not-found.js +99 -0
  39. package/dist/build/not-found.js.map +1 -0
  40. package/dist/build/relative-links.d.ts +31 -0
  41. package/dist/build/relative-links.d.ts.map +1 -0
  42. package/dist/build/relative-links.js +79 -0
  43. package/dist/build/relative-links.js.map +1 -0
  44. package/dist/build/shell-head.d.ts +68 -0
  45. package/dist/build/shell-head.d.ts.map +1 -0
  46. package/dist/build/shell-head.js +236 -0
  47. package/dist/build/shell-head.js.map +1 -0
  48. package/dist/build/sprite-ssg.d.ts +61 -0
  49. package/dist/build/sprite-ssg.d.ts.map +1 -0
  50. package/dist/build/sprite-ssg.js +114 -0
  51. package/dist/build/sprite-ssg.js.map +1 -0
  52. package/dist/build/ssg.d.ts +117 -0
  53. package/dist/build/ssg.d.ts.map +1 -0
  54. package/dist/build/ssg.js +404 -0
  55. package/dist/build/ssg.js.map +1 -0
  56. package/dist/build/vite-ssg.d.ts +396 -0
  57. package/dist/build/vite-ssg.d.ts.map +1 -0
  58. package/dist/build/vite-ssg.js +1130 -0
  59. package/dist/build/vite-ssg.js.map +1 -0
  60. package/dist/client/bootstrap.d.ts +51 -0
  61. package/dist/client/bootstrap.d.ts.map +1 -0
  62. package/dist/client/bootstrap.js +121 -0
  63. package/dist/client/bootstrap.js.map +1 -0
  64. package/dist/client/hydrate.d.ts +60 -0
  65. package/dist/client/hydrate.d.ts.map +1 -0
  66. package/dist/client/hydrate.js +168 -0
  67. package/dist/client/hydrate.js.map +1 -0
  68. package/dist/client/index.d.ts +21 -0
  69. package/dist/client/index.d.ts.map +1 -0
  70. package/dist/client/index.js +16 -0
  71. package/dist/client/index.js.map +1 -0
  72. package/dist/index.d.ts +32 -0
  73. package/dist/index.d.ts.map +1 -0
  74. package/dist/index.js +31 -0
  75. package/dist/index.js.map +1 -0
  76. package/dist/server/app.d.ts +166 -0
  77. package/dist/server/app.d.ts.map +1 -0
  78. package/dist/server/app.js +200 -0
  79. package/dist/server/app.js.map +1 -0
  80. package/dist/server/context.d.ts +238 -0
  81. package/dist/server/context.d.ts.map +1 -0
  82. package/dist/server/context.js +371 -0
  83. package/dist/server/context.js.map +1 -0
  84. package/dist/server/environment.d.ts +88 -0
  85. package/dist/server/environment.d.ts.map +1 -0
  86. package/dist/server/environment.js +261 -0
  87. package/dist/server/environment.js.map +1 -0
  88. package/dist/server/html-shell.d.ts +41 -0
  89. package/dist/server/html-shell.d.ts.map +1 -0
  90. package/dist/server/html-shell.js +208 -0
  91. package/dist/server/html-shell.js.map +1 -0
  92. package/dist/server/index.d.ts +26 -0
  93. package/dist/server/index.d.ts.map +1 -0
  94. package/dist/server/index.js +37 -0
  95. package/dist/server/index.js.map +1 -0
  96. package/dist/server/layout-taint.d.ts +62 -0
  97. package/dist/server/layout-taint.d.ts.map +1 -0
  98. package/dist/server/layout-taint.js +313 -0
  99. package/dist/server/layout-taint.js.map +1 -0
  100. package/dist/server/loaders.d.ts +194 -0
  101. package/dist/server/loaders.d.ts.map +1 -0
  102. package/dist/server/loaders.js +479 -0
  103. package/dist/server/loaders.js.map +1 -0
  104. package/dist/server/render-route.d.ts +102 -0
  105. package/dist/server/render-route.d.ts.map +1 -0
  106. package/dist/server/render-route.js +182 -0
  107. package/dist/server/render-route.js.map +1 -0
  108. package/dist/server/render.d.ts +80 -0
  109. package/dist/server/render.d.ts.map +1 -0
  110. package/dist/server/render.js +256 -0
  111. package/dist/server/render.js.map +1 -0
  112. package/dist/server/router-adapter.d.ts +134 -0
  113. package/dist/server/router-adapter.d.ts.map +1 -0
  114. package/dist/server/router-adapter.js +225 -0
  115. package/dist/server/router-adapter.js.map +1 -0
  116. package/dist/server/serialization.d.ts +54 -0
  117. package/dist/server/serialization.d.ts.map +1 -0
  118. package/dist/server/serialization.js +287 -0
  119. package/dist/server/serialization.js.map +1 -0
  120. package/dist/server/ssr-worker.d.ts +18 -0
  121. package/dist/server/ssr-worker.d.ts.map +1 -0
  122. package/dist/server/ssr-worker.js +118 -0
  123. package/dist/server/ssr-worker.js.map +1 -0
  124. package/dist/server/utils.d.ts +11 -0
  125. package/dist/server/utils.d.ts.map +1 -0
  126. package/dist/server/utils.js +14 -0
  127. package/dist/server/utils.js.map +1 -0
  128. package/dist/server/worker-pool.d.ts +153 -0
  129. package/dist/server/worker-pool.d.ts.map +1 -0
  130. package/dist/server/worker-pool.js +451 -0
  131. package/dist/server/worker-pool.js.map +1 -0
  132. package/dist/server/worker-protocol.d.ts +61 -0
  133. package/dist/server/worker-protocol.d.ts.map +1 -0
  134. package/dist/server/worker-protocol.js +9 -0
  135. package/dist/server/worker-protocol.js.map +1 -0
  136. package/dist/shared/css-purge.d.ts +71 -0
  137. package/dist/shared/css-purge.d.ts.map +1 -0
  138. package/dist/shared/css-purge.js +177 -0
  139. package/dist/shared/css-purge.js.map +1 -0
  140. package/dist/shared/entry-path.d.ts +41 -0
  141. package/dist/shared/entry-path.d.ts.map +1 -0
  142. package/dist/shared/entry-path.js +87 -0
  143. package/dist/shared/entry-path.js.map +1 -0
  144. package/dist/shared/head.d.ts +87 -0
  145. package/dist/shared/head.d.ts.map +1 -0
  146. package/dist/shared/head.js +412 -0
  147. package/dist/shared/head.js.map +1 -0
  148. package/dist/shared/shell-helpers.d.ts +69 -0
  149. package/dist/shared/shell-helpers.d.ts.map +1 -0
  150. package/dist/shared/shell-helpers.js +160 -0
  151. package/dist/shared/shell-helpers.js.map +1 -0
  152. package/dist/shared/types.d.ts +332 -0
  153. package/dist/shared/types.d.ts.map +1 -0
  154. package/dist/shared/types.js +27 -0
  155. package/dist/shared/types.js.map +1 -0
  156. package/package.json +84 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-live-props.js","sourceRoot":"","sources":["../../src/build/css-live-props.ts"],"names":[],"mappings":"AAAA,oJAAoJ;AAEpJ;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,GAEX,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;GASG;AACH,2JAA2J;AAC3J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YAC9D,2DAA2D,EAC7D,GAAG,CACJ,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,mNAAmN;AACnN,MAAM,UAAU,kBAAkB,CAChC,KAAoC,EACpC,MAA6B;IAE7B,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,CAAC,CAAC,IAAI,IAAI,EAAE;QACZ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;QACzC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;QACzC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;KACpD,CAAC,CAAC;IACH,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;QAClD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC1B,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/** @codex { \"id\": \"pithy.ssr.build.css-live-props\", \"title\": \"Static Export Dead Custom-Property Purge\", \"category\": \"feature\", \"risk\": \"high\" } */\n\n/**\n * Drops custom-property declarations nothing live references, from the CSS that\n * survived the rule-level purge in `css-purge.ts`.\n *\n * It reads RESOLVED CSS, never SCSS source: by this point the `@use` graph,\n * `#{}` interpolation and package aliases are gone, so there is nothing left to\n * resolve and no reference a scanner could miss. Do not reintroduce source\n * scanning here — see `docs/ssg/static-export-unification.md` Step 6.\n *\n * Liveness is TRANSITIVE and per NAME: `--a: var(--b)` makes `--b` live only\n * when `--a` is, and a name defined in both `:root` and `[data-theme=dark]`\n * contributes refs from every definition. Iterated to a fixed point — one pass\n * keeps a chain's first hop and drops the rest.\n *\n * Output is produced by SPLICING drop ranges out of the input, never by\n * re-emitting. A sheet with nothing dead comes back byte-identical, so\n * `oklch()` and `color-mix()` cannot be reformatted away.\n *\n * Fail-open end to end: an unparseable name, an unterminated block, an opaque\n * at-rule and anything else it cannot classify are KEPT. Keeping a declaration\n * costs bytes; dropping a live one renders a JS-disabled page wrong.\n */\n\nimport {\n atRuleName,\n holdsCascadeSlot,\n isRecursiveAtRule,\n} from '../shared/css-purge.js';\nimport {\n splitFirstRule,\n skipComment,\n skipString,\n type CssNode,\n} from './css-purge.js';\n\n/**\n * Names kept however the CSS reads, because JavaScript composes them from a\n * string at runtime and no scan of any kind can see the reference.\n *\n * Static export ships no framework JS, but it does still carry whatever\n * `scripts` the caller configured, so these stay. Anything else a static page's\n * own JS reads through `getComputedStyle` belongs in {@link DeadPropOptions}'s\n * `safelist` — in particular `getDefaultTheme(true)`, which bootstraps a theme\n * by READING `--color-*` off the sheet before anything has written it.\n */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"DEFAULT_LIVE_PROP_SAFELIST\",\"stability\":\"experimental\",\"signature\":\"readonly string[]\"} */\nexport const DEFAULT_LIVE_PROP_SAFELIST: readonly string[] = [\n // `ShadowManager.resolveTintColor()` reads `--color-${color}-rgb` for these\n // three. Re-derived, not imported: `@pithyjs/ssr` has no dependency on\n // `@pithyjs/vite-plugin`. Keep in step with `DEFAULT_CHANNEL_VAR_SAFELIST`,\n // `packages/vitePlugins/src/designSystemPlugin/channelVars.ts:205`.\n '--color-primary-rgb',\n '--color-secondary-rgb',\n '--color-tertiary-rgb',\n // `packages/ui-kit/src/shared/headerOffset.ts:152`, a fixed literal.\n '--app-header-offset',\n];\n\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"DeadPropOptions\",\"stability\":\"experimental\",\"signature\":\"interface { safelist?: Iterable<string | RegExp>; htmlSources?: readonly string[] }\"} */\nexport interface DeadPropOptions {\n /**\n * Extra names to keep, on top of {@link DEFAULT_LIVE_PROP_SAFELIST}. A\n * trailing `*` makes the entry a prefix pattern (`--brand-*`); a `RegExp`\n * is tested against the whole name.\n *\n * `RegExp` is accepted so the design-system plugin's `channelVarSafelist`,\n * which this pass is given, can be forwarded without losing entries.\n */\n safelist?: Iterable<string | RegExp>;\n /**\n * Every rendered page's HTML. An inline `style=\"color:var(--x)\"` is invisible\n * to a CSS-only scan, and omitting this is how such a page loses its colour.\n */\n htmlSources?: readonly string[];\n}\n\n/**\n * Matches the same charset the declaration parser will accept as a name.\n *\n * Case-insensitive because `VAR(--x)` is a live reference — CSS function names\n * are ASCII case-insensitive — and missing one DROPS the declaration. The\n * capture stays case-sensitive: names are compared by exact string, as CSS\n * requires.\n *\n * A comment is whitespace to the tokenizer, so a `var(` may be separated from\n * its name by one. That case belongs to {@link addSpacedVarRefs}, not here: a\n * `(?:comment\\s*)*` group in this pattern backtracked exponentially when the\n * tail failed, so a sheet with `var(` followed by comments and no name could\n * hang the build (60 ms at 24 comments, and doubling per comment).\n */\nconst VAR_REF_RE = /var\\(\\s*(--[A-Za-z0-9_-]+)/gi;\n\n/**\n * Opens a `style()` query, whose whole argument {@link addStyleFnRefs} reads.\n *\n * The lookbehind keeps `getComputedStyle(` and prose out. An unclosed one of\n * those runs to the end of the text, so it kept every name after it.\n */\nconst STYLE_FN_OPEN_RE = /(?<![\\w-])style\\(/gi;\n\n/** Opens a `var()` reference, whose name {@link addSpacedVarRefs} reads. */\nconst VAR_OPEN_RE = /var\\(/gi;\n\n/** Reads a name at an exact offset, for a scanner that already found it. */\nconst PROP_NAME_AT_RE = /--[A-Za-z0-9_-]+/y;\n\n/**\n * Index past the whitespace and comments at `i`, or `-1` when an unclosed\n * comment means nothing after it is code.\n */\nfunction skipTrivia(text: string, i: number): number {\n for (;;) {\n while (i < text.length && /\\s/.test(text[i])) i++;\n if (text[i] !== '/' || text[i + 1] !== '*') return i;\n const close = text.indexOf('*/', i + 2);\n if (close === -1) return -1;\n i = close + 2;\n }\n}\n\n/**\n * Every name a comment separates from its `var(`, which a comment being\n * whitespace to the tokenizer makes a real reference.\n *\n * Comments are read HERE, where a name is expected, rather than blanked out of\n * the text first. Blanking was wrong about what it was reading: these sources\n * carry HTML prose and CSS strings too, so a comment opener in `<pre>src/*` or\n * in `content:\"/*\"` paired with the closer of a real reference further along\n * and deleted the `var(` between them — dropping a definition that renders.\n */\nfunction addSpacedVarRefs(text: string, into: Set<string>): void {\n VAR_OPEN_RE.lastIndex = 0;\n for (;;) {\n const m = VAR_OPEN_RE.exec(text);\n if (m === null) return;\n const i = skipTrivia(text, m.index + m[0].length);\n // Nothing closes a comment after this point, so no later `var(` can be\n // separated from its name by one either; a bare name is the raw scan's.\n if (i === -1) return;\n PROP_NAME_AT_RE.lastIndex = i;\n const name = PROP_NAME_AT_RE.exec(text);\n if (name !== null) into.add(name[0]);\n // Resume past what this scan consumed, so no span is read twice — which\n // is what keeps a source full of comment openers linear.\n VAR_OPEN_RE.lastIndex = Math.max(VAR_OPEN_RE.lastIndex, i);\n }\n}\n\n/**\n * A name this pass is willing to decide about. Anything else — an escaped or\n * non-ASCII name the `var()` extractor could not match either — is kept, so the\n * two sides can never disagree about what a reference refers to.\n *\n * It answers \"may this name be DELETED\", which is not the same question as\n * \"is this a custom-property declaration\" — see {@link isCustomPropDecl}.\n */\nconst PROP_NAME_RE = /^--[A-Za-z0-9_-]+$/;\n\n/** Where `@container style(--x: y)` and `transition: --x 200ms` read a name bare. */\nconst BARE_PROP_RE = /--[A-Za-z0-9_-]+/g;\n\n/**\n * Properties whose VALUE names a registered custom property without `var()`.\n * Harvested bare, which over-keeps — the safe direction.\n */\nconst BARE_REF_PROPS = new Set([\n 'transition',\n 'transition-property',\n 'animation',\n 'will-change',\n]);\n\n/**\n * Every custom property named anywhere inside a `style()` query.\n *\n * A `style()` query reads a name with no `var()` around it, in a CONDITION\n * rather than a value, and the same query reaches the pass three ways: a\n * declaration value (`if(style(--v: a): …)`), an opaque at-rule kept whole\n * (`@starting-style{@container style(--x: 1){…}}`) and a page's inline\n * `<style>`. Only the recursive-at-rule prelude read it before.\n *\n * The WHOLE argument, not the name after the paren: a query may be compound or\n * negated — `style((--a: 1) and (--b: 2))`, `style(not (--a: 1))` — and\n * matching only `style(\\s*--name` dropped every property such a condition\n * tests, which then silently stops matching.\n *\n * Linear: `lastIndex` resumes past each closed group, so a nested `style(`\n * already covered by the enclosing argument is not rescanned. An unterminated\n * `style(` runs to the end of the text and is harvested, which over-keeps.\n */\nfunction addStyleFnRefs(text: string, into: Set<string>): void {\n STYLE_FN_OPEN_RE.lastIndex = 0;\n for (;;) {\n const m = STYLE_FN_OPEN_RE.exec(text);\n if (m === null) return;\n let depth = 0;\n let i = m.index + m[0].length - 1;\n const open = i;\n for (; i < text.length; i++) {\n const c = text[i];\n // A `)` inside a string, a comment or behind a backslash closes nothing,\n // and ending the argument early drops every name after it.\n if (c === '\\\\') i++;\n else if (c === '\"' || c === \"'\") i = skipString(text, i, text.length);\n else if (c === '/' && text[i + 1] === '*')\n i = skipComment(text, i, text.length) - 1;\n else if (c === '(') depth++;\n else if (c === ')' && --depth === 0) break;\n }\n for (const name of text.slice(open + 1, i).matchAll(BARE_PROP_RE)) {\n into.add(name[0]);\n }\n STYLE_FN_OPEN_RE.lastIndex = i;\n }\n}\n\nfunction addVarRefs(text: string, into: Set<string>): void {\n // The raw scan counts a reference inside a comment too\n // (`color:red/*var(--half)*/`), a deliberate over-keep.\n for (const m of text.matchAll(VAR_REF_RE)) into.add(m[1]);\n addSpacedVarRefs(text, into);\n addStyleFnRefs(text, into);\n}\n\n/**\n * Whether the text before a declaration's colon names a custom property — ANY\n * name, with comments and whitespace read as the trivia they are, so\n * `--x/*c*\\/:` and `--x /*c*\\/ :` are declarations.\n *\n * Deliberately wider than {@link PROP_NAME_RE}, which answers which names may\n * be deleted. Deciding declaration SYNTAX with that narrow matcher read\n * `--café:{--inner:1}` as a nested RULE, recursed into it and removed a live\n * definition — past the safelist, which never saw a declaration to protect.\n */\nfunction isCustomPropDecl(text: string): boolean {\n // Only the first two characters decide, which is why trivia needs no\n // handling here: a comment before the colon comes after the name, and the\n // splitter never starts an item on leading trivia — that is its own item.\n //\n // Either hyphen may be ESCAPED, and CSS spells one several ways (`\\--x`,\n // `-\\-x`, `\\2d\\2d x`). Rather than decode them, an escape in either\n // position is read as \"possibly a custom property\". Being wrong that way\n // keeps an escape-led nested rule (`\\64 iv:hover{…}`) whole, which costs\n // bytes; being wrong the other way recursed INTO a declaration's value and\n // deleted the definition around it.\n if (text.startsWith('\\\\')) return true;\n if (!text.startsWith('-')) return false;\n return text.startsWith('-', 1) || text.startsWith('\\\\', 1);\n}\n\nfunction addBareRefs(text: string, into: Set<string>): void {\n for (const m of text.matchAll(BARE_PROP_RE)) into.add(m[0]);\n}\n\n/**\n * One item of a rule body (or of the stylesheet). `other` is anything with no\n * name to decide about and is never dropped; `group` with `children: null` is\n * an opaque at-rule kept whole.\n */\ntype Item =\n | { kind: 'prop'; name: string; start: number; end: number }\n | { kind: 'other'; start: number; end: number }\n | { kind: 'comment'; start: number; end: number; pinned: boolean }\n | {\n kind: 'group';\n start: number;\n end: number;\n bodyStart: number;\n bodyEnd: number;\n children: Item[] | null;\n /** `@layer`: emptying it must not remove its cascade slot. */\n holdsSlot?: boolean;\n };\n\ninterface Scan {\n /** Names live regardless of any custom property's own liveness. */\n roots: Set<string>;\n /** Per name, every ref any of its definitions makes. */\n edges: Map<string, Set<string>>;\n}\n\n/** Advance past the block starting at `start`, as `splitRules` sees it. */\nfunction blockAt(\n css: string,\n start: number,\n to: number\n): { node: CssNode; end: number } | null {\n const node = splitFirstRule(css, start, to);\n return node ? { node, end: start + node.raw.length } : null;\n}\n\n/**\n * Split `css[from, to)` into declarations and nested blocks.\n *\n * Parens, strings and comments all hold the scan: `url(data:…;base64,…)`,\n * `content: \"a;b\"` and `/* ; *\\/` each carry a `;` that would otherwise end a\n * declaration early and shift every name after it. A `{` before any `;` means\n * the item is a nested rule, and `splitRules` is asked where it ends.\n */\nfunction splitBody(css: string, from: number, to: number, scan: Scan): Item[] {\n const items: Item[] = [];\n let i = from;\n\n while (i < to) {\n while (i < to && /\\s/.test(css[i])) i++;\n if (i >= to) break;\n\n if (css[i] === '/' && css[i + 1] === '*') {\n const stop = skipComment(css, i, to);\n // A ref inside a comment is NOT a ref — a comment cannot render. Safe\n // only because `skipComment` finds the real end; a comment misjudged as\n // code would instead keep a dead name, which costs bytes, not render.\n items.push({\n kind: 'comment',\n start: i,\n end: stop,\n pinned: css.startsWith('/*!', i),\n });\n i = stop;\n continue;\n }\n\n const start = i;\n // Closers still owed, innermost last. A `;` inside ANY block belongs to\n // that block's value, not to this declaration: `--x:[a;b]` is one\n // declaration, and reading its `;` as a separator spliced the text either\n // side of it into different items — promoting `color:red` out of a dead\n // custom property's value into a real declaration, and leaving an\n // unmatched `[` that swallows the rules after it.\n const owed: string[] = [];\n let colonAt = -1;\n let end = -1;\n let isBlock = false;\n let valueHasBlock = false;\n\n for (; i < to; i++) {\n const ch = css[i];\n // An escape outside a string: `.w-\\(` is one class name, not an open\n // paren. Without this the paren count desynchronises and the rest of the\n // sheet is swallowed into one verbatim item.\n if (ch === '\\\\') {\n i++;\n continue;\n }\n if (ch === '/' && css[i + 1] === '*') {\n i = skipComment(css, i, to) - 1;\n continue;\n }\n if (ch === '\"' || ch === \"'\") {\n i = skipString(css, i, to);\n continue;\n }\n if (ch === '(') {\n owed.push(')');\n continue;\n }\n if (ch === '[') {\n owed.push(']');\n continue;\n }\n if (owed.length > 0) {\n if (ch === '{') owed.push('}');\n else if (ch === owed[owed.length - 1]) owed.pop();\n continue;\n }\n if (ch === '{') {\n // A custom property's VALUE may be a block (`--x:{--y:1}`, the old\n // `@apply` idiom); anywhere else a `{` opens a nested RULE.\n if (colonAt !== -1 && isCustomPropDecl(css.slice(start, colonAt))) {\n owed.push('}');\n valueHasBlock = true;\n continue;\n }\n isBlock = true;\n break;\n }\n if (ch === '}') {\n // Unbalanced input; `i === start` would otherwise never advance.\n end = i === start ? i + 1 : i;\n break;\n }\n if (ch === ';') {\n end = i + 1;\n break;\n }\n if (ch === ':' && colonAt === -1) colonAt = i;\n }\n\n if (isBlock) {\n const found = blockAt(css, start, to);\n // `splitRules` is paren-aware now, so it and this loop tokenise alike and\n // `found.end <= i` can no longer happen — kept as a fail-open floor,\n // because trusting a disagreeing end emitted an unterminated at-rule.\n if (!found || found.end <= i) {\n items.push({ kind: 'other', start, end: to });\n addVarRefs(css.slice(start, to), scan.roots);\n i = to;\n continue;\n }\n items.push(groupItem(css, start, found, scan));\n i = found.end;\n continue;\n }\n\n const stop = end === -1 ? to : end;\n const text = css.slice(start, stop);\n const name = colonAt === -1 ? '' : css.slice(start, colonAt).trim();\n\n // A leading `@` is a statement at-rule, not a declaration, whatever colons\n // it carries (`@import url(a:b);`). A block-valued custom property and an\n // unclosed block are kept verbatim: neither one's liveness is modelled, so\n // dropping it on the strength of its NAME can take live text with it.\n if (valueHasBlock || owed.length > 0) {\n items.push({ kind: 'other', start, end: stop });\n addVarRefs(text, scan.roots);\n } else if (text[0] !== '@' && PROP_NAME_RE.test(name)) {\n items.push({ kind: 'prop', name, start, end: stop });\n const refs = scan.edges.get(name) ?? new Set<string>();\n // Counts a `var()` in a comment EMBEDDED here, unlike a standalone\n // comment item's: a half commented-out fallback is still a reference.\n addVarRefs(css.slice(colonAt + 1, stop), refs);\n scan.edges.set(name, refs);\n } else {\n items.push({ kind: 'other', start, end: stop });\n addVarRefs(text, scan.roots);\n // `transition: --x 200ms` and `will-change: --x` name a registered\n // property with no `var()` around it.\n if (BARE_REF_PROPS.has(name.toLowerCase())) {\n addBareRefs(css.slice(colonAt + 1, stop), scan.roots);\n }\n }\n i = stop;\n }\n\n return items;\n}\n\n/** Classify a block: recurse into it, or keep it whole and harvest its refs. */\nfunction groupItem(\n css: string,\n start: number,\n found: { node: CssNode; end: number },\n scan: Scan\n): Item {\n const { node, end } = found;\n if (node.kind !== 'block') {\n addVarRefs(node.raw, scan.roots);\n return { kind: 'other', start, end };\n }\n\n const at = atRuleName(node.prelude);\n const base = {\n kind: 'group' as const,\n start,\n end,\n bodyStart: node.bodyStart,\n bodyEnd: node.bodyEnd,\n };\n\n if (at !== null && !isRecursiveAtRule(at)) {\n // `@property`, `@keyframes`, `@font-face`, `@page`: descriptors and\n // keyframe offsets, not declarations to decide about. Kept whole — an\n // `@property` for a dropped name costs a few bytes and removes a\n // correctness question — and every `var()` inside is a root.\n addVarRefs(node.raw, scan.roots);\n return { ...base, children: null };\n }\n\n addVarRefs(node.prelude, scan.roots);\n if (at !== null) {\n // `@supports (color: var(--x))` is covered above; `@container style(--x: y)`\n // reads the name with no `var()` around it.\n addBareRefs(node.prelude, scan.roots);\n }\n return {\n ...base,\n // A NAMED `@layer{}` declares ORDER, so an emptied one is emptied rather\n // than dropped: removing it moves the layer behind any later block that\n // reopens the name. An anonymous one names nothing and holds no slot —\n // the rule-level pass and Studio decide this with the same helper.\n holdsSlot: holdsCascadeSlot(at, node.prelude),\n children: splitBody(css, node.bodyStart, node.bodyEnd, scan),\n };\n}\n\n/** Every name reachable from a root or the safelist, to a fixed point. */\nfunction resolveLive(\n scan: Scan,\n inSafelist: (name: string) => boolean\n): Set<string> {\n const live = new Set<string>();\n const queue: string[] = [];\n const mark = (name: string): void => {\n if (live.has(name)) return;\n live.add(name);\n queue.push(name);\n };\n\n for (const r of scan.roots) mark(r);\n for (const name of scan.edges.keys()) if (inSafelist(name)) mark(name);\n\n while (queue.length > 0) {\n const name = queue.pop() as string;\n for (const ref of scan.edges.get(name) ?? []) mark(ref);\n }\n return live;\n}\n\ninterface Range {\n start: number;\n end: number;\n}\n\n/** A dropped range, and the spans inside it that must survive anyway. */\ninterface Drops {\n gone: boolean;\n keep: Range[];\n}\n\n/** `range` minus `holes`, so a dropped rule can leave a `/*!` comment behind. */\nfunction carve(range: Range, holes: Range[]): Range[] {\n if (holes.length === 0) return [range];\n const out: Range[] = [];\n let at = range.start;\n for (const h of [...holes].sort((a, b) => a.start - b.start)) {\n if (h.start > at) out.push({ start: at, end: h.start });\n at = Math.max(at, h.end);\n }\n if (at < range.end) out.push({ start: at, end: range.end });\n return out;\n}\n\n/**\n * Collect the ranges to splice out of `css[bodyStart, bodyEnd)`.\n *\n * `gone` means every item here can go, which lets the CALLER drop the whole rule\n * rather than leave `:root{}` or a dangling `@media{}` behind; the local ranges\n * are then discarded, since the caller's range covers them. `keep` carries the\n * `/*!` comments the caller must carve out of that range.\n *\n * `inBody` is false only for the stylesheet itself, which has no enclosing rule\n * to drop and no `}` to tidy up to.\n */\nfunction collectDrops(\n css: string,\n items: Item[],\n live: Set<string>,\n out: Range[],\n bodyStart: number,\n bodyEnd: number,\n inBody: boolean\n): Drops {\n const local: Range[] = [];\n const pinned: Range[] = [];\n let allGone = true;\n\n for (const item of items) {\n if (item.kind === 'comment') {\n // `/*!` is a licence marker, so it outlives its rule rather than keeping\n // an empty one alive. Authoring noise goes with the rule.\n if (item.pinned) pinned.push({ start: item.start, end: item.end });\n continue;\n }\n if (item.kind === 'prop') {\n if (live.has(item.name)) allGone = false;\n else local.push({ start: item.start, end: item.end });\n continue;\n }\n if (item.kind === 'group' && item.children !== null) {\n const sub: Range[] = [];\n const r = collectDrops(\n css,\n item.children,\n live,\n sub,\n item.bodyStart,\n item.bodyEnd,\n true\n );\n if (r.gone) {\n const span = item.holdsSlot\n ? { start: item.bodyStart, end: item.bodyEnd }\n : { start: item.start, end: item.end };\n local.push(...carve(span, r.keep));\n pinned.push(...r.keep);\n // An emptied slot-holder still occupies its position, so the parent is\n // not empty either.\n if (item.holdsSlot) allGone = false;\n } else {\n local.push(...sub);\n allGone = false;\n }\n continue;\n }\n allGone = false;\n }\n\n if (allGone && inBody) return { gone: true, keep: pinned };\n out.push(...tidy(css, local, bodyStart, bodyEnd, inBody));\n return { gone: false, keep: [] };\n}\n\n/**\n * Merge the ranges, then let a drop that reaches the end of the body absorb the\n * separator in front of it — without it, `{--a:1;--b:2}` losing `--b` emits\n * `{--a:1;}`.\n *\n * Only inside a body: at stylesheet level the `;` in front of a dropped rule\n * terminates a statement of its own, and eating it turns `@import url(a.css);`\n * into `@import url(a.css)`.\n */\nfunction tidy(\n css: string,\n ranges: Range[],\n bodyStart: number,\n bodyEnd: number,\n inBody: boolean\n): Range[] {\n if (ranges.length === 0) return ranges;\n const sorted = [...ranges].sort((a, b) => a.start - b.start);\n const merged: Range[] = [sorted[0]];\n\n for (const r of sorted.slice(1)) {\n const prev = merged[merged.length - 1];\n // Only separators between two drops means no survivor sits between them.\n if (r.start <= prev.end || /^[\\s;]*$/.test(css.slice(prev.end, r.start))) {\n prev.end = Math.max(prev.end, r.end);\n } else {\n merged.push(r);\n }\n }\n\n const last = merged[merged.length - 1];\n if (inBody && /^\\s*$/.test(css.slice(last.end, bodyEnd))) {\n while (last.start > bodyStart && /[\\s;]/.test(css[last.start - 1])) {\n last.start--;\n }\n // Give a trailing escape its character back. `font-family:Foo\\ ;` ends in\n // an escaped SPACE, and trimming the space left `Foo\\` against the closing\n // `}` — which the backslash then escaped, swallowing the rule. An ODD run\n // of backslashes means the last one is an escape still looking for a\n // victim.\n let slashes = 0;\n while (\n last.start - 1 - slashes >= bodyStart &&\n css[last.start - 1 - slashes] === '\\\\'\n ) {\n slashes++;\n }\n if (slashes % 2 === 1) last.start++;\n }\n return merged;\n}\n\nfunction splice(css: string, ranges: Range[]): string {\n if (ranges.length === 0) return css;\n const sorted = [...ranges].sort((a, b) => a.start - b.start);\n let out = '';\n let at = 0;\n for (const r of sorted) {\n if (r.start > at) out += css.slice(at, r.start);\n at = Math.max(at, r.end);\n }\n return out + css.slice(at);\n}\n\n/**\n * `keepCustomProperties`, coerced to an array BEFORE anything spreads it.\n *\n * A plain string is iterable, so `keepCustomProperties: '--brand'` spread into\n * characters and produced one \"ignoring \\\"-\\\"\" warning per letter, none of\n * which said the option takes an array — while the name itself was purged. A\n * number or object is not iterable at all and threw.\n *\n * Exported because every caller that assembles the safelist must coerce first;\n * `livePropSafelist` spread the raw option and hit both of those.\n */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"asSafelistArray\",\"stability\":\"experimental\",\"signature\":\"(value: unknown) => readonly (string | RegExp)[]\"} */\nexport function asSafelistArray(value: unknown): readonly (string | RegExp)[] {\n if (value === undefined || value === null) return [];\n if (typeof value === 'string') {\n console.warn(\n `[pithy:ssg] keepCustomProperties must be an ARRAY; got the string ` +\n `\"${value}\". Reading it as [\"${value}\"] — wrap it to silence this.`\n );\n return [value];\n }\n if (Array.isArray(value)) return value as readonly (string | RegExp)[];\n // A `Set` is the shape an author reaches for after de-duplicating names, and\n // rejecting it dropped every entry it held.\n if (typeof (value as Iterable<unknown>)[Symbol.iterator] === 'function') {\n return [...(value as Iterable<string | RegExp>)];\n }\n console.warn(\n `[pithy:ssg] keepCustomProperties must be an ARRAY; ignoring a ` +\n `${typeof value} value. Nothing extra is kept.`\n );\n return [];\n}\n\nfunction safelistMatcher(\n entries: readonly (string | RegExp)[]\n): (name: string) => boolean {\n const literals = new Set<string>();\n const prefixes: string[] = [];\n const patterns: RegExp[] = [];\n for (const entry of entries) {\n if (entry instanceof RegExp) {\n // `g`/`y` are dropped: `.test()` advances `lastIndex` on a sticky or\n // global regex, so the same entry would match every other name.\n patterns.push(new RegExp(entry.source, entry.flags.replace(/[gy]/g, '')));\n continue;\n }\n // Validated, not trusted. An entry that cannot match any name used to be\n // accepted in silence, so `keepCustomProperties: ['--color-*-rgb']` — a\n // MIDDLE glob, which this matcher does not support — protected nothing and\n // the author lost the declarations they had asked to keep. A non-string\n // entry was worse: `entry.endsWith` threw and the caller's catch skipped\n // the whole pass, so nothing was purged at all and nothing said why.\n if (typeof entry !== 'string') {\n console.warn(\n `[pithy:ssg] keepCustomProperties: ignoring a non-string entry ` +\n `(${typeof entry}). Entries are names, \\`--prefix-*\\` patterns or ` +\n `RegExps.`\n );\n continue;\n }\n if (!entry.startsWith('--')) {\n console.warn(\n `[pithy:ssg] keepCustomProperties: ignoring \"${entry}\" — a custom ` +\n `property name starts with \"--\".`\n );\n continue;\n }\n const star = entry.indexOf('*');\n if (star !== -1 && star !== entry.length - 1) {\n console.warn(\n `[pithy:ssg] keepCustomProperties: ignoring \"${entry}\" — \"*\" is only ` +\n `supported as a trailing wildcard, as in \"--color-*\".`\n );\n continue;\n }\n if (star !== -1) prefixes.push(entry.slice(0, -1));\n else literals.add(entry);\n }\n return name =>\n literals.has(name) ||\n prefixes.some(p => name.startsWith(p)) ||\n patterns.some(re => re.test(name));\n}\n\n/**\n * Drop the custom-property declarations in `css` that nothing live references.\n *\n * Run it on the output of `purgeCssForPages` in `css-purge.ts`, not on the\n * collected sheet: the rule purge is what makes a channel variable dead in the\n * first place, by removing the unused utility rule that referenced it.\n *\n * @param css - Stylesheet text, already rule-purged.\n * @param options - Safelist and the rendered HTML to read roots from.\n * @returns The stylesheet with dead declarations spliced out.\n */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"purgeDeadCustomProps\",\"stability\":\"experimental\",\"signature\":\"(css: string, options?: DeadPropOptions) => string\"} */\nexport function purgeDeadCustomProps(\n css: string,\n options: DeadPropOptions = {}\n): string {\n if (!css) return css;\n\n try {\n const scan: Scan = { roots: new Set(), edges: new Map() };\n const items = splitBody(css, 0, css.length, scan);\n for (const html of options.htmlSources ?? []) {\n addVarRefs(html, scan.roots);\n }\n\n const live = resolveLive(\n scan,\n safelistMatcher([\n ...DEFAULT_LIVE_PROP_SAFELIST,\n ...asSafelistArray(options.safelist),\n ])\n );\n\n const ranges: Range[] = [];\n collectDrops(css, items, live, ranges, 0, css.length, false);\n return splice(css, ranges);\n } catch (err) {\n console.warn(\n '[pithy:ssg] Dead custom-property purge failed; shipping every ' +\n 'declaration. The stylesheet renders correctly but larger.',\n err\n );\n return css;\n }\n}\n\n/**\n * Everything in a rendered page that can reference a custom property outside\n * the stylesheet: the body fragment, the shell's `html`/`body` attribute values\n * (`style=\"color:var(--x)\"`), and inline `script` bodies, which ship in the\n * page and can write a style string.\n *\n * Extracted and exported because the assembly in `runBuildSSG` is otherwise\n * unreachable from a test — gutting it to `[]` reddened nothing, so a refactor\n * could drop a source silently and every affected page would lose its colour.\n */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"collectHtmlSources\",\"stability\":\"experimental\",\"signature\":\"(pages: readonly LivePropPageSource[], sprite?: LivePropSpriteSource) => string[]\"} */\nexport function collectHtmlSources(\n pages: readonly LivePropPageSource[],\n sprite?: LivePropSpriteSource\n): string[] {\n const out = pages.flatMap(p => [\n p.html ?? '',\n ...Object.values(p.head?.htmlAttrs ?? {}),\n ...Object.values(p.head?.bodyAttrs ?? {}),\n ...(p.head?.script ?? []).map(t => t.content ?? ''),\n ]);\n // Sprite symbols are inlined AFTER this purge runs, and the sprite parser's\n // `SAFE_ATTR_VALUE_RE` admits `var(--x)` in a presentational attribute — so\n // a `<stop stop-color=\"var(--brand)\">` inside `<defs>` (which `optimize.ts`\n // does not rewrite to `currentColor`) ships a reference nothing else scans.\n for (const sym of sprite?.symbols?.values() ?? []) {\n out.push(sym.inner ?? '');\n out.push(...Object.values(sym.presentation ?? {}));\n }\n return out;\n}\n\n/** The shape {@link collectHtmlSources} needs from a sprite bundle. */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"LivePropSpriteSource\",\"stability\":\"experimental\",\"signature\":\"interface { symbols?: ReadonlyMap<string, { inner?: string; presentation?: Record<string, string> }> }\"} */\nexport interface LivePropSpriteSource {\n symbols?: ReadonlyMap<\n string,\n { inner?: string; presentation?: Record<string, string> }\n >;\n}\n\n/** The shape {@link collectHtmlSources} needs from a rendered page. */\n/** @codexApi {\"parent\":\"pithy.ssr.build.css-live-props\",\"name\":\"LivePropPageSource\",\"stability\":\"experimental\",\"signature\":\"interface { html?: string; head?: { htmlAttrs?: Record<string, string>; bodyAttrs?: Record<string, string>; script?: readonly { content?: string }[] } }\"} */\nexport interface LivePropPageSource {\n html?: string;\n head?: {\n htmlAttrs?: Record<string, string>;\n bodyAttrs?: Record<string, string>;\n script?: readonly { content?: string }[];\n };\n}\n"]}
@@ -0,0 +1,153 @@
1
+ /** @codex { "id": "pithy.ssr.build.css-purge", "title": "Static Export CSS Purge (text)", "category": "feature", "risk": "high" } */
2
+ /**
3
+ * Drops CSS rules the rendered pages never use, from stylesheet TEXT.
4
+ *
5
+ * **Every kept rule is emitted as its ORIGINAL SOURCE SLICE**, never
6
+ * regenerated from a CSSOM. happy-dom's CSSOM empties any declaration it
7
+ * cannot model — `color-mix()`, `oklch()`, `oklch(… / α)` all serialize back
8
+ * as `.x { }` — and drops `@property` rules from the rule list entirely, so a
9
+ * purge that round-trips through it ships a stylesheet that renders unstyled.
10
+ * The same trap rules out "enumerate via CSSOM, slice text by rule index": the
11
+ * indices do not align, because CSSOM holds fewer rules than the text does.
12
+ * happy-dom is used here ONLY as a selector matcher, the part of it that is
13
+ * sound.
14
+ *
15
+ * Rule identification is therefore a brace/string/comment-aware scan of the
16
+ * text. Anything it cannot confidently classify is KEPT — fail-open end to end.
17
+ */
18
+ import { type SelectorMatchRoot } from '../shared/css-purge.js';
19
+ export type { SelectorMatchRoot };
20
+ /**
21
+ * One top-level item of a stylesheet (or of one at-rule body). `verbatim` is
22
+ * anything with no selector to test — a statement at-rule, a stray brace, an
23
+ * unterminated block. `block` records the ORIGINAL prelude slice and the
24
+ * body's bounds, so a recursed at-rule re-emits from source text alone.
25
+ */
26
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"CssNode","stability":"experimental","signature":"{ kind: 'comment' | 'verbatim'; raw: string } | { kind: 'block'; raw: string; prelude: string; bodyStart: number; bodyEnd: number }"} */
27
+ export type CssNode = {
28
+ kind: 'comment';
29
+ raw: string;
30
+ } | {
31
+ kind: 'verbatim';
32
+ raw: string;
33
+ } | {
34
+ kind: 'block';
35
+ raw: string;
36
+ prelude: string;
37
+ bodyStart: number;
38
+ bodyEnd: number;
39
+ };
40
+ /**
41
+ * Index of the closing quote of the string starting at `i`, or `to` when it is
42
+ * never closed. A `\` escapes the next character, so `'it\'s'` does not end early.
43
+ */
44
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"skipString","stability":"experimental","signature":"(css: string, i: number, to: number) => number"} */
45
+ export declare function skipString(css: string, i: number, to: number): number;
46
+ /** Index just past the end of the comment starting at `i`, or `to` if unclosed. */
47
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"skipComment","stability":"experimental","signature":"(css: string, i: number, to: number) => number"} */
48
+ export declare function skipComment(css: string, i: number, to: number): number;
49
+ /**
50
+ * Split `css[from, to)` into its top-level nodes. Braces inside strings and
51
+ * comments must not move the depth, or a single `content: "}"` desynchronises
52
+ * every rule after it. Unterminated input ends the scan rather than looping.
53
+ *
54
+ * At-rule level only: inside a style-rule BODY its `;`-at-depth-0 branch emits
55
+ * `verbatim` nodes, so `css-live-props.ts` splits declarations itself and calls
56
+ * back here for the nested blocks it meets.
57
+ *
58
+ * `limit` stops after that many nodes. A caller that wants only the next one
59
+ * must pass it ({@link splitFirstRule}): scanning to `to` every time makes a
60
+ * per-block caller quadratic, measured at 4x per doubling of sheet size.
61
+ */
62
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"splitRules","stability":"experimental","signature":"(css: string, from: number, to: number, limit?: number) => CssNode[]"} */
63
+ export declare function splitRules(css: string, from: number, to: number, limit?: number): CssNode[];
64
+ /** The next node of `css[from, to)`, without parsing what follows it. */
65
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"splitFirstRule","stability":"experimental","signature":"(css: string, from: number, to: number) => CssNode | null"} */
66
+ export declare function splitFirstRule(css: string, from: number, to: number): CssNode | null;
67
+ /**
68
+ * Drop the rules in `css` that `root` proves unused, emitting every survivor as
69
+ * its original source slice.
70
+ *
71
+ * @param css - Stylesheet text.
72
+ * @param root - What the selectors are matched against.
73
+ * @returns The purged stylesheet.
74
+ */
75
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"purgeCssText","stability":"experimental","signature":"(css: string, root: SelectorMatchRoot) => string"} */
76
+ export declare function purgeCssText(css: string, root: SelectorMatchRoot): string;
77
+ /**
78
+ * The element surface {@link indexedMatchRoot} indexes. Structural rather than
79
+ * `Element`: happy-dom's `Element` is a different type from `lib.dom`'s.
80
+ */
81
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"IndexableElement","stability":"experimental","signature":"interface { classList: Iterable<string>; id: string }"} */
82
+ export interface IndexableElement {
83
+ classList: Iterable<string>;
84
+ id: string;
85
+ }
86
+ /**
87
+ * A match root that answers "definitely not present" from a precomputed index
88
+ * before falling back to a real `querySelector`.
89
+ *
90
+ * An optimisation, and a load-bearing one: a `querySelector` MISS walks the
91
+ * whole tree, and misses over a union of every rendered page cost ~8 ms each
92
+ * across ~15k elements (measured on `apps/basic-app`) — minutes over a real
93
+ * stylesheet. Tag-only selectors, attribute selectors and hex escapes it simply
94
+ * delegates.
95
+ *
96
+ * **The precondition is not "it only answers no".** Its "no" is consumed by
97
+ * {@link isSelectorUsed} as PROOF the rule is unused, so it may answer at all
98
+ * only where it would agree with the engine — including where the engine would
99
+ * REFUSE the selector, which is how a rule the purge cannot reason about stays
100
+ * in the sheet. So the index answers only for a plain compound/combinator chain
101
+ * whose every `.`/`#` token is genuinely required for a match; `requiredTokens`
102
+ * returns `null` for everything else, and a functional pseudo — whether
103
+ * `stripPseudos` left it whole or a selector-list split cut it in half — is
104
+ * exactly what "everything else" is for.
105
+ *
106
+ * @param root - The document or element to index and delegate to.
107
+ * @param elements - Every element under `root`.
108
+ */
109
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"indexedMatchRoot","stability":"experimental","signature":"(root: SelectorMatchRoot, elements: Iterable<IndexableElement>) => SelectorMatchRoot"} */
110
+ export declare function indexedMatchRoot(root: SelectorMatchRoot, elements: Iterable<IndexableElement>): SelectorMatchRoot;
111
+ /**
112
+ * One rendered page, as the purge sees it.
113
+ *
114
+ * `html` is the BODY FRAGMENT the shell will inject — `<html>`/`<body>` do not
115
+ * exist yet at purge time and cannot be reconstructed by handing over a whole
116
+ * document either, since assigning one to `innerHTML` strips those very tags.
117
+ * So the attributes the shell is going to put on them come separately: an app
118
+ * that themes with `head({ bodyAttrs: { class: 'dark' } })` has a `.dark .x`
119
+ * rule that is genuinely used, and without these it is proven unused.
120
+ *
121
+ * `appId` is the same problem one level further in, and it is not an attribute
122
+ * but a whole element: `htmlShell` wraps the fragment in `<div id="{appId}">`
123
+ * AFTER this runs, so every `#app …` rule is otherwise proven unused — with no
124
+ * fail-open to catch it, because the id is simply not in the DOM.
125
+ */
126
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"PurgePage","stability":"experimental","signature":"interface { html: string; appId?: string; htmlAttrs?: Record<string, string>; bodyAttrs?: Record<string, string> }"} */
127
+ export interface PurgePage {
128
+ html: string;
129
+ /**
130
+ * The app-root id `htmlShell` wraps `html` in. Omitted, it falls back to
131
+ * {@link DEFAULT_APP_ID} exactly as the shell does — an app that never sets
132
+ * `appId` still ships `<div id="app">`, so defaulting to "no id" here would
133
+ * leave `#app` rules dropped in the ONE case that is most common.
134
+ */
135
+ appId?: string;
136
+ htmlAttrs?: Readonly<Record<string, string>>;
137
+ bodyAttrs?: Readonly<Record<string, string>>;
138
+ }
139
+ /**
140
+ * Purge `css` against the union of the rendered pages.
141
+ *
142
+ * happy-dom is an OPTIONAL peer dependency, so every failure path returns `css`
143
+ * unchanged: a larger stylesheet is correct, a missing one is not.
144
+ *
145
+ * Pass every document that will be served, the 404 included — a rule only that
146
+ * page uses is otherwise proven unused and dropped.
147
+ *
148
+ * @param css - The stylesheet the build is about to inline.
149
+ * @param pages - Every page in the output; see {@link PurgePage}.
150
+ */
151
+ /** @codexApi {"parent":"pithy.ssr.build.css-purge","name":"purgeCssForPages","stability":"experimental","signature":"(css: string, pages: readonly PurgePage[]) => Promise<string>"} */
152
+ export declare function purgeCssForPages(css: string, pages: readonly PurgePage[]): Promise<string>;
153
+ //# sourceMappingURL=css-purge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-purge.d.ts","sourceRoot":"","sources":["../../src/build/css-purge.ts"],"names":[],"mappings":"AAAA,qIAAqI;AAErI;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAOhC,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC;;;;;GAKG;AACH,qPAAqP;AACrP,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjC;IACE,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN;;;GAGG;AACH,mKAAmK;AACnK,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAWrE;AAED,mFAAmF;AACnF,oKAAoK;AACpK,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;;;;;;;;;;;GAYG;AACH,yLAAyL;AACzL,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,EAAE,EA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