@lynx-js/react-rsbuild-plugin 0.18.0 → 0.18.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.18.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Add the experimental `experimental_transformBuiltinAttributeNames` option for transforming builtin element attribute names. `false` preserves attribute names. `true` transforms `onClick` to `bindtap`, `onCatchTap` to `catchtap`, other `onXXX` event names to `bindxxx`, and remaining camelCase names to dash-case. An object supports serializable custom rules through `mode`, `preserve`, and `rename`. Explicit JSX attributes are transformed during compilation, and spread attributes are transformed at runtime. ([#3274](https://github.com/lynx-family/lynx-stack/pull/3274))
8
+
9
+ - Updated dependencies [[`4315634`](https://github.com/lynx-family/lynx-stack/commit/43156341e2449e48fd5badd6794937bad7c2b7c3), [`a03e15c`](https://github.com/lynx-family/lynx-stack/commit/a03e15cf157d3451b15987756c14ccd202597481), [`fa2ef9b`](https://github.com/lynx-family/lynx-stack/commit/fa2ef9b6fa2ff9e881a77ff5d80f300950fbca0d), [`7795a43`](https://github.com/lynx-family/lynx-stack/commit/7795a43797ac9daf59e5f18dc978e1596948f94b)]:
10
+ - @lynx-js/template-webpack-plugin@0.14.1
11
+ - @lynx-js/react-webpack-plugin@0.10.2
12
+ - @lynx-js/react-alias-rsbuild-plugin@0.18.2
13
+ - @lynx-js/use-sync-external-store@1.5.0
14
+ - @lynx-js/react-refresh-webpack-plugin@0.4.1
15
+ - @lynx-js/css-extract-webpack-plugin@0.10.0
16
+
17
+ ## 0.18.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`16248b5`](https://github.com/lynx-family/lynx-stack/commit/16248b55b37375402d63d2b53e40e832ab6544c6), [`08dd06a`](https://github.com/lynx-family/lynx-stack/commit/08dd06ae3a812155fa82d8d0356e5b7ae5395155), [`08dd06a`](https://github.com/lynx-family/lynx-stack/commit/08dd06ae3a812155fa82d8d0356e5b7ae5395155), [`811f2b5`](https://github.com/lynx-family/lynx-stack/commit/811f2b5bb40e472b577fed16b9142a3c36bd499f), [`ad2ed20`](https://github.com/lynx-family/lynx-stack/commit/ad2ed20aead82a7d23cd2fdc1dcffb2ef55b5fc3), [`d40a91f`](https://github.com/lynx-family/lynx-stack/commit/d40a91fe38730a5695cd0bcd8f14fcf5623b8d96), [`0d3623b`](https://github.com/lynx-family/lynx-stack/commit/0d3623bae7741223083b2723af87a0d32226d01e), [`f6e4548`](https://github.com/lynx-family/lynx-stack/commit/f6e454896a63c0b15a59c6c7674dc72b38ded5ff)]:
22
+ - @lynx-js/runtime-wrapper-webpack-plugin@0.2.3
23
+ - @lynx-js/template-webpack-plugin@0.14.0
24
+ - @lynx-js/css-extract-webpack-plugin@0.10.0
25
+ - @lynx-js/react-webpack-plugin@0.10.1
26
+ - @lynx-js/react-alias-rsbuild-plugin@0.18.1
27
+ - @lynx-js/use-sync-external-store@1.5.0
28
+ - @lynx-js/react-refresh-webpack-plugin@0.4.1
29
+
3
30
  ## 0.18.0
4
31
 
5
32
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -556,6 +556,27 @@ export declare interface PluginReactLynxOptions {
556
556
  * @defaultValue `false`
557
557
  */
558
558
  enableAccessibilityElement?: boolean;
559
+ /**
560
+ * Transform attribute names on Lynx builtin elements.
561
+ *
562
+ * @remarks
563
+ *
564
+ * `false` disables the conversion. `true` applies the default rule:
565
+ * `onClick` becomes `bindtap`, `onCatchTap` becomes `catchtap`, other
566
+ * `onXXX` names become `bindxxx`, and remaining camelCase names become
567
+ * dash-case. An object provides serializable custom rules. Exact entries in
568
+ * `rename` take precedence over `preserve`, followed by the fallback behavior
569
+ * selected by `mode`.
570
+ *
571
+ * Explicit JSX attributes are transformed at compile time. Attributes
572
+ * supplied through JSX spreads are transformed at runtime with the same
573
+ * rules.
574
+ *
575
+ * @defaultValue `false`
576
+ *
577
+ * @experimental
578
+ */
579
+ experimental_transformBuiltinAttributeNames?: boolean | TransformBuiltinAttributeNamesOptions;
559
580
  /**
560
581
  * enableCSSInheritance enables the default inheritance properties.
561
582
  *
@@ -860,4 +881,34 @@ export declare interface ShakeVisitorConfig {
860
881
 
861
882
  export { TemplateHooks }
862
883
 
884
+ /**
885
+ * Serializable rules for transforming builtin element attribute names.
886
+ *
887
+ * Exact entries in `rename` take precedence over `preserve`, followed by the
888
+ * fallback behavior selected by `mode`.
889
+ *
890
+ * @public
891
+ */
892
+ export declare interface TransformBuiltinAttributeNamesOptions {
893
+ /**
894
+ * The fallback behavior for attribute names not listed in `rename` or
895
+ * `preserve`.
896
+ *
897
+ * `'dash-case'` also applies the default React-style event mappings.
898
+ * `'mapping-only'` leaves all remaining names unchanged.
899
+ *
900
+ * @defaultValue `'dash-case'`
901
+ */
902
+ mode?: 'dash-case' | 'mapping-only'
903
+ /**
904
+ * Attribute names that should remain unchanged unless an exact `rename`
905
+ * entry is also present.
906
+ */
907
+ preserve?: ReadonlyArray<string>
908
+ /**
909
+ * Exact mappings from source attribute names to transformed attribute names.
910
+ */
911
+ rename?: Readonly<Record<string, string>>
912
+ }
913
+
863
914
  export { }
package/dist/index.js CHANGED
@@ -134,7 +134,7 @@ const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
134
134
  const DEFAULT_FILENAME_HASH = '.[contenthash:8]';
135
135
  const EMPTY_HASH = '';
136
136
  function applyEntry(api, options) {
137
- const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableRemoveCSSScope, firstScreenSyncTiming, globalPropsMode, enableSSR, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle } = options;
137
+ const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableRemoveCSSScope, firstScreenSyncTiming, globalPropsMode, enableSSR, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle, experimental_transformBuiltinAttributeNames } = options;
138
138
  const lazyBundleFetcher = resolveLazyBundleFetcher(targetSdkVersion);
139
139
  api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
140
140
  const mainThreadChunks = [];
@@ -276,6 +276,7 @@ function applyEntry(api, options) {
276
276
  extractStr,
277
277
  experimental_isLazyBundle,
278
278
  experimental_useElementTemplate: options.experimental_useElementTemplate,
279
+ experimental_transformBuiltinAttributeNames,
279
280
  profile: getDefaultProfile(),
280
281
  workletRuntimePath: await resolve(`@lynx-js/react/${isDev ? 'worklet-dev-runtime' : 'worklet-runtime'}`),
281
282
  lazyBundleFetcher
@@ -369,7 +370,7 @@ const MAIN_THREAD_ENV_TARGETS = {
369
370
  function getLoaderOptions(api, options, isMainThread = false) {
370
371
  const { output } = api.getRsbuildConfig();
371
372
  const inlineSourcesContent = output?.sourceMap === true || !(output?.sourceMap === false || output?.sourceMap?.js === false || output?.sourceMap?.js?.includes('nosources'));
372
- const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, enableUiSourceMap, experimental_isLazyBundle, experimental_useElementTemplate } = options;
373
+ const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, enableUiSourceMap, experimental_transformBuiltinAttributeNames, experimental_isLazyBundle, experimental_useElementTemplate } = options;
373
374
  return {
374
375
  compat,
375
376
  enableRemoveCSSScope,
@@ -377,6 +378,7 @@ function getLoaderOptions(api, options, isMainThread = false) {
377
378
  inlineSourcesContent,
378
379
  defineDCE,
379
380
  engineVersion,
381
+ experimental_transformBuiltinAttributeNames,
380
382
  experimental_useElementTemplate,
381
383
  ...isMainThread ? {
382
384
  enableUiSourceMap,
@@ -643,7 +645,7 @@ const _assertGuard = (exceptionable, props, factory)=>{
643
645
  return false;
644
646
  };
645
647
  const validateConfig = (()=>{
646
- const _io0 = (input, _exceptionable = true)=>(void 0 === input.enableUiSourceMap || "boolean" == typeof input.enableUiSourceMap) && (void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming || "manual" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.globalPropsMode || "reactive" === input.globalPropsMode || "event" === input.globalPropsMode) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (void 0 === input.experimental_useElementTemplate || "boolean" == typeof input.experimental_useElementTemplate) && null !== input.optimizeBundleSize && (void 0 === input.optimizeBundleSize || "boolean" == typeof input.optimizeBundleSize || "object" == typeof input.optimizeBundleSize && null !== input.optimizeBundleSize && false === Array.isArray(input.optimizeBundleSize) && _io8(input.optimizeBundleSize, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
648
+ const _io0 = (input, _exceptionable = true)=>(void 0 === input.enableUiSourceMap || "boolean" == typeof input.enableUiSourceMap) && (void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && null !== input.experimental_transformBuiltinAttributeNames && (void 0 === input.experimental_transformBuiltinAttributeNames || "boolean" == typeof input.experimental_transformBuiltinAttributeNames || "object" == typeof input.experimental_transformBuiltinAttributeNames && null !== input.experimental_transformBuiltinAttributeNames && false === Array.isArray(input.experimental_transformBuiltinAttributeNames) && _io4(input.experimental_transformBuiltinAttributeNames, _exceptionable)) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming || "manual" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io6(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io7(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.globalPropsMode || "reactive" === input.globalPropsMode || "event" === input.globalPropsMode) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io9(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (void 0 === input.experimental_useElementTemplate || "boolean" == typeof input.experimental_useElementTemplate) && null !== input.optimizeBundleSize && (void 0 === input.optimizeBundleSize || "boolean" == typeof input.optimizeBundleSize || "object" == typeof input.optimizeBundleSize && null !== input.optimizeBundleSize && false === Array.isArray(input.optimizeBundleSize) && _io10(input.optimizeBundleSize, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
647
649
  if ([
648
650
  "enableUiSourceMap",
649
651
  "compat",
@@ -651,6 +653,7 @@ const validateConfig = (()=>{
651
653
  "debugInfoOutside",
652
654
  "defaultDisplayLinear",
653
655
  "enableAccessibilityElement",
656
+ "experimental_transformBuiltinAttributeNames",
654
657
  "enableCSSInheritance",
655
658
  "enableCSSInvalidation",
656
659
  "enableCSSSelector",
@@ -707,7 +710,22 @@ const validateConfig = (()=>{
707
710
  if (void 0 === value) return true;
708
711
  return false;
709
712
  }));
710
- const _io4 = (input, _exceptionable = true)=>(void 0 === input.pkgName || Array.isArray(input.pkgName) && input.pkgName.every((elem, _index5)=>"string" == typeof elem)) && (void 0 === input.retainProp || Array.isArray(input.retainProp) && input.retainProp.every((elem, _index6)=>"string" == typeof elem)) && (void 0 === input.removeCall || Array.isArray(input.removeCall) && input.removeCall.every((elem, _index7)=>"string" == typeof elem)) && (void 0 === input.removeCallParams || Array.isArray(input.removeCallParams) && input.removeCallParams.every((elem, _index8)=>"string" == typeof elem)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
713
+ const _io4 = (input, _exceptionable = true)=>(void 0 === input.mode || "dash-case" === input.mode || "mapping-only" === input.mode) && (void 0 === input.preserve || Array.isArray(input.preserve) && input.preserve.every((elem, _index5)=>"string" == typeof elem)) && (void 0 === input.rename || "object" == typeof input.rename && null !== input.rename && false === Array.isArray(input.rename) && _io5(input.rename, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
714
+ if ([
715
+ "mode",
716
+ "preserve",
717
+ "rename"
718
+ ].some((prop)=>key === prop)) return true;
719
+ const value = input[key];
720
+ if (void 0 === value) return true;
721
+ return false;
722
+ }));
723
+ const _io5 = (input, _exceptionable = true)=>Object.keys(input).every((key)=>{
724
+ const value = input[key];
725
+ if (void 0 === value) return true;
726
+ return "string" == typeof value;
727
+ });
728
+ const _io6 = (input, _exceptionable = true)=>(void 0 === input.pkgName || Array.isArray(input.pkgName) && input.pkgName.every((elem, _index6)=>"string" == typeof elem)) && (void 0 === input.retainProp || Array.isArray(input.retainProp) && input.retainProp.every((elem, _index7)=>"string" == typeof elem)) && (void 0 === input.removeCall || Array.isArray(input.removeCall) && input.removeCall.every((elem, _index8)=>"string" == typeof elem)) && (void 0 === input.removeCallParams || Array.isArray(input.removeCallParams) && input.removeCallParams.every((elem, _index9)=>"string" == typeof elem)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
711
729
  if ([
712
730
  "pkgName",
713
731
  "retainProp",
@@ -718,7 +736,7 @@ const validateConfig = (()=>{
718
736
  if (void 0 === value) return true;
719
737
  return false;
720
738
  }));
721
- const _io5 = (input, _exceptionable = true)=>(void 0 === input.define || "object" == typeof input.define && null !== input.define && false === Array.isArray(input.define) && _io6(input.define, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
739
+ const _io7 = (input, _exceptionable = true)=>(void 0 === input.define || "object" == typeof input.define && null !== input.define && false === Array.isArray(input.define) && _io8(input.define, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
722
740
  if ([
723
741
  "define"
724
742
  ].some((prop)=>key === prop)) return true;
@@ -726,12 +744,12 @@ const validateConfig = (()=>{
726
744
  if (void 0 === value) return true;
727
745
  return false;
728
746
  }));
729
- const _io6 = (input, _exceptionable = true)=>Object.keys(input).every((key)=>{
747
+ const _io8 = (input, _exceptionable = true)=>Object.keys(input).every((key)=>{
730
748
  const value = input[key];
731
749
  if (void 0 === value) return true;
732
750
  return "string" == typeof value;
733
751
  });
734
- const _io7 = (input, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
752
+ const _io9 = (input, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
735
753
  if ([
736
754
  "strLength"
737
755
  ].some((prop)=>key === prop)) return true;
@@ -739,7 +757,7 @@ const validateConfig = (()=>{
739
757
  if (void 0 === value) return true;
740
758
  return false;
741
759
  }));
742
- const _io8 = (input, _exceptionable = true)=>(void 0 === input.mainThread || "boolean" == typeof input.mainThread) && (void 0 === input.background || "boolean" == typeof input.background) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
760
+ const _io10 = (input, _exceptionable = true)=>(void 0 === input.mainThread || "boolean" == typeof input.mainThread) && (void 0 === input.background || "boolean" == typeof input.background) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
743
761
  if ([
744
762
  "mainThread",
745
763
  "background"
@@ -768,9 +786,9 @@ const validateConfig = (()=>{
768
786
  path: _path + ".customCSSInheritanceList",
769
787
  expected: "(Array<string> | undefined)",
770
788
  value: input.customCSSInheritanceList
771
- }, _errorFactory)) && input.customCSSInheritanceList.every((elem, _index9)=>"string" == typeof elem || _assertGuard(_exceptionable, {
789
+ }, _errorFactory)) && input.customCSSInheritanceList.every((elem, _index10)=>"string" == typeof elem || _assertGuard(_exceptionable, {
772
790
  method: "typia.createAssertEquals",
773
- path: _path + ".customCSSInheritanceList[" + _index9 + "]",
791
+ path: _path + ".customCSSInheritanceList[" + _index10 + "]",
774
792
  expected: "string",
775
793
  value: elem
776
794
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -793,6 +811,21 @@ const validateConfig = (()=>{
793
811
  path: _path + ".enableAccessibilityElement",
794
812
  expected: "(boolean | undefined)",
795
813
  value: input.enableAccessibilityElement
814
+ }, _errorFactory)) && (null !== input.experimental_transformBuiltinAttributeNames || _assertGuard(_exceptionable, {
815
+ method: "typia.createAssertEquals",
816
+ path: _path + ".experimental_transformBuiltinAttributeNames",
817
+ expected: "(TransformBuiltinAttributeNamesOptions | boolean | undefined)",
818
+ value: input.experimental_transformBuiltinAttributeNames
819
+ }, _errorFactory)) && (void 0 === input.experimental_transformBuiltinAttributeNames || "boolean" == typeof input.experimental_transformBuiltinAttributeNames || ("object" == typeof input.experimental_transformBuiltinAttributeNames && null !== input.experimental_transformBuiltinAttributeNames && false === Array.isArray(input.experimental_transformBuiltinAttributeNames) || _assertGuard(_exceptionable, {
820
+ method: "typia.createAssertEquals",
821
+ path: _path + ".experimental_transformBuiltinAttributeNames",
822
+ expected: "(TransformBuiltinAttributeNamesOptions | boolean | undefined)",
823
+ value: input.experimental_transformBuiltinAttributeNames
824
+ }, _errorFactory)) && _ao4(input.experimental_transformBuiltinAttributeNames, _path + ".experimental_transformBuiltinAttributeNames", _exceptionable) || _assertGuard(_exceptionable, {
825
+ method: "typia.createAssertEquals",
826
+ path: _path + ".experimental_transformBuiltinAttributeNames",
827
+ expected: "(TransformBuiltinAttributeNamesOptions | boolean | undefined)",
828
+ value: input.experimental_transformBuiltinAttributeNames
796
829
  }, _errorFactory)) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance || _assertGuard(_exceptionable, {
797
830
  method: "typia.createAssertEquals",
798
831
  path: _path + ".enableCSSInheritance",
@@ -838,7 +871,7 @@ const validateConfig = (()=>{
838
871
  path: _path + ".shake",
839
872
  expected: "(Partial<ShakeVisitorConfig> | undefined)",
840
873
  value: input.shake
841
- }, _errorFactory)) && _ao4(input.shake, _path + ".shake", _exceptionable) || _assertGuard(_exceptionable, {
874
+ }, _errorFactory)) && _ao6(input.shake, _path + ".shake", _exceptionable) || _assertGuard(_exceptionable, {
842
875
  method: "typia.createAssertEquals",
843
876
  path: _path + ".shake",
844
877
  expected: "(Partial<ShakeVisitorConfig> | undefined)",
@@ -848,7 +881,7 @@ const validateConfig = (()=>{
848
881
  path: _path + ".defineDCE",
849
882
  expected: "(Partial<DefineDceVisitorConfig> | undefined)",
850
883
  value: input.defineDCE
851
- }, _errorFactory)) && _ao5(input.defineDCE, _path + ".defineDCE", _exceptionable) || _assertGuard(_exceptionable, {
884
+ }, _errorFactory)) && _ao7(input.defineDCE, _path + ".defineDCE", _exceptionable) || _assertGuard(_exceptionable, {
852
885
  method: "typia.createAssertEquals",
853
886
  path: _path + ".defineDCE",
854
887
  expected: "(Partial<DefineDceVisitorConfig> | undefined)",
@@ -878,7 +911,7 @@ const validateConfig = (()=>{
878
911
  path: _path + ".extractStr",
879
912
  expected: "(Partial<ExtractStrConfig> | boolean | undefined)",
880
913
  value: input.extractStr
881
- }, _errorFactory)) && _ao7(input.extractStr, _path + ".extractStr", _exceptionable) || _assertGuard(_exceptionable, {
914
+ }, _errorFactory)) && _ao9(input.extractStr, _path + ".extractStr", _exceptionable) || _assertGuard(_exceptionable, {
882
915
  method: "typia.createAssertEquals",
883
916
  path: _path + ".extractStr",
884
917
  expected: "(Partial<ExtractStrConfig> | boolean | undefined)",
@@ -903,7 +936,7 @@ const validateConfig = (()=>{
903
936
  path: _path + ".optimizeBundleSize",
904
937
  expected: "(__type | boolean | undefined)",
905
938
  value: input.optimizeBundleSize
906
- }, _errorFactory)) && _ao8(input.optimizeBundleSize, _path + ".optimizeBundleSize", _exceptionable) || _assertGuard(_exceptionable, {
939
+ }, _errorFactory)) && _ao10(input.optimizeBundleSize, _path + ".optimizeBundleSize", _exceptionable) || _assertGuard(_exceptionable, {
907
940
  method: "typia.createAssertEquals",
908
941
  path: _path + ".optimizeBundleSize",
909
942
  expected: "(__type | boolean | undefined)",
@@ -916,6 +949,7 @@ const validateConfig = (()=>{
916
949
  "debugInfoOutside",
917
950
  "defaultDisplayLinear",
918
951
  "enableAccessibilityElement",
952
+ "experimental_transformBuiltinAttributeNames",
919
953
  "enableCSSInheritance",
920
954
  "enableCSSInvalidation",
921
955
  "enableCSSSelector",
@@ -948,9 +982,9 @@ const validateConfig = (()=>{
948
982
  path: _path + ".componentsPkg",
949
983
  expected: "(Array<string> | undefined)",
950
984
  value: input.componentsPkg
951
- }, _errorFactory)) && input.componentsPkg.every((elem, _index10)=>"string" == typeof elem || _assertGuard(_exceptionable, {
985
+ }, _errorFactory)) && input.componentsPkg.every((elem, _index11)=>"string" == typeof elem || _assertGuard(_exceptionable, {
952
986
  method: "typia.createAssertEquals",
953
- path: _path + ".componentsPkg[" + _index10 + "]",
987
+ path: _path + ".componentsPkg[" + _index11 + "]",
954
988
  expected: "string",
955
989
  value: elem
956
990
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -963,9 +997,9 @@ const validateConfig = (()=>{
963
997
  path: _path + ".oldRuntimePkg",
964
998
  expected: "(Array<string> | undefined)",
965
999
  value: input.oldRuntimePkg
966
- }, _errorFactory)) && input.oldRuntimePkg.every((elem, _index11)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1000
+ }, _errorFactory)) && input.oldRuntimePkg.every((elem, _index12)=>"string" == typeof elem || _assertGuard(_exceptionable, {
967
1001
  method: "typia.createAssertEquals",
968
- path: _path + ".oldRuntimePkg[" + _index11 + "]",
1002
+ path: _path + ".oldRuntimePkg[" + _index12 + "]",
969
1003
  expected: "string",
970
1004
  value: elem
971
1005
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -983,9 +1017,9 @@ const validateConfig = (()=>{
983
1017
  path: _path + ".additionalComponentAttributes",
984
1018
  expected: "(Array<string> | undefined)",
985
1019
  value: input.additionalComponentAttributes
986
- }, _errorFactory)) && input.additionalComponentAttributes.every((elem, _index12)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1020
+ }, _errorFactory)) && input.additionalComponentAttributes.every((elem, _index13)=>"string" == typeof elem || _assertGuard(_exceptionable, {
987
1021
  method: "typia.createAssertEquals",
988
- path: _path + ".additionalComponentAttributes[" + _index12 + "]",
1022
+ path: _path + ".additionalComponentAttributes[" + _index13 + "]",
989
1023
  expected: "string",
990
1024
  value: elem
991
1025
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -1107,14 +1141,69 @@ const validateConfig = (()=>{
1107
1141
  value: value
1108
1142
  }, _errorFactory);
1109
1143
  }));
1110
- const _ao4 = (input, _path, _exceptionable = true)=>(void 0 === input.pkgName || (Array.isArray(input.pkgName) || _assertGuard(_exceptionable, {
1144
+ const _ao4 = (input, _path, _exceptionable = true)=>(void 0 === input.mode || "dash-case" === input.mode || "mapping-only" === input.mode || _assertGuard(_exceptionable, {
1145
+ method: "typia.createAssertEquals",
1146
+ path: _path + ".mode",
1147
+ expected: "(\"dash-case\" | \"mapping-only\" | undefined)",
1148
+ value: input.mode
1149
+ }, _errorFactory)) && (void 0 === input.preserve || (Array.isArray(input.preserve) || _assertGuard(_exceptionable, {
1150
+ method: "typia.createAssertEquals",
1151
+ path: _path + ".preserve",
1152
+ expected: "(ReadonlyArray<string> | undefined)",
1153
+ value: input.preserve
1154
+ }, _errorFactory)) && input.preserve.every((elem, _index14)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1155
+ method: "typia.createAssertEquals",
1156
+ path: _path + ".preserve[" + _index14 + "]",
1157
+ expected: "string",
1158
+ value: elem
1159
+ }, _errorFactory)) || _assertGuard(_exceptionable, {
1160
+ method: "typia.createAssertEquals",
1161
+ path: _path + ".preserve",
1162
+ expected: "(ReadonlyArray<string> | undefined)",
1163
+ value: input.preserve
1164
+ }, _errorFactory)) && (void 0 === input.rename || ("object" == typeof input.rename && null !== input.rename && false === Array.isArray(input.rename) || _assertGuard(_exceptionable, {
1165
+ method: "typia.createAssertEquals",
1166
+ path: _path + ".rename",
1167
+ expected: "(Readonly<Record<string, string>> | undefined)",
1168
+ value: input.rename
1169
+ }, _errorFactory)) && _ao5(input.rename, _path + ".rename", _exceptionable) || _assertGuard(_exceptionable, {
1170
+ method: "typia.createAssertEquals",
1171
+ path: _path + ".rename",
1172
+ expected: "(Readonly<Record<string, string>> | undefined)",
1173
+ value: input.rename
1174
+ }, _errorFactory)) && (0 === Object.keys(input).length || false === _exceptionable || Object.keys(input).every((key)=>{
1175
+ if ([
1176
+ "mode",
1177
+ "preserve",
1178
+ "rename"
1179
+ ].some((prop)=>key === prop)) return true;
1180
+ const value = input[key];
1181
+ if (void 0 === value) return true;
1182
+ return _assertGuard(_exceptionable, {
1183
+ method: "typia.createAssertEquals",
1184
+ path: _path + _accessExpressionAsString(key),
1185
+ expected: "undefined",
1186
+ value: value
1187
+ }, _errorFactory);
1188
+ }));
1189
+ const _ao5 = (input, _path, _exceptionable = true)=>false === _exceptionable || Object.keys(input).every((key)=>{
1190
+ const value = input[key];
1191
+ if (void 0 === value) return true;
1192
+ return "string" == typeof value || _assertGuard(_exceptionable, {
1193
+ method: "typia.createAssertEquals",
1194
+ path: _path + _accessExpressionAsString(key),
1195
+ expected: "string",
1196
+ value: value
1197
+ }, _errorFactory);
1198
+ });
1199
+ const _ao6 = (input, _path, _exceptionable = true)=>(void 0 === input.pkgName || (Array.isArray(input.pkgName) || _assertGuard(_exceptionable, {
1111
1200
  method: "typia.createAssertEquals",
1112
1201
  path: _path + ".pkgName",
1113
1202
  expected: "(Array<string> | undefined)",
1114
1203
  value: input.pkgName
1115
- }, _errorFactory)) && input.pkgName.every((elem, _index13)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1204
+ }, _errorFactory)) && input.pkgName.every((elem, _index15)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1116
1205
  method: "typia.createAssertEquals",
1117
- path: _path + ".pkgName[" + _index13 + "]",
1206
+ path: _path + ".pkgName[" + _index15 + "]",
1118
1207
  expected: "string",
1119
1208
  value: elem
1120
1209
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -1127,9 +1216,9 @@ const validateConfig = (()=>{
1127
1216
  path: _path + ".retainProp",
1128
1217
  expected: "(Array<string> | undefined)",
1129
1218
  value: input.retainProp
1130
- }, _errorFactory)) && input.retainProp.every((elem, _index14)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1219
+ }, _errorFactory)) && input.retainProp.every((elem, _index16)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1131
1220
  method: "typia.createAssertEquals",
1132
- path: _path + ".retainProp[" + _index14 + "]",
1221
+ path: _path + ".retainProp[" + _index16 + "]",
1133
1222
  expected: "string",
1134
1223
  value: elem
1135
1224
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -1142,9 +1231,9 @@ const validateConfig = (()=>{
1142
1231
  path: _path + ".removeCall",
1143
1232
  expected: "(Array<string> | undefined)",
1144
1233
  value: input.removeCall
1145
- }, _errorFactory)) && input.removeCall.every((elem, _index15)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1234
+ }, _errorFactory)) && input.removeCall.every((elem, _index17)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1146
1235
  method: "typia.createAssertEquals",
1147
- path: _path + ".removeCall[" + _index15 + "]",
1236
+ path: _path + ".removeCall[" + _index17 + "]",
1148
1237
  expected: "string",
1149
1238
  value: elem
1150
1239
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -1157,9 +1246,9 @@ const validateConfig = (()=>{
1157
1246
  path: _path + ".removeCallParams",
1158
1247
  expected: "(Array<string> | undefined)",
1159
1248
  value: input.removeCallParams
1160
- }, _errorFactory)) && input.removeCallParams.every((elem, _index16)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1249
+ }, _errorFactory)) && input.removeCallParams.every((elem, _index18)=>"string" == typeof elem || _assertGuard(_exceptionable, {
1161
1250
  method: "typia.createAssertEquals",
1162
- path: _path + ".removeCallParams[" + _index16 + "]",
1251
+ path: _path + ".removeCallParams[" + _index18 + "]",
1163
1252
  expected: "string",
1164
1253
  value: elem
1165
1254
  }, _errorFactory)) || _assertGuard(_exceptionable, {
@@ -1183,12 +1272,12 @@ const validateConfig = (()=>{
1183
1272
  value: value
1184
1273
  }, _errorFactory);
1185
1274
  }));
1186
- const _ao5 = (input, _path, _exceptionable = true)=>(void 0 === input.define || ("object" == typeof input.define && null !== input.define && false === Array.isArray(input.define) || _assertGuard(_exceptionable, {
1275
+ const _ao7 = (input, _path, _exceptionable = true)=>(void 0 === input.define || ("object" == typeof input.define && null !== input.define && false === Array.isArray(input.define) || _assertGuard(_exceptionable, {
1187
1276
  method: "typia.createAssertEquals",
1188
1277
  path: _path + ".define",
1189
1278
  expected: "(Record<string, string> | undefined)",
1190
1279
  value: input.define
1191
- }, _errorFactory)) && _ao6(input.define, _path + ".define", _exceptionable) || _assertGuard(_exceptionable, {
1280
+ }, _errorFactory)) && _ao8(input.define, _path + ".define", _exceptionable) || _assertGuard(_exceptionable, {
1192
1281
  method: "typia.createAssertEquals",
1193
1282
  path: _path + ".define",
1194
1283
  expected: "(Record<string, string> | undefined)",
@@ -1206,7 +1295,7 @@ const validateConfig = (()=>{
1206
1295
  value: value
1207
1296
  }, _errorFactory);
1208
1297
  }));
1209
- const _ao6 = (input, _path, _exceptionable = true)=>false === _exceptionable || Object.keys(input).every((key)=>{
1298
+ const _ao8 = (input, _path, _exceptionable = true)=>false === _exceptionable || Object.keys(input).every((key)=>{
1210
1299
  const value = input[key];
1211
1300
  if (void 0 === value) return true;
1212
1301
  return "string" == typeof value || _assertGuard(_exceptionable, {
@@ -1216,7 +1305,7 @@ const validateConfig = (()=>{
1216
1305
  value: value
1217
1306
  }, _errorFactory);
1218
1307
  });
1219
- const _ao7 = (input, _path, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength || _assertGuard(_exceptionable, {
1308
+ const _ao9 = (input, _path, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength || _assertGuard(_exceptionable, {
1220
1309
  method: "typia.createAssertEquals",
1221
1310
  path: _path + ".strLength",
1222
1311
  expected: "(number | undefined)",
@@ -1234,7 +1323,7 @@ const validateConfig = (()=>{
1234
1323
  value: value
1235
1324
  }, _errorFactory);
1236
1325
  }));
1237
- const _ao8 = (input, _path, _exceptionable = true)=>(void 0 === input.mainThread || "boolean" == typeof input.mainThread || _assertGuard(_exceptionable, {
1326
+ const _ao10 = (input, _path, _exceptionable = true)=>(void 0 === input.mainThread || "boolean" == typeof input.mainThread || _assertGuard(_exceptionable, {
1238
1327
  method: "typia.createAssertEquals",
1239
1328
  path: _path + ".mainThread",
1240
1329
  expected: "(boolean | undefined)",
@@ -1316,6 +1405,7 @@ function pluginReactLynx(userOptions) {
1316
1405
  extractStr: false,
1317
1406
  globalPropsMode: 'reactive',
1318
1407
  experimental_isLazyBundle: false,
1408
+ experimental_transformBuiltinAttributeNames: false,
1319
1409
  experimental_useElementTemplate: false,
1320
1410
  optimizeBundleSize: false,
1321
1411
  enableUiSourceMap: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -33,33 +33,33 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "tiny-invariant": "^1.3.3",
36
- "@lynx-js/css-extract-webpack-plugin": "0.9.0",
37
- "@lynx-js/react-alias-rsbuild-plugin": "0.18.0",
36
+ "@lynx-js/css-extract-webpack-plugin": "0.10.0",
37
+ "@lynx-js/react-alias-rsbuild-plugin": "0.18.2",
38
38
  "@lynx-js/react-refresh-webpack-plugin": "0.4.1",
39
- "@lynx-js/react-webpack-plugin": "0.10.0",
40
- "@lynx-js/runtime-wrapper-webpack-plugin": "0.2.2",
41
- "@lynx-js/template-webpack-plugin": "0.13.0",
39
+ "@lynx-js/react-webpack-plugin": "0.10.2",
40
+ "@lynx-js/runtime-wrapper-webpack-plugin": "0.2.3",
41
+ "@lynx-js/template-webpack-plugin": "0.14.1",
42
42
  "@lynx-js/use-sync-external-store": "1.5.0",
43
43
  "background-only": "^0.0.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@microsoft/api-extractor": "7.58.2",
47
- "@rsbuild/core": "2.1.4",
48
- "@rsbuild/plugin-sass": "1.5.2",
49
- "@rsbuild/plugin-typed-css-modules": "1.2.2",
50
- "@rstest/core": "0.11.0",
46
+ "@microsoft/api-extractor": "7.58.12",
47
+ "@rsbuild/core": "2.1.7",
48
+ "@rsbuild/plugin-sass": "2.0.1",
49
+ "@rsbuild/plugin-typed-css-modules": "1.2.4",
50
+ "@rstest/core": "0.11.3",
51
51
  "rsbuild-plugin-arethetypeswrong": "0.3.1",
52
- "rsbuild-plugin-publint": "0.3.4",
52
+ "rsbuild-plugin-publint": "1.0.0",
53
53
  "source-map": "^0.7.6",
54
54
  "tailwindcss": "^3.4.19",
55
- "type-fest": "^5.4.4",
55
+ "type-fest": "^5.8.0",
56
56
  "typia": "12.1.1",
57
57
  "typia-rspack-plugin": "3.0.1",
58
+ "@lynx-js/config-rsbuild-plugin": "0.2.1",
58
59
  "@lynx-js/debug-metadata": "0.1.0",
59
- "@lynx-js/react": "0.123.0",
60
- "@lynx-js/config-rsbuild-plugin": "0.1.1",
60
+ "@lynx-js/react": "0.123.2",
61
61
  "@lynx-js/react-transform": "0.2.0",
62
- "@lynx-js/rspeedy": "0.16.0",
62
+ "@lynx-js/rspeedy": "0.16.2",
63
63
  "@lynx-js/test-tools": "0.0.0"
64
64
  },
65
65
  "peerDependencies": {