@blotch/rsbuild-plugin-angular-lynx 0.0.0-stage → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -2
- package/dist/angular-rebuild-coordinator.d.ts +70 -0
- package/dist/angular-rebuild-coordinator.test.d.ts +1 -0
- package/dist/angular-webpack-plugin.d.ts +127 -0
- package/dist/angular-webpack-plugin.test.d.ts +1 -0
- package/dist/angular.d.ts +31 -0
- package/dist/build-schema-source-file-cache.d.ts +20 -0
- package/dist/build-schema-source-file-cache.test.d.ts +1 -0
- package/dist/component-styles-cache.d.ts +43 -0
- package/dist/component-styles-cache.test.d.ts +1 -0
- package/dist/css.d.ts +13 -0
- package/dist/css.test.d.ts +1 -0
- package/dist/entry.d.ts +11 -0
- package/dist/entry.test.d.ts +1 -0
- package/dist/generator.d.ts +2 -0
- package/dist/generator.test.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1510 -0
- package/dist/index.js.LICENSE.txt +7 -0
- package/dist/is-lynx-unknown-element-message.d.ts +12 -0
- package/dist/is-lynx-unknown-element-message.test.d.ts +1 -0
- package/dist/layers.d.ts +12 -0
- package/dist/layers.test.d.ts +1 -0
- package/dist/loaders/ignore-css-loader.d.ts +7 -0
- package/dist/loaders/ignore-css-loader.js +7 -0
- package/dist/loaders/ignore-css-loader.test.d.ts +1 -0
- package/dist/loaders/thread-globals-loader.d.ts +8 -0
- package/dist/loaders/thread-globals-loader.js +6 -0
- package/dist/loaders/thread-globals-loader.test.d.ts +1 -0
- package/dist/logger/dev-logger-middleware.d.ts +12 -0
- package/dist/logger/dev-logger-middleware.test.d.ts +1 -0
- package/dist/logger/dev-logger.d.ts +2 -0
- package/dist/logger/dev-logger.test.d.ts +1 -0
- package/dist/lynx-diagnostics.d.ts +38 -0
- package/dist/lynx-diagnostics.test.d.ts +1 -0
- package/dist/lynx-process-eval-result-runtime-module.d.ts +21 -0
- package/dist/lynx-process-eval-result-runtime-module.test.d.ts +1 -0
- package/dist/plugin-angular-lynx.d.ts +3 -0
- package/dist/plugin-angular-lynx.test.d.ts +1 -0
- package/dist/polyfills.js +122 -0
- package/dist/seed-compilation-source-files.d.ts +22 -0
- package/dist/seed-compilation-source-files.test.d.ts +1 -0
- package/dist/split-chunks.d.ts +3 -0
- package/dist/split-chunks.test.d.ts +1 -0
- package/dist/tailwind.d.ts +2 -0
- package/dist/tailwind.test.d.ts +1 -0
- package/dist/transform-module.d.ts +31 -0
- package/dist/transform-module.test.d.ts +1 -0
- package/dist/utils/angular/angular-config.d.ts +3 -0
- package/dist/utils/angular/angular-config.test.d.ts +1 -0
- package/dist/utils/angular/component-scope-id.d.ts +12 -0
- package/dist/utils/angular/component-scope-id.test.d.ts +1 -0
- package/dist/utils/angular/component-style-bundler.d.ts +19 -0
- package/dist/utils/angular/component-style-bundler.test.d.ts +1 -0
- package/dist/utils/angular/env.d.ts +2 -0
- package/dist/utils/angular/env.test.d.ts +1 -0
- package/dist/utils/angular/find-up.d.ts +8 -0
- package/dist/utils/angular/find-up.test.d.ts +1 -0
- package/dist/utils/angular/normalize-cache.d.ts +22 -0
- package/dist/utils/angular/normalize-cache.test.d.ts +1 -0
- package/dist/utils/angular/options.d.ts +82 -0
- package/dist/utils/angular/options.test.d.ts +1 -0
- package/dist/utils/angular/read-workspace.d.ts +7 -0
- package/dist/utils/angular/read-workspace.test.d.ts +1 -0
- package/dist/utils/angular/resolve-pages.d.ts +13 -0
- package/dist/utils/angular/resolve-pages.test.d.ts +1 -0
- package/dist/utils/inject-lynx-schema.d.ts +10 -0
- package/dist/utils/inject-lynx-schema.test.d.ts +1 -0
- package/dist/utils/options.d.ts +31 -0
- package/dist/utils/options.test.d.ts +1 -0
- package/dist/utils/strip-template-whitespace.d.ts +34 -0
- package/dist/utils/strip-template-whitespace.test.d.ts +1 -0
- package/dist/worklet-transform.d.ts +7 -0
- package/dist/worklet-transform.test.d.ts +1 -0
- package/package.json +73 -4
- package/patch/patch-angular-build.cjs +27 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type PluginAngularLynxOptions = {
|
|
2
|
+
customCSSInheritanceList?: string[] | undefined;
|
|
3
|
+
debugInfoOutside?: boolean;
|
|
4
|
+
defaultDisplayLinear?: boolean;
|
|
5
|
+
defaultOverflowVisible?: boolean;
|
|
6
|
+
enableA11y?: boolean;
|
|
7
|
+
enableAccessibilityElement?: boolean;
|
|
8
|
+
enableCSSInheritance?: boolean;
|
|
9
|
+
enableCSSInvalidation?: boolean;
|
|
10
|
+
enableCSSSelector?: boolean;
|
|
11
|
+
enableICU?: boolean;
|
|
12
|
+
enableNewGesture?: boolean;
|
|
13
|
+
enableParallelElement?: boolean;
|
|
14
|
+
enableRemoveCSSScope?: boolean;
|
|
15
|
+
enableSSR?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Build multiple angular.json projects as separate Lynx pages.
|
|
18
|
+
* Each project's `browser` field becomes a named entry producing its own .lynx.bundle.
|
|
19
|
+
*
|
|
20
|
+
* - `string[]` — list of angular.json project names to build
|
|
21
|
+
* - `'all'` — build all `application`-type projects in the workspace
|
|
22
|
+
*
|
|
23
|
+
* When omitted, uses `source.entry` from lynx.config.ts (single or multi-entry).
|
|
24
|
+
*/
|
|
25
|
+
pages?: string[] | 'all' | undefined;
|
|
26
|
+
pipelineSchedulerConfig?: number;
|
|
27
|
+
removeDescendantSelectorScope?: boolean;
|
|
28
|
+
targetSdkVersion?: string;
|
|
29
|
+
experimental_isLazyBundle?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const normalizeOptions: (options?: Partial<PluginAngularLynxOptions>) => Required<PluginAngularLynxOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips leading and trailing newline-induced whitespace from single-line text
|
|
3
|
+
* nodes in Angular component templates.
|
|
4
|
+
*
|
|
5
|
+
* Angular's template compiler (`preserveWhitespaces: false`, the default)
|
|
6
|
+
* condenses consecutive whitespace but does NOT strip the edge spaces produced
|
|
7
|
+
* by template indentation. A block-level text element written naturally:
|
|
8
|
+
*
|
|
9
|
+
* <text class="...">
|
|
10
|
+
* The Quick Brown Fox
|
|
11
|
+
* </text>
|
|
12
|
+
*
|
|
13
|
+
* compiles to `ɵɵtext(1, " The Quick Brown Fox ")` — the newlines become
|
|
14
|
+
* single spaces. Lynx has no HTML whitespace-collapsing model, so those edge
|
|
15
|
+
* spaces render literally, producing a visible leading/trailing indent.
|
|
16
|
+
*
|
|
17
|
+
* This transform runs on the raw template source BEFORE Angular's compiler sees
|
|
18
|
+
* it (in `buildLynxSchemaSourceFileCache`), so the compiler receives:
|
|
19
|
+
*
|
|
20
|
+
* <text class="...">The Quick Brown Fox</text>
|
|
21
|
+
*
|
|
22
|
+
* and emits `ɵɵtext(1, "The Quick Brown Fox")` — clean, no extra spaces.
|
|
23
|
+
*
|
|
24
|
+
* Why this is safe for inline text:
|
|
25
|
+
* <text>Hello <text style="color:red">world</text> again</text>
|
|
26
|
+
*
|
|
27
|
+
* The text nodes "Hello " and " again" sit on the SAME line as their sibling
|
|
28
|
+
* elements — no surrounding newlines — so the regex never matches them and their
|
|
29
|
+
* inter-word spaces are preserved.
|
|
30
|
+
*
|
|
31
|
+
* Limitation: external templates (`templateUrl`) are read by Angular's compiler
|
|
32
|
+
* host directly from disk and are not reachable from this transform path.
|
|
33
|
+
*/
|
|
34
|
+
export declare const stripTemplateWhitespace: (source: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects functions with a `"main thread"` directive and wraps them with
|
|
3
|
+
* `mainThreadFn()` at build time. This matches React Lynx's worklet directive
|
|
4
|
+
* pattern — users write a string directive as the first statement, and the
|
|
5
|
+
* build transform handles registration.
|
|
6
|
+
*/
|
|
7
|
+
export declare const transformWorklets: (code: string, filename: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blotch/rsbuild-plugin-angular-lynx",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "22.2.0",
|
|
4
|
+
"description": "Rsbuild plugin for building AngularLynx applications",
|
|
5
|
+
"homepage": "https://github.com/Blotch-Smart-Frames/AngularLynx#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/Blotch-Smart-Frames/AngularLynx/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Blotch-Smart-Frames/AngularLynx.git",
|
|
13
|
+
"directory": "packages/rsbuild-plugin-angular-lynx"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"patch"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "rslib build",
|
|
30
|
+
"dev": "rslib build --watch",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"test:coverage": "vitest run --coverage",
|
|
33
|
+
"test:ci:coverage": "vitest run --coverage",
|
|
34
|
+
"test:ui": "vitest --ui --coverage.enabled=true",
|
|
35
|
+
"lint": "oxlint .",
|
|
36
|
+
"lint:fix": "oxlint --fix .",
|
|
37
|
+
"format": "oxfmt --write .",
|
|
38
|
+
"format:check": "oxfmt --check .",
|
|
39
|
+
"cspell": "cspell .",
|
|
40
|
+
"postinstall": "node ./patch/patch-angular-build.cjs",
|
|
41
|
+
"publish:local": "yalc publish --push"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@lynx-js/css-extract-webpack-plugin": "^0.11.0",
|
|
45
|
+
"@lynx-js/rsbuild-plugin": "^0.1.3",
|
|
46
|
+
"@lynx-js/runtime-wrapper-webpack-plugin": "^0.2.4",
|
|
47
|
+
"@lynx-js/template-webpack-plugin": "^0.16.2",
|
|
48
|
+
"@lynx-js/webpack-runtime-globals": "^0.0.8",
|
|
49
|
+
"rsbuild-plugin-tailwindcss": "0.2.4",
|
|
50
|
+
"tiny-invariant": "^1.3.3"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@angular-devkit/build-angular": "^22.2.2",
|
|
54
|
+
"@angular-devkit/core": "^22.2.2",
|
|
55
|
+
"@angular/build": "^22.2.2",
|
|
56
|
+
"@rsbuild/core": "^2.2.9",
|
|
57
|
+
"@rslib/core": "^0.21.4",
|
|
58
|
+
"@rspack/core": "^2.2.8",
|
|
59
|
+
"@types/node": "^25.6.2",
|
|
60
|
+
"type-fest": "^5.6.0",
|
|
61
|
+
"typescript": "^6.0.3"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@angular-devkit/build-angular": "^22.2.0",
|
|
65
|
+
"@angular-devkit/core": "^22.2.0",
|
|
66
|
+
"@angular/build": "^22.2.0",
|
|
67
|
+
"@angular/localize": "^22.2.0",
|
|
68
|
+
"@lynx-js/rspeedy": "^0.18.0"
|
|
69
|
+
},
|
|
70
|
+
"peerDependenciesMeta": {
|
|
71
|
+
"@angular/localize": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { readFileSync, writeFileSync } = require('node:fs');
|
|
2
|
+
|
|
3
|
+
const main = () => {
|
|
4
|
+
const angularBuildPackageJson =
|
|
5
|
+
require.resolve('@angular/build/package.json');
|
|
6
|
+
const fileContentsJson = JSON.parse(
|
|
7
|
+
readFileSync(angularBuildPackageJson, 'utf8'),
|
|
8
|
+
);
|
|
9
|
+
// Angular 22.2 moved the transformer out of `src/tools/esbuild/`.
|
|
10
|
+
fileContentsJson.exports['./src/tools/javascript-transformer'] =
|
|
11
|
+
'./src/tools/javascript-transformer/index.js';
|
|
12
|
+
fileContentsJson.exports['./src/tools/angular/compilation'] =
|
|
13
|
+
'./src/tools/angular/compilation/index.js';
|
|
14
|
+
fileContentsJson.exports[
|
|
15
|
+
'./src/tools/esbuild/angular/file-reference-tracker'
|
|
16
|
+
] = './src/tools/esbuild/angular/file-reference-tracker.js';
|
|
17
|
+
fileContentsJson.exports[
|
|
18
|
+
'./src/tools/esbuild/angular/component-stylesheets'
|
|
19
|
+
] = './src/tools/esbuild/angular/component-stylesheets.js';
|
|
20
|
+
|
|
21
|
+
writeFileSync(
|
|
22
|
+
angularBuildPackageJson,
|
|
23
|
+
JSON.stringify(fileContentsJson, null, 2),
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
main();
|