@analogjs/platform 3.0.0-alpha.25 → 3.0.0-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/platform",
3
- "version": "3.0.0-alpha.25",
3
+ "version": "3.0.0-alpha.26",
4
4
  "description": "The fullstack meta-framework for Angular",
5
5
  "type": "module",
6
6
  "author": "Brandon Roberts <robertsbt@gmail.com>",
@@ -9,6 +9,18 @@
9
9
  "types": "./src/index.d.ts",
10
10
  "default": "./src/index.js"
11
11
  },
12
+ "./style-pipeline": {
13
+ "types": "./src/style-pipeline.d.ts",
14
+ "import": "./src/style-pipeline.js",
15
+ "require": "./src/style-pipeline.js",
16
+ "default": "./src/style-pipeline.js"
17
+ },
18
+ "./style-preprocessor": {
19
+ "types": "./src/style-preprocessor.d.ts",
20
+ "import": "./src/style-preprocessor.js",
21
+ "require": "./src/style-preprocessor.js",
22
+ "default": "./src/style-preprocessor.js"
23
+ },
12
24
  "./package.json": "./package.json"
13
25
  },
14
26
  "keywords": [
@@ -35,8 +47,8 @@
35
47
  "es-toolkit": "^1.45.1",
36
48
  "tinyglobby": "^0.2.15",
37
49
  "nitro": "3.0.260311-beta",
38
- "@analogjs/vite-plugin-angular": "3.0.0-alpha.25",
39
- "@analogjs/vite-plugin-nitro": "3.0.0-alpha.25",
50
+ "@analogjs/vite-plugin-angular": "3.0.0-alpha.26",
51
+ "@analogjs/vite-plugin-nitro": "3.0.0-alpha.26",
40
52
  "rolldown": "^1.0.0-rc.13",
41
53
  "obug": "^2.1.1",
42
54
  "vitefu": "^1.1.2"
package/src/index.d.ts CHANGED
@@ -2,5 +2,9 @@ import { platformPlugin } from "./lib/platform-plugin.js";
2
2
  export type { Options, PrerenderSitemapConfig, TypedRouterOptions, PrerenderContentFile, SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform } from "./lib/options.js";
3
3
  export { routeGenerationPlugin } from "./lib/route-generation-plugin.js";
4
4
  export { tailwindPreprocessor } from "./lib/tailwind-preprocessor.js";
5
+ export type { AngularStylePipelineContext, AngularStylePipelineOptions, AngularStylePipelinePlugin, StylePipelineContext, StylePipelineOptions, StylePipelinePluginEntry, StylePipelinePluginFactory } from "./lib/style-pipeline.js";
6
+ export { defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, resolveStylePipelinePlugins } from "./lib/style-pipeline.js";
7
+ export type { StylePreprocessor, StylesheetDependency, StylesheetDiagnostic, StylesheetTransformContext, StylesheetTransformResult } from "./lib/style-preprocessor.js";
8
+ export { composeStylePreprocessors, normalizeStylesheetDependencies, normalizeStylesheetTransformResult } from "./lib/style-preprocessor.js";
5
9
  export type { TailwindPreprocessorMode, TailwindPreprocessorOptions } from "./lib/tailwind-preprocessor.js";
6
10
  export default platformPlugin;
package/src/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { routeGenerationPlugin } from "./lib/route-generation-plugin.js";
2
+ import { defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, resolveStylePipelinePlugins } from "./lib/style-pipeline.js";
2
3
  import { platformPlugin } from "./lib/platform-plugin.js";
3
4
  import { tailwindPreprocessor } from "./lib/tailwind-preprocessor.js";
5
+ import { composeStylePreprocessors, normalizeStylesheetDependencies, normalizeStylesheetTransformResult } from "./lib/style-preprocessor.js";
4
6
  //#region packages/platform/src/index.ts
5
7
  var src_default = platformPlugin;
6
8
  //#endregion
7
- export { src_default as default, routeGenerationPlugin, tailwindPreprocessor };
9
+ export { composeStylePreprocessors, src_default as default, defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, normalizeStylesheetDependencies, normalizeStylesheetTransformResult, resolveStylePipelinePlugins, routeGenerationPlugin, tailwindPreprocessor };
8
10
 
9
11
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { platformPlugin } from './lib/platform-plugin.js';\n\nexport type {\n Options,\n PrerenderSitemapConfig,\n TypedRouterOptions,\n PrerenderContentFile,\n SitemapConfig,\n SitemapEntry,\n SitemapExcludeRule,\n SitemapPriority,\n SitemapRouteDefinition,\n SitemapRouteInput,\n SitemapRouteSource,\n SitemapTransform,\n} from './lib/options.js';\nexport { routeGenerationPlugin } from './lib/route-generation-plugin.js';\nexport { tailwindPreprocessor } from './lib/tailwind-preprocessor.js';\nexport type {\n TailwindPreprocessorMode,\n TailwindPreprocessorOptions,\n} from './lib/tailwind-preprocessor.js';\nexport default platformPlugin;\n"],"mappings":";;;;AAsBA,IAAA,cAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { platformPlugin } from './lib/platform-plugin.js';\n\nexport type {\n Options,\n PrerenderSitemapConfig,\n TypedRouterOptions,\n PrerenderContentFile,\n SitemapConfig,\n SitemapEntry,\n SitemapExcludeRule,\n SitemapPriority,\n SitemapRouteDefinition,\n SitemapRouteInput,\n SitemapRouteSource,\n SitemapTransform,\n} from './lib/options.js';\nexport { routeGenerationPlugin } from './lib/route-generation-plugin.js';\nexport { tailwindPreprocessor } from './lib/tailwind-preprocessor.js';\nexport type {\n AngularStylePipelineContext,\n AngularStylePipelineOptions,\n AngularStylePipelinePlugin,\n StylePipelineContext,\n StylePipelineOptions,\n StylePipelinePluginEntry,\n StylePipelinePluginFactory,\n} from './lib/style-pipeline.js';\nexport {\n defineAngularStylePipeline,\n defineAngularStylePipelinePlugins,\n defineStylePipeline,\n defineStylePipelinePlugins,\n resolveStylePipelinePlugins,\n} from './lib/style-pipeline.js';\nexport type {\n StylePreprocessor,\n StylesheetDependency,\n StylesheetDiagnostic,\n StylesheetTransformContext,\n StylesheetTransformResult,\n} from './lib/style-preprocessor.js';\nexport {\n composeStylePreprocessors,\n normalizeStylesheetDependencies,\n normalizeStylesheetTransformResult,\n} from './lib/style-preprocessor.js';\nexport type {\n TailwindPreprocessorMode,\n TailwindPreprocessorOptions,\n} from './lib/tailwind-preprocessor.js';\nexport default platformPlugin;\n"],"mappings":";;;;;;AAkDA,IAAA,cAAe"}
@@ -1,9 +1,9 @@
1
1
  export declare const V18_X_NX_DEVKIT = "^20.0.0";
2
2
  export declare const V18_X_NX_ANGULAR = "^20.0.0";
3
- export declare const V18_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.25";
4
- export declare const V18_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.25";
5
- export declare const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.25";
6
- export declare const V18_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.25";
3
+ export declare const V18_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.26";
4
+ export declare const V18_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.26";
5
+ export declare const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.26";
6
+ export declare const V18_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.26";
7
7
  export declare const V18_X_FRONT_MATTER = "^4.0.2";
8
8
  export declare const V18_X_MARKED = "^15.0.7";
9
9
  export declare const V18_X_MARKED_GFM_HEADING_ID = "^4.1.1";
@@ -15,7 +15,7 @@ export declare const V18_X_TAILWINDCSS = "^4.2.2";
15
15
  export declare const V18_X_TAILWINDCSS_POSTCSS = "^4.2.2";
16
16
  export declare const V18_X_TAILWINDCSS_VITE = "^4.2.2";
17
17
  export declare const V18_X_POSTCSS = "^8.5.6";
18
- export declare const V18_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.25";
18
+ export declare const V18_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.26";
19
19
  export declare const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = "^19.0.0";
20
20
  export declare const V18_X_NX_VITE = "^21.0.0";
21
21
  export declare const V18_X_NX_LINTER = "^21.0.0";
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../nx-plugin/src/generators/app/versions/nx_18_X/versions.ts"],"sourcesContent":["// V18_X\n// dependencies\nexport const V18_X_NX_DEVKIT = '^20.0.0';\nexport const V18_X_NX_ANGULAR = '^20.0.0';\nexport const V18_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.25';\nexport const V18_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.25';\nexport const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.25';\nexport const V18_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.25';\nexport const V18_X_FRONT_MATTER = '^4.0.2';\nexport const V18_X_MARKED = '^15.0.7';\nexport const V18_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V18_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V18_X_MARKED_MANGLE = '^1.1.10';\nexport const V18_X_MERMAID = '^10.2.4';\nexport const V18_X_PRISMJS = '^1.29.0';\nexport const V18_X_TAILWINDCSS = '^4.2.2';\nexport const V18_X_TAILWINDCSS_POSTCSS = '^4.2.2';\nexport const V18_X_TAILWINDCSS_VITE = '^4.2.2';\nexport const V18_X_POSTCSS = '^8.5.6';\n\n// devDependencies\nexport const V18_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.25';\nexport const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = '^19.0.0';\nexport const V18_X_NX_VITE = '^21.0.0';\nexport const V18_X_NX_LINTER = '^21.0.0';\nexport const V18_X_JSDOM = '^22.1.0';\nexport const V18_X_VITE = '^8.0.0';\nexport const V18_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V18_X_VITEST = '^4.0.0';\nexport const V18_X_ZOD = '^3.21.4';\n"],"mappings":";AAeA,IAAa,oBAAoB;AACjC,IAAa,4BAA4B;AACzC,IAAa,yBAAyB;AACtC,IAAa,gBAAgB"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../nx-plugin/src/generators/app/versions/nx_18_X/versions.ts"],"sourcesContent":["// V18_X\n// dependencies\nexport const V18_X_NX_DEVKIT = '^20.0.0';\nexport const V18_X_NX_ANGULAR = '^20.0.0';\nexport const V18_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.26';\nexport const V18_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.26';\nexport const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.26';\nexport const V18_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.26';\nexport const V18_X_FRONT_MATTER = '^4.0.2';\nexport const V18_X_MARKED = '^15.0.7';\nexport const V18_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V18_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V18_X_MARKED_MANGLE = '^1.1.10';\nexport const V18_X_MERMAID = '^10.2.4';\nexport const V18_X_PRISMJS = '^1.29.0';\nexport const V18_X_TAILWINDCSS = '^4.2.2';\nexport const V18_X_TAILWINDCSS_POSTCSS = '^4.2.2';\nexport const V18_X_TAILWINDCSS_VITE = '^4.2.2';\nexport const V18_X_POSTCSS = '^8.5.6';\n\n// devDependencies\nexport const V18_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.26';\nexport const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = '^19.0.0';\nexport const V18_X_NX_VITE = '^21.0.0';\nexport const V18_X_NX_LINTER = '^21.0.0';\nexport const V18_X_JSDOM = '^22.1.0';\nexport const V18_X_VITE = '^8.0.0';\nexport const V18_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V18_X_VITEST = '^4.0.0';\nexport const V18_X_ZOD = '^3.21.4';\n"],"mappings":";AAeA,IAAa,oBAAoB;AACjC,IAAa,4BAA4B;AACzC,IAAa,yBAAyB;AACtC,IAAa,gBAAgB"}
@@ -1,13 +1,13 @@
1
- export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.25";
2
- export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.25";
1
+ export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.26";
2
+ export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.26";
3
3
  export declare const V19_X_MARKED = "^15.0.7";
4
4
  export declare const V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
5
5
  export declare const V19_X_MARKED_HIGHLIGHT = "^2.2.1";
6
6
  export declare const V19_X_MARKED_MANGLE = "^1.1.10";
7
7
  export declare const V19_X_PRISMJS = "^1.29.0";
8
- export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.25";
9
- export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.25";
10
- export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.25";
8
+ export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.26";
9
+ export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.26";
10
+ export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.26";
11
11
  export declare const V19_X_NX_ANGULAR = "^22.0.0";
12
12
  export declare const V19_X_NX_VITE = "^22.0.0";
13
13
  export declare const V19_X_JSDOM = "^22.0.0";
@@ -1,14 +1,14 @@
1
1
  //#region packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts
2
- var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.25";
3
- var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.25";
2
+ var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.26";
3
+ var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.26";
4
4
  var V19_X_MARKED = "^15.0.7";
5
5
  var V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
6
6
  var V19_X_MARKED_HIGHLIGHT = "^2.2.1";
7
7
  var V19_X_MARKED_MANGLE = "^1.1.10";
8
8
  var V19_X_PRISMJS = "^1.29.0";
9
- var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.25";
10
- var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.25";
11
- var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.25";
9
+ var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.26";
10
+ var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.26";
11
+ var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.26";
12
12
  var V19_X_NX_VITE = "^22.0.0";
13
13
  var V19_X_JSDOM = "^22.0.0";
14
14
  var V19_X_VITE_TSCONFIG_PATHS = "^4.2.0";
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.25';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.25';\nexport const V19_X_MARKED = '^15.0.7';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.25';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.25';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.25';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.26';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.26';\nexport const V19_X_MARKED = '^15.0.7';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.26';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.26';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.26';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
@@ -3,6 +3,7 @@ import type { NitroConfig, PrerenderRoute } from "nitro/types";
3
3
  import type { SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform, PrerenderContentDir, PrerenderContentFile, PrerenderSitemapConfig, PrerenderRouteConfig } from "@analogjs/vite-plugin-nitro";
4
4
  import type { ContentPluginOptions } from "./content-plugin.js";
5
5
  import type { DebugOption } from "./utils/debug.js";
6
+ import type { StylePipelineOptions } from "./style-pipeline.js";
6
7
  declare module "nitro/types" {
7
8
  interface NitroRouteConfig {
8
9
  ssr?: boolean;
@@ -166,6 +167,15 @@ export interface Options {
166
167
  * Inspired by TanStack Router's `routeTree.gen.ts` codegen.
167
168
  */
168
169
  typedRouter?: boolean | TypedRouterOptions;
170
+ /**
171
+ * Experimental slot for community-maintained style-pipeline integrations.
172
+ *
173
+ * This keeps Analog's core surface intentionally narrow: community
174
+ * packages can register Vite plugins through an Analog-first config shape
175
+ * without requiring Analog itself to own design-token engines, library
176
+ * target contracts, or framework-specific theming semantics.
177
+ */
178
+ stylePipeline?: StylePipelineOptions | false;
169
179
  };
170
180
  }
171
181
  export interface TypedRouterOptions {
@@ -8,6 +8,7 @@ import { depsPlugin } from "./deps-plugin.js";
8
8
  import { injectHTMLPlugin } from "./ssr/inject-html-plugin.js";
9
9
  import { serverModePlugin } from "../server-mode-plugin.js";
10
10
  import { routeGenerationPlugin } from "./route-generation-plugin.js";
11
+ import { resolveStylePipelinePlugins } from "./style-pipeline.js";
11
12
  import viteNitroPlugin from "@analogjs/vite-plugin-nitro";
12
13
  import angular from "@analogjs/vite-plugin-angular";
13
14
  import { mapValues, union } from "es-toolkit";
@@ -32,7 +33,8 @@ function platformPlugin(opts = {}) {
32
33
  const useAngularCompilationAPI = platformOptions.experimental?.useAngularCompilationAPI ?? viteOptions?.experimental?.useAngularCompilationAPI;
33
34
  debugPlatform("experimental options resolved", {
34
35
  useAngularCompilationAPI: !!useAngularCompilationAPI,
35
- typedRouter: platformOptions.experimental?.typedRouter
36
+ typedRouter: platformOptions.experimental?.typedRouter,
37
+ stylePipeline: !!platformOptions.experimental?.stylePipeline
36
38
  });
37
39
  let nitroOptions = platformOptions?.nitro;
38
40
  if (nitroOptions?.routeRules) nitroOptions = {
@@ -55,6 +57,7 @@ function platformPlugin(opts = {}) {
55
57
  ...externalPlugins(viteNitroPlugin(platformOptions, nitroOptions)),
56
58
  ...platformOptions.ssr ? [...ssrBuildPlugin(), ...injectHTMLPlugin()] : [],
57
59
  ...!isTest ? depsPlugin(platformOptions) : [],
60
+ ...resolveStylePipelinePlugins(platformOptions.experimental?.stylePipeline, platformOptions.workspaceRoot),
58
61
  ...routerPlugin(platformOptions),
59
62
  routeGenerationPlugin(platformOptions),
60
63
  ...contentPlugin(platformOptions?.content, platformOptions),
@@ -69,6 +72,7 @@ function platformPlugin(opts = {}) {
69
72
  inlineStylesExtension: platformOptions.inlineStylesExtension,
70
73
  fileReplacements: platformOptions.fileReplacements,
71
74
  debug: platformOptions.debug,
75
+ stylePipeline: platformOptions.experimental?.stylePipeline?.angularPlugins?.length ? { plugins: platformOptions.experimental.stylePipeline.angularPlugins } : void 0,
72
76
  ...viteOptions ?? {},
73
77
  experimental: {
74
78
  ...viteOptions?.experimental ?? {},
@@ -1 +1 @@
1
- {"version":3,"file":"platform-plugin.js","names":[],"sources":["../../../src/lib/platform-plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\nimport viteNitroPlugin from '@analogjs/vite-plugin-nitro';\nimport angular from '@analogjs/vite-plugin-angular';\nimport { mapValues, union } from 'es-toolkit';\n\nimport { Options } from './options.js';\nimport {\n activateDeferredDebug,\n applyDebugOption,\n debugPlatform,\n} from './utils/debug.js';\nimport { discoverLibraryRoutes } from './discover-library-routes.js';\nimport { routerPlugin } from './router-plugin.js';\nimport { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';\nimport { contentPlugin } from './content-plugin.js';\nimport { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';\nimport { depsPlugin } from './deps-plugin.js';\nimport { injectHTMLPlugin } from './ssr/inject-html-plugin.js';\nimport { serverModePlugin } from '../server-mode-plugin.js';\nimport { routeGenerationPlugin } from './route-generation-plugin.js';\n\n// Bridge Plugin types from external @analogjs packages that resolve a different vite instance\nfunction externalPlugins(plugins: unknown): Plugin[] {\n return plugins as Plugin[];\n}\n\nexport function platformPlugin(opts: Options = {}): Plugin[] {\n applyDebugOption(opts.debug, opts.workspaceRoot);\n\n const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];\n const viteOptions = opts?.vite === false ? undefined : opts?.vite;\n const { ...platformOptions } = {\n ssr: true,\n ...opts,\n };\n if (platformOptions.discoverRoutes) {\n const workspaceRoot =\n platformOptions.workspaceRoot ??\n process.env['NX_WORKSPACE_ROOT'] ??\n process.cwd();\n const discovered = discoverLibraryRoutes(workspaceRoot);\n platformOptions.additionalPagesDirs = union(\n platformOptions.additionalPagesDirs ?? [],\n discovered.additionalPagesDirs,\n );\n platformOptions.additionalContentDirs = union(\n platformOptions.additionalContentDirs ?? [],\n discovered.additionalContentDirs,\n );\n platformOptions.additionalAPIDirs = union(\n platformOptions.additionalAPIDirs ?? [],\n discovered.additionalAPIDirs,\n );\n }\n\n const useAngularCompilationAPI =\n platformOptions.experimental?.useAngularCompilationAPI ??\n viteOptions?.experimental?.useAngularCompilationAPI;\n debugPlatform('experimental options resolved', {\n useAngularCompilationAPI: !!useAngularCompilationAPI,\n typedRouter: platformOptions.experimental?.typedRouter,\n });\n let nitroOptions = platformOptions?.nitro;\n\n if (nitroOptions?.routeRules) {\n nitroOptions = {\n ...nitroOptions,\n routeRules: mapValues(nitroOptions.routeRules, (rule) => ({\n ...rule,\n headers: {\n ...rule.headers,\n 'x-analog-no-ssr': rule?.ssr === false ? 'true' : undefined,\n } as any,\n })),\n };\n }\n\n return [\n {\n name: 'analogjs-debug-activate',\n config(_, { command }) {\n activateDeferredDebug(command);\n },\n },\n ...externalPlugins(viteNitroPlugin(platformOptions as any, nitroOptions)),\n ...(platformOptions.ssr\n ? [...ssrBuildPlugin(), ...injectHTMLPlugin()]\n : []),\n ...(!isTest ? depsPlugin(platformOptions) : []),\n ...routerPlugin(platformOptions),\n routeGenerationPlugin(platformOptions),\n ...contentPlugin(platformOptions?.content, platformOptions),\n ...(opts?.vite === false\n ? []\n : externalPlugins(\n angular({\n jit: platformOptions.jit,\n workspaceRoot: platformOptions.workspaceRoot,\n // Let the Angular plugin keep its own dev-friendly default unless the\n // app explicitly opts into stricter serve-time diagnostics.\n disableTypeChecking: platformOptions.disableTypeChecking,\n include: [\n ...(platformOptions.include ?? []),\n ...(platformOptions.additionalPagesDirs ?? []).map(\n (pageDir) => `${pageDir}/**/*.page.ts`,\n ),\n ],\n additionalContentDirs: platformOptions.additionalContentDirs,\n hmr: platformOptions.hmr,\n liveReload: platformOptions.liveReload,\n inlineStylesExtension: platformOptions.inlineStylesExtension,\n fileReplacements: platformOptions.fileReplacements,\n debug: platformOptions.debug,\n ...(viteOptions ?? {}),\n experimental: {\n ...(viteOptions?.experimental ?? {}),\n useAngularCompilationAPI,\n },\n }),\n )),\n ...serverModePlugin(),\n ...clearClientPageEndpointsPlugin(),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,gBAAgB,SAA4B;AACnD,QAAO;;AAGT,SAAgB,eAAe,OAAgB,EAAE,EAAY;AAC3D,kBAAiB,KAAK,OAAO,KAAK,cAAc;CAEhD,MAAM,SAAA,QAAA,IAAA,aAAqC,UAAU,CAAC,CAAC,QAAQ,IAAI;CACnE,MAAM,cAAc,MAAM,SAAS,QAAQ,KAAA,IAAY,MAAM;CAC7D,MAAM,EAAE,GAAG,oBAAoB;EAC7B,KAAK;EACL,GAAG;EACJ;AACD,KAAI,gBAAgB,gBAAgB;EAKlC,MAAM,aAAa,sBAHjB,gBAAgB,iBAChB,QAAQ,IAAI,wBACZ,QAAQ,KAAK,CACwC;AACvD,kBAAgB,sBAAsB,MACpC,gBAAgB,uBAAuB,EAAE,EACzC,WAAW,oBACZ;AACD,kBAAgB,wBAAwB,MACtC,gBAAgB,yBAAyB,EAAE,EAC3C,WAAW,sBACZ;AACD,kBAAgB,oBAAoB,MAClC,gBAAgB,qBAAqB,EAAE,EACvC,WAAW,kBACZ;;CAGH,MAAM,2BACJ,gBAAgB,cAAc,4BAC9B,aAAa,cAAc;AAC7B,eAAc,iCAAiC;EAC7C,0BAA0B,CAAC,CAAC;EAC5B,aAAa,gBAAgB,cAAc;EAC5C,CAAC;CACF,IAAI,eAAe,iBAAiB;AAEpC,KAAI,cAAc,WAChB,gBAAe;EACb,GAAG;EACH,YAAY,UAAU,aAAa,aAAa,UAAU;GACxD,GAAG;GACH,SAAS;IACP,GAAG,KAAK;IACR,mBAAmB,MAAM,QAAQ,QAAQ,SAAS,KAAA;IACnD;GACF,EAAE;EACJ;AAGH,QAAO;EACL;GACE,MAAM;GACN,OAAO,GAAG,EAAE,WAAW;AACrB,0BAAsB,QAAQ;;GAEjC;EACD,GAAG,gBAAgB,gBAAgB,iBAAwB,aAAa,CAAC;EACzE,GAAI,gBAAgB,MAChB,CAAC,GAAG,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,GAC5C,EAAE;EACN,GAAI,CAAC,SAAS,WAAW,gBAAgB,GAAG,EAAE;EAC9C,GAAG,aAAa,gBAAgB;EAChC,sBAAsB,gBAAgB;EACtC,GAAG,cAAc,iBAAiB,SAAS,gBAAgB;EAC3D,GAAI,MAAM,SAAS,QACf,EAAE,GACF,gBACE,QAAQ;GACN,KAAK,gBAAgB;GACrB,eAAe,gBAAgB;GAG/B,qBAAqB,gBAAgB;GACrC,SAAS,CACP,GAAI,gBAAgB,WAAW,EAAE,EACjC,IAAI,gBAAgB,uBAAuB,EAAE,EAAE,KAC5C,YAAY,GAAG,QAAQ,eACzB,CACF;GACD,uBAAuB,gBAAgB;GACvC,KAAK,gBAAgB;GACrB,YAAY,gBAAgB;GAC5B,uBAAuB,gBAAgB;GACvC,kBAAkB,gBAAgB;GAClC,OAAO,gBAAgB;GACvB,GAAI,eAAe,EAAE;GACrB,cAAc;IACZ,GAAI,aAAa,gBAAgB,EAAE;IACnC;IACD;GACF,CAAC,CACH;EACL,GAAG,kBAAkB;EACrB,GAAG,gCAAgC;EACpC"}
1
+ {"version":3,"file":"platform-plugin.js","names":[],"sources":["../../../src/lib/platform-plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\nimport viteNitroPlugin from '@analogjs/vite-plugin-nitro';\nimport angular from '@analogjs/vite-plugin-angular';\nimport { mapValues, union } from 'es-toolkit';\n\nimport { Options } from './options.js';\nimport {\n activateDeferredDebug,\n applyDebugOption,\n debugPlatform,\n} from './utils/debug.js';\nimport { discoverLibraryRoutes } from './discover-library-routes.js';\nimport { routerPlugin } from './router-plugin.js';\nimport { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';\nimport { contentPlugin } from './content-plugin.js';\nimport { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';\nimport { depsPlugin } from './deps-plugin.js';\nimport { injectHTMLPlugin } from './ssr/inject-html-plugin.js';\nimport { serverModePlugin } from '../server-mode-plugin.js';\nimport { routeGenerationPlugin } from './route-generation-plugin.js';\nimport { resolveStylePipelinePlugins } from './style-pipeline.js';\n\n// Bridge Plugin types from external @analogjs packages that resolve a different vite instance\nfunction externalPlugins(plugins: unknown): Plugin[] {\n return plugins as Plugin[];\n}\n\nexport function platformPlugin(opts: Options = {}): Plugin[] {\n applyDebugOption(opts.debug, opts.workspaceRoot);\n\n const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];\n const viteOptions = opts?.vite === false ? undefined : opts?.vite;\n const { ...platformOptions } = {\n ssr: true,\n ...opts,\n };\n if (platformOptions.discoverRoutes) {\n const workspaceRoot =\n platformOptions.workspaceRoot ??\n process.env['NX_WORKSPACE_ROOT'] ??\n process.cwd();\n const discovered = discoverLibraryRoutes(workspaceRoot);\n platformOptions.additionalPagesDirs = union(\n platformOptions.additionalPagesDirs ?? [],\n discovered.additionalPagesDirs,\n );\n platformOptions.additionalContentDirs = union(\n platformOptions.additionalContentDirs ?? [],\n discovered.additionalContentDirs,\n );\n platformOptions.additionalAPIDirs = union(\n platformOptions.additionalAPIDirs ?? [],\n discovered.additionalAPIDirs,\n );\n }\n\n const useAngularCompilationAPI =\n platformOptions.experimental?.useAngularCompilationAPI ??\n viteOptions?.experimental?.useAngularCompilationAPI;\n debugPlatform('experimental options resolved', {\n useAngularCompilationAPI: !!useAngularCompilationAPI,\n typedRouter: platformOptions.experimental?.typedRouter,\n stylePipeline: !!platformOptions.experimental?.stylePipeline,\n });\n let nitroOptions = platformOptions?.nitro;\n\n if (nitroOptions?.routeRules) {\n nitroOptions = {\n ...nitroOptions,\n routeRules: mapValues(nitroOptions.routeRules, (rule) => ({\n ...rule,\n headers: {\n ...rule.headers,\n 'x-analog-no-ssr': rule?.ssr === false ? 'true' : undefined,\n } as any,\n })),\n };\n }\n\n return [\n {\n name: 'analogjs-debug-activate',\n config(_, { command }) {\n activateDeferredDebug(command);\n },\n },\n ...externalPlugins(viteNitroPlugin(platformOptions as any, nitroOptions)),\n ...(platformOptions.ssr\n ? [...ssrBuildPlugin(), ...injectHTMLPlugin()]\n : []),\n ...(!isTest ? depsPlugin(platformOptions) : []),\n ...resolveStylePipelinePlugins(\n platformOptions.experimental?.stylePipeline,\n platformOptions.workspaceRoot,\n ),\n ...routerPlugin(platformOptions),\n routeGenerationPlugin(platformOptions),\n ...contentPlugin(platformOptions?.content, platformOptions),\n ...(opts?.vite === false\n ? []\n : externalPlugins(\n angular({\n jit: platformOptions.jit,\n workspaceRoot: platformOptions.workspaceRoot,\n // Let the Angular plugin keep its own dev-friendly default unless the\n // app explicitly opts into stricter serve-time diagnostics.\n disableTypeChecking: platformOptions.disableTypeChecking,\n include: [\n ...(platformOptions.include ?? []),\n ...(platformOptions.additionalPagesDirs ?? []).map(\n (pageDir) => `${pageDir}/**/*.page.ts`,\n ),\n ],\n additionalContentDirs: platformOptions.additionalContentDirs,\n hmr: platformOptions.hmr,\n liveReload: platformOptions.liveReload,\n inlineStylesExtension: platformOptions.inlineStylesExtension,\n fileReplacements: platformOptions.fileReplacements,\n debug: platformOptions.debug,\n stylePipeline: platformOptions.experimental?.stylePipeline\n ?.angularPlugins?.length\n ? {\n plugins:\n platformOptions.experimental.stylePipeline.angularPlugins,\n }\n : undefined,\n ...(viteOptions ?? {}),\n experimental: {\n ...(viteOptions?.experimental ?? {}),\n useAngularCompilationAPI,\n },\n }),\n )),\n ...serverModePlugin(),\n ...clearClientPageEndpointsPlugin(),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,SAAS,gBAAgB,SAA4B;AACnD,QAAO;;AAGT,SAAgB,eAAe,OAAgB,EAAE,EAAY;AAC3D,kBAAiB,KAAK,OAAO,KAAK,cAAc;CAEhD,MAAM,SAAA,QAAA,IAAA,aAAqC,UAAU,CAAC,CAAC,QAAQ,IAAI;CACnE,MAAM,cAAc,MAAM,SAAS,QAAQ,KAAA,IAAY,MAAM;CAC7D,MAAM,EAAE,GAAG,oBAAoB;EAC7B,KAAK;EACL,GAAG;EACJ;AACD,KAAI,gBAAgB,gBAAgB;EAKlC,MAAM,aAAa,sBAHjB,gBAAgB,iBAChB,QAAQ,IAAI,wBACZ,QAAQ,KAAK,CACwC;AACvD,kBAAgB,sBAAsB,MACpC,gBAAgB,uBAAuB,EAAE,EACzC,WAAW,oBACZ;AACD,kBAAgB,wBAAwB,MACtC,gBAAgB,yBAAyB,EAAE,EAC3C,WAAW,sBACZ;AACD,kBAAgB,oBAAoB,MAClC,gBAAgB,qBAAqB,EAAE,EACvC,WAAW,kBACZ;;CAGH,MAAM,2BACJ,gBAAgB,cAAc,4BAC9B,aAAa,cAAc;AAC7B,eAAc,iCAAiC;EAC7C,0BAA0B,CAAC,CAAC;EAC5B,aAAa,gBAAgB,cAAc;EAC3C,eAAe,CAAC,CAAC,gBAAgB,cAAc;EAChD,CAAC;CACF,IAAI,eAAe,iBAAiB;AAEpC,KAAI,cAAc,WAChB,gBAAe;EACb,GAAG;EACH,YAAY,UAAU,aAAa,aAAa,UAAU;GACxD,GAAG;GACH,SAAS;IACP,GAAG,KAAK;IACR,mBAAmB,MAAM,QAAQ,QAAQ,SAAS,KAAA;IACnD;GACF,EAAE;EACJ;AAGH,QAAO;EACL;GACE,MAAM;GACN,OAAO,GAAG,EAAE,WAAW;AACrB,0BAAsB,QAAQ;;GAEjC;EACD,GAAG,gBAAgB,gBAAgB,iBAAwB,aAAa,CAAC;EACzE,GAAI,gBAAgB,MAChB,CAAC,GAAG,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,GAC5C,EAAE;EACN,GAAI,CAAC,SAAS,WAAW,gBAAgB,GAAG,EAAE;EAC9C,GAAG,4BACD,gBAAgB,cAAc,eAC9B,gBAAgB,cACjB;EACD,GAAG,aAAa,gBAAgB;EAChC,sBAAsB,gBAAgB;EACtC,GAAG,cAAc,iBAAiB,SAAS,gBAAgB;EAC3D,GAAI,MAAM,SAAS,QACf,EAAE,GACF,gBACE,QAAQ;GACN,KAAK,gBAAgB;GACrB,eAAe,gBAAgB;GAG/B,qBAAqB,gBAAgB;GACrC,SAAS,CACP,GAAI,gBAAgB,WAAW,EAAE,EACjC,IAAI,gBAAgB,uBAAuB,EAAE,EAAE,KAC5C,YAAY,GAAG,QAAQ,eACzB,CACF;GACD,uBAAuB,gBAAgB;GACvC,KAAK,gBAAgB;GACrB,YAAY,gBAAgB;GAC5B,uBAAuB,gBAAgB;GACvC,kBAAkB,gBAAgB;GAClC,OAAO,gBAAgB;GACvB,eAAe,gBAAgB,cAAc,eACzC,gBAAgB,SAChB,EACE,SACE,gBAAgB,aAAa,cAAc,gBAC9C,GACD,KAAA;GACJ,GAAI,eAAe,EAAE;GACrB,cAAc;IACZ,GAAI,aAAa,gBAAgB,EAAE;IACnC;IACD;GACF,CAAC,CACH;EACL,GAAG,kBAAkB;EACrB,GAAG,gCAAgC;EACpC"}
@@ -0,0 +1,34 @@
1
+ import type { Plugin } from "vite";
2
+ import type { StylesheetDependency, StylesheetDiagnostic, StylesheetTransformContext, StylesheetTransformResult } from "./style-preprocessor.js";
3
+ export interface StylePipelineStylesheetRegistry {
4
+ getPublicIdsForSource(sourcePath: string): string[];
5
+ getRequestIdsForSource(sourcePath: string): string[];
6
+ getDependenciesForSource(sourcePath: string): StylesheetDependency[];
7
+ getDiagnosticsForSource(sourcePath: string): StylesheetDiagnostic[];
8
+ getTagsForSource(sourcePath: string): string[];
9
+ }
10
+ export interface AngularStylePipelineContext {
11
+ workspaceRoot: string;
12
+ }
13
+ export interface AngularStylePipelinePlugin {
14
+ name: string;
15
+ preprocessStylesheet?: (code: string, context: StylesheetTransformContext) => string | StylesheetTransformResult | undefined;
16
+ configureStylesheetRegistry?: (registry: StylePipelineStylesheetRegistry, context: AngularStylePipelineContext) => void;
17
+ }
18
+ export interface AngularStylePipelineOptions {
19
+ plugins: AngularStylePipelinePlugin[];
20
+ }
21
+ export declare function defineAngularStylePipeline<const T extends AngularStylePipelineOptions>(options: T): T;
22
+ export declare function defineAngularStylePipelinePlugins<const T extends AngularStylePipelinePlugin[]>(plugins: T): T;
23
+ export interface StylePipelineContext {
24
+ workspaceRoot: string;
25
+ }
26
+ export type StylePipelinePluginFactory = (context: StylePipelineContext) => Plugin | Plugin[] | false | null | undefined;
27
+ export type StylePipelinePluginEntry = Plugin | Plugin[] | StylePipelinePluginFactory | false | null | undefined;
28
+ export interface StylePipelineOptions {
29
+ plugins?: StylePipelinePluginEntry[];
30
+ angularPlugins?: AngularStylePipelinePlugin[];
31
+ }
32
+ export declare function defineStylePipeline<const T extends StylePipelineOptions>(options: T): T;
33
+ export declare function defineStylePipelinePlugins<const T extends StylePipelinePluginEntry[]>(plugins: T): T;
34
+ export declare function resolveStylePipelinePlugins(options: StylePipelineOptions | false | undefined, workspaceRoot?: string): Plugin[];
@@ -0,0 +1,32 @@
1
+ //#region packages/platform/src/lib/style-pipeline.ts
2
+ function defineAngularStylePipeline(options) {
3
+ return options;
4
+ }
5
+ function defineAngularStylePipelinePlugins(plugins) {
6
+ return plugins;
7
+ }
8
+ function defineStylePipeline(options) {
9
+ return options;
10
+ }
11
+ function defineStylePipelinePlugins(plugins) {
12
+ return plugins;
13
+ }
14
+ function resolveStylePipelinePlugins(options, workspaceRoot) {
15
+ if (!options?.plugins?.length) return [];
16
+ const context = { workspaceRoot: workspaceRoot ?? process.env["NX_WORKSPACE_ROOT"] ?? process.cwd() };
17
+ const resolved = [];
18
+ for (const entry of options.plugins) {
19
+ const plugins = typeof entry === "function" ? entry(context) : entry;
20
+ if (!plugins) continue;
21
+ if (Array.isArray(plugins)) {
22
+ resolved.push(...plugins);
23
+ continue;
24
+ }
25
+ resolved.push(plugins);
26
+ }
27
+ return resolved;
28
+ }
29
+ //#endregion
30
+ export { defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, resolveStylePipelinePlugins };
31
+
32
+ //# sourceMappingURL=style-pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-pipeline.js","names":[],"sources":["../../../src/lib/style-pipeline.ts"],"sourcesContent":["import type { Plugin } from 'vite';\nimport type {\n StylesheetDependency,\n StylesheetDiagnostic,\n StylesheetTransformContext,\n StylesheetTransformResult,\n} from './style-preprocessor.js';\n\nexport interface StylePipelineStylesheetRegistry {\n getPublicIdsForSource(sourcePath: string): string[];\n getRequestIdsForSource(sourcePath: string): string[];\n getDependenciesForSource(sourcePath: string): StylesheetDependency[];\n getDiagnosticsForSource(sourcePath: string): StylesheetDiagnostic[];\n getTagsForSource(sourcePath: string): string[];\n}\n\nexport interface AngularStylePipelineContext {\n workspaceRoot: string;\n}\n\nexport interface AngularStylePipelinePlugin {\n name: string;\n preprocessStylesheet?: (\n code: string,\n context: StylesheetTransformContext,\n ) => string | StylesheetTransformResult | undefined;\n configureStylesheetRegistry?: (\n registry: StylePipelineStylesheetRegistry,\n context: AngularStylePipelineContext,\n ) => void;\n}\n\nexport interface AngularStylePipelineOptions {\n plugins: AngularStylePipelinePlugin[];\n}\n\nexport function defineAngularStylePipeline<\n const T extends AngularStylePipelineOptions,\n>(options: T): T {\n return options;\n}\n\nexport function defineAngularStylePipelinePlugins<\n const T extends AngularStylePipelinePlugin[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport interface StylePipelineContext {\n workspaceRoot: string;\n}\n\nexport type StylePipelinePluginFactory = (\n context: StylePipelineContext,\n) => Plugin | Plugin[] | false | null | undefined;\n\nexport type StylePipelinePluginEntry =\n | Plugin\n | Plugin[]\n | StylePipelinePluginFactory\n | false\n | null\n | undefined;\n\nexport interface StylePipelineOptions {\n plugins?: StylePipelinePluginEntry[];\n angularPlugins?: AngularStylePipelinePlugin[];\n}\n\nexport function defineStylePipeline<const T extends StylePipelineOptions>(\n options: T,\n): T {\n return options;\n}\n\nexport function defineStylePipelinePlugins<\n const T extends StylePipelinePluginEntry[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport function resolveStylePipelinePlugins(\n options: StylePipelineOptions | false | undefined,\n workspaceRoot?: string,\n): Plugin[] {\n if (!options?.plugins?.length) {\n return [];\n }\n\n const context: StylePipelineContext = {\n workspaceRoot:\n workspaceRoot ?? process.env['NX_WORKSPACE_ROOT'] ?? process.cwd(),\n };\n\n const resolved: Plugin[] = [];\n\n for (const entry of options.plugins) {\n const plugins = typeof entry === 'function' ? entry(context) : entry;\n\n if (!plugins) {\n continue;\n }\n\n if (Array.isArray(plugins)) {\n resolved.push(...plugins);\n continue;\n }\n\n resolved.push(plugins);\n }\n\n return resolved;\n}\n"],"mappings":";AAoCA,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,kCAEd,SAAe;AACf,QAAO;;AAwBT,SAAgB,oBACd,SACG;AACH,QAAO;;AAGT,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,4BACd,SACA,eACU;AACV,KAAI,CAAC,SAAS,SAAS,OACrB,QAAO,EAAE;CAGX,MAAM,UAAgC,EACpC,eACE,iBAAiB,QAAQ,IAAI,wBAAwB,QAAQ,KAAK,EACrE;CAED,MAAM,WAAqB,EAAE;AAE7B,MAAK,MAAM,SAAS,QAAQ,SAAS;EACnC,MAAM,UAAU,OAAO,UAAU,aAAa,MAAM,QAAQ,GAAG;AAE/D,MAAI,CAAC,QACH;AAGF,MAAI,MAAM,QAAQ,QAAQ,EAAE;AAC1B,YAAS,KAAK,GAAG,QAAQ;AACzB;;AAGF,WAAS,KAAK,QAAQ;;AAGxB,QAAO"}
@@ -0,0 +1,28 @@
1
+ export interface StylesheetTransformContext {
2
+ filename: string;
3
+ containingFile?: string;
4
+ resourceFile?: string;
5
+ className?: string;
6
+ order?: number;
7
+ inline: boolean;
8
+ }
9
+ export interface StylesheetDependency {
10
+ id: string;
11
+ kind?: "file" | "virtual" | "token" | "bridge" | "manifest" | "runtime";
12
+ owner?: string;
13
+ }
14
+ export interface StylesheetDiagnostic {
15
+ severity: "warning" | "error";
16
+ code: string;
17
+ message: string;
18
+ }
19
+ export interface StylesheetTransformResult {
20
+ code: string;
21
+ dependencies?: Array<string | StylesheetDependency>;
22
+ diagnostics?: StylesheetDiagnostic[];
23
+ tags?: string[];
24
+ }
25
+ export type StylePreprocessor = (code: string, filename: string, context?: StylesheetTransformContext) => string | StylesheetTransformResult;
26
+ export declare function normalizeStylesheetTransformResult(value: string | StylesheetTransformResult | undefined, fallbackCode: string): StylesheetTransformResult;
27
+ export declare function normalizeStylesheetDependencies(dependencies: Array<string | StylesheetDependency> | undefined): StylesheetDependency[];
28
+ export declare function composeStylePreprocessors(preprocessors: Array<StylePreprocessor | false | null | undefined>): StylePreprocessor | undefined;
@@ -0,0 +1,35 @@
1
+ //#region packages/platform/src/lib/style-preprocessor.ts
2
+ function normalizeStylesheetTransformResult(value, fallbackCode) {
3
+ if (value == null) return { code: fallbackCode };
4
+ if (typeof value === "string") return { code: value };
5
+ return {
6
+ code: value.code ?? fallbackCode,
7
+ dependencies: value.dependencies ?? [],
8
+ diagnostics: value.diagnostics ?? [],
9
+ tags: value.tags ?? []
10
+ };
11
+ }
12
+ function normalizeStylesheetDependencies(dependencies) {
13
+ return (dependencies ?? []).map((dependency) => typeof dependency === "string" ? { id: dependency } : dependency);
14
+ }
15
+ function composeStylePreprocessors(preprocessors) {
16
+ const active = preprocessors.filter((preprocessor) => !!preprocessor);
17
+ if (!active.length) return;
18
+ return (code, filename, context) => {
19
+ let current = normalizeStylesheetTransformResult(void 0, code);
20
+ for (const preprocessor of active) {
21
+ const next = normalizeStylesheetTransformResult(preprocessor(current.code, filename, context), current.code);
22
+ current = {
23
+ code: next.code,
24
+ dependencies: [...current.dependencies ?? [], ...next.dependencies ?? []],
25
+ diagnostics: [...current.diagnostics ?? [], ...next.diagnostics ?? []],
26
+ tags: [...current.tags ?? [], ...next.tags ?? []]
27
+ };
28
+ }
29
+ return current;
30
+ };
31
+ }
32
+ //#endregion
33
+ export { composeStylePreprocessors, normalizeStylesheetDependencies, normalizeStylesheetTransformResult };
34
+
35
+ //# sourceMappingURL=style-preprocessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-preprocessor.js","names":[],"sources":["../../../src/lib/style-preprocessor.ts"],"sourcesContent":["export interface StylesheetTransformContext {\n filename: string;\n containingFile?: string;\n resourceFile?: string;\n className?: string;\n order?: number;\n inline: boolean;\n}\n\nexport interface StylesheetDependency {\n id: string;\n kind?: 'file' | 'virtual' | 'token' | 'bridge' | 'manifest' | 'runtime';\n owner?: string;\n}\n\nexport interface StylesheetDiagnostic {\n severity: 'warning' | 'error';\n code: string;\n message: string;\n}\n\nexport interface StylesheetTransformResult {\n code: string;\n dependencies?: Array<string | StylesheetDependency>;\n diagnostics?: StylesheetDiagnostic[];\n tags?: string[];\n}\n\nexport type StylePreprocessor = (\n code: string,\n filename: string,\n context?: StylesheetTransformContext,\n) => string | StylesheetTransformResult;\n\nexport function normalizeStylesheetTransformResult(\n value: string | StylesheetTransformResult | undefined,\n fallbackCode: string,\n): StylesheetTransformResult {\n if (value == null) {\n return { code: fallbackCode };\n }\n\n if (typeof value === 'string') {\n return { code: value };\n }\n\n return {\n code: value.code ?? fallbackCode,\n dependencies: value.dependencies ?? [],\n diagnostics: value.diagnostics ?? [],\n tags: value.tags ?? [],\n };\n}\n\nexport function normalizeStylesheetDependencies(\n dependencies: Array<string | StylesheetDependency> | undefined,\n): StylesheetDependency[] {\n return (dependencies ?? []).map((dependency) =>\n typeof dependency === 'string' ? { id: dependency } : dependency,\n );\n}\n\nexport function composeStylePreprocessors(\n preprocessors: Array<StylePreprocessor | false | null | undefined>,\n): StylePreprocessor | undefined {\n const active = preprocessors.filter(\n (preprocessor): preprocessor is StylePreprocessor => !!preprocessor,\n );\n\n if (!active.length) {\n return undefined;\n }\n\n return (code, filename, context) => {\n let current = normalizeStylesheetTransformResult(undefined, code);\n\n for (const preprocessor of active) {\n const next = normalizeStylesheetTransformResult(\n preprocessor(current.code, filename, context),\n current.code,\n );\n current = {\n code: next.code,\n dependencies: [\n ...(current.dependencies ?? []),\n ...(next.dependencies ?? []),\n ],\n diagnostics: [\n ...(current.diagnostics ?? []),\n ...(next.diagnostics ?? []),\n ],\n tags: [...(current.tags ?? []), ...(next.tags ?? [])],\n };\n }\n\n return current;\n };\n}\n"],"mappings":";AAkCA,SAAgB,mCACd,OACA,cAC2B;AAC3B,KAAI,SAAS,KACX,QAAO,EAAE,MAAM,cAAc;AAG/B,KAAI,OAAO,UAAU,SACnB,QAAO,EAAE,MAAM,OAAO;AAGxB,QAAO;EACL,MAAM,MAAM,QAAQ;EACpB,cAAc,MAAM,gBAAgB,EAAE;EACtC,aAAa,MAAM,eAAe,EAAE;EACpC,MAAM,MAAM,QAAQ,EAAE;EACvB;;AAGH,SAAgB,gCACd,cACwB;AACxB,SAAQ,gBAAgB,EAAE,EAAE,KAAK,eAC/B,OAAO,eAAe,WAAW,EAAE,IAAI,YAAY,GAAG,WACvD;;AAGH,SAAgB,0BACd,eAC+B;CAC/B,MAAM,SAAS,cAAc,QAC1B,iBAAoD,CAAC,CAAC,aACxD;AAED,KAAI,CAAC,OAAO,OACV;AAGF,SAAQ,MAAM,UAAU,YAAY;EAClC,IAAI,UAAU,mCAAmC,KAAA,GAAW,KAAK;AAEjE,OAAK,MAAM,gBAAgB,QAAQ;GACjC,MAAM,OAAO,mCACX,aAAa,QAAQ,MAAM,UAAU,QAAQ,EAC7C,QAAQ,KACT;AACD,aAAU;IACR,MAAM,KAAK;IACX,cAAc,CACZ,GAAI,QAAQ,gBAAgB,EAAE,EAC9B,GAAI,KAAK,gBAAgB,EAAE,CAC5B;IACD,aAAa,CACX,GAAI,QAAQ,eAAe,EAAE,EAC7B,GAAI,KAAK,eAAe,EAAE,CAC3B;IACD,MAAM,CAAC,GAAI,QAAQ,QAAQ,EAAE,EAAG,GAAI,KAAK,QAAQ,EAAE,CAAE;IACtD;;AAGH,SAAO"}
@@ -1,4 +1,4 @@
1
- import type { StylePreprocessor } from "@analogjs/vite-plugin-angular";
1
+ import type { StylePreprocessor } from "./style-preprocessor.js";
2
2
  export type TailwindPreprocessorMode = "auto" | "disabled" | {
3
3
  prefix: string;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-preprocessor.js","names":[],"sources":["../../../src/lib/tailwind-preprocessor.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport path from 'node:path';\n\nimport type { StylePreprocessor } from '@analogjs/vite-plugin-angular';\nimport { debugTailwind } from './utils/debug.js';\n\nexport type TailwindPreprocessorMode = 'auto' | 'disabled' | { prefix: string };\n\nexport interface TailwindPreprocessorOptions {\n /** Absolute path to the Tailwind root CSS file that imports `tailwindcss`. */\n tailwindRootCss: string;\n\n /**\n * Controls whether the preprocessor auto-detects, disables, or manually\n * overrides the Tailwind prefix for a given file.\n */\n mode?:\n | TailwindPreprocessorMode\n | ((filename: string) => TailwindPreprocessorMode);\n\n /**\n * Optional predicate to override the default `@reference` injection behavior.\n */\n shouldInject?: (\n code: string,\n filename: string,\n resolvedPrefix: string | null,\n ) => boolean;\n}\n\n/**\n * Creates a stylesheet preprocessor that injects Tailwind v4 `@reference`\n * directives into Angular component styles when needed. The Tailwind prefix is\n * detected from the configured root CSS file.\n */\nexport function tailwindPreprocessor(\n options: TailwindPreprocessorOptions,\n): StylePreprocessor {\n const { tailwindRootCss, mode: modeOption = 'auto', shouldInject } = options;\n let rootPrefix: string | undefined;\n\n debugTailwind('configured', { tailwindRootCss, mode: modeOption });\n\n return (code: string, filename: string): string => {\n if (code.includes('@reference')) {\n debugTailwind('skip (already has @reference)', { filename });\n return code;\n }\n\n const resolvedMode =\n typeof modeOption === 'function' ? modeOption(filename) : modeOption;\n\n if (resolvedMode === 'disabled') {\n debugTailwind('skip (mode disabled)', { filename });\n return code;\n }\n\n const resolvedPrefix =\n typeof resolvedMode === 'object' ? resolvedMode.prefix : getRootPrefix();\n const isRootFile =\n path.resolve(filename) === path.resolve(tailwindRootCss) ||\n /@import\\s+[\"']tailwindcss[\"']/.test(code);\n const hasTailwindUsage = resolvedPrefix\n ? code.includes(`${resolvedPrefix}:`)\n : false;\n const shouldAddReference = shouldInject\n ? shouldInject(code, filename, resolvedPrefix)\n : hasTailwindUsage && !isRootFile;\n\n if (!shouldAddReference || !resolvedPrefix) {\n debugTailwind('skip (no injection needed)', {\n filename,\n resolvedPrefix,\n isRootFile,\n hasTailwindUsage,\n });\n return code;\n }\n\n const refPath = path\n .relative(path.dirname(filename), tailwindRootCss)\n .replace(/\\\\/g, '/');\n debugTailwind('injected @reference', { filename, refPath });\n\n return `@reference \"${refPath}\";\\n${code}`;\n };\n\n function getRootPrefix(): string | null {\n if (rootPrefix === undefined) {\n rootPrefix = extractTailwindPrefix(\n readFileSync(tailwindRootCss, 'utf-8'),\n );\n }\n\n return rootPrefix;\n }\n}\n\nfunction extractTailwindPrefix(code: string): string | null {\n const prefixMatch = code.match(\n /@import\\s+[\"']tailwindcss[\"']\\s+prefix\\(\\s*([^)\\s;]+)\\s*\\)/i,\n );\n\n return prefixMatch?.[1]?.trim() ?? null;\n}\n"],"mappings":";;;;;;;;;AAmCA,SAAgB,qBACd,SACmB;CACnB,MAAM,EAAE,iBAAiB,MAAM,aAAa,QAAQ,iBAAiB;CACrE,IAAI;AAEJ,eAAc,cAAc;EAAE;EAAiB,MAAM;EAAY,CAAC;AAElE,SAAQ,MAAc,aAA6B;AACjD,MAAI,KAAK,SAAS,aAAa,EAAE;AAC/B,iBAAc,iCAAiC,EAAE,UAAU,CAAC;AAC5D,UAAO;;EAGT,MAAM,eACJ,OAAO,eAAe,aAAa,WAAW,SAAS,GAAG;AAE5D,MAAI,iBAAiB,YAAY;AAC/B,iBAAc,wBAAwB,EAAE,UAAU,CAAC;AACnD,UAAO;;EAGT,MAAM,iBACJ,OAAO,iBAAiB,WAAW,aAAa,SAAS,eAAe;EAC1E,MAAM,aACJ,KAAK,QAAQ,SAAS,KAAK,KAAK,QAAQ,gBAAgB,IACxD,gCAAgC,KAAK,KAAK;EAC5C,MAAM,mBAAmB,iBACrB,KAAK,SAAS,GAAG,eAAe,GAAG,GACnC;AAKJ,MAAI,EAJuB,eACvB,aAAa,MAAM,UAAU,eAAe,GAC5C,oBAAoB,CAAC,eAEE,CAAC,gBAAgB;AAC1C,iBAAc,8BAA8B;IAC1C;IACA;IACA;IACA;IACD,CAAC;AACF,UAAO;;EAGT,MAAM,UAAU,KACb,SAAS,KAAK,QAAQ,SAAS,EAAE,gBAAgB,CACjD,QAAQ,OAAO,IAAI;AACtB,gBAAc,uBAAuB;GAAE;GAAU;GAAS,CAAC;AAE3D,SAAO,eAAe,QAAQ,MAAM;;CAGtC,SAAS,gBAA+B;AACtC,MAAI,eAAe,KAAA,EACjB,cAAa,sBACX,aAAa,iBAAiB,QAAQ,CACvC;AAGH,SAAO;;;AAIX,SAAS,sBAAsB,MAA6B;AAK1D,QAJoB,KAAK,MACvB,8DACD,GAEoB,IAAI,MAAM,IAAI"}
1
+ {"version":3,"file":"tailwind-preprocessor.js","names":[],"sources":["../../../src/lib/tailwind-preprocessor.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport path from 'node:path';\n\nimport type { StylePreprocessor } from './style-preprocessor.js';\nimport { debugTailwind } from './utils/debug.js';\n\nexport type TailwindPreprocessorMode = 'auto' | 'disabled' | { prefix: string };\n\nexport interface TailwindPreprocessorOptions {\n /** Absolute path to the Tailwind root CSS file that imports `tailwindcss`. */\n tailwindRootCss: string;\n\n /**\n * Controls whether the preprocessor auto-detects, disables, or manually\n * overrides the Tailwind prefix for a given file.\n */\n mode?:\n | TailwindPreprocessorMode\n | ((filename: string) => TailwindPreprocessorMode);\n\n /**\n * Optional predicate to override the default `@reference` injection behavior.\n */\n shouldInject?: (\n code: string,\n filename: string,\n resolvedPrefix: string | null,\n ) => boolean;\n}\n\n/**\n * Creates a stylesheet preprocessor that injects Tailwind v4 `@reference`\n * directives into Angular component styles when needed. The Tailwind prefix is\n * detected from the configured root CSS file.\n */\nexport function tailwindPreprocessor(\n options: TailwindPreprocessorOptions,\n): StylePreprocessor {\n const { tailwindRootCss, mode: modeOption = 'auto', shouldInject } = options;\n let rootPrefix: string | undefined;\n\n debugTailwind('configured', { tailwindRootCss, mode: modeOption });\n\n return (code: string, filename: string): string => {\n if (code.includes('@reference')) {\n debugTailwind('skip (already has @reference)', { filename });\n return code;\n }\n\n const resolvedMode =\n typeof modeOption === 'function' ? modeOption(filename) : modeOption;\n\n if (resolvedMode === 'disabled') {\n debugTailwind('skip (mode disabled)', { filename });\n return code;\n }\n\n const resolvedPrefix =\n typeof resolvedMode === 'object' ? resolvedMode.prefix : getRootPrefix();\n const isRootFile =\n path.resolve(filename) === path.resolve(tailwindRootCss) ||\n /@import\\s+[\"']tailwindcss[\"']/.test(code);\n const hasTailwindUsage = resolvedPrefix\n ? code.includes(`${resolvedPrefix}:`)\n : false;\n const shouldAddReference = shouldInject\n ? shouldInject(code, filename, resolvedPrefix)\n : hasTailwindUsage && !isRootFile;\n\n if (!shouldAddReference || !resolvedPrefix) {\n debugTailwind('skip (no injection needed)', {\n filename,\n resolvedPrefix,\n isRootFile,\n hasTailwindUsage,\n });\n return code;\n }\n\n const refPath = path\n .relative(path.dirname(filename), tailwindRootCss)\n .replace(/\\\\/g, '/');\n debugTailwind('injected @reference', { filename, refPath });\n\n return `@reference \"${refPath}\";\\n${code}`;\n };\n\n function getRootPrefix(): string | null {\n if (rootPrefix === undefined) {\n rootPrefix = extractTailwindPrefix(\n readFileSync(tailwindRootCss, 'utf-8'),\n );\n }\n\n return rootPrefix;\n }\n}\n\nfunction extractTailwindPrefix(code: string): string | null {\n const prefixMatch = code.match(\n /@import\\s+[\"']tailwindcss[\"']\\s+prefix\\(\\s*([^)\\s;]+)\\s*\\)/i,\n );\n\n return prefixMatch?.[1]?.trim() ?? null;\n}\n"],"mappings":";;;;;;;;;AAmCA,SAAgB,qBACd,SACmB;CACnB,MAAM,EAAE,iBAAiB,MAAM,aAAa,QAAQ,iBAAiB;CACrE,IAAI;AAEJ,eAAc,cAAc;EAAE;EAAiB,MAAM;EAAY,CAAC;AAElE,SAAQ,MAAc,aAA6B;AACjD,MAAI,KAAK,SAAS,aAAa,EAAE;AAC/B,iBAAc,iCAAiC,EAAE,UAAU,CAAC;AAC5D,UAAO;;EAGT,MAAM,eACJ,OAAO,eAAe,aAAa,WAAW,SAAS,GAAG;AAE5D,MAAI,iBAAiB,YAAY;AAC/B,iBAAc,wBAAwB,EAAE,UAAU,CAAC;AACnD,UAAO;;EAGT,MAAM,iBACJ,OAAO,iBAAiB,WAAW,aAAa,SAAS,eAAe;EAC1E,MAAM,aACJ,KAAK,QAAQ,SAAS,KAAK,KAAK,QAAQ,gBAAgB,IACxD,gCAAgC,KAAK,KAAK;EAC5C,MAAM,mBAAmB,iBACrB,KAAK,SAAS,GAAG,eAAe,GAAG,GACnC;AAKJ,MAAI,EAJuB,eACvB,aAAa,MAAM,UAAU,eAAe,GAC5C,oBAAoB,CAAC,eAEE,CAAC,gBAAgB;AAC1C,iBAAc,8BAA8B;IAC1C;IACA;IACA;IACA;IACD,CAAC;AACF,UAAO;;EAGT,MAAM,UAAU,KACb,SAAS,KAAK,QAAQ,SAAS,EAAE,gBAAgB,CACjD,QAAQ,OAAO,IAAI;AACtB,gBAAc,uBAAuB;GAAE;GAAU;GAAS,CAAC;AAE3D,SAAO,eAAe,QAAQ,MAAM;;CAGtC,SAAS,gBAA+B;AACtC,MAAI,eAAe,KAAA,EACjB,cAAa,sBACX,aAAa,iBAAiB,QAAQ,CACvC;AAGH,SAAO;;;AAIX,SAAS,sBAAsB,MAA6B;AAK1D,QAJoB,KAAK,MACvB,8DACD,GAEoB,IAAI,MAAM,IAAI"}
@@ -3,7 +3,8 @@ export declare const debugRoutes: unknown;
3
3
  export declare const debugContent: unknown;
4
4
  export declare const debugTypedRouter: unknown;
5
5
  export declare const debugTailwind: unknown;
6
- export type DebugScope = "analog:*" | "analog:platform" | "analog:platform:*" | "analog:platform:routes" | "analog:platform:content" | "analog:platform:typed-router" | "analog:platform:tailwind" | "analog:angular:*" | "analog:angular:hmr" | "analog:angular:styles" | "analog:angular:compiler" | "analog:angular:compilation-api" | "analog:angular:tailwind" | "analog:nitro" | "analog:nitro:*" | "analog:nitro:ssr" | "analog:nitro:prerender" | (string & {});
6
+ export declare const debugStylePipeline: unknown;
7
+ export type DebugScope = "analog:*" | "analog:platform" | "analog:platform:*" | "analog:platform:routes" | "analog:platform:content" | "analog:platform:typed-router" | "analog:platform:tailwind" | "analog:platform:style-pipeline" | "analog:angular:*" | "analog:angular:hmr" | "analog:angular:styles" | "analog:angular:compiler" | "analog:angular:compilation-api" | "analog:angular:tailwind" | "analog:angular:style-pipeline" | "analog:nitro" | "analog:nitro:*" | "analog:nitro:ssr" | "analog:nitro:prerender" | (string & {});
7
8
  export type DebugMode = "build" | "dev";
8
9
  export interface DebugModeOptions {
9
10
  scopes?: boolean | DebugScope[];
@@ -14,7 +14,8 @@ var harness = createDebugHarness({
14
14
  debugRoutes,
15
15
  debugContent,
16
16
  debugTypedRouter,
17
- debugTailwind
17
+ debugTailwind,
18
+ createDebug("analog:platform:style-pipeline")
18
19
  ], debugInstances]
19
20
  });
20
21
  var applyDebugOption = harness.applyDebugOption;
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","names":[],"sources":["../../../../src/lib/utils/debug.ts"],"sourcesContent":["import { createDebug } from 'obug';\nimport { debugInstances as nitroDebugInstances } from '@analogjs/vite-plugin-nitro/internal';\nimport { createDebugHarness } from './debug-harness.js';\n\nexport const debugPlatform = createDebug('analog:platform');\nexport const debugRoutes = createDebug('analog:platform:routes');\nexport const debugContent = createDebug('analog:platform:content');\nexport const debugTypedRouter = createDebug('analog:platform:typed-router');\nexport const debugTailwind = createDebug('analog:platform:tailwind');\n\nconst platformDebugInstances = [\n debugPlatform,\n debugRoutes,\n debugContent,\n debugTypedRouter,\n debugTailwind,\n];\n\nexport type DebugScope =\n | 'analog:*'\n | 'analog:platform'\n | 'analog:platform:*'\n | 'analog:platform:routes'\n | 'analog:platform:content'\n | 'analog:platform:typed-router'\n | 'analog:platform:tailwind'\n | 'analog:angular:*'\n | 'analog:angular:hmr'\n | 'analog:angular:styles'\n | 'analog:angular:compiler'\n | 'analog:angular:compilation-api'\n | 'analog:angular:tailwind'\n | 'analog:nitro'\n | 'analog:nitro:*'\n | 'analog:nitro:ssr'\n | 'analog:nitro:prerender'\n | (string & {});\n\nexport type DebugMode = 'build' | 'dev';\n\nexport interface DebugModeOptions {\n scopes?: boolean | DebugScope[];\n mode?: DebugMode;\n /**\n * Write debug output to log files under `tmp/debug/` in the workspace root.\n * - `true` or `'single'` — all output to `tmp/debug/analog.log`\n * - `'scoped'` — one file per scope, e.g. `tmp/debug/analog.angular.hmr.log`\n */\n logFile?: boolean | 'single' | 'scoped';\n}\n\nexport type DebugOption =\n | boolean\n | DebugScope[]\n | DebugModeOptions\n | DebugModeOptions[];\n\nconst harness = createDebugHarness({\n fallbackNamespace: 'analog:*',\n instanceGroups: [platformDebugInstances, nitroDebugInstances],\n});\n\nexport const applyDebugOption: (\n debug: DebugOption | undefined,\n workspaceRoot?: string,\n) => void = harness.applyDebugOption;\nexport const activateDeferredDebug: (command: 'build' | 'serve') => void =\n harness.activateDeferredDebug;\nexport const _resetDeferredDebug: () => void = harness._resetDeferredDebug;\n"],"mappings":";;;;AAIA,IAAa,gBAAgB,YAAY,kBAAkB;AAC3D,IAAa,cAAc,YAAY,yBAAyB;AAChE,IAAa,eAAe,YAAY,0BAA0B;AAClE,IAAa,mBAAmB,YAAY,+BAA+B;AAC3E,IAAa,gBAAgB,YAAY,2BAA2B;AAiDpE,IAAM,UAAU,mBAAmB;CACjC,mBAAmB;CACnB,gBAAgB,CAjDa;EAC7B;EACA;EACA;EACA;EACA;EACD,EA2C0C,eAAoB;CAC9D,CAAC;AAEF,IAAa,mBAGD,QAAQ;AACpB,IAAa,wBACX,QAAQ;AACqC,QAAQ"}
1
+ {"version":3,"file":"debug.js","names":[],"sources":["../../../../src/lib/utils/debug.ts"],"sourcesContent":["import { createDebug } from 'obug';\nimport { debugInstances as nitroDebugInstances } from '@analogjs/vite-plugin-nitro/internal';\nimport { createDebugHarness } from './debug-harness.js';\n\nexport const debugPlatform = createDebug('analog:platform');\nexport const debugRoutes = createDebug('analog:platform:routes');\nexport const debugContent = createDebug('analog:platform:content');\nexport const debugTypedRouter = createDebug('analog:platform:typed-router');\nexport const debugTailwind = createDebug('analog:platform:tailwind');\nexport const debugStylePipeline = createDebug('analog:platform:style-pipeline');\n\nconst platformDebugInstances = [\n debugPlatform,\n debugRoutes,\n debugContent,\n debugTypedRouter,\n debugTailwind,\n debugStylePipeline,\n];\n\nexport type DebugScope =\n | 'analog:*'\n | 'analog:platform'\n | 'analog:platform:*'\n | 'analog:platform:routes'\n | 'analog:platform:content'\n | 'analog:platform:typed-router'\n | 'analog:platform:tailwind'\n | 'analog:platform:style-pipeline'\n | 'analog:angular:*'\n | 'analog:angular:hmr'\n | 'analog:angular:styles'\n | 'analog:angular:compiler'\n | 'analog:angular:compilation-api'\n | 'analog:angular:tailwind'\n | 'analog:angular:style-pipeline'\n | 'analog:nitro'\n | 'analog:nitro:*'\n | 'analog:nitro:ssr'\n | 'analog:nitro:prerender'\n | (string & {});\n\nexport type DebugMode = 'build' | 'dev';\n\nexport interface DebugModeOptions {\n scopes?: boolean | DebugScope[];\n mode?: DebugMode;\n /**\n * Write debug output to log files under `tmp/debug/` in the workspace root.\n * - `true` or `'single'` — all output to `tmp/debug/analog.log`\n * - `'scoped'` — one file per scope, e.g. `tmp/debug/analog.angular.hmr.log`\n */\n logFile?: boolean | 'single' | 'scoped';\n}\n\nexport type DebugOption =\n | boolean\n | DebugScope[]\n | DebugModeOptions\n | DebugModeOptions[];\n\nconst harness = createDebugHarness({\n fallbackNamespace: 'analog:*',\n instanceGroups: [platformDebugInstances, nitroDebugInstances],\n});\n\nexport const applyDebugOption: (\n debug: DebugOption | undefined,\n workspaceRoot?: string,\n) => void = harness.applyDebugOption;\nexport const activateDeferredDebug: (command: 'build' | 'serve') => void =\n harness.activateDeferredDebug;\nexport const _resetDeferredDebug: () => void = harness._resetDeferredDebug;\n"],"mappings":";;;;AAIA,IAAa,gBAAgB,YAAY,kBAAkB;AAC3D,IAAa,cAAc,YAAY,yBAAyB;AAChE,IAAa,eAAe,YAAY,0BAA0B;AAClE,IAAa,mBAAmB,YAAY,+BAA+B;AAC3E,IAAa,gBAAgB,YAAY,2BAA2B;AAqDpE,IAAM,UAAU,mBAAmB;CACjC,mBAAmB;CACnB,gBAAgB,CApDa;EAC7B;EACA;EACA;EACA;EACA;EAPgC,YAAY,iCAAiC;EAS9E,EA6C0C,eAAoB;CAC9D,CAAC;AAEF,IAAa,mBAGD,QAAQ;AACpB,IAAa,wBACX,QAAQ;AACqC,QAAQ"}
@@ -0,0 +1 @@
1
+ export * from "./lib/style-pipeline.js";
@@ -0,0 +1,2 @@
1
+ import { defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, resolveStylePipelinePlugins } from "./lib/style-pipeline.js";
2
+ export { defineAngularStylePipeline, defineAngularStylePipelinePlugins, defineStylePipeline, defineStylePipelinePlugins, resolveStylePipelinePlugins };
@@ -0,0 +1 @@
1
+ export * from "./lib/style-preprocessor.js";
@@ -0,0 +1,2 @@
1
+ import { composeStylePreprocessors, normalizeStylesheetDependencies, normalizeStylesheetTransformResult } from "./lib/style-preprocessor.js";
2
+ export { composeStylePreprocessors, normalizeStylesheetDependencies, normalizeStylesheetTransformResult };