@powerhousedao/shared 6.2.3-dev.69 → 6.2.3-dev.70

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 (31) hide show
  1. package/dist/clis/{build-config-DKXLMMtQ.mjs → build-config-DwRi23zQ.mjs} +3 -2
  2. package/dist/clis/{build-config-DKXLMMtQ.mjs.map → build-config-DwRi23zQ.mjs.map} +1 -1
  3. package/dist/clis/build-config.d.mts +3 -0
  4. package/dist/clis/build-config.d.mts.map +1 -1
  5. package/dist/clis/build-config.mjs +1 -1
  6. package/dist/clis/build-pieces.mjs +1 -1
  7. package/dist/clis/index.d.mts.map +1 -1
  8. package/dist/clis/package-style.d.mts +32 -0
  9. package/dist/clis/package-style.d.mts.map +1 -0
  10. package/dist/clis/package-style.mjs +102 -0
  11. package/dist/clis/package-style.mjs.map +1 -0
  12. package/dist/clis/types-BxOUzRvH.d.mts.map +1 -1
  13. package/dist/connect/config-loader.d.ts +1 -1
  14. package/dist/connect/index.d.ts +6 -1
  15. package/dist/connect/index.d.ts.map +1 -1
  16. package/dist/connect/index.js +6 -1
  17. package/dist/connect/index.js.map +1 -1
  18. package/dist/document-drive/index.d.ts +3 -3
  19. package/dist/document-model/errors.d.ts +1 -1
  20. package/dist/document-model/index.d.ts +2 -2
  21. package/dist/{index-CxFojvYH.d.ts → index-DeEVCeve.d.ts} +2 -2
  22. package/dist/{index-CxFojvYH.d.ts.map → index-DeEVCeve.d.ts.map} +1 -1
  23. package/dist/index.d.ts +4 -4
  24. package/dist/processors/index.d.ts +1 -1
  25. package/dist/registry/index.d.ts +2 -2
  26. package/dist/registry/manifest-slim.d.ts +2 -2
  27. package/dist/{types-CYpUKqla.d.ts → types-PM0i4vns.d.ts} +25 -5
  28. package/dist/{types-CYpUKqla.d.ts.map → types-PM0i4vns.d.ts.map} +1 -1
  29. package/dist/{types-CRCdTEHb.d.ts → types-f_wMStgZ.d.ts} +2 -2
  30. package/dist/{types-CRCdTEHb.d.ts.map → types-f_wMStgZ.d.ts.map} +1 -1
  31. package/package.json +5 -1
@@ -181,13 +181,14 @@ const baseBrowserConfig = {
181
181
  inputOptions: { experimental: { resolveNewUrlToAsset: true } }
182
182
  };
183
183
  const pluginList = (plugins) => plugins === void 0 ? [] : Array.isArray(plugins) ? plugins : [plugins];
184
+ const stylesheets = [/\.css$/];
184
185
  function buildBrowserBuildConfig(options = {}) {
185
186
  const sharedDeps = options.sharedDeps ?? true;
186
187
  return {
187
188
  ...baseBrowserConfig,
188
189
  plugins: [...baseBrowserConfig.plugins, ...pluginList(options.plugins)],
189
190
  deps: {
190
- alwaysBundle,
191
+ alwaysBundle: options.bundleDependencies ?? true ? alwaysBundle : stylesheets,
191
192
  neverBundle: [...browserNeverBundle, ...sharedDeps ? sharedNeverBundle : []]
192
193
  }
193
194
  };
@@ -258,4 +259,4 @@ function buildPieceBuildConfig(options) {
258
259
  //#endregion
259
260
  export { buildNodeBuildConfig as a, nodeBuildConfig as c, buildBrowserBuildConfig as i, browserBuildConfig as n, buildPieceBuildConfig as o, browserEntry as r, findBundledSharedDeps as s, PIECE_ENTRY_GLOB as t };
260
261
 
261
- //# sourceMappingURL=build-config-DKXLMMtQ.mjs.map
262
+ //# sourceMappingURL=build-config-DwRi23zQ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-config-DKXLMMtQ.mjs","names":[],"sources":["../../connect/shared-deps.ts","../../clis/build-config.mts"],"sourcesContent":["import { satisfies, validRange } from \"semver\";\n\nexport type SharedDep = { specifier: string; package: string };\n\n/**\n * The dependency set Connect and loaded packages share via the import map.\n * `@powerhousedao/connect` is deliberately absent: it is the Connect app, not\n * vendored (a host with routes compiles its files), so its exports are for a\n * host's own routes and layout. Packages share `@powerhousedao/connect-core`.\n */\nexport const SHARED_DEPS: readonly SharedDep[] = [\n { specifier: \"document-model\", package: \"document-model\" },\n {\n specifier: \"@powerhousedao/document-engineering\",\n package: \"@powerhousedao/document-engineering\",\n },\n { specifier: \"@powerhousedao/shared\", package: \"@powerhousedao/shared\" },\n {\n specifier: \"@powerhousedao/shared/registry/urls\",\n package: \"@powerhousedao/shared\",\n },\n {\n specifier: \"@powerhousedao/design-system/connect\",\n package: \"@powerhousedao/design-system\",\n },\n {\n specifier: \"@powerhousedao/reactor-browser\",\n package: \"@powerhousedao/reactor-browser\",\n },\n // Connect already vendors zod (it is in DEFAULT_VENDOR_INCLUDE, so the\n // import map publishes an entry for it) and every generated project already\n // declares it as a peerDependency -- yet it was missing from this set, so\n // each package inlined a private copy anyway. It is the single biggest\n // dependency left in a minimal package.\n { specifier: \"zod\", package: \"zod\" },\n // One core and one router: slots, routes and router context reach every package.\n {\n specifier: \"@powerhousedao/connect-core\",\n package: \"@powerhousedao/connect-core\",\n },\n { specifier: \"@tanstack/react-router\", package: \"@tanstack/react-router\" },\n];\n\nexport const SHARED_DEP_SPECIFIERS: readonly string[] = SHARED_DEPS.map(\n (d) => d.specifier,\n);\n\n/**\n * The `@powerhousedao/shared` subpaths the production vendor bundles. The\n * bare root is deliberately absent: its type barrel references node-only\n * modules (`clis/`), which the current vite/rolldown cannot bundle for the\n * browser — vendoring the root fails the build (a pre-existing latent\n * issue). A package that imports the bare root is simply not shared; it\n * bundles its own copy.\n */\nexport const SHARED_SUBPATHS: readonly string[] = [\n \"connect\",\n \"document-model\",\n \"processors\",\n \"document-drive\",\n \"registry\",\n \"registry/urls\",\n \"registry/manifest-slim\",\n];\n\n/**\n * The specifiers a package build may safely externalize onto the host's\n * import map — i.e. the ones the vendor actually publishes an entry for.\n *\n * `@powerhousedao/shared` is narrowed to SHARED_SUBPATHS rather than taken as\n * a prefix: the bare root is never vendored (see SHARED_SUBPATHS), and\n * neither are its other subpaths (`analytics`, `constants`, `clis`, ...).\n * Externalizing those would leave a bare specifier in the package's output\n * that nothing in the import map resolves, so the package would fail to load\n * at runtime instead of simply bundling its own copy.\n */\nexport const EXTERNALIZABLE_SHARED_SPECIFIERS: readonly string[] = [\n ...new Set([\n ...SHARED_DEP_SPECIFIERS.filter((s) => s !== \"@powerhousedao/shared\"),\n ...SHARED_SUBPATHS.map((s) => `@powerhousedao/shared/${s}`),\n ]),\n];\n\n/** Split a specifier into its package name and subpath (\"\" for a root). */\nexport function parseDepSpec(spec: string): { pkg: string; sub: string } {\n if (spec.startsWith(\"@\")) {\n const parts = spec.split(\"/\");\n return { pkg: parts.slice(0, 2).join(\"/\"), sub: parts.slice(2).join(\"/\") };\n }\n const i = spec.indexOf(\"/\");\n return i === -1\n ? { pkg: spec, sub: \"\" }\n : { pkg: spec.slice(0, i), sub: spec.slice(i + 1) };\n}\n\nfunction isSharedSpecifier(spec: string, specs: readonly string[]): boolean {\n return specs.some((s) => spec === s || spec.startsWith(s + \"/\"));\n}\n\n/**\n * Return the import/export specifiers in `source` that are a shared\n * specifier (or a subpath of one), sorted. Heuristic: only statement\n * positions are scanned (`from \"x\"`, `import \"x\"`, `import(\"x\")`;\n * `export … from \"x\"` is covered by the `from` pattern), so import-like\n * text inside comments or strings can be reported too. That errs toward\n * over-reporting, which is the safe direction for the advisory build\n * warning.\n */\nexport function findSharedImports(\n source: string,\n specs: readonly string[] = SHARED_DEP_SPECIFIERS,\n): string[] {\n const found = new Set<string>();\n const patterns = [\n /\\bfrom\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s*\\(\\s*[\"']([^\"'\\\\]+)[\"']\\s*\\)/g,\n ];\n for (const re of patterns) {\n for (const m of source.matchAll(re)) {\n const spec = m[1];\n if (isSharedSpecifier(spec, specs)) found.add(spec);\n }\n }\n return [...found].sort();\n}\n\n/**\n * Rewrite a package source for blob import in a worker context (import maps\n * don't apply there): shared specifiers become their mapped URLs, and\n * relative (`./`, `../`) specifiers become absolute against `sourceUrl`\n * (a blob URL has no directory to resolve against). `#` subpath imports are\n * deliberately left alone: they resolve via the package's own\n * `package.json` \"imports\" field, which the rewrite cannot reproduce.\n * Returns the input unchanged when nothing matched.\n */\nexport function rewritePackageSource(\n source: string,\n sourceUrl: string,\n imports: Record<string, string>,\n): string {\n if (!Object.keys(imports).length) return source;\n const base = new URL(sourceUrl);\n const map = (spec: string): string | null => {\n const mapped = imports[spec];\n if (mapped) return mapped;\n if (spec.startsWith(\"./\") || spec.startsWith(\"../\")) {\n return new URL(spec, base).href;\n }\n return null;\n };\n let out = source;\n // The quote character is captured and reused: a source that quotes its\n // specifiers with ' would otherwise never match the replacement and be\n // left un-rewritten — silently, since the specifier still maps.\n for (const re of [\n /\\bfrom\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s*\\(\\s*([\"'])([^\"'\\\\]+)\\1\\s*\\)/g,\n ]) {\n out = out.replace(re, (match, quote: string, spec: string) => {\n // The match contains the quoted specifier exactly once and the\n // captured group has no quotes/backslashes ([^\"'\\\\]), so a literal\n // replace is safe.\n const mapped = map(spec);\n return mapped\n ? match.replace(`${quote}${spec}${quote}`, `${quote}${mapped}${quote}`)\n : match;\n });\n }\n return out;\n}\n\nexport type SharedDepMismatch = {\n package: string;\n required: string;\n provided: string;\n};\n\nexport type PackageDeps = {\n dependencies?: Record<string, unknown>;\n peerDependencies?: Record<string, unknown>;\n};\n\n/**\n * Compare a package's declared ranges against the host's version table.\n * `hostVersions` defines the checked set (only deps present in it are\n * checked). `*`, non-semver protocols (workspace:, file:, git:, npm:, URLs)\n * and unparseable ranges never mismatch.\n */\nexport function checkSharedDeps(\n pkgJson: PackageDeps,\n hostVersions: Record<string, string>,\n): SharedDepMismatch[] {\n const out: SharedDepMismatch[] = [];\n const entries = [\n ...Object.entries(pkgJson.dependencies ?? {}),\n ...Object.entries(pkgJson.peerDependencies ?? {}),\n ];\n for (const [dep, range] of entries) {\n const provided = hostVersions[dep];\n if (provided === undefined || typeof range !== \"string\") continue;\n if (range === \"*\" || /^[a-z]+:/i.test(range)) continue;\n if (!validRange(range)) continue;\n if (!satisfies(provided, range, { includePrerelease: true })) {\n out.push({ package: dep, required: range, provided });\n }\n }\n return out;\n}\n\nexport function formatSharedDepWarnings(\n mismatches: SharedDepMismatch[],\n): string[] {\n return mismatches.map(\n (m) =>\n `${m.package}: requires ${m.required}, Connect provides ${m.provided}`,\n );\n}\n\n/**\n * Stable filename for a local package's worker model bundle under\n * `__reactor_worker__/packages/`. Shared by the tab (URL computation via the\n * manifest) and the production prebuild (emitted entry names), so the two can\n * never drift. Scoped names flatten (`@scope/name` -> `scope__name`).\n */\nexport function workerPackageFileName(packageName: string): string {\n return `${packageName.replace(/^@/, \"\").replace(/[^\\w.-]+/g, \"__\")}.js`;\n}\n","import { esmExternalRequirePlugin } from \"rolldown/plugins\";\nimport type { InlineConfig } from \"tsdown\";\nimport {\n EXTERNALIZABLE_SHARED_SPECIFIERS,\n findSharedImports,\n} from \"../connect/shared-deps.js\";\n\nconst entry = [\n \"index.ts\",\n \"document-models/index.ts\",\n \"document-models/*/index.ts\",\n \"document-models/*/module.ts\",\n \"editors/index.ts\",\n \"editors/*/index.ts\",\n \"editors/*/module.ts\",\n \"processors/index.ts\",\n];\n\n// ./pieces is node-only for the same reason ./reactor is browser-only: a piece\n// is loaded and run by a host process, never by the browser. Only the list of\n// pieces builds here; each piece is its own build (buildPieceBuildConfig), so\n// two pieces never share a chunk and each ships as one self-contained module.\nconst nodeEntry = [\n ...entry,\n // Node-only: Connect reaches processors through processors/index.ts, and\n // subgraphs only over GraphQL.\n \"processors/*/index.ts\",\n \"subgraphs/index.ts\",\n \"subgraphs/*/index.ts\",\n \"pieces/index.ts\",\n];\n\n// Where a package's pieces live, one directory per piece, as the node entry\n// glob spells it; `ph build` expands it against the project to find them.\nexport const PIECE_ENTRY_GLOB = \"pieces/*/index.ts\";\n\n// ./reactor is browser-only: the SharedWorker needs it, the node build does not.\nexport const browserEntry = [...entry, \"reactor/index.ts\"];\n\nconst alwaysBundle = [\"**\"];\n\n// React must be external so `import ... from \"react\"` stays a bare import and\n// resolves to the host's React at runtime; bundled, a chunk would carry a second\n// React. In the browser build the externals below belong to esmExternalRequirePlugin\n// alone: rolldown converts a CommonJS `require(\"react\")` into an import only for\n// externals the plugin owns, and listed in neverBundle too the top-level external\n// wins, leaving a browser bundle with a require it cannot serve. use-sync-external-store\n// under zustand, and so under @xyflow/react, is the case that found this.\nconst reactExternals = [\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n];\n\nconst nodeNeverBundle = [\n // we know that we don't want connect inside connect\n \"@powerhousedao/connect\",\n \"@powerhousedao/connect-core\",\n // published code would never need the cli\n \"@powerhousedao/ph-cli\",\n // the reactor-api host must provide a single class identity for\n // BaseSubgraph/BaseProcessor — inlining a copy here breaks the\n // prototype-chain check the package loader uses to detect subgraphs.\n \"@powerhousedao/reactor-api\",\n // react is resolved from esm.sh\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n // build tools\n \"tailwindcss\",\n \"vitest\",\n \"tsdown\",\n \"@tailwindcss/cli\",\n \"@vitejs/plugin-react\",\n // testing tools\n \"@testing-library/jest-dom\",\n \"@testing-library/react\",\n \"@testing-library/user-event\",\n // types\n \"@types/node\",\n \"@types/react\",\n \"@types/react-dom\",\n // exclude pglite wasm/data chunks\n \"@electric-sql/pglite\",\n \"@electric-sql/pglite-tools\",\n];\n\n// The node build keeps React in neverBundle: node has createRequire, so a\n// CommonJS require of an external resolves there without the plugin.\nconst browserNeverBundle = nodeNeverBundle.filter(\n (spec) => typeof spec !== \"string\" || !reactExternals.includes(spec),\n);\n\nconst copy = [{ from: \"powerhouse.manifest.json\", to: \"dist\" }];\n\nconst config = false;\nconst clean = true;\n// types are emitted via a separate tsc command\nconst dts = false;\nconst sourcemap = true;\n\n// Shared deps are externalized from every package build: the host (Connect)\n// resolves them to one bundled copy via the import map, so a package must\n// not inline its own copy (two instances of the same dep break identity\n// checks and double the download). One regexp per specifier covers the root\n// and every subpath (rolldown `external` accepts strings and regexps, not\n// function matchers, in this toolchain).\n//\n// Only the specifiers the vendor publishes are externalized — see\n// EXTERNALIZABLE_SHARED_SPECIFIERS. Externalizing one the import map has no\n// entry for would leave an unresolvable bare specifier in the output.\nconst sharedNeverBundle = EXTERNALIZABLE_SHARED_SPECIFIERS.map(\n (s) => new RegExp(`^${s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}(/.*)?$`),\n);\n\ntype Plugin = NonNullable<InlineConfig[\"plugins\"]>;\n\nconst SWITCHBOARD_PROCESSORS_STUB = \"\\0powerhouse:switchboard-processors\";\n\n// Connect runs processors with processorApp \"connect\", so the generated\n// factory's import of ./switchboard gets an empty list in the browser build.\nfunction switchboardProcessorsStub(): Plugin {\n return {\n name: \"powerhouse:switchboard-processors-stub\",\n resolveId(source, importer) {\n if (!importer || !/^\\.\\/switchboard(\\.[cm]?[jt]s)?$/.test(source)) {\n return null;\n }\n const path = importer.replaceAll(\"\\\\\", \"/\");\n const isFactory =\n /(^|\\/)processors\\/factory\\.[cm]?[jt]s$/.test(path) &&\n !path.includes(\"/node_modules/\");\n return isFactory ? SWITCHBOARD_PROCESSORS_STUB : null;\n },\n load(id) {\n return id === SWITCHBOARD_PROCESSORS_STUB\n ? \"export const processorFactoryBuilders = [];\"\n : null;\n },\n };\n}\n\nconst baseBrowserConfig = {\n entry: browserEntry,\n platform: \"browser\" as const,\n copy,\n config,\n clean,\n dts,\n sourcemap,\n plugins: [\n esmExternalRequirePlugin({\n external: reactExternals,\n skipDuplicateCheck: true,\n }),\n switchboardProcessorsStub(),\n ],\n inputOptions: {\n experimental: { resolveNewUrlToAsset: true },\n },\n};\n\nconst pluginList = (plugins: InlineConfig[\"plugins\"]) =>\n plugins === undefined ? [] : Array.isArray(plugins) ? plugins : [plugins];\n\nexport type BrowserBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n /** Extra bundler plugins, such as the external dependency guard. */\n plugins?: InlineConfig[\"plugins\"];\n};\n\nexport function buildBrowserBuildConfig(\n options: BrowserBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n ...baseBrowserConfig,\n plugins: [...baseBrowserConfig.plugins, ...pluginList(options.plugins)],\n deps: {\n alwaysBundle,\n neverBundle: [\n ...browserNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const browserBuildConfig = buildBrowserBuildConfig();\n\n/**\n * Shared specs a source imports but the built output no longer references as\n * bare imports — the bundler inlined them, which is exactly what the\n * external set is meant to prevent.\n */\nexport function findBundledSharedDeps(\n importedSpecs: string[],\n outputs: readonly { path: string; content: string }[],\n): string[] {\n return importedSpecs.filter(\n (spec) =>\n !outputs.some((f) => findSharedImports(f.content, [spec]).includes(spec)),\n );\n}\n\nexport type NodeBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n /** Extra bundler plugins, such as the external dependency detector. */\n plugins?: InlineConfig[\"plugins\"];\n};\n\n/**\n * The node build externalizes the same shared set as the browser build, for\n * the same reason the `@powerhousedao/reactor-api` entry in `nodeNeverBundle`\n * already gives: the host provides these, and a package carrying its own copy\n * is a second class identity as well as dead weight. What differs is only how\n * the import is resolved at runtime -- Connect's import map in the browser,\n * ordinary node resolution here, which works because these are declared for\n * the consumer to provide (`document-model`, `@powerhousedao/reactor-browser`\n * and `zod` are peerDependencies of every generated project).\n */\nexport function buildNodeBuildConfig(\n options: NodeBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n entry: nodeEntry,\n deps: {\n alwaysBundle,\n neverBundle: [\n ...nodeNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n platform: \"node\",\n ...(options.plugins ? { plugins: options.plugins } : {}),\n config,\n clean,\n dts,\n sourcemap,\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const nodeBuildConfig: InlineConfig = buildNodeBuildConfig();\n\nexport type PieceBuildConfigOptions = {\n /** The piece's source entry, relative to the project: `pieces/<dir>/index.ts`. */\n entry: string;\n /** Where the piece lands: `<outDir>/node/pieces/<dir>`. */\n outDir: string;\n /** Extra bundler plugins, such as the external dependency detector. */\n plugins?: InlineConfig[\"plugins\"];\n};\n\n/**\n * One piece, bundled whole. A piece runs in a forked worker with no\n * node_modules beside it, so nothing the piece imports can be left to the\n * host: the framework, its dependencies and the shared set that every other\n * module kind externalizes are all inlined here, and only node built-ins stay\n * external. Code splitting is off for the same reason, so a dynamic import is\n * inlined too and the piece directory holds exactly one module.\n */\nexport function buildPieceBuildConfig(\n options: PieceBuildConfigOptions,\n): InlineConfig {\n return {\n entry: { index: options.entry },\n outDir: options.outDir,\n platform: \"node\",\n ...(options.plugins ? { plugins: options.plugins } : {}),\n deps: {\n alwaysBundle,\n neverBundle: [],\n // Inlining dependencies is the point here, so tsdown's hint about it\n // would only be noise on every piece.\n onlyBundle: false,\n },\n outputOptions: { codeSplitting: false },\n // The worker runs without source maps, so a map would only be shipped twice\n minify: true,\n config,\n clean,\n dts,\n sourcemap: false,\n };\n}\n"],"mappings":";;AA2CA,MAAa,wBAA2C;CAhCtD;EAAE,WAAW;EAAkB,SAAS;CAAiB;CACzD;EACE,WAAW;EACX,SAAS;CACX;CACA;EAAE,WAAW;EAAyB,SAAS;CAAwB;CACvE;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CAMA;EAAE,WAAW;EAAO,SAAS;CAAM;CAEnC;EACE,WAAW;EACX,SAAS;CACX;CACA;EAAE,WAAW;EAA0B,SAAS;CAAyB;AAGnB,CAAA,CAAY,KACjE,MAAM,EAAE,SACX;;;;;;;;;AAUA,MAAa,kBAAqC;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AAaA,MAAa,mCAAsD,CACjE,mBAAG,IAAI,IAAI,CACT,GAAG,sBAAs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,MAAM;GACJ;GACA,aAAa,CACX,GAAG,iBACH,GAAI,aAAa,oBAAoB,CAAC,CACxC;EACF;EACA,UAAU;EACV,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;EACtD;EACA;EACA;EACA;CACF;AACF;AAGA,MAAa,kBAAgC,qBAAqB;;;;;;;;;AAmBlE,SAAgB,sBACd,SACc;CACd,OAAO;EACL,OAAO,EAAE,OAAO,QAAQ,MAAM;EAC9B,QAAQ,QAAQ;EAChB,UAAU;EACV,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;EACtD,MAAM;GACJ;GACA,aAAa,CAAC;GAGd,YAAY;EACd;EACA,eAAe,EAAE,eAAe,MAAM;EAEtC,QAAQ;EACR;EACA;EACA;EACA,WAAW;CACb;AACF"}
1
+ {"version":3,"file":"build-config-DwRi23zQ.mjs","names":[],"sources":["../../connect/shared-deps.ts","../../clis/build-config.mts"],"sourcesContent":["import { satisfies, validRange } from \"semver\";\n\nexport type SharedDep = { specifier: string; package: string };\n\n/**\n * The dependency set Connect and loaded packages share via the import map.\n * `@powerhousedao/connect` is deliberately absent: it is the Connect app, not\n * vendored (a host with routes compiles its files), so its exports are for a\n * host's own routes and layout. Packages share `@powerhousedao/connect-core`.\n */\nexport const SHARED_DEPS: readonly SharedDep[] = [\n { specifier: \"document-model\", package: \"document-model\" },\n {\n specifier: \"@powerhousedao/document-engineering\",\n package: \"@powerhousedao/document-engineering\",\n },\n { specifier: \"@powerhousedao/shared\", package: \"@powerhousedao/shared\" },\n {\n specifier: \"@powerhousedao/shared/registry/urls\",\n package: \"@powerhousedao/shared\",\n },\n {\n specifier: \"@powerhousedao/design-system/connect\",\n package: \"@powerhousedao/design-system\",\n },\n {\n specifier: \"@powerhousedao/reactor-browser\",\n package: \"@powerhousedao/reactor-browser\",\n },\n // Connect already vendors zod (it is in DEFAULT_VENDOR_INCLUDE, so the\n // import map publishes an entry for it) and every generated project already\n // declares it as a peerDependency -- yet it was missing from this set, so\n // each package inlined a private copy anyway. It is the single biggest\n // dependency left in a minimal package.\n { specifier: \"zod\", package: \"zod\" },\n // One core and one router: slots, routes and router context reach every package.\n {\n specifier: \"@powerhousedao/connect-core\",\n package: \"@powerhousedao/connect-core\",\n },\n { specifier: \"@tanstack/react-router\", package: \"@tanstack/react-router\" },\n];\n\nexport const SHARED_DEP_SPECIFIERS: readonly string[] = SHARED_DEPS.map(\n (d) => d.specifier,\n);\n\n/**\n * The `@powerhousedao/shared` subpaths the production vendor bundles. The\n * bare root is deliberately absent: its type barrel references node-only\n * modules (`clis/`), which the current vite/rolldown cannot bundle for the\n * browser — vendoring the root fails the build (a pre-existing latent\n * issue). A package that imports the bare root is simply not shared; it\n * bundles its own copy.\n */\nexport const SHARED_SUBPATHS: readonly string[] = [\n \"connect\",\n \"document-model\",\n \"processors\",\n \"document-drive\",\n \"registry\",\n \"registry/urls\",\n \"registry/manifest-slim\",\n];\n\n/**\n * The specifiers a package build may safely externalize onto the host's\n * import map — i.e. the ones the vendor actually publishes an entry for.\n *\n * `@powerhousedao/shared` is narrowed to SHARED_SUBPATHS rather than taken as\n * a prefix: the bare root is never vendored (see SHARED_SUBPATHS), and\n * neither are its other subpaths (`analytics`, `constants`, `clis`, ...).\n * Externalizing those would leave a bare specifier in the package's output\n * that nothing in the import map resolves, so the package would fail to load\n * at runtime instead of simply bundling its own copy.\n */\nexport const EXTERNALIZABLE_SHARED_SPECIFIERS: readonly string[] = [\n ...new Set([\n ...SHARED_DEP_SPECIFIERS.filter((s) => s !== \"@powerhousedao/shared\"),\n ...SHARED_SUBPATHS.map((s) => `@powerhousedao/shared/${s}`),\n ]),\n];\n\n/** Split a specifier into its package name and subpath (\"\" for a root). */\nexport function parseDepSpec(spec: string): { pkg: string; sub: string } {\n if (spec.startsWith(\"@\")) {\n const parts = spec.split(\"/\");\n return { pkg: parts.slice(0, 2).join(\"/\"), sub: parts.slice(2).join(\"/\") };\n }\n const i = spec.indexOf(\"/\");\n return i === -1\n ? { pkg: spec, sub: \"\" }\n : { pkg: spec.slice(0, i), sub: spec.slice(i + 1) };\n}\n\nfunction isSharedSpecifier(spec: string, specs: readonly string[]): boolean {\n return specs.some((s) => spec === s || spec.startsWith(s + \"/\"));\n}\n\n/**\n * Return the import/export specifiers in `source` that are a shared\n * specifier (or a subpath of one), sorted. Heuristic: only statement\n * positions are scanned (`from \"x\"`, `import \"x\"`, `import(\"x\")`;\n * `export … from \"x\"` is covered by the `from` pattern), so import-like\n * text inside comments or strings can be reported too. That errs toward\n * over-reporting, which is the safe direction for the advisory build\n * warning.\n */\nexport function findSharedImports(\n source: string,\n specs: readonly string[] = SHARED_DEP_SPECIFIERS,\n): string[] {\n const found = new Set<string>();\n const patterns = [\n /\\bfrom\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s*\\(\\s*[\"']([^\"'\\\\]+)[\"']\\s*\\)/g,\n ];\n for (const re of patterns) {\n for (const m of source.matchAll(re)) {\n const spec = m[1];\n if (isSharedSpecifier(spec, specs)) found.add(spec);\n }\n }\n return [...found].sort();\n}\n\n/**\n * Rewrite a package source for blob import in a worker context (import maps\n * don't apply there): shared specifiers become their mapped URLs, and\n * relative (`./`, `../`) specifiers become absolute against `sourceUrl`\n * (a blob URL has no directory to resolve against). `#` subpath imports are\n * deliberately left alone: they resolve via the package's own\n * `package.json` \"imports\" field, which the rewrite cannot reproduce.\n * Returns the input unchanged when nothing matched.\n */\nexport function rewritePackageSource(\n source: string,\n sourceUrl: string,\n imports: Record<string, string>,\n): string {\n if (!Object.keys(imports).length) return source;\n const base = new URL(sourceUrl);\n const map = (spec: string): string | null => {\n const mapped = imports[spec];\n if (mapped) return mapped;\n if (spec.startsWith(\"./\") || spec.startsWith(\"../\")) {\n return new URL(spec, base).href;\n }\n return null;\n };\n let out = source;\n // The quote character is captured and reused: a source that quotes its\n // specifiers with ' would otherwise never match the replacement and be\n // left un-rewritten — silently, since the specifier still maps.\n for (const re of [\n /\\bfrom\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s*\\(\\s*([\"'])([^\"'\\\\]+)\\1\\s*\\)/g,\n ]) {\n out = out.replace(re, (match, quote: string, spec: string) => {\n // The match contains the quoted specifier exactly once and the\n // captured group has no quotes/backslashes ([^\"'\\\\]), so a literal\n // replace is safe.\n const mapped = map(spec);\n return mapped\n ? match.replace(`${quote}${spec}${quote}`, `${quote}${mapped}${quote}`)\n : match;\n });\n }\n return out;\n}\n\nexport type SharedDepMismatch = {\n package: string;\n required: string;\n provided: string;\n};\n\nexport type PackageDeps = {\n dependencies?: Record<string, unknown>;\n peerDependencies?: Record<string, unknown>;\n};\n\n/**\n * Compare a package's declared ranges against the host's version table.\n * `hostVersions` defines the checked set (only deps present in it are\n * checked). `*`, non-semver protocols (workspace:, file:, git:, npm:, URLs)\n * and unparseable ranges never mismatch.\n */\nexport function checkSharedDeps(\n pkgJson: PackageDeps,\n hostVersions: Record<string, string>,\n): SharedDepMismatch[] {\n const out: SharedDepMismatch[] = [];\n const entries = [\n ...Object.entries(pkgJson.dependencies ?? {}),\n ...Object.entries(pkgJson.peerDependencies ?? {}),\n ];\n for (const [dep, range] of entries) {\n const provided = hostVersions[dep];\n if (provided === undefined || typeof range !== \"string\") continue;\n if (range === \"*\" || /^[a-z]+:/i.test(range)) continue;\n if (!validRange(range)) continue;\n if (!satisfies(provided, range, { includePrerelease: true })) {\n out.push({ package: dep, required: range, provided });\n }\n }\n return out;\n}\n\nexport function formatSharedDepWarnings(\n mismatches: SharedDepMismatch[],\n): string[] {\n return mismatches.map(\n (m) =>\n `${m.package}: requires ${m.required}, Connect provides ${m.provided}`,\n );\n}\n\n/**\n * Stable filename for a local package's worker model bundle under\n * `__reactor_worker__/packages/`. Shared by the tab (URL computation via the\n * manifest) and the production prebuild (emitted entry names), so the two can\n * never drift. Scoped names flatten (`@scope/name` -> `scope__name`).\n */\nexport function workerPackageFileName(packageName: string): string {\n return `${packageName.replace(/^@/, \"\").replace(/[^\\w.-]+/g, \"__\")}.js`;\n}\n","import { esmExternalRequirePlugin } from \"rolldown/plugins\";\nimport type { InlineConfig } from \"tsdown\";\nimport {\n EXTERNALIZABLE_SHARED_SPECIFIERS,\n findSharedImports,\n} from \"../connect/shared-deps.js\";\n\nconst entry = [\n \"index.ts\",\n \"document-models/index.ts\",\n \"document-models/*/index.ts\",\n \"document-models/*/module.ts\",\n \"editors/index.ts\",\n \"editors/*/index.ts\",\n \"editors/*/module.ts\",\n \"processors/index.ts\",\n];\n\n// ./pieces is node-only for the same reason ./reactor is browser-only: a piece\n// is loaded and run by a host process, never by the browser. Only the list of\n// pieces builds here; each piece is its own build (buildPieceBuildConfig), so\n// two pieces never share a chunk and each ships as one self-contained module.\nconst nodeEntry = [\n ...entry,\n // Node-only: Connect reaches processors through processors/index.ts, and\n // subgraphs only over GraphQL.\n \"processors/*/index.ts\",\n \"subgraphs/index.ts\",\n \"subgraphs/*/index.ts\",\n \"pieces/index.ts\",\n];\n\n// Where a package's pieces live, one directory per piece, as the node entry\n// glob spells it; `ph build` expands it against the project to find them.\nexport const PIECE_ENTRY_GLOB = \"pieces/*/index.ts\";\n\n// ./reactor is browser-only: the SharedWorker needs it, the node build does not.\nexport const browserEntry = [...entry, \"reactor/index.ts\"];\n\nconst alwaysBundle = [\"**\"];\n\n// React must be external so `import ... from \"react\"` stays a bare import and\n// resolves to the host's React at runtime; bundled, a chunk would carry a second\n// React. In the browser build the externals below belong to esmExternalRequirePlugin\n// alone: rolldown converts a CommonJS `require(\"react\")` into an import only for\n// externals the plugin owns, and listed in neverBundle too the top-level external\n// wins, leaving a browser bundle with a require it cannot serve. use-sync-external-store\n// under zustand, and so under @xyflow/react, is the case that found this.\nconst reactExternals = [\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n];\n\nconst nodeNeverBundle = [\n // we know that we don't want connect inside connect\n \"@powerhousedao/connect\",\n \"@powerhousedao/connect-core\",\n // published code would never need the cli\n \"@powerhousedao/ph-cli\",\n // the reactor-api host must provide a single class identity for\n // BaseSubgraph/BaseProcessor — inlining a copy here breaks the\n // prototype-chain check the package loader uses to detect subgraphs.\n \"@powerhousedao/reactor-api\",\n // react is resolved from esm.sh\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n // build tools\n \"tailwindcss\",\n \"vitest\",\n \"tsdown\",\n \"@tailwindcss/cli\",\n \"@vitejs/plugin-react\",\n // testing tools\n \"@testing-library/jest-dom\",\n \"@testing-library/react\",\n \"@testing-library/user-event\",\n // types\n \"@types/node\",\n \"@types/react\",\n \"@types/react-dom\",\n // exclude pglite wasm/data chunks\n \"@electric-sql/pglite\",\n \"@electric-sql/pglite-tools\",\n];\n\n// The node build keeps React in neverBundle: node has createRequire, so a\n// CommonJS require of an external resolves there without the plugin.\nconst browserNeverBundle = nodeNeverBundle.filter(\n (spec) => typeof spec !== \"string\" || !reactExternals.includes(spec),\n);\n\nconst copy = [{ from: \"powerhouse.manifest.json\", to: \"dist\" }];\n\nconst config = false;\nconst clean = true;\n// types are emitted via a separate tsc command\nconst dts = false;\nconst sourcemap = true;\n\n// Shared deps are externalized from every package build: the host (Connect)\n// resolves them to one bundled copy via the import map, so a package must\n// not inline its own copy (two instances of the same dep break identity\n// checks and double the download). One regexp per specifier covers the root\n// and every subpath (rolldown `external` accepts strings and regexps, not\n// function matchers, in this toolchain).\n//\n// Only the specifiers the vendor publishes are externalized — see\n// EXTERNALIZABLE_SHARED_SPECIFIERS. Externalizing one the import map has no\n// entry for would leave an unresolvable bare specifier in the output.\nconst sharedNeverBundle = EXTERNALIZABLE_SHARED_SPECIFIERS.map(\n (s) => new RegExp(`^${s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}(/.*)?$`),\n);\n\ntype Plugin = NonNullable<InlineConfig[\"plugins\"]>;\n\nconst SWITCHBOARD_PROCESSORS_STUB = \"\\0powerhouse:switchboard-processors\";\n\n// Connect runs processors with processorApp \"connect\", so the generated\n// factory's import of ./switchboard gets an empty list in the browser build.\nfunction switchboardProcessorsStub(): Plugin {\n return {\n name: \"powerhouse:switchboard-processors-stub\",\n resolveId(source, importer) {\n if (!importer || !/^\\.\\/switchboard(\\.[cm]?[jt]s)?$/.test(source)) {\n return null;\n }\n const path = importer.replaceAll(\"\\\\\", \"/\");\n const isFactory =\n /(^|\\/)processors\\/factory\\.[cm]?[jt]s$/.test(path) &&\n !path.includes(\"/node_modules/\");\n return isFactory ? SWITCHBOARD_PROCESSORS_STUB : null;\n },\n load(id) {\n return id === SWITCHBOARD_PROCESSORS_STUB\n ? \"export const processorFactoryBuilders = [];\"\n : null;\n },\n };\n}\n\nconst baseBrowserConfig = {\n entry: browserEntry,\n platform: \"browser\" as const,\n copy,\n config,\n clean,\n dts,\n sourcemap,\n plugins: [\n esmExternalRequirePlugin({\n external: reactExternals,\n skipDuplicateCheck: true,\n }),\n switchboardProcessorsStub(),\n ],\n inputOptions: {\n experimental: { resolveNewUrlToAsset: true },\n },\n};\n\nconst pluginList = (plugins: InlineConfig[\"plugins\"]) =>\n plugins === undefined ? [] : Array.isArray(plugins) ? plugins : [plugins];\n\nexport type BrowserBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n /** Extra bundler plugins, such as the external dependency guard. */\n plugins?: InlineConfig[\"plugins\"];\n /** Inline every dependency (default: true), as a package Connect loads from\n * the CDN needs. False leaves declared dependencies to the app that bundles it. */\n bundleDependencies?: boolean;\n};\n\n// A dependency's stylesheet stays bundled, so `style.css` keeps the vendor CSS.\nconst stylesheets = [/\\.css$/];\n\nexport function buildBrowserBuildConfig(\n options: BrowserBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n ...baseBrowserConfig,\n plugins: [...baseBrowserConfig.plugins, ...pluginList(options.plugins)],\n deps: {\n alwaysBundle:\n (options.bundleDependencies ?? true) ? alwaysBundle : stylesheets,\n neverBundle: [\n ...browserNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const browserBuildConfig = buildBrowserBuildConfig();\n\n/**\n * Shared specs a source imports but the built output no longer references as\n * bare imports — the bundler inlined them, which is exactly what the\n * external set is meant to prevent.\n */\nexport function findBundledSharedDeps(\n importedSpecs: string[],\n outputs: readonly { path: string; content: string }[],\n): string[] {\n return importedSpecs.filter(\n (spec) =>\n !outputs.some((f) => findSharedImports(f.content, [spec]).includes(spec)),\n );\n}\n\nexport type NodeBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n /** Extra bundler plugins, such as the external dependency detector. */\n plugins?: InlineConfig[\"plugins\"];\n};\n\n/**\n * The node build externalizes the same shared set as the browser build, for\n * the same reason the `@powerhousedao/reactor-api` entry in `nodeNeverBundle`\n * already gives: the host provides these, and a package carrying its own copy\n * is a second class identity as well as dead weight. What differs is only how\n * the import is resolved at runtime -- Connect's import map in the browser,\n * ordinary node resolution here, which works because these are declared for\n * the consumer to provide (`document-model`, `@powerhousedao/reactor-browser`\n * and `zod` are peerDependencies of every generated project).\n */\nexport function buildNodeBuildConfig(\n options: NodeBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n entry: nodeEntry,\n deps: {\n alwaysBundle,\n neverBundle: [\n ...nodeNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n platform: \"node\",\n ...(options.plugins ? { plugins: options.plugins } : {}),\n config,\n clean,\n dts,\n sourcemap,\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const nodeBuildConfig: InlineConfig = buildNodeBuildConfig();\n\nexport type PieceBuildConfigOptions = {\n /** The piece's source entry, relative to the project: `pieces/<dir>/index.ts`. */\n entry: string;\n /** Where the piece lands: `<outDir>/node/pieces/<dir>`. */\n outDir: string;\n /** Extra bundler plugins, such as the external dependency detector. */\n plugins?: InlineConfig[\"plugins\"];\n};\n\n/**\n * One piece, bundled whole. A piece runs in a forked worker with no\n * node_modules beside it, so nothing the piece imports can be left to the\n * host: the framework, its dependencies and the shared set that every other\n * module kind externalizes are all inlined here, and only node built-ins stay\n * external. Code splitting is off for the same reason, so a dynamic import is\n * inlined too and the piece directory holds exactly one module.\n */\nexport function buildPieceBuildConfig(\n options: PieceBuildConfigOptions,\n): InlineConfig {\n return {\n entry: { index: options.entry },\n outDir: options.outDir,\n platform: \"node\",\n ...(options.plugins ? { plugins: options.plugins } : {}),\n deps: {\n alwaysBundle,\n neverBundle: [],\n // Inlining dependencies is the point here, so tsdown's hint about it\n // would only be noise on every piece.\n onlyBundle: false,\n },\n outputOptions: { codeSplitting: false },\n // The worker runs without source maps, so a map would only be shipped twice\n minify: true,\n config,\n clean,\n dts,\n sourcemap: false,\n };\n}\n"],"mappings":";;AA2CA,MAAa,wBAA2C;CAhCtD;EAAE,WAAW;EAAkB,SAAS;CAAiB;CACzD;EACE,WAAW;EACX,SAAS;CACX;CACA;EAAE,WAAW;EAAyB,SAAS;CAAwB;CACvE;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CAMA;EAAE,WAAW;EAAO,SAAS;CAAM;CAEnC;EACE,WAAW;EACX,SAAS;CACX;CACA;EAAE,WAAW;EAA0B,SAAS;CAAyB;AAGnB,CAAA,CAAY,KACjE,MAAM,EAAE,SACX;;;;;;;;;AAUA,MAAa,kBAAqC;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AAaA,MAAa,mCAAsD,CACjE,mBAAG,IAAI,IAAI,CACT,GAAG,sBAAsB,QAAQ,MAAM,MAAM,uBAAuB,GACpE,GAAG,gBAAgB,KAAK,MAAM,yBAAyB,GAAG,CAC5D,CAAC,CACH;AAc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AG,iBACH,GAAI,aAAa,oBAAoB,CAAC,CACxC;EACF;EACA,UAAU;EACV,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;EACtD;EACA;EACA;EACA;CACF;AACF;AAGA,MAAa,kBAAgC,qBAAqB;;;;;;;;;AAmBlE,SAAgB,sBACd,SACc;CACd,OAAO;EACL,OAAO,EAAE,OAAO,QAAQ,MAAM;EAC9B,QAAQ,QAAQ;EAChB,UAAU;EACV,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;EACtD,MAAM;GACJ;GACA,aAAa,CAAC;GAGd,YAAY;EACd;EACA,eAAe,EAAE,eAAe,MAAM;EAEtC,QAAQ;EACR;EACA;EACA;EACA,WAAW;CACb;AACF"}
@@ -7,6 +7,9 @@ export type BrowserBuildConfigOptions = {
7
7
  sharedDeps?: boolean;
8
8
  /** Extra bundler plugins, such as the external dependency guard. */
9
9
  plugins?: InlineConfig["plugins"];
10
+ /** Inline every dependency (default: true), as a package Connect loads from
11
+ * the CDN needs. False leaves declared dependencies to the app that bundles it. */
12
+ bundleDependencies?: boolean;
10
13
  };
11
14
  export declare function buildBrowserBuildConfig(options?: BrowserBuildConfigOptions): InlineConfig;
12
15
  export declare const browserBuildConfig: InlineConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"build-config.d.mts","names":[],"sources":["../../clis/build-config.mts"],"mappings":";;qBAkCa;qBAGA;YAkID;;EAEV;;EAEA,UAAU;;wBAGI,wBACd,UAAS,4BACR;qBAgBU,oBAAkB;;;;;;wBAOf,sBACd,yBACA;EAAoB;EAAc;;YAQxB;;EAEV;;EAEA,UAAU;;;;;;;;;;;;wBAaI,qBACd,UAAS,yBACR;qBAqBU,iBAAiB;YAElB;;EAEV;;EAEA;;EAEA,UAAU;;;;;;;;;;wBAWI,sBACd,SAAS,0BACR"}
1
+ {"version":3,"file":"build-config.d.mts","names":[],"sources":["../../clis/build-config.mts"],"mappings":";;qBAkCa;qBAGA;YAkID;;EAEV;;EAEA,UAAU;;;EAGV;;wBAMc,wBACd,UAAS,4BACR;qBAiBU,oBAAkB;;;;;;wBAOf,sBACd,yBACA;EAAoB;EAAc;;YAQxB;;EAEV;;EAEA,UAAU;;;;;;;;;;;;wBAaI,qBACd,UAAS,yBACR;qBAqBU,iBAAiB;YAElB;;EAEV;;EAEA;;EAEA,UAAU;;;;;;;;;;wBAWI,sBACd,SAAS,0BACR"}
@@ -1,2 +1,2 @@
1
- import { a as buildNodeBuildConfig, c as nodeBuildConfig, i as buildBrowserBuildConfig, n as browserBuildConfig, o as buildPieceBuildConfig, r as browserEntry, s as findBundledSharedDeps, t as PIECE_ENTRY_GLOB } from "./build-config-DKXLMMtQ.mjs";
1
+ import { a as buildNodeBuildConfig, c as nodeBuildConfig, i as buildBrowserBuildConfig, n as browserBuildConfig, o as buildPieceBuildConfig, r as browserEntry, s as findBundledSharedDeps, t as PIECE_ENTRY_GLOB } from "./build-config-DwRi23zQ.mjs";
2
2
  export { PIECE_ENTRY_GLOB, browserBuildConfig, browserEntry, buildBrowserBuildConfig, buildNodeBuildConfig, buildPieceBuildConfig, findBundledSharedDeps, nodeBuildConfig };
@@ -1,4 +1,4 @@
1
- import { o as buildPieceBuildConfig, t as PIECE_ENTRY_GLOB } from "./build-config-DKXLMMtQ.mjs";
1
+ import { o as buildPieceBuildConfig, t as PIECE_ENTRY_GLOB } from "./build-config-DwRi23zQ.mjs";
2
2
  import { isBuiltin } from "node:module";
3
3
  import { tmpdir } from "node:os";
4
4
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../clis/args/access-token.ts","../../clis/args/common.ts","../../clis/args/connect.ts","../../clis/args/generate.ts","../../clis/command-names.ts","../../clis/args/help.ts","../../clis/args/init.ts","../../clis/args/inspect.ts","../../clis/args/install.ts","../../clis/args/list.ts","../../clis/args/login.ts","../../clis/args/migrate.ts","../../clis/args/publish.ts","../../clis/args/registry.ts","../../document-model/schemas.ts","../../document-model/types.ts","../../clis/constants.ts","../../clis/types.ts","../../clis/args/service.ts","../../clis/args/switchboard.ts","../../clis/args/uninstall.ts","../../clis/args/unpublish.ts","../../clis/args/vetra.ts","../../clis/ph-dir.ts","../../clis/file-system/dependencies.ts","../../clis/file-system/directory-exists.ts","../../clis/file-system/file-exists.ts","../../clis/file-system/get-config.ts","../../clis/file-system/package-json.ts","../../clis/file-system/projects.ts","../../clis/file-system/run-cmd.ts","../../clis/file-system/spawn-async.ts","../../clis/file-system/version-info.ts","../../clis/file-system/write-file-ensuring-dir.ts","../../clis/services/telemetry.ts","../../clis/services/use-local.ts","../../clis/source-config-schema.ts","../../clis/utils.ts"],"mappings":";;;;;;;;qBAIa;;;;;;;;;;;;;qBCmBA,QAAQ;qBAER;EACX,OAAK,+CAAA;;;;qBAOM;;;;;;;;;;;;;;qBA2BA;EACX,gBAAc,+CAAA;;;EAOd,KAAG,+CAAA;;;EAKH,MAAI,+CAAA;;;EAKJ,MAAI,+CAAA;;;EAKJ,KAAG,+CAAA;;;;qBAMQ,0BAAwB,+CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInC,6CAAA,iDAAA,mDAAA;qBACW,UAAQ,+CAAA;;yCAKnB,eAAA,6CAAA;qBAEW,cAAY,+CAAA;;yCAKvB,eAAA,6CAAA;qBAEW,sBAAoB,+CAAA;;yCAK/B,sDAAA,WAAA,6CAAA;qBAEW,cAAY,+CAAA;;yCAWvB,eAAA,6CAAA;qBAEW,eAAa,+CAAA;;yCAWxB,eAAA,6CAAA;qBAEW,OAAK,+CAAA;;yCAUhB,sDAAA,WAAA,6CAAA;qBAEW;;;;;;;;;;;;;;;;;;;;;;;qBAmBA,kBAAgB,+CAAA;;yCAK3B,eAAA,6CAAA;qBAEW,UAAQ,+CAAA;;yCAOnB,eAAA,6CAAA;qBAEW,iBAAe,+CAAA;;yCAK1B,eAAA,6CAAA;qBAEW,iBAAe,+C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAME;;;;;;;;;;;;wBCjPQ,sBACd,YACA;EAAY;EAAiB;;qBAOlB,yBAAyB;EACpC,YAAY,wBAAwB;SAO7B,QAAQ,iBAAiB,SAAS;;wBAK3B,kBAAkB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../clis/args/access-token.ts","../../clis/args/common.ts","../../clis/args/connect.ts","../../clis/args/generate.ts","../../clis/command-names.ts","../../clis/args/help.ts","../../clis/args/init.ts","../../clis/args/inspect.ts","../../clis/args/install.ts","../../clis/args/list.ts","../../clis/args/login.ts","../../clis/args/migrate.ts","../../clis/args/publish.ts","../../clis/args/registry.ts","../../document-model/schemas.ts","../../document-model/types.ts","../../clis/constants.ts","../../clis/types.ts","../../clis/args/service.ts","../../clis/args/switchboard.ts","../../clis/args/uninstall.ts","../../clis/args/unpublish.ts","../../clis/args/vetra.ts","../../clis/ph-dir.ts","../../clis/file-system/dependencies.ts","../../clis/file-system/directory-exists.ts","../../clis/file-system/file-exists.ts","../../clis/file-system/get-config.ts","../../clis/file-system/package-json.ts","../../clis/file-system/projects.ts","../../clis/file-system/run-cmd.ts","../../clis/file-system/spawn-async.ts","../../clis/file-system/version-info.ts","../../clis/file-system/write-file-ensuring-dir.ts","../../clis/services/telemetry.ts","../../clis/services/use-local.ts","../../clis/source-config-schema.ts","../../clis/utils.ts"],"mappings":";;;;;;;;qBAIa;;;;;;;;;;;;;qBCmBA,QAAQ;qBAER;EACX,OAAK,+CAAA;;;;qBAOM;;;;;;;;;;;;;;qBA2BA;EACX,gBAAc,+CAAA;;;EAOd,KAAG,+CAAA;;;EAKH,MAAI,+CAAA;;;EAKJ,MAAI,+CAAA;;;EAKJ,KAAG,+CAAA;;;;qBAMQ,0BAAwB,+CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInC,6CAAA,iDAAA,mDAAA;qBACW,UAAQ,+CAAA;;yCAKnB,eAAA,6CAAA;qBAEW,cAAY,+CAAA;;yCAKvB,eAAA,6CAAA;qBAEW,sBAAoB,+CAAA;;yCAK/B,sDAAA,WAAA,6CAAA;qBAEW,cAAY,+CAAA;;yCAWvB,eAAA,6CAAA;qBAEW,eAAa,+CAAA;;yCAWxB,eAAA,6CAAA;qBAEW,OAAK,+CAAA;;yCAUhB,sDAAA,WAAA,6CAAA;qBAEW;;;;;;;;;;;;;;;;;;;;;;;qBAmBA,kBAAgB,+CAAA;;yCAK3B,eAAA,6CAAA;qBAEW,UAAQ,+CAAA;;yCAOnB,eAAA,6CAAA;qBAEW,iBAAe,+CAAA;;yCAK1B,eAAA,6CAAA;qBAEW,iBAAe,+CAAA;;yCAK1B,eAAA,6CAAA;qBAEW,sBAAoB,+CAAA;;yCAK/B,eAAA,6CAAA;qBAEW,wBAAsB,+CAAA;;yCAMjC,eAAA,6CAAA;qBAEW,OAAK,+CAAA;;yCAKhB,sDAAA,WAAA,6CAAA;qBAEW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAYA;EACX,MAAI,+CAAA;;;EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAME;;;;;;;;;;;;wBCjPQ,sBACd,YACA;EAAY;EAAiB;;qBAOlB,yBAAyB;EACpC,YAAY,wBAAwB;SAO7B,QAAQ,iBAAiB,SAAS;;wBAK3B,kBAAkB"}
@@ -0,0 +1,32 @@
1
+ //#region clis/package-style.d.ts
2
+ /** The imports at the top of a project's style.css, which `ph migrate` keeps current. */
3
+ export declare const STYLE_IMPORT_LINES: string[];
4
+ /** The empty @theme block the style.css template used to end with. */
5
+ export declare const LEGACY_THEME_LINES: string[];
6
+ /** The default host's stylesheet, beside hosts/connect/routes. */
7
+ export declare const HOST_STYLESHEET = "hosts/connect/style.css";
8
+ export declare const TAILWIND_IMPORT: RegExp;
9
+ export declare function projectStyle(current: string, localPackages?: readonly string[]): {
10
+ tailwind: string | undefined;
11
+ rest: string;
12
+ };
13
+ export type PackageStyleOptions = {
14
+ /** The package's browser build, relative to the project. */
15
+ browserDir: string;
16
+ /** The project's local packages, whose old style.css imports are dropped. */
17
+ localPackages?: readonly string[];
18
+ /** The theme the classes build against, by reference: Connect's by default. */
19
+ references?: readonly string[];
20
+ };
21
+ /** What `ph build` compiles to a package's stylesheet: the classes in the
22
+ * package's browser build, and the project's own tokens and rules, with
23
+ * Tailwind's and Connect's theme by reference, so not emitted. */
24
+ export declare function packageStyleEntry(current: string | undefined, { browserDir, localPackages, references }: PackageStyleOptions): string;
25
+ /** The compiled entry in the external-packages layer, between Connect's
26
+ * components and utilities, whichever of Connect's stylesheets loads first. */
27
+ export declare function packageStylesheet(compiled: string): string;
28
+ /** The project's `provider: "local"` packages, from powerhouse.config.json. */
29
+ export declare function localPackageNames(projectDir: string): string[];
30
+ //#endregion
31
+ export {};
32
+ //# sourceMappingURL=package-style.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-style.d.mts","names":[],"sources":["../../clis/package-style.ts"],"mappings":";;qBAOa;;qBASA;;qBAWA;qBAYA,iBAAe;wBAqBZ,aACd,iBACA;;;;YAiCU;;EAEV;;EAEA;;EAEA;;;;;wBAMc,kBACd,+BAEE,YACA,eACA,cACC;;;wBAmBW,kBAAkB;;wBAMlB,kBAAkB"}
@@ -0,0 +1,102 @@
1
+ import { join } from "node:path";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ //#region connect/layers.ts
4
+ /** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in
5
+ * external-packages, above Connect's reset and below its utilities. */
6
+ const CONNECT_LAYER_ORDER = "@layer properties, theme, base, components, external-packages, utilities;";
7
+ //#endregion
8
+ //#region clis/package-style.ts
9
+ /** The imports at the top of a project's style.css, which `ph migrate` keeps current. */
10
+ const STYLE_IMPORT_LINES = [
11
+ "/* Package CSS goes in external-packages, between Connect's components and utilities. */",
12
+ CONNECT_LAYER_ORDER,
13
+ "@import \"tailwindcss\";",
14
+ "/* Connect's tokens, rules and classes, generated in this one build. */",
15
+ "@import \"@powerhousedao/connect/tailwind.css\";"
16
+ ];
17
+ /** The empty @theme block the style.css template used to end with. */
18
+ const LEGACY_THEME_LINES = [
19
+ "@theme {",
20
+ "/* You can customize the theme by overriding the theme variables here */",
21
+ "/* See https://tailwindcss.com/docs/theme#using-a-custom-theme for details */",
22
+ "/* If you would prefer to use plain css, add your styles below this @theme tag as you normally would */",
23
+ "/* A sensible CSS reset is applied by default. If you would prefer to use a different reset or none at all, uncomment the following line */",
24
+ "/* --*: initial; */",
25
+ "}"
26
+ ];
27
+ /** The default host's stylesheet, beside hosts/connect/routes. */
28
+ const HOST_STYLESHEET = "hosts/connect/style.css";
29
+ const MANAGED_LINES = [
30
+ /^@layer (properties, )?theme, base, components\b.*;$/,
31
+ /^@import ["']@powerhousedao\/design-system\/(theme|style)\.css["'];$/,
32
+ /^@import ["']@powerhousedao\/connect\/(style|tailwind)\.css["'];$/,
33
+ /^@custom-variant dark \(&:where\(\.dark, \.dark \*\)\);$/
34
+ ];
35
+ const PACKAGE_BUILD_IMPORT = /^@import ["']\.\/node_modules\/(.+)\/dist\/style\.css["'];$/;
36
+ const TAILWIND_IMPORT = /^@import ["']tailwindcss["'].*;$/;
37
+ const TEMPLATE_LINES = new Set(STYLE_IMPORT_LINES);
38
+ function withoutLegacyTheme(kept) {
39
+ const filled = kept.flatMap((line, i) => line.trim() ? [i] : []);
40
+ for (let start = 0; start + LEGACY_THEME_LINES.length <= filled.length; start++) {
41
+ const block = filled.slice(start, start + LEGACY_THEME_LINES.length);
42
+ if (block.every((i, n) => kept[i].trim() === LEGACY_THEME_LINES[n])) return [...kept.slice(0, block[0]), ...kept.slice(block.at(-1) + 1)];
43
+ }
44
+ return kept;
45
+ }
46
+ function projectStyle(current, localPackages = []) {
47
+ let tailwind;
48
+ const kept = current.split("\n").filter((line) => {
49
+ const trimmed = line.trim();
50
+ if (TAILWIND_IMPORT.test(trimmed)) {
51
+ tailwind ??= trimmed;
52
+ return false;
53
+ }
54
+ const packageBuild = PACKAGE_BUILD_IMPORT.exec(trimmed)?.[1];
55
+ return !TEMPLATE_LINES.has(trimmed) && !MANAGED_LINES.some((pattern) => pattern.test(trimmed)) && !(packageBuild && localPackages.includes(packageBuild));
56
+ });
57
+ return {
58
+ tailwind,
59
+ rest: withoutLegacyTheme(kept).join("\n").trim()
60
+ };
61
+ }
62
+ function tailwindOptions(tailwind) {
63
+ if (!tailwind) return "";
64
+ const options = tailwind.replace(/^@import ["']tailwindcss["']/, "").replace(/;$/, "").replace(/\b(source|theme)\([^)]*\)/g, "").trim().replace(/\s+/g, " ");
65
+ return options ? ` ${options}` : "";
66
+ }
67
+ /** What `ph build` compiles to a package's stylesheet: the classes in the
68
+ * package's browser build, and the project's own tokens and rules, with
69
+ * Tailwind's and Connect's theme by reference, so not emitted. */
70
+ function packageStyleEntry(current, { browserDir, localPackages, references = ["@powerhousedao/connect/theme.css"] }) {
71
+ const { tailwind, rest } = projectStyle(current ?? "", localPackages);
72
+ const options = tailwindOptions(tailwind);
73
+ return `${[
74
+ `@import "tailwindcss/theme.css" theme(reference)${options};`,
75
+ ...references.map((file) => `@reference ${JSON.stringify(file)};`),
76
+ `@import "tailwindcss/utilities.css" source(none)${options};`,
77
+ `@source ${JSON.stringify(browserDir)};`,
78
+ `@source not ${JSON.stringify(`${browserDir}/**/*.map`)};`,
79
+ rest
80
+ ].join("\n")}\n`;
81
+ }
82
+ const BANNER = /^\/\*! tailwindcss v[^*]*\*\/\s*/;
83
+ /** The compiled entry in the external-packages layer, between Connect's
84
+ * components and utilities, whichever of Connect's stylesheets loads first. */
85
+ function packageStylesheet(compiled) {
86
+ const css = compiled.replace(BANNER, "").trim();
87
+ return `${CONNECT_LAYER_ORDER}\n@layer external-packages{${css}}\n`;
88
+ }
89
+ /** The project's `provider: "local"` packages, from powerhouse.config.json. */
90
+ function localPackageNames(projectDir) {
91
+ const file = join(projectDir, "powerhouse.config.json");
92
+ if (!existsSync(file)) return [];
93
+ try {
94
+ return (JSON.parse(readFileSync(file, "utf8")).packages ?? []).flatMap((p) => p.provider === "local" && typeof p.packageName === "string" ? [p.packageName] : []);
95
+ } catch {
96
+ return [];
97
+ }
98
+ }
99
+ //#endregion
100
+ export { HOST_STYLESHEET, LEGACY_THEME_LINES, STYLE_IMPORT_LINES, TAILWIND_IMPORT, localPackageNames, packageStyleEntry, packageStylesheet, projectStyle };
101
+
102
+ //# sourceMappingURL=package-style.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-style.mjs","names":[],"sources":["../../connect/layers.ts","../../clis/package-style.ts"],"sourcesContent":["/** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in\n * external-packages, above Connect's reset and below its utilities. */\nexport const CONNECT_LAYER_ORDER =\n \"@layer properties, theme, base, components, external-packages, utilities;\";\n","// style.css's managed lines, and the package stylesheet `ph build` compiles from\n// it. Kept light: ph build imports this, and ph migrate (codegen) shares it.\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { CONNECT_LAYER_ORDER } from \"../connect/layers.js\";\n\n/** The imports at the top of a project's style.css, which `ph migrate` keeps current. */\nexport const STYLE_IMPORT_LINES = [\n \"/* Package CSS goes in external-packages, between Connect's components and utilities. */\",\n CONNECT_LAYER_ORDER,\n '@import \"tailwindcss\";',\n \"/* Connect's tokens, rules and classes, generated in this one build. */\",\n '@import \"@powerhousedao/connect/tailwind.css\";',\n];\n\n/** The empty @theme block the style.css template used to end with. */\nexport const LEGACY_THEME_LINES = [\n \"@theme {\",\n \"/* You can customize the theme by overriding the theme variables here */\",\n \"/* See https://tailwindcss.com/docs/theme#using-a-custom-theme for details */\",\n \"/* If you would prefer to use plain css, add your styles below this @theme tag as you normally would */\",\n \"/* A sensible CSS reset is applied by default. If you would prefer to use a different reset or none at all, uncomment the following line */\",\n \"/* --*: initial; */\",\n \"}\",\n];\n\n/** The default host's stylesheet, beside hosts/connect/routes. */\nexport const HOST_STYLESHEET = \"hosts/connect/style.css\";\n\n// Connect's stylesheet imports, current and past; the template's own lines too.\nconst MANAGED_LINES = [\n /^@layer (properties, )?theme, base, components\\b.*;$/,\n /^@import [\"']@powerhousedao\\/design-system\\/(theme|style)\\.css[\"'];$/,\n /^@import [\"']@powerhousedao\\/connect\\/(style|tailwind)\\.css[\"'];$/,\n /^@custom-variant dark \\(&:where\\(\\.dark, \\.dark \\*\\)\\);$/,\n];\n// A package's full build, which `ph install --local` used to add.\nconst PACKAGE_BUILD_IMPORT =\n /^@import [\"']\\.\\/node_modules\\/(.+)\\/dist\\/style\\.css[\"'];$/;\nexport const TAILWIND_IMPORT = /^@import [\"']tailwindcss[\"'].*;$/;\nconst TEMPLATE_LINES = new Set(STYLE_IMPORT_LINES);\n\n// `kept` without the old template's empty @theme block, matched line by line.\nfunction withoutLegacyTheme(kept: string[]) {\n const filled = kept.flatMap((line, i) => (line.trim() ? [i] : []));\n for (\n let start = 0;\n start + LEGACY_THEME_LINES.length <= filled.length;\n start++\n ) {\n const block = filled.slice(start, start + LEGACY_THEME_LINES.length);\n if (block.every((i, n) => kept[i].trim() === LEGACY_THEME_LINES[n])) {\n return [...kept.slice(0, block[0]), ...kept.slice(block.at(-1)! + 1)];\n }\n }\n return kept;\n}\n\n// The project's own lines, and its tailwindcss import if it has one. Imports of\n// its local packages' builds go; other node_modules CSS stays.\nexport function projectStyle(\n current: string,\n localPackages: readonly string[] = [],\n) {\n let tailwind: string | undefined;\n const kept = current.split(\"\\n\").filter((line) => {\n const trimmed = line.trim();\n if (TAILWIND_IMPORT.test(trimmed)) {\n // A project's `source(...)` or `prefix(...)` options stay.\n tailwind ??= trimmed;\n return false;\n }\n const packageBuild = PACKAGE_BUILD_IMPORT.exec(trimmed)?.[1];\n return (\n !TEMPLATE_LINES.has(trimmed) &&\n !MANAGED_LINES.some((pattern) => pattern.test(trimmed)) &&\n !(packageBuild && localPackages.includes(packageBuild))\n );\n });\n return { tailwind, rest: withoutLegacyTheme(kept).join(\"\\n\").trim() };\n}\n\n// Options of the project's `@import \"tailwindcss\"` that the package build keeps:\n// not source(), which it replaces, nor theme(), which clashes with theme(reference).\nfunction tailwindOptions(tailwind: string | undefined) {\n if (!tailwind) return \"\";\n const options = tailwind\n .replace(/^@import [\"']tailwindcss[\"']/, \"\")\n .replace(/;$/, \"\")\n .replace(/\\b(source|theme)\\([^)]*\\)/g, \"\")\n .trim()\n .replace(/\\s+/g, \" \");\n return options ? ` ${options}` : \"\";\n}\n\nexport type PackageStyleOptions = {\n /** The package's browser build, relative to the project. */\n browserDir: string;\n /** The project's local packages, whose old style.css imports are dropped. */\n localPackages?: readonly string[];\n /** The theme the classes build against, by reference: Connect's by default. */\n references?: readonly string[];\n};\n\n/** What `ph build` compiles to a package's stylesheet: the classes in the\n * package's browser build, and the project's own tokens and rules, with\n * Tailwind's and Connect's theme by reference, so not emitted. */\nexport function packageStyleEntry(\n current: string | undefined,\n {\n browserDir,\n localPackages,\n references = [\"@powerhousedao/connect/theme.css\"],\n }: PackageStyleOptions,\n): string {\n const { tailwind, rest } = projectStyle(current ?? \"\", localPackages);\n const options = tailwindOptions(tailwind);\n return `${[\n `@import \"tailwindcss/theme.css\" theme(reference)${options};`,\n ...references.map((file) => `@reference ${JSON.stringify(file)};`),\n `@import \"tailwindcss/utilities.css\" source(none)${options};`,\n `@source ${JSON.stringify(browserDir)};`,\n // Source maps carry the sources the bundle left out.\n `@source not ${JSON.stringify(`${browserDir}/**/*.map`)};`,\n rest,\n ].join(\"\\n\")}\\n`;\n}\n\nconst BANNER = /^\\/\\*! tailwindcss v[^*]*\\*\\/\\s*/;\n\n/** The compiled entry in the external-packages layer, between Connect's\n * components and utilities, whichever of Connect's stylesheets loads first. */\nexport function packageStylesheet(compiled: string): string {\n const css = compiled.replace(BANNER, \"\").trim();\n return `${CONNECT_LAYER_ORDER}\\n@layer external-packages{${css}}\\n`;\n}\n\n/** The project's `provider: \"local\"` packages, from powerhouse.config.json. */\nexport function localPackageNames(projectDir: string): string[] {\n const file = join(projectDir, \"powerhouse.config.json\");\n if (!existsSync(file)) return [];\n try {\n const config = JSON.parse(readFileSync(file, \"utf8\")) as {\n packages?: { packageName?: unknown; provider?: unknown }[];\n };\n return (config.packages ?? []).flatMap((p) =>\n p.provider === \"local\" && typeof p.packageName === \"string\"\n ? [p.packageName]\n : [],\n );\n } catch {\n return [];\n }\n}\n"],"mappings":";;;;;AAEA,MAAa,sBACX;;;;ACIF,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA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AgC,EAAE,CAAC,CAC3C,QAAQ,MAAM,EAAE,CAAC,CACjB,QAAQ,8BAA8B,EAAE,CAAC,CACzC,KAAK,CAAC,CACN,QAAQ,QAAQ,GAAG;CACtB,OAAO,UAAU,IAAI,YAAY;AACnC;;;;AAcA,SAAgB,kBACd,SACA,EACE,YACA,eACA,aAAa,CAAC,kCAAkC,KAE1C;CACR,MAAM,EAAE,UAAU,SAAS,aAAa,WAAW,IAAI,aAAa;CACpE,MAAM,UAAU,gBAAgB,QAAQ;CACxC,OAAO,GAAG;EACR,mDAAmD,QAAQ;EAC3D,GAAG,WAAW,KAAK,SAAS,cAAc,KAAK,UAAU,IAAI,EAAE,EAAE;EACjE,mDAAmD,QAAQ;EAC3D,WAAW,KAAK,UAAU,UAAU,EAAE;EAEtC,eAAe,KAAK,UAAU,GAAG,WAAW,UAAU,EAAE;EACxD;CACF,CAAC,CAAC,KAAK,IAAI,EAAE;AACf;AAEA,MAAM,SAAS;;;AAIf,SAAgB,kBAAkB,UAA0B;CAC1D,MAAM,MAAM,SAAS,QAAQ,QAAQ,EAAE,CAAC,CAAC,KAAK;CAC9C,OAAO,GAAG,oBAAoB,6BAA6B,IAAI;AACjE;;AAGA,SAAgB,kBAAkB,YAA8B;CAC9D,MAAM,OAAO,KAAK,YAAY,wBAAwB;CACtD,IAAI,CAAC,WAAW,IAAI,GAAG,OAAO,CAAC;CAC/B,IAAI;EAIF,QAHe,KAAK,MAAM,aAAa,MAAM,MAAM,CAGtC,CAAC,CAAC,YAAY,CAAC,EAAA,CAAG,SAAS,MACtC,EAAE,aAAa,WAAW,OAAO,EAAE,gBAAgB,WAC/C,CAAC,EAAE,WAAW,IACd,CAAC,CACP;CACF,QAAQ;EACN,OAAO,CAAC;CACV;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"types-BxOUzRvH.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;;;;;;;;;;;;cAaA;cAGA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAeA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAGF;aACE;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW,iBAAiB;cAuBjB,gBAAgB;;;KChWjB,iCAAiC;KACjC,wBAAwB;KACxB,mBAAmB;KACnB,WAAW;KAOX;KAGA;EACV;EACA;EACA,WAAW;EACX;;KAGU;EACV;EACA;;EAEA;;KAGU;EACV;EACA;EACA;;KAGU;;EAEV;;EAEA;EACA;EACA;;EAEA;;KAGU,wBACR,8BACA;KAEQ;EACV;EACA;EACA;;KAGU;EACV,SAAS;EACT,QAAQ;;KAGE;EACV;EACA,gBAAgB;EAChB,mBAAmB;EACnB,WAAW;;KAGD;EACV;EACA;EACA;EAGA;EAKA;;KAGU;;EAEV;;KAGU;EACV;;EAEA;;KAGU;;EAEV;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;KAGU;EACV,U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E,aAAa"}
1
+ {"version":3,"file":"types-BxOUzRvH.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;;;;;;;;;;;;cAaA;cAGA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAeA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAGF;aACE;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW,iBAAiB;cAuBjB,gBAAgB;;;KChWjB,iCAAiC;KACjC,wBAAwB;KACxB,mBAAmB;KACnB,WAAW;KAOX;KAGA;EACV;EACA;EACA,WAAW;EACX;;KAGU;EACV;EACA;;EAEA;;KAGU;EACV;EACA;EACA;;KAGU;;EAEV;;EAEA;EACA;EACA;;EAEA;;KAGU,wBACR,8BACA;KAEQ;EACV;EACA;EACA;;KAGU;EACV,SAAS;EACT,QAAQ;;KAGE;EACV;EACA,gBAAgB;EAChB,mBAAmB;EAC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F;EACA,UAAU;;;;cC4cC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuBzB,EAAA,KAAA;;;KC42BU,WAAW,EAAE,aAAa"}
@@ -1,4 +1,4 @@
1
- import { k as PHConnectRuntimeConfig, z as PowerhouseConfig } from "../types-CYpUKqla.js";
1
+ import { k as PHConnectRuntimeConfig, z as PowerhouseConfig } from "../types-PM0i4vns.js";
2
2
  //#region connect/config-loader.d.ts
3
3
  /** Recursive Partial. Arrays are leaves — `write({ packages: [...] })`
4
4
  * replaces the array, it doesn't merge. */
@@ -1,4 +1,4 @@
1
- import { B as PowerhousePackage, C as PHConnectPwaRuntimeCaching, S as PHConnectPwaManifest, b as PHConnectPwaFileHandler, k as PHConnectRuntimeConfig, v as PHConnectPwa, w as PHConnectPwaUrlPattern, x as PHConnectPwaIcon, y as PHConnectPwaCacheStrategy, z as PowerhouseConfig } from "../types-CYpUKqla.js";
1
+ import { B as PowerhousePackage, C as PHConnectPwaRuntimeCaching, S as PHConnectPwaManifest, b as PHConnectPwaFileHandler, k as PHConnectRuntimeConfig, v as PHConnectPwa, w as PHConnectPwaUrlPattern, x as PHConnectPwaIcon, y as PHConnectPwaCacheStrategy, z as PowerhouseConfig } from "../types-PM0i4vns.js";
2
2
  import { ConfigAdapter, ConfigLoader, ConfigShape, DeepPartial, deepMerge, resolveSourceConnect, workflowsSettingConflict } from "./config-loader.js";
3
3
  import { JsonConfigAdapter, JsonConfigAdapterOptions } from "./json-adapter.js";
4
4
  import { z } from "zod";
@@ -195,6 +195,11 @@ export declare const ROOT_STORAGE_NAMESPACE = "reactor";
195
195
  */
196
196
  export declare function getStorageNamespace(basePath: string): string;
197
197
  //#endregion
198
+ //#region connect/layers.d.ts
199
+ /** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in
200
+ * external-packages, above Connect's reset and below its utilities. */
201
+ export declare const CONNECT_LAYER_ORDER = "@layer properties, theme, base, components, external-packages, utilities;";
202
+ //#endregion
198
203
  //#region connect/pwa-config.d.ts
199
204
  /** A labelled PWA fragment, so merge diagnostics can name the contributor. */
200
205
  export type PwaContribution = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../connect/dynamic-base.ts","../../connect/env-config.ts","../../connect/pwa-config.ts","../../connect/pwa-manifest.ts","../../connect/runtime-config.ts","../../connect/schema-fragments.ts","../../connect/shared-deps.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAYa;;wBAOG,sBAAsB,aAAa;;;;;;cCC7C,gBAAc,EAAA;;;;;;GA0BlB,EAAA,KAAA;;;;;;qBAiGW,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAES,EAAA,KAAA;;;;qBAKzB,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgD,EAAA,KAAA;;;;YAKjE,kBAAkB,EAAE,aAAa;YACjC,oBAAoB,EAAE,aAAa;YACnC,aAAa,EAAE,aAAa;;;;iBASvB;;;;EAIf,aAAa;;;;EAIb,UAAU;;;;;;;;;;;wBAkEI,eAAe,UAAS,iBAAsB;;;;;;;;;wBAkB9C,eACd,UAAS,iBACR;;;;;;;;;;;;;;;wBAoBa,cAAc,QAAQ,QAAQ;;;;;;;;;;;;;;;;;wBA4C9B,kBAAkB;;;;;;qBA8BrB;;;;;;;;;;;;;;;;;;;;;;;wBAwBG,oBAAoB;;;;YCrVxB;;EAEV;EACA,QAAQ;;KA6BL;EACH;EACA;EACA;;;wBAyBc,YAAY,UAAU,UAAU,OAAO,MAAM;;;;;;;;;wBA4B7C,mBAAmB,kBAAkB,UAAU,MAAM;;;;;;wBASrD,qBACd,QAAQ,cACR,oBACC;;wBASa,aACd,4BACA;;;;;;;;;;;;;;;wBA2Gc,eACd,sBAAsB,mBACtB,gBAAgB,cAChB,UAAS,2BACR;;;wBA8Ca,iBACd,SAAS,kCACC;;;;;;;;;;;qBCrRC;qBAQA;qBACA;qBACA;qBACA;;;;iBAKI;EACf,QAAQ;EACR,iBAAiB;IAA4B;;EAC7C;GACC;;;;;;;;;;;;;;;;;;;;;wBAsBa,cACd,MAAM,gBACN,UAAU,kCACV;EACE;EACA;IAED;;;YCzES;EACV;EACA,UAAU;EACV;EACA;IAAgB;IAAc;;EAC9B,SAAS;;;;qBAKE,wBAAwB;wBAgErB,mBACd,QAAQ,KAAK,kEACb;EAAe;EAAc;WAC5B;;;qBC5EU;WACX;WACA;WACA;WACA;aACE;eACE;eACA;;aAEF;eACE;eACA;;aAEF;eACE;eACA;eACA;;aAEF;eACE;eACA;;;;qBAsEO;WACX;WACA;WACA;WAEA;aACE;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;mBACA;qBACE;uBAEI;uBACA;uBACA;uBACA;yBACE;2BAAO;;yBACP;2BAAQ;;yBACR;2BAAQ;;;;uBAIV;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAGF;2BAAQ;;yBACR;2BAAQ;;yBACR;2BACE;2BACA;;;;;;iBAQZ;mBACE;mBACA;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBAjOJ;;uBAGJ;;yBAEA;2BACE;2BACA;2BACA;;yBAEF;2BACE;2BACA;2BAEA;;yBAEF;2BACE;2BACA;2BAEA;;;;qBA8MM;;;;;;;;;;;;;;;;;;;;;;;;;;aAKR;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;;;qBAKN;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAEF;2BACE;2BACA;2BAEA;6BAAS;;;;;;;;;aAQvB;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;;;iBAIN;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBACA;qBACE;uBAAQ;;qBACR;uBAAc;;qBACd;uBAAe;;qBACf;uBAAe;;qBACf;uBAAoB;;qBACpB;uBACE;uBACA;;qBAEF;uBAAa;;qBACb;uBAAS;;qBACT;uBACE;uBACA;uBAEA;yBAtaN;;yBAEK;;2BAET;6BAAO;;2BACP;6BAAS;;2BACT;6BAAQ;;2BACR;6BAAW;;;;;qBAiaH;uBACE;uBACA;uBAEA;yBACE;yBACA;yBACA;yBACA;2BACE;6BACE;6BACA;6BAEA;+BACE;+BACA;iCAAS;iCAAgB;;;;2BAG7B;6BACE;6BACA;6BACA;;;;;;;;;;;;;;;;;;;;2BAEF;6BACE;6BACA;;;;;qBAKR;uBACE;uBACA;uBACA;uBACA;uBAEA;yBACE;2BACE;2BACA;;;;;;iBAWV;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBAEA;qBACE;qBACA;qBACA;qBACA;uBACE;yBArgBV;;2BAEE;;2BAEA;2BACA;2BACA;2BACA;6BACE;+BAAU;+BAAgB;;6BAC1B;+BAAS;+BAAgB;;;;;uBA6fnB;yBACE;yBACA;;uBAQF;yBACE;yBACA;;uBAEF;yBACE;yBACA;yBACA;2BACE;6BAAa;;2BACb;6BACE;6BACA;;2BAGF;6BACE;6BACA;6BACA;+BACE;iCAAc;;+BACd;iCAAiB;;;;2BAGrB;6BACE;6BACA;6BACA;+BACE;iCAAY;iCAAe;mCAAS;;;+BACpC;iCACE;iCACA;mCAAwB;;;;;;;;;;iBASxC;mBACE;mBACA;mBAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;YC7nBE;EAAc;EAAmB;;;;;;;;qBAQhC,sBAAsB;qBAiCtB;;;;;;;;;qBAYA;;;;;;;;;;;;qBAqBA;;wBAQG,aAAa;EAAiB;EAAa;;;;;;;;;;;wBAwB3C,kBACd,gBACA;;;;;;;;;;wBA0Bc,qBACd,gBACA,mBACA,SAAS;YAkCC;EACV;EACA;EACA;;YAGU;EACV,eAAe;EACf,mBAAmB;;;;;;;;wBASL,gBACd,SAAS,aACT,cAAc,yBACb;wBAkBa,wBACd,YAAY;;;;;;;wBAcE,sBAAsB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../connect/dynamic-base.ts","../../connect/env-config.ts","../../connect/layers.ts","../../connect/pwa-config.ts","../../connect/pwa-manifest.ts","../../connect/runtime-config.ts","../../connect/schema-fragments.ts","../../connect/shared-deps.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAYa;;wBAOG,sBAAsB,aAAa;;;;;;cCC7C,gBAAc,EAAA;;;;;;GA0BlB,EAAA,KAAA;;;;;;qBAiGW,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAES,EAAA,KAAA;;;;qBAKzB,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgD,EAAA,KAAA;;;;YAKjE,kBAAkB,EAAE,aAAa;YACjC,oBAAoB,EAAE,aAAa;YACnC,aAAa,EAAE,aAAa;;;;iBASvB;;;;EAIf,aAAa;;;;EAIb,UAAU;;;;;;;;;;;wBAkEI,eAAe,UAAS,iBAAsB;;;;;;;;;wBAkB9C,eACd,UAAS,iBACR;;;;;;;;;;;;;;;wBAoBa,cAAc,QAAQ,QAAQ;;;;;;;;;;;;;;;;;wBA4C9B,kBAAkB;;;;;;qBA8BrB;;;;;;;;;;;;;;;;;;;;;;;wBAwBG,oBAAoB;;;;;qBCxXvB;;;;YCmCD;;EAEV;EACA,QAAQ;;KA6BL;EACH;EACA;EACA;;;wBAyBc,YAAY,UAAU,UAAU,OAAO,MAAM;;;;;;;;;wBA4B7C,mBAAmB,kBAAkB,UAAU,MAAM;;;;;;wBASrD,qBACd,QAAQ,cACR,oBACC;;wBASa,aACd,4BACA;;;;;;;;;;;;;;;wBA2Gc,eACd,sBAAsB,mBACtB,gBAAgB,cAChB,UAAS,2BACR;;;wBA8Ca,iBACd,SAAS,kCACC;;;;;;;;;;;qBCrRC;qBAQA;qBACA;qBACA;qBACA;;;;iBAKI;EACf,QAAQ;EACR,iBAAiB;IAA4B;;EAC7C;GACC;;;;;;;;;;;;;;;;;;;;;wBAsBa,cACd,MAAM,gBACN,UAAU,kCACV;EACE;EACA;IAED;;;YCzES;EACV;EACA,UAAU;EACV;EACA;IAAgB;IAAc;;EAC9B,SAAS;;;;qBAKE,wBAAwB;wBAgErB,mBACd,QAAQ,KAAK,kEACb;EAAe;EAAc;WAC5B;;;qBC5EU;WACX;WACA;WACA;WACA;aACE;eACE;eACA;;aAEF;eACE;eACA;;aAEF;eACE;eACA;eACA;;aAEF;eACE;eACA;;;;qBAsEO;WACX;WACA;WACA;WAEA;aACE;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;mBACA;qBACE;uBAEI;uBACA;uBACA;uBACA;yBACE;2BAAO;;yBACP;2BAAQ;;yBACR;2BAAQ;;;;uBAIV;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAGF;2BAAQ;;yBACR;2BAAQ;;yBACR;2BACE;2BACA;;;;;;iBAQZ;mBACE;mBACA;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBAjOJ;;uBAGJ;;yBAEA;2BACE;2BACA;2BACA;;yBAEF;2BACE;2BACA;2BAEA;;yBAEF;2BACE;2BACA;2BAEA;;;;qBA8MM;;;;;;;;;;;;;;;;;;;;;;;;;;aAKR;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;;;qBAKN;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAEF;2BACE;2BACA;2BAEA;6BAAS;;;;;;;;;aAQvB;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;;;iBAIN;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBACA;qBACE;uBAAQ;;qBACR;uBAAc;;qBACd;uBAAe;;qBACf;uBAAe;;qBACf;uBAAoB;;qBACpB;uBACE;uBACA;;qBAEF;uBAAa;;qBACb;uBAAS;;qBACT;uBACE;uBACA;uBAEA;yBAtaN;;yBAEK;;2BAET;6BAAO;;2BACP;6BAAS;;2BACT;6BAAQ;;2BACR;6BAAW;;;;;qBAiaH;uBACE;uBACA;uBAEA;yBACE;yBACA;yBACA;yBACA;2BACE;6BACE;6BACA;6BAEA;+BACE;+BACA;iCAAS;iCAAgB;;;;2BAG7B;6BACE;6BACA;6BACA;;;;;;;;;;;;;;;;;;;;2BAEF;6BACE;6BACA;;;;;qBAKR;uBACE;uBACA;uBACA;uBACA;uBAEA;yBACE;2BACE;2BACA;;;;;;iBAWV;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBAEA;qBACE;qBACA;qBACA;qBACA;uBACE;yBArgBV;;2BAEE;;2BAEA;2BACA;2BACA;2BACA;6BACE;+BAAU;+BAAgB;;6BAC1B;+BAAS;+BAAgB;;;;;uBA6fnB;yBACE;yBACA;;uBAQF;yBACE;yBACA;;uBAEF;yBACE;yBACA;yBACA;2BACE;6BAAa;;2BACb;6BACE;6BACA;;2BAGF;6BACE;6BACA;6BACA;+BACE;iCAAc;;+BACd;iCAAiB;;;;2BAGrB;6BACE;6BACA;6BACA;+BACE;iCAAY;iCAAe;mCAAS;;;+BACpC;iCACE;iCACA;mCAAwB;;;;;;;;;;iBASxC;mBACE;mBACA;mBAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;YC7nBE;EAAc;EAAmB;;;;;;;;qBAQhC,sBAAsB;qBAiCtB;;;;;;;;;qBAYA;;;;;;;;;;;;qBAqBA;;wBAQG,aAAa;EAAiB;EAAa;;;;;;;;;;;wBAwB3C,kBACd,gBACA;;;;;;;;;;wBA0Bc,qBACd,gBACA,mBACA,SAAS;YAkCC;EACV;EACA;EACA;;YAGU;EACV,eAAe;EACf,mBAAmB;;;;;;;;wBASL,gBACd,SAAS,aACT,cAAc,yBACb;wBAkBa,wBACd,YAAY;;;;;;;wBAcE,sBAAsB"}
@@ -281,6 +281,11 @@ function getStorageNamespace(basePath) {
281
281
  return `${ROOT_STORAGE_NAMESPACE}--${slug || "default"}`;
282
282
  }
283
283
  //#endregion
284
+ //#region connect/layers.ts
285
+ /** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in
286
+ * external-packages, above Connect's reset and below its utilities. */
287
+ const CONNECT_LAYER_ORDER = "@layer properties, theme, base, components, external-packages, utilities;";
288
+ //#endregion
284
289
  //#region connect/pwa-config.ts
285
290
  const MANIFEST_SCALAR_KEYS = [
286
291
  "name",
@@ -1269,6 +1274,6 @@ function workerPackageFileName(packageName) {
1269
1274
  return `${packageName.replace(/^@/, "").replace(/[^\w.-]+/g, "__")}.js`;
1270
1275
  }
1271
1276
  //#endregion
1272
- export { ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveDynamicBaseUrl, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory, workerPackageFileName, workflowsSettingConflict };
1277
+ export { CONNECT_LAYER_ORDER, ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveDynamicBaseUrl, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory, workerPackageFileName, workflowsSettingConflict };
1273
1278
 
1274
1279
  //# sourceMappingURL=index.js.map