@blotch/rsbuild-plugin-angular-lynx 22.2.2 → 22.2.3
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 +1 -1
- package/dist/544.js +21 -0
- package/dist/angular-rebuild-coordinator.d.ts +1 -1
- package/dist/angular.d.ts +3 -2
- package/dist/background-entry.d.ts +96 -0
- package/dist/client/background-hot-updates.d.ts +50 -0
- package/dist/client/background-hot-updates.js +77 -0
- package/dist/client/background-hot-updates.test.d.ts +1 -0
- package/dist/client/css-hot-update.cjs +9 -0
- package/dist/client/css-hot-update.d.ts +44 -0
- package/dist/client/css-hot-update.js +42 -0
- package/dist/client/css-hot-update.test.d.ts +1 -0
- package/dist/client/hmr-background.js +16 -0
- package/dist/client/hmr-main-thread.js +9 -0
- package/dist/client/hmr-protocol.d.ts +74 -0
- package/dist/client/main-thread-hot-updates.d.ts +40 -0
- package/dist/client/main-thread-hot-updates.js +78 -0
- package/dist/client/main-thread-hot-updates.test.d.ts +1 -0
- package/dist/client/testing/test-context.d.ts +16 -0
- package/dist/component-styles-cache.d.ts +5 -35
- package/dist/component-styles.d.ts +73 -0
- package/dist/component-styles.test.d.ts +1 -0
- package/dist/cross-thread-transform.d.ts +38 -0
- package/dist/cross-thread-transform.test.d.ts +1 -0
- package/dist/css.d.ts +2 -2
- package/dist/entry.d.ts +23 -2
- package/dist/hot-updates.d.ts +67 -0
- package/dist/hot-updates.test.d.ts +1 -0
- package/dist/index.js +718 -168
- package/dist/layers.d.ts +6 -4
- package/dist/logger/dev-logger-middleware.d.ts +13 -7
- package/dist/logger/dev-logger.d.ts +13 -0
- package/dist/polyfills.js +56 -0
- package/dist/polyfills.test.d.ts +1 -0
- package/dist/pure-classes.d.ts +27 -0
- package/dist/pure-classes.test.d.ts +1 -0
- package/dist/resolve.d.ts +19 -0
- package/dist/resolve.test.d.ts +1 -0
- package/dist/split-chunks.d.ts +2 -2
- package/dist/styles/blur-view.css +16 -0
- package/dist/transform-module.d.ts +43 -17
- package/dist/utils/angular/component-scope-id.d.ts +5 -3
- package/dist/utils/options.d.ts +40 -1
- package/package.json +1 -2
- package/dist/loaders/thread-globals-loader.d.ts +0 -8
- package/dist/loaders/thread-globals-loader.js +0 -6
- /package/dist/{loaders/thread-globals-loader.test.d.ts → background-entry.test.d.ts} +0 -0
package/dist/layers.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { RsbuildPluginAPI } from '@lynx-js/rspeedy';
|
|
2
2
|
/**
|
|
3
|
-
* Webpack layer names for the dual-thread build. Each entry is
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Webpack layer names for the dual-thread build. Each entry is split into two
|
|
4
|
+
* webpack entries with different layers (entry.ts), and every module an entry
|
|
5
|
+
* reaches stays in its layer. The layer determines which SWC target (ES2015 vs
|
|
6
|
+
* ES2019), which `__MAIN_THREAD__` value and which thread-specific
|
|
7
|
+
* configuration (CSS extraction vs ignore, AMD wrapping vs plain) applies to
|
|
8
|
+
* the module.
|
|
7
9
|
*/
|
|
8
10
|
export declare const LAYERS: {
|
|
9
11
|
BACKGROUND: string;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
export declare const formatArg: (arg: unknown) => string;
|
|
3
|
-
export declare const getLogFilePath: () => string;
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Connect-style middleware that receives log batches from on-device and
|
|
4
|
+
* writes them to a log file. Rspeedy's TUI uses the alternate screen buffer,
|
|
5
|
+
* so stdout writes are hidden — a file + `tail -f` is more reliable.
|
|
7
6
|
*/
|
|
7
|
+
/** The dev server path the app posts its log entries to. */
|
|
8
|
+
export declare const DEV_LOGS_PATH = "/__dev_logs";
|
|
9
|
+
export declare const formatArg: (arg: unknown) => string;
|
|
8
10
|
/**
|
|
9
|
-
* Creates a connect-style middleware that handles POST /__dev_logs
|
|
10
|
-
* Other requests are passed through to the next
|
|
11
|
+
* Creates a connect-style middleware that handles POST /__dev_logs and writes
|
|
12
|
+
* the entries to `logFilePath`. Other requests are passed through to the next
|
|
13
|
+
* middleware.
|
|
14
|
+
*
|
|
15
|
+
* The file is created, or emptied, right away: each dev server start begins a
|
|
16
|
+
* fresh log, and `tail -f` can follow it before the first entry arrives.
|
|
11
17
|
*/
|
|
12
|
-
export declare const createDevLoggerMiddleware: () => ((req: IncomingMessage, res: ServerResponse, next: () => void) => void);
|
|
18
|
+
export declare const createDevLoggerMiddleware: (logFilePath: string) => ((req: IncomingMessage, res: ServerResponse, next: () => void) => void);
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import type { RsbuildPluginAPI } from '@lynx-js/rspeedy';
|
|
2
|
+
/**
|
|
3
|
+
* Receives `LynxLogger` entries from the app on the dev server itself, and
|
|
4
|
+
* writes them to `.dev-logs`. Also injects __DEV_LOG_URL__ at compile time so
|
|
5
|
+
* the runtime knows where to POST logs (rspack's __webpack_public_path__ isn't
|
|
6
|
+
* accessible as a globalThis property in Lynx's JS environment).
|
|
7
|
+
*
|
|
8
|
+
* The endpoint is a middleware on the dev server, at the origin the app loads
|
|
9
|
+
* its bundle from, rather than a server of its own on a port next to it. The
|
|
10
|
+
* phone can already reach that origin, and its port is the one rspeedy
|
|
11
|
+
* resolved: a second server had to guess its port when the bundle was
|
|
12
|
+
* compiled, and when that port was taken it moved to another one while the
|
|
13
|
+
* app kept posting to the first, so the logs were lost.
|
|
14
|
+
*/
|
|
2
15
|
export declare const applyDevLogger: (api: RsbuildPluginAPI) => void;
|
package/dist/polyfills.js
CHANGED
|
@@ -40,6 +40,62 @@ if ("u" < typeof AbortController) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
if ('function' != typeof Object.hasOwn) Object.hasOwn = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
43
|
+
const definePolyfillOverride = (proto, name, value)=>{
|
|
44
|
+
Object.defineProperty(proto, name, {
|
|
45
|
+
value,
|
|
46
|
+
writable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: false
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const definePolyfill = (proto, name, value)=>{
|
|
52
|
+
if (proto && 'function' != typeof proto[name]) definePolyfillOverride(proto, name, value);
|
|
53
|
+
};
|
|
54
|
+
const relativeIndex = function(index) {
|
|
55
|
+
const length = this.length;
|
|
56
|
+
let n = Math.trunc(Number(index)) || 0;
|
|
57
|
+
if (n < 0) n += length;
|
|
58
|
+
if (n < 0 || n >= length) return;
|
|
59
|
+
return 'string' == typeof this ? this.charAt(n) : this[n];
|
|
60
|
+
};
|
|
61
|
+
definePolyfill(Array.prototype, 'at', relativeIndex);
|
|
62
|
+
definePolyfill(String.prototype, 'at', function(index) {
|
|
63
|
+
return relativeIndex.call(String(this), index);
|
|
64
|
+
});
|
|
65
|
+
if ('function' == typeof Int8Array) definePolyfill(Object.getPrototypeOf(Int8Array.prototype), 'at', relativeIndex);
|
|
66
|
+
definePolyfill(Array.prototype, 'findLastIndex', function(predicate, thisArg) {
|
|
67
|
+
for(let i = this.length - 1; i >= 0; i--)if (predicate.call(thisArg, this[i], i, this)) return i;
|
|
68
|
+
return -1;
|
|
69
|
+
});
|
|
70
|
+
definePolyfill(Array.prototype, 'findLast', function(predicate, thisArg) {
|
|
71
|
+
for(let i = this.length - 1; i >= 0; i--)if (predicate.call(thisArg, this[i], i, this)) return this[i];
|
|
72
|
+
});
|
|
73
|
+
definePolyfill(String.prototype, 'replaceAll', function(search, replacement) {
|
|
74
|
+
const subject = String(this);
|
|
75
|
+
if (search instanceof RegExp) {
|
|
76
|
+
if (!search.global) throw new TypeError('replaceAll must be called with a global RegExp');
|
|
77
|
+
return subject.replace(search, replacement);
|
|
78
|
+
}
|
|
79
|
+
const needle = String(search);
|
|
80
|
+
const pattern = new RegExp(needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
|
|
81
|
+
return subject.replace(pattern, replacement);
|
|
82
|
+
});
|
|
83
|
+
if ("u" < typeof Intl) definePolyfillOverride(Number.prototype, 'toLocaleString', function(_locales, options) {
|
|
84
|
+
const value = Number(this);
|
|
85
|
+
if (Number.isNaN(value)) return 'NaN';
|
|
86
|
+
if (!Number.isFinite(value)) return value > 0 ? '∞' : '-∞';
|
|
87
|
+
const opts = options || {};
|
|
88
|
+
const min = opts.minimumFractionDigits ?? 0;
|
|
89
|
+
const max = Math.max(min, opts.maximumFractionDigits ?? Math.max(min, 3));
|
|
90
|
+
const fixed = Math.abs(value).toFixed(max);
|
|
91
|
+
const dot = fixed.indexOf('.');
|
|
92
|
+
let integer = dot < 0 ? fixed : fixed.slice(0, dot);
|
|
93
|
+
let fraction = dot < 0 ? '' : fixed.slice(dot + 1).replace(/0+$/, '');
|
|
94
|
+
while(fraction.length < min)fraction += '0';
|
|
95
|
+
if (false !== opts.useGrouping) integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
96
|
+
const sign = value < 0 && 0 !== Number(fixed) ? '-' : '';
|
|
97
|
+
return sign + integer + (fraction ? `.${fraction}` : '');
|
|
98
|
+
});
|
|
43
99
|
if ('function' != typeof Promise.allSettled) Promise.allSettled = (promises)=>Promise.all(Array.from(promises, (p)=>Promise.resolve(p).then((value)=>({
|
|
44
100
|
status: 'fulfilled',
|
|
45
101
|
value
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps each top-level class with private or static members in a pure IIFE,
|
|
3
|
+
* so a bundler can drop the classes nothing uses.
|
|
4
|
+
*
|
|
5
|
+
* The background layer compiles to ES2015 (layers.ts), so SWC lowers private
|
|
6
|
+
* and static class fields. A class declaration keeps its own statement, but the
|
|
7
|
+
* class expressions that bundled libraries are written in (`var X = class
|
|
8
|
+
* {…}`) become a sequence that assigns each private field's `WeakMap` to an
|
|
9
|
+
* outer variable: `var X = (_a = new WeakMap(), class {…})`. The assignment
|
|
10
|
+
* counts as a side effect, so rspack keeps every such class, and every import
|
|
11
|
+
* it uses, even when nothing uses the class. The runtime's own classes are
|
|
12
|
+
* like that (it uses `#private` fields throughout), which kept Angular's
|
|
13
|
+
* renderer and change detection in the background bundle.
|
|
14
|
+
*
|
|
15
|
+
* Angular's build already wraps a class whose static members are Angular's
|
|
16
|
+
* own (`ɵcmp`, `ɵfac` and so on) in `/*#__PURE__*\/ (() => {…})()`; this does
|
|
17
|
+
* the same for the rest. Inside the IIFE, the lowering's assignments are local
|
|
18
|
+
* and the call is marked pure. A class whose static members could have side
|
|
19
|
+
* effects of their own (anything but literals, functions and new collections)
|
|
20
|
+
* is left alone.
|
|
21
|
+
*
|
|
22
|
+
* @param code - The module's code, before SWC lowers it (and, for a `.ts`
|
|
23
|
+
* file, strips its types).
|
|
24
|
+
* @param filename - The module's path, for the parser.
|
|
25
|
+
* @returns The transformed code, or `code` itself when nothing applies.
|
|
26
|
+
*/
|
|
27
|
+
export declare const wrapPureClasses: (code: string, filename: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RsbuildPluginAPI } from '@lynx-js/rspeedy';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves `import`s to a package's ES module build.
|
|
4
|
+
*
|
|
5
|
+
* The Lynx build engine resolves every request with the conditions `lynx`,
|
|
6
|
+
* `import`, `require` and `browser`, whether it comes from an `import` or a
|
|
7
|
+
* `require()`. A package whose `exports` list `require` before any of the
|
|
8
|
+
* others then resolves to its CommonJS build even from an `import`. rxjs is
|
|
9
|
+
* one (`types`, `node`, `require`, `es2015`, `default`), and Angular and the
|
|
10
|
+
* runtime import it everywhere. CommonJS can't be tree-shaken, so every app
|
|
11
|
+
* carried all of rxjs on both threads, about 130 kB of each bundle, when the
|
|
12
|
+
* background thread uses `Subject` alone.
|
|
13
|
+
*
|
|
14
|
+
* So `import`s get the engine's conditions without `require`, and with
|
|
15
|
+
* `module` after `import`, as webpack's defaults have them (tslib's ES module
|
|
16
|
+
* build is behind `module`). A `require()` still resolves with all of the
|
|
17
|
+
* engine's conditions.
|
|
18
|
+
*/
|
|
19
|
+
export declare const applyResolve: (api: RsbuildPluginAPI) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/split-chunks.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RsbuildPluginAPI } from '@lynx-js/rspeedy';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const applySplitChunksRule: (api: RsbuildPluginAPI, options:
|
|
2
|
+
import type { NormalizedPluginAngularLynxOptions } from './utils/options.js';
|
|
3
|
+
export declare const applySplitChunksRule: (api: RsbuildPluginAPI, options: NormalizedPluginAngularLynxOptions) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The look of iOS's blur-view materials on Android, where Lynx's blur-view
|
|
3
|
+
* only blurs. On Android the runtime sets these variables inline on every
|
|
4
|
+
* blur-view (see android-blur-material.ts in @blotch/angular-lynx); iOS leaves
|
|
5
|
+
* them unset, so the fallbacks apply there and change nothing.
|
|
6
|
+
*
|
|
7
|
+
* The type selector is what lets the app restyle a blur-view: it loses to any
|
|
8
|
+
* class, id or inline style, so `bg-white/30` or `shadow-none` still wins.
|
|
9
|
+
* The build adds this file to the native bundle first, so an app's own
|
|
10
|
+
* `blur-view` rule comes later and wins too. Web draws its materials itself.
|
|
11
|
+
*/
|
|
12
|
+
blur-view {
|
|
13
|
+
background-color: var(--angular-lynx-blur-background, transparent);
|
|
14
|
+
background-image: var(--angular-lynx-blur-background-image, none);
|
|
15
|
+
box-shadow: var(--angular-lynx-blur-box-shadow, none);
|
|
16
|
+
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The stylesheets extracted from one module's components (see
|
|
3
|
+
* component-styles.ts), written as CSS files.
|
|
4
|
+
*/
|
|
5
|
+
export type ModuleStylesheets = {
|
|
6
|
+
/** The CSS files, in the order the module's components declare them. */
|
|
7
|
+
imports: string[];
|
|
8
|
+
/** Each Emulated component's class name and the scope ID its CSS uses. */
|
|
9
|
+
scopes: Array<{
|
|
10
|
+
className: string;
|
|
11
|
+
scopeId: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
2
14
|
/**
|
|
3
15
|
* Transforms the Angular-compiled JS for a single component module before rspack
|
|
4
16
|
* bundles it. This is the per-module half of the AngularLynx pipeline, extracted
|
|
@@ -6,26 +18,40 @@ import type { ComponentScopeInfo, ComponentStylesEntry } from './component-style
|
|
|
6
18
|
* string→string function (no rspack loader context, no compilation cache).
|
|
7
19
|
*
|
|
8
20
|
* It applies, in order:
|
|
9
|
-
* 1. Prepends `import "<
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
21
|
+
* 1. Prepends `import "<component.css>"` statements for the stylesheets
|
|
22
|
+
* extracted from the module's components (resolved relative to the
|
|
23
|
+
* component file).
|
|
24
|
+
* 2. Appends a `Component.ɵcmp.id = '<scopeId>'` assignment for each
|
|
25
|
+
* Emulated component, which ties its scoped CSS to its renderer.
|
|
13
26
|
* 3. Runs the worklet ("main thread" directive) transform over the result.
|
|
27
|
+
* 4. Runs the cross-thread transform (cross-thread-transform.ts), which gives
|
|
28
|
+
* module-level background functions and refs IDs that match on both
|
|
29
|
+
* threads.
|
|
30
|
+
* 5. In a development build with hot updates (`hot` is set), makes the
|
|
31
|
+
* module take them (hot-updates.ts): an entry module re-bootstraps the
|
|
32
|
+
* app, and a module that defines components updates them in place when
|
|
33
|
+
* only their templates or styles changed. Other modules pass their
|
|
34
|
+
* updates on to the modules that import them.
|
|
14
35
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* and re-bootstrap its own copy of the app, so HMR reported success and the
|
|
21
|
-
* main thread kept rendering the old code until a manual reload. With no
|
|
22
|
-
* module accepting, the update aborts and the Lynx HMR client
|
|
23
|
-
* (`@lynx-js/webpack-dev-transport`) falls back to a full `Page.reload`, which
|
|
24
|
-
* re-runs both threads with the new bundle.
|
|
36
|
+
* The hot update clients apply each update on both threads (see client/).
|
|
37
|
+
* Before they did, only the background thread took hot updates, so a
|
|
38
|
+
* self-accepting entry (which an earlier version had) re-bootstrapped the
|
|
39
|
+
* background thread's copy of the app while the main thread, which draws the
|
|
40
|
+
* screen, kept running the old code.
|
|
25
41
|
*/
|
|
26
42
|
export declare const buildTransformedCode: (params: {
|
|
27
43
|
code: string;
|
|
28
44
|
resourcePath: string;
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
stylesheets: ModuleStylesheets | undefined;
|
|
46
|
+
/** The project root, which cross-thread IDs are relative to. */
|
|
47
|
+
root: string;
|
|
48
|
+
/**
|
|
49
|
+
* Set in a development build with hot updates. `entry` says whether the
|
|
50
|
+
* module is one of the app's entries, and `source` reads its TypeScript
|
|
51
|
+
* source.
|
|
52
|
+
*/
|
|
53
|
+
hot?: {
|
|
54
|
+
entry: boolean;
|
|
55
|
+
source: () => string;
|
|
56
|
+
};
|
|
31
57
|
}) => string;
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* (for "Lynx") differentiates these from Angular's default 'ng' prefix IDs,
|
|
6
6
|
* preventing collisions if browser-Angular scope IDs leak into shared code.
|
|
7
7
|
* This ID appears in:
|
|
8
|
-
* - CSS
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
8
|
+
* - the component's compiled CSS: `.title._ngcontent-l<hash>`,
|
|
9
|
+
* `._nghost-l<hash>` (see component-styles.ts)
|
|
10
|
+
* - ɵcmp.id: set by the loader (see transform-module.ts)
|
|
11
|
+
* - the `_ngcontent-l<hash>` and `_nghost-l<hash>` classes that
|
|
12
|
+
* EmulatedLynxRenderer adds to the component's elements
|
|
11
13
|
*/
|
|
12
14
|
export declare const generateComponentScopeId: (className: string, containingFile: string) => string;
|
package/dist/utils/options.d.ts
CHANGED
|
@@ -2,14 +2,29 @@ export type PluginAngularLynxOptions = {
|
|
|
2
2
|
customCSSInheritanceList?: string[] | undefined;
|
|
3
3
|
debugInfoOutside?: boolean;
|
|
4
4
|
defaultDisplayLinear?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Make `overflow: visible` the default for every element, as on the web.
|
|
7
|
+
* With `false`, elements clip their children unless they set `overflow`,
|
|
8
|
+
* Lynx's older default.
|
|
9
|
+
*/
|
|
5
10
|
defaultOverflowVisible?: boolean;
|
|
6
11
|
enableA11y?: boolean;
|
|
7
12
|
enableAccessibilityElement?: boolean;
|
|
8
13
|
enableCSSInheritance?: boolean;
|
|
9
14
|
enableCSSInvalidation?: boolean;
|
|
10
15
|
enableCSSSelector?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Has no effect, and never did: it was never passed to Lynx.
|
|
18
|
+
* Lynx's template plugin and React Lynx dropped it too. Will be removed in
|
|
19
|
+
* a future release.
|
|
20
|
+
*/
|
|
11
21
|
enableICU?: boolean;
|
|
12
22
|
enableNewGesture?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Has no effect, and never did: it was never passed to Lynx.
|
|
25
|
+
* Lynx's template plugin and React Lynx dropped it too. Will be removed in
|
|
26
|
+
* a future release.
|
|
27
|
+
*/
|
|
13
28
|
enableParallelElement?: boolean;
|
|
14
29
|
enableRemoveCSSScope?: boolean;
|
|
15
30
|
enableSSR?: boolean;
|
|
@@ -23,9 +38,33 @@ export type PluginAngularLynxOptions = {
|
|
|
23
38
|
* When omitted, uses `source.entry` from lynx.config.ts (single or multi-entry).
|
|
24
39
|
*/
|
|
25
40
|
pages?: string[] | 'all' | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Has no effect, and never did: it was never passed to Lynx.
|
|
43
|
+
* Lynx's template plugin and React Lynx dropped it too. Will be removed in
|
|
44
|
+
* a future release.
|
|
45
|
+
*/
|
|
26
46
|
pipelineSchedulerConfig?: number;
|
|
27
47
|
removeDescendantSelectorScope?: boolean;
|
|
28
48
|
targetSdkVersion?: string;
|
|
29
49
|
experimental_isLazyBundle?: boolean;
|
|
30
50
|
};
|
|
31
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Options the plugin still accepts, so existing `lynx.config.ts` files keep
|
|
53
|
+
* type-checking, but ignores. They were declared and given defaults but never
|
|
54
|
+
* passed to Lynx, and `@lynx-js/template-webpack-plugin` 0.9 removed them
|
|
55
|
+
* (lynx-family/lynx-stack#1705, #1800), so there's nothing to pass them to:
|
|
56
|
+
*
|
|
57
|
+
* - `enableParallelElement` and `pipelineSchedulerConfig` turn on Lynx's
|
|
58
|
+
* experimental parallel element resolution, which React Lynx turned off for
|
|
59
|
+
* stability.
|
|
60
|
+
* - `enableICU` binds a host-provided ICU service (`LynxServiceI18nProtocol`
|
|
61
|
+
* on iOS, `ICURegister` on Android) into the JS context. Lynx Explorer and
|
|
62
|
+
* the apps `ng build --platform` makes don't provide one.
|
|
63
|
+
*/
|
|
64
|
+
export declare const DEPRECATED_OPTIONS: readonly ["enableICU", "enableParallelElement", "pipelineSchedulerConfig"];
|
|
65
|
+
type DeprecatedOption = (typeof DEPRECATED_OPTIONS)[number];
|
|
66
|
+
export type NormalizedPluginAngularLynxOptions = Required<Omit<PluginAngularLynxOptions, DeprecatedOption>>;
|
|
67
|
+
/** The deprecated options `options` sets, to warn about. */
|
|
68
|
+
export declare const deprecatedOptionsIn: (options?: Partial<PluginAngularLynxOptions>) => DeprecatedOption[];
|
|
69
|
+
export declare const normalizeOptions: (options?: Partial<PluginAngularLynxOptions>) => NormalizedPluginAngularLynxOptions;
|
|
70
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blotch/rsbuild-plugin-angular-lynx",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.3",
|
|
4
4
|
"description": "Rsbuild plugin for building AngularLynx applications",
|
|
5
5
|
"homepage": "https://github.com/Blotch-Smart-Frames/AngularLynx#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@lynx-js/runtime-wrapper-webpack-plugin": "^0.2.4",
|
|
46
46
|
"@lynx-js/template-webpack-plugin": "^0.16.2",
|
|
47
47
|
"@lynx-js/webpack-runtime-globals": "^0.0.8",
|
|
48
|
-
"rsbuild-plugin-tailwindcss": "0.2.4",
|
|
49
48
|
"tiny-invariant": "^1.3.3"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Rspack } from '@rsbuild/core';
|
|
2
|
-
/**
|
|
3
|
-
* Prepends `globalThis["__MAIN_THREAD__"]=<value>;` to every module in the layer.
|
|
4
|
-
* Replaces the BannerPlugin approach — injections happen per-module during
|
|
5
|
-
* compilation instead of per-chunk after bundling.
|
|
6
|
-
*/
|
|
7
|
-
declare const threadGlobalsLoader: (this: Rspack.LoaderContext, source: string) => string;
|
|
8
|
-
export default threadGlobalsLoader;
|
|
File without changes
|