@arcgis/lumina-compiler 5.0.0-next.58 → 5.0.0-next.59

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.
@@ -1,5 +1,5 @@
1
1
  import { CompilerContext } from '../context';
2
- export declare function addGlobalCss(context: CompilerContext): string;
2
+ export declare function addGlobalCss(context: Pick<CompilerContext, "_globalHydratedCssString" | "apiJsonComponents" | "dir" | "isInStorybook" | "options" | "shouldMinify" | "viteCommand">): string;
3
3
  export declare const defaultHydratedAttribute = "hydrated";
4
4
  /**
5
5
  * Auto-inject the CSS when in dev server or when building for CDN to remove the
@@ -8,7 +8,7 @@ export declare const defaultHydratedAttribute = "hydrated";
8
8
  *
9
9
  * @see https://discord.com/channels/1012791295170859069/1274527043614150708
10
10
  */
11
- export declare function getGlobalCssInjectionCode(globalCssString: string | undefined, context: CompilerContext): string;
11
+ export declare function getGlobalCssInjectionCode(globalCssString: string | undefined, context: Pick<CompilerContext, "_globalHydratedCssString" | "shouldMinify">): string;
12
12
  /**a
13
13
  * Get a CSS string that can be printed into a .css file
14
14
  *
@@ -8,7 +8,7 @@ import { ApiCustomElementDeclaration } from '@arcgis/api-extractor';
8
8
  * generate a small metadata structure for each component. This will be
9
9
  * inserted into the root index.ts file in the package
10
10
  */
11
- export declare function buildLoaderJs(context: CompilerContext): string;
11
+ export declare function buildLoaderJs(context: Pick<CompilerContext, "_globalHydratedCssString" | "apiJson" | "apiJsonComponents" | "dir" | "hmrEnabled" | "isInStorybook" | "options" | "privateApiJson" | "shouldMinify" | "viteCommand">): string;
12
12
  export declare const loaderDts = "import \"./index\";\nexport declare const defineCustomElements: import(\"@arcgis/lumina\").DefineCustomElements;";
13
13
  /**
14
14
  * For each component, build as compact definition as possible of all the public
@@ -7,7 +7,7 @@ import { WebTypesOptions } from './docs/webTypes/types';
7
7
  import { VsCodeDocOptions } from './docs/vsCodeCustomData/types';
8
8
  import { DependencyManagementOptions as BaseDependencyManagementOptions } from '@arcgis/components-build-utils';
9
9
  import { ApiJson, ApiModule, CopyDocDefinitions } from '@arcgis/api-extractor';
10
- import { LuminaApiExtractor } from './extractor/extractor';
10
+ import { LuminaApiExtractor } from './extractor/LuminaApiExtractor';
11
11
  /**
12
12
  * `useLumina()` returns an array of Vite plugins. The array additionally
13
13
  * has a `context` property for accessing the compiler context.
@@ -486,6 +486,10 @@ export type CssHandlingOptions = {
486
486
  * do not need a separate `<link>` tag. In the NPM build, users will need to
487
487
  * manually apply these styles as appropriate in their bundler (either via
488
488
  * import statement, or via `<link>` tag or etc).
489
+ *
490
+ * @example
491
+ * // If relative path is provided, it is relative to the root directory.
492
+ * "./src/styles/global.css"
489
493
  */
490
494
  globalStylesPath?: string;
491
495
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "5.0.0-next.58",
3
+ "version": "5.0.0-next.59",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
- "@arcgis/api-extractor": "5.0.0-next.58",
22
- "@arcgis/components-build-utils": "5.0.0-next.58",
23
- "@arcgis/toolkit": "~5.0.0-next.58",
21
+ "@arcgis/api-extractor": "5.0.0-next.59",
22
+ "@arcgis/components-build-utils": "5.0.0-next.59",
23
+ "@arcgis/toolkit": "~5.0.0-next.59",
24
24
  "chalk": "^5.4.1",
25
25
  "esbuild": "^0.25.12",
26
26
  "glob": "^11.0.3",
@@ -30,7 +30,7 @@
30
30
  "vite-plugin-dts": "^4.5.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@arcgis/lumina": "~5.0.0-next.58",
33
+ "@arcgis/lumina": "~5.0.0-next.59",
34
34
  "lit": "^3.3.0",
35
35
  "typescript": "~5.9.3",
36
36
  "vite": "^7.2.2",
@@ -1,31 +0,0 @@
1
- import { default as ts } from 'typescript';
2
- import { TransformResult } from 'vite';
3
- type SourceMap = Extract<NonNullable<TransformResult["map"]>, {
4
- file: string;
5
- }>;
6
- export type UndocumentedTypeScript = {
7
- readonly createSourceMapGenerator?: (host: ts.CompilerHost, basename: string, sourceRoot: string, dirname: string, compilerOptions: ts.CompilerOptions) => SourceMapGenerator;
8
- readonly createTextWriter?: (newLine: string) => EmitTextWriter;
9
- readonly getNewLineCharacter?: (options: ts.CompilerOptions) => string;
10
- readonly createPrinter: (
11
- /**
12
- * Printer has undocumented options for printing source maps:
13
- * https://github.com/microsoft/TypeScript/blob/7319968e90600102892a79142fb804bcbe384160/src/compiler/types.ts#L9689C18-L9707
14
- */
15
- options: ts.CompilerOptions & ts.PrinterOptions) => ReturnType<typeof ts.createPrinter> & UndocumentedPrinter;
16
- };
17
- type SourceMapGenerator = {
18
- readonly toJSON: () => SourceMap;
19
- };
20
- type UndocumentedPrinter = {
21
- readonly writeFile?: (writeFile: ts.SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined) => void;
22
- writeNode?(hint: ts.EmitHint, node: ts.TypeNode, sourceFile: undefined, output: EmitTextWriter): void;
23
- writeNode?(hint: ts.EmitHint, node: Node, sourceFile: ts.SourceFile, output: EmitTextWriter): void;
24
- };
25
- type EmitTextWriter = {
26
- readonly getText: () => string;
27
- readonly clear: () => void;
28
- };
29
- export declare const undocumentedTs: Required<UndocumentedTypeScript>;
30
- export declare function getPrinter(compilerOptions: ts.CompilerOptions): ReturnType<typeof ts.createPrinter> & UndocumentedPrinter;
31
- export {};