@reckona/mreact-compat 0.0.173 → 0.0.175

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/dist/element.d.ts CHANGED
@@ -102,6 +102,7 @@ export interface MemoType<P = Record<string, unknown>> {
102
102
  $$typeof: typeof MEMO_TYPE;
103
103
  type: ElementType<P>;
104
104
  compare?: (previous: P, next: P) => boolean;
105
+ __mreactMemoCompareProps?: readonly string[];
105
106
  }
106
107
  /** Element type record produced by lazy. */
107
108
  export interface LazyType<P = Record<string, unknown>> {
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,eAA2C,CAAC;AAClF,eAAO,MAAM,mBAAmB,eAA6C,CAAC;AAC9E,eAAO,MAAM,gBAAgB,eAAkC,CAAC;AAChE,eAAO,MAAM,SAAS,eAA2B,CAAC;AAClD,eAAO,MAAM,SAAS,eAA2B,CAAC;AAClD,eAAO,MAAM,gBAAgB,eAAkC,CAAC;AAChE,eAAO,MAAM,WAAW,eAA6B,CAAC;AACtD,eAAO,MAAM,uBAAuB,eAAiD,CAAC;AAEtF,uEAAuE;AACvE,eAAO,MAAM,QAAQ,eAA+B,CAAC;AACrD,qEAAqE;AACrE,eAAO,MAAM,QAAQ,eAA+B,CAAC;AACrD,8DAA8D;AAC9D,eAAO,MAAM,YAAY,eAAoC,CAAC;AAC9D,yEAAyE;AACzE,eAAO,MAAM,QAAQ,eAA+B,CAAC;AACrD,kEAAkE;AAClE,eAAO,MAAM,QAAQ,eAA+B,CAAC;AACrD,eAAO,MAAM,6BAA6B,eAEzC,CAAC;AACF,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,eAEtC,CAAC;AACF,4EAA4E;AAC5E,eAAO,MAAM,2BAA2B,eAEvC,CAAC;AAGF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAA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AO,MAAM,cAAc,6BAAuB,CAAC;AAEnD,4EAA4E;AAC5E,eAAO,MAAM,QAAQ;QACf,CAAC,YACO,eAAe,MACrB,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACpF,CAAC,EAAE,GAAG,IAAI;sBAUD,eAAe,MACrB,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACvF,IAAI;oBAKS,eAAe,GAAG,MAAM;sBAOtB,eAAe,GAAG,OAAO,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE;mBAG3E,eAAe,GAAG,OAAO,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;CAStF,CAAC;AAmBF,4EAA4E;AAC5E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,eAAe,CAAC;IAC5C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,eAAe,GACxB,kBAAkB,CAAC,oBAAoB,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC,CAK1E"}
package/dist/element.js CHANGED
@@ -76,6 +76,15 @@ export function createElementFromJsxConfig(type, config, keyArgument) {
76
76
  ? String(keyArgument)
77
77
  : config?.key === undefined ? null : String(config.key);
78
78
  const ref = config?.ref ?? null;
79
+ if (canReuseJsxConfigAsComponentProps(normalizedType, config)) {
80
+ return {
81
+ $$typeof: REACT_COMPAT_ELEMENT_TYPE,
82
+ type: normalizedType,
83
+ key,
84
+ ref,
85
+ props: config,
86
+ };
87
+ }
79
88
  const hasChildren = config !== null && config !== undefined && hasOwnProperty.call(config, "children");
80
89
  const children = config?.children;
81
90
  const copiedProps = copyElementProps(config, undefined, true);
@@ -96,6 +105,24 @@ export function createElementFromJsxConfig(type, config, keyArgument) {
96
105
  props,
97
106
  };
98
107
  }
108
+ function canReuseJsxConfigAsComponentProps(type, config) {
109
+ if (config === null ||
110
+ config === undefined ||
111
+ typeof type === "string" ||
112
+ hasDefaultProps(type)) {
113
+ return false;
114
+ }
115
+ for (const name in config) {
116
+ if (hasOwnProperty.call(config, name) &&
117
+ (name === "key" ||
118
+ name === "ref" ||
119
+ name === "__self" ||
120
+ name === "__source")) {
121
+ return false;
122
+ }
123
+ }
124
+ return true;
125
+ }
99
126
  /** Returns true when a value is a React-compatible element record. */
100
127
  export function isReactCompatElement(value) {
101
128
  return (typeof value === "object" &&
@@ -254,7 +281,7 @@ function normalizeElementType(type) {
254
281
  return isReactCompatContextProviderShorthand(type) ? type.Provider : type;
255
282
  }
256
283
  function applyDefaultProps(type, props) {
257
- if (typeof type !== "function" && (typeof type !== "object" || type === null)) {
284
+ if (!canHaveDefaultProps(type)) {
258
285
  return props;
259
286
  }
260
287
  const defaultProps = type
@@ -269,6 +296,13 @@ function applyDefaultProps(type, props) {
269
296
  }
270
297
  return props;
271
298
  }
299
+ function hasDefaultProps(type) {
300
+ return canHaveDefaultProps(type) &&
301
+ type.defaultProps !== undefined;
302
+ }
303
+ function canHaveDefaultProps(type) {
304
+ return typeof type === "function" || (typeof type === "object" && type !== null);
305
+ }
272
306
  function isReactCompatContextProviderShorthand(value) {
273
307
  if (typeof value !== "object" || value === null) {
274
308
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAClF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,G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CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,CAAC,QAAyB;QAC5B,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAErC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAyD,CAAC;IAC1E,CAAC;CACF,CAAC;AAEF,SAAS,YAAY,CACnB,QAAyB;IAEzB,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CACrC,CAAC,KAAK,EAAiE,EAAE,CACvE,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,SAAS,CACtE,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,QAAyB;IAChD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC;AAQD,kEAAkE;AAClE,MAAM,UAAU,mBAAmB,CACjC,OAA6B,EAC7B,QAAyB;IAEzB,OAAO,aAAa,CAAC,mBAAmB,EAAE;QACxC,GAAG,OAAO;QACV,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["export const REACT_COMPAT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\");\nexport const ERROR_BOUNDARY_TYPE = Symbol.for(\"modular.react.error_boundary\");\nexport const FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\");\nexport const MEMO_TYPE = Symbol.for(\"react.memo\");\nexport const LAZY_TYPE = Symbol.for(\"react.lazy\");\nexport const STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\");\nexport const PORTAL_TYPE = Symbol.for(\"react.portal\");\nexport const REACTIVE_DOM_BLOCK_TYPE = Symbol.for(\"modular.react.reactive_dom_block\");\nconst REACT_COMPAT_PROVIDER_TYPE = Symbol.for(\"react.context\");\n/** Symbol used to group JSX children without adding a host element. */\nexport const Fragment = Symbol.for(\"react.fragment\");\n/** Symbol used to suspend rendering while async content resolves. */\nexport const Suspense = Symbol.for(\"react.suspense\");\n/** Symbol used to coordinate multiple suspense boundaries. */\nexport const SuspenseList = Symbol.for(\"react.suspense_list\");\n/** Symbol used to mark activity boundaries in React-compatible trees. */\nexport const Activity = Symbol.for(\"react.activity\");\n/** Symbol used to measure render work with profiler callbacks. */\nexport const Profiler = Symbol.for(\"react.profiler\");\nexport const HOST_CHILDREN_ONLY_PROPS_META = Symbol.for(\n \"modular.react.host_children_only_props_meta\",\n);\n/** Metadata key that links a state value to a reactive text binding. */\nexport const REACTIVE_TEXT_BINDING_META = Symbol.for(\n \"modular.react.reactive_text_binding_meta\",\n);\n/** Metadata key that links compiler-owned DOM blocks to component state. */\nexport const REACTIVE_STATE_BINDING_META = Symbol.for(\n \"modular.react.reactive_state_binding_meta\",\n);\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nexport interface ReactCompatProviderType {\n $$typeof: symbol;\n context: unknown;\n}\n\nexport interface ReactCompatContextProviderShorthand {\n Provider: ReactCompatProviderType;\n Consumer: unknown;\n}\n\n/** Element type accepted by createElement, JSX, and renderer entrypoints. */\nexport type ElementType<P = Record<string, unknown>> =\n | string\n | typeof Fragment\n | typeof Suspense\n | typeof SuspenseList\n | typeof Activity\n | typeof Profiler\n | typeof ERROR_BOUNDARY_TYPE\n | typeof REACTIVE_DOM_BLOCK_TYPE\n | typeof STRICT_MODE_TYPE\n | ReactCompatContextProviderShorthand\n | ReactCompatProviderType\n | ForwardRefType<P>\n | MemoType<P>\n | LazyType<P>\n | ((props: P) => ReactCompatNode | PromiseLike<ReactCompatNode>)\n | (new (props: P) => { render(): ReactCompatNode });\n\n/** Element-shaped renderable value accepted regardless of its original prop shape. */\nexport interface ReactCompatRenderableElement {\n /** React-compatible element marker. */\n $$typeof: typeof REACT_COMPAT_ELEMENT_TYPE;\n /** Host tag, component, or special element type. */\n type: unknown;\n /** Normalized React key. */\n key: string | null;\n /** Normalized React ref. */\n ref: unknown;\n /** Element props with children widened to the renderable node surface. */\n props: { children?: ReactCompatNode };\n}\n\n/** Renderable value accepted by the React-compatible renderer. */\nexport type ReactCompatNode =\n | ReactCompatRenderableElement\n | ReactCompatPortal\n | string\n | number\n | boolean\n | null\n | undefined\n | ReactCompatNode[];\n\n/** React-compatible element record produced by createElement and JSX transforms. */\nexport interface ReactCompatElement<P = Record<string, unknown>> {\n $$typeof: typeof REACT_COMPAT_ELEMENT_TYPE;\n type: ElementType<P>;\n key: string | null;\n ref: unknown;\n props: P & { children?: ReactCompatNode };\n}\n\n/** Portal record that renders children into an external DOM container. */\nexport interface ReactCompatPortal {\n $$typeof: typeof PORTAL_TYPE;\n container: Element;\n children: ReactCompatNode;\n key: string | null;\n}\n\nexport interface ReactiveDomBlockResult {\n node: ChildNode;\n dispose?: (() => void) | undefined;\n}\n\n// The render receives a stable reactive props proxy when the block is created\n// with props (createReactiveDomBlock(render, props)); state-only blocks ignore\n// the argument.\nexport type ReactiveDomBlockRender<P = unknown> = (props: P) => ReactiveDomBlockResult;\n\nexport interface ReactiveDomBlockProps {\n render: ReactiveDomBlockRender;\n // Present when the block bridges its component's props into the reactive\n // runtime; carries the latest props on every re-render so the reconciler can\n // push them into the block's prop cell.\n blockProps?: Record<string, unknown> | undefined;\n}\n\n/** Creates a React-compatible element from a type, config object, and children. */\nexport function createElement<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps) | null,\n ...children: ReactCompatNode[]\n): ReactCompatElement<P>;\nexport function createElement<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps) | null,\n): ReactCompatElement<P> {\n const childCount = arguments.length - 2;\n\n if (typeof type === \"string\") {\n const key = config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n const props = copyHostCreateElementProps(config) as P & {\n children?: ReactCompatNode;\n };\n\n assignCreateElementChildren(props, childCount, arguments);\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type,\n key,\n ref,\n props,\n };\n }\n\n const normalizedType =\n typeof type === \"object\" && type !== null ? normalizeElementType(type) : type;\n const key = config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n const props = applyDefaultProps(\n normalizedType,\n copyCreateElementProps(config),\n ) as P & {\n children?: ReactCompatNode;\n };\n\n assignCreateElementChildren(props, childCount, arguments);\n\n if (typeof normalizedType === \"string\") {\n setHostOwnPropsMeta(props);\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: normalizedType as ElementType<P>,\n key,\n ref,\n props: props as P & { children?: ReactCompatNode },\n };\n}\n\nfunction assignCreateElementChildren(\n props: { children?: ReactCompatNode },\n childCount: number,\n args: IArguments,\n): void {\n if (childCount === 1) {\n props.children = args[2] as ReactCompatNode;\n return;\n }\n\n if (childCount <= 1) {\n return;\n }\n\n const children: ReactCompatNode[] = [];\n children.length = childCount;\n\n for (let index = 0; index < childCount; index += 1) {\n children[index] = args[index + 2] as ReactCompatNode;\n }\n\n props.children = children;\n}\n\n/** Creates a React-compatible element from JSX runtime arguments. */\nexport function createElementFromJsxConfig<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps & { children?: ReactCompatNode }) | null,\n keyArgument?: unknown,\n): ReactCompatElement<P> {\n const normalizedType =\n typeof type === \"object\" && type !== null ? normalizeElementType(type) : type;\n const key = keyArgument !== undefined\n ? String(keyArgument)\n : config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n const hasChildren = config !== null && config !== undefined && hasOwnProperty.call(config, \"children\");\n const children = config?.children;\n const copiedProps = copyElementProps(config, undefined, true);\n const props = (typeof normalizedType === \"string\"\n ? copiedProps\n : applyDefaultProps(normalizedType, copiedProps)) as P & {\n children?: ReactCompatNode;\n };\n\n if (hasChildren) {\n props.children = children;\n }\n\n if (typeof normalizedType === \"string\") {\n setHostOwnPropsMeta(props);\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: normalizedType as ElementType<P>,\n key,\n ref,\n props,\n };\n}\n\n/** Returns true when a value is a React-compatible element record. */\nexport function isReactCompatElement(\n value: unknown,\n): value is ReactCompatElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n (value as { $$typeof?: unknown }).$$typeof === REACT_COMPAT_ELEMENT_TYPE\n );\n}\n\n/** Creates a portal that renders children into a DOM container outside the parent tree. */\nexport function createPortal(\n children: ReactCompatNode,\n container: Element,\n key?: unknown,\n): ReactCompatPortal {\n return {\n $$typeof: PORTAL_TYPE,\n container,\n children,\n key: key === undefined ? null : String(key),\n };\n}\n\n/** Returns true when a value is a React-compatible portal record. */\nexport function isReactCompatPortal(value: unknown): value is ReactCompatPortal {\n return (\n typeof value === \"object\" &&\n value !== null &&\n (value as { $$typeof?: unknown }).$$typeof === PORTAL_TYPE\n );\n}\n\n/** Creates a mutable ref object with a null initial current value. */\nexport function createRef<T>(): { current: T | null } {\n return { current: null };\n}\n\n/** Element type record produced by forwardRef. */\nexport interface ForwardRefType<P = Record<string, unknown>> {\n $$typeof: typeof FORWARD_REF_TYPE;\n render: (props: P, ref: unknown) => ReactCompatNode;\n}\n\n/** Element type record produced by memo. */\nexport interface MemoType<P = Record<string, unknown>> {\n $$typeof: typeof MEMO_TYPE;\n type: ElementType<P>;\n compare?: (previous: P, next: P) => boolean;\n}\n\n/** Element type record produced by lazy. */\nexport interface LazyType<P = Record<string, unknown>> {\n $$typeof: typeof LAZY_TYPE;\n load: () => Promise<{ default: ElementType<P> }>;\n status: \"uninitialized\" | \"pending\" | \"resolved\" | \"rejected\";\n promise?: Promise<void>;\n resolved?: ElementType<P>;\n error?: unknown;\n}\n\n/** Wraps a component so it can receive a ref as the second render argument. */\nexport function forwardRef<P, T>(\n render: (props: P, ref: { current: T | null } | ((value: T | null) => void) | null) => ReactCompatNode,\n): ForwardRefType<P & { ref?: unknown }> {\n return { $$typeof: FORWARD_REF_TYPE, render: render as ForwardRefType<P>[\"render\"] };\n}\n\n/** Wraps an element type with optional prop comparison for memoized renders. */\nexport function memo<P>(\n type: ElementType<P>,\n compare?: (previous: P, next: P) => boolean,\n): MemoType<P> {\n return compare === undefined\n ? { $$typeof: MEMO_TYPE, type }\n : { $$typeof: MEMO_TYPE, type, compare };\n}\n\n/** Creates a lazy element type that resolves its implementation on demand. */\nexport function lazy<P>(\n load: () => Promise<{ default: ElementType<P> }>,\n): LazyType<P> {\n return {\n $$typeof: LAZY_TYPE,\n load,\n status: \"uninitialized\",\n };\n}\n\n/** Symbol used to mark a subtree for strict-mode development checks. */\nexport const StrictMode = STRICT_MODE_TYPE;\n\n/** Clones an existing element with merged props and optional replacement children. */\nexport function cloneElement<P extends object>(\n element: ReactCompatElement<P>,\n props: (Partial<P> & ReactReservedProps) | null,\n ...children: ReactCompatNode[]\n): ReactCompatElement<P> {\n const key = props === null || props.key === undefined ? element.key : String(props.key);\n const ref = props === null || props.ref === undefined ? element.ref : props.ref;\n const nextProps = copyElementProps(props, element.props) as P & {\n children?: ReactCompatNode;\n };\n\n if (children.length === 1) {\n (nextProps as P & { children?: ReactCompatNode }).children = children[0];\n } else if (children.length > 1) {\n (nextProps as P & { children?: ReactCompatNode }).children = children;\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: element.type,\n key,\n ref,\n props: nextProps as P & { children?: ReactCompatNode },\n };\n}\n\nfunction copyElementProps(\n source: object | null | undefined,\n base?: object,\n omitChildren = false,\n copySymbols: boolean | \"internal\" = true,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (base !== undefined) {\n copyOwnStringElementProps(base, props, omitChildren);\n }\n\n if (source === null || source === undefined) {\n return props as Record<string, unknown>;\n }\n\n copyOwnStringElementProps(source, props, omitChildren);\n if (copySymbols === \"internal\") {\n copyInternalElementSymbolProps(source, props);\n } else if (copySymbols) {\n copyOwnSymbolElementProps(source, props);\n }\n return props as Record<string, unknown>;\n}\n\nfunction copyCreateElementProps(\n source: object | null | undefined,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (source === null || source === undefined) {\n return props as Record<string, unknown>;\n }\n\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\"\n ) {\n props[name] = stringSource[name];\n }\n }\n\n copyInternalElementSymbolProps(source, props);\n return props as Record<string, unknown>;\n}\n\nfunction copyHostCreateElementProps(\n source: object | null | undefined,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (source === null || source === undefined) {\n props[HOST_CHILDREN_ONLY_PROPS_META] = true;\n return props as Record<string, unknown>;\n }\n\n let hasNonChildrenProp = false;\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\"\n ) {\n props[name] = stringSource[name];\n hasNonChildrenProp ||= name !== \"children\";\n }\n }\n\n copyInternalElementSymbolProps(source, props);\n if (!hasNonChildrenProp) {\n props[HOST_CHILDREN_ONLY_PROPS_META] = true;\n }\n return props as Record<string, unknown>;\n}\n\nfunction copyOwnStringElementProps(\n source: object,\n target: Record<string, unknown>,\n omitChildren: boolean,\n): void {\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\" &&\n (!omitChildren || name !== \"children\")\n ) {\n target[name] = stringSource[name];\n }\n }\n}\n\nfunction copyOwnSymbolElementProps(\n source: object,\n target: Record<PropertyKey, unknown>,\n): void {\n const symbolSource = source as Record<PropertyKey, unknown>;\n for (const symbol of Object.getOwnPropertySymbols(source)) {\n target[symbol] = symbolSource[symbol];\n }\n}\n\nfunction copyInternalElementSymbolProps(\n source: object,\n target: Record<PropertyKey, unknown>,\n): void {\n const symbolSource = source as Record<PropertyKey, unknown>;\n if (hasOwnProperty.call(source, REACTIVE_TEXT_BINDING_META)) {\n target[REACTIVE_TEXT_BINDING_META] = symbolSource[REACTIVE_TEXT_BINDING_META];\n }\n}\n\nfunction normalizeElementType<P>(type: ElementType<P>): ElementType<P> {\n return isReactCompatContextProviderShorthand(type) ? (type.Provider as ElementType<P>) : type;\n}\n\nfunction applyDefaultProps(\n type: unknown,\n props: Record<string, unknown>,\n): Record<string, unknown> {\n if (typeof type !== \"function\" && (typeof type !== \"object\" || type === null)) {\n return props;\n }\n\n const defaultProps = (type as { defaultProps?: Record<string, unknown> } | undefined)\n ?.defaultProps;\n\n if (defaultProps === undefined) {\n return props;\n }\n\n for (const [name, value] of Object.entries(defaultProps)) {\n if (props[name] === undefined) {\n props[name] = value;\n }\n }\n\n return props;\n}\n\ninterface ReactReservedProps {\n key?: unknown;\n ref?: unknown;\n __self?: unknown;\n __source?: unknown;\n}\n\nfunction isReactCompatContextProviderShorthand(\n value: unknown,\n): value is ReactCompatContextProviderShorthand {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n\n const provider = (value as { Provider?: unknown }).Provider;\n\n return (\n typeof provider === \"object\" &&\n provider !== null &&\n (provider as { $$typeof?: unknown }).$$typeof === REACT_COMPAT_PROVIDER_TYPE\n );\n}\n\nfunction setHostOwnPropsMeta(props: Record<string, unknown>): void {\n if (hostPropsAreChildrenOnly(props)) {\n (props as { [HOST_CHILDREN_ONLY_PROPS_META]?: true })[\n HOST_CHILDREN_ONLY_PROPS_META\n ] = true;\n }\n}\n\nfunction hostPropsAreChildrenOnly(props: Record<string, unknown>): boolean {\n for (const name in props) {\n if (hasOwnProperty.call(props, name) && name !== \"children\") {\n return false;\n }\n }\n\n return true;\n}\n\n/** Alias for checking whether a value is a React-compatible element. */\nexport const isValidElement = isReactCompatElement;\n\n/** Helpers for iterating, counting, flattening, and validating children. */\nexport const Children = {\n map<T>(\n children: ReactCompatNode,\n fn: (child: Exclude<ReactCompatNode, null | undefined | boolean>, index: number) => T,\n ): T[] | null {\n if (children === null || children === undefined) {\n return null;\n }\n\n return flattenChildren(children).map((child, index) =>\n fn(child as Exclude<ReactCompatNode, null | undefined | boolean>, index),\n );\n },\n forEach(\n children: ReactCompatNode,\n fn: (child: Exclude<ReactCompatNode, null | undefined | boolean>, index: number) => void,\n ): void {\n toChildArray(children).forEach((child, index) => {\n fn(child, index);\n });\n },\n count(children: ReactCompatNode): number {\n if (children === null || children === undefined) {\n return 0;\n }\n\n return flattenChildren(children).length;\n },\n toArray(children: ReactCompatNode): Exclude<ReactCompatNode, null | undefined | boolean>[] {\n return toChildArray(children);\n },\n only(children: ReactCompatNode): Exclude<ReactCompatNode, null | undefined | boolean> {\n const array = toChildArray(children);\n\n if (array.length !== 1) {\n throw new Error(\"Expected exactly one child.\");\n }\n\n return array[0] as Exclude<ReactCompatNode, null | undefined | boolean>;\n },\n};\n\nfunction toChildArray(\n children: ReactCompatNode,\n): Exclude<ReactCompatNode, null | undefined | boolean>[] {\n return flattenChildren(children).filter(\n (child): child is Exclude<ReactCompatNode, null | undefined | boolean> =>\n child !== null && child !== undefined && typeof child !== \"boolean\",\n );\n}\n\nfunction flattenChildren(children: ReactCompatNode): ReactCompatNode[] {\n if (Array.isArray(children)) {\n return children.flatMap((child) => flattenChildren(child));\n }\n\n return [children];\n}\n\n/** Options used to render and observe a React-compatible error boundary. */\nexport interface ErrorBoundaryOptions {\n fallback: (error: Error) => ReactCompatNode;\n onError?: (error: Error) => void;\n}\n\n/** Creates an error boundary element with a fallback renderer. */\nexport function createErrorBoundary(\n options: ErrorBoundaryOptions,\n children: ReactCompatNode,\n): ReactCompatElement<ErrorBoundaryOptions & { children: ReactCompatNode }> {\n return createElement(ERROR_BOUNDARY_TYPE, {\n ...options,\n children,\n });\n}\n"]}
1
+ {"version":3,"file":"element.js","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAClF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AACtF,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC/D,uEAAuE;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACrD,qEAAqE;AACrE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACrD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAC9D,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACrD,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C,QAAyB;QAC5B,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAErC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAyD,CAAC;IAC1E,CAAC;CACF,CAAC;AAEF,SAAS,YAAY,CACnB,QAAyB;IAEzB,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CACrC,CAAC,KAAK,EAAiE,EAAE,CACvE,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,SAAS,CACtE,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,QAAyB;IAChD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpB,CAAC;AAQD,kEAAkE;AAClE,MAAM,UAAU,mBAAmB,CACjC,OAA6B,EAC7B,QAAyB;IAEzB,OAAO,aAAa,CAAC,mBAAmB,EAAE;QACxC,GAAG,OAAO;QACV,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["export const REACT_COMPAT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\");\nexport const ERROR_BOUNDARY_TYPE = Symbol.for(\"modular.react.error_boundary\");\nexport const FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\");\nexport const MEMO_TYPE = Symbol.for(\"react.memo\");\nexport const LAZY_TYPE = Symbol.for(\"react.lazy\");\nexport const STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\");\nexport const PORTAL_TYPE = Symbol.for(\"react.portal\");\nexport const REACTIVE_DOM_BLOCK_TYPE = Symbol.for(\"modular.react.reactive_dom_block\");\nconst REACT_COMPAT_PROVIDER_TYPE = Symbol.for(\"react.context\");\n/** Symbol used to group JSX children without adding a host element. */\nexport const Fragment = Symbol.for(\"react.fragment\");\n/** Symbol used to suspend rendering while async content resolves. */\nexport const Suspense = Symbol.for(\"react.suspense\");\n/** Symbol used to coordinate multiple suspense boundaries. */\nexport const SuspenseList = Symbol.for(\"react.suspense_list\");\n/** Symbol used to mark activity boundaries in React-compatible trees. */\nexport const Activity = Symbol.for(\"react.activity\");\n/** Symbol used to measure render work with profiler callbacks. */\nexport const Profiler = Symbol.for(\"react.profiler\");\nexport const HOST_CHILDREN_ONLY_PROPS_META = Symbol.for(\n \"modular.react.host_children_only_props_meta\",\n);\n/** Metadata key that links a state value to a reactive text binding. */\nexport const REACTIVE_TEXT_BINDING_META = Symbol.for(\n \"modular.react.reactive_text_binding_meta\",\n);\n/** Metadata key that links compiler-owned DOM blocks to component state. */\nexport const REACTIVE_STATE_BINDING_META = Symbol.for(\n \"modular.react.reactive_state_binding_meta\",\n);\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nexport interface ReactCompatProviderType {\n $$typeof: symbol;\n context: unknown;\n}\n\nexport interface ReactCompatContextProviderShorthand {\n Provider: ReactCompatProviderType;\n Consumer: unknown;\n}\n\n/** Element type accepted by createElement, JSX, and renderer entrypoints. */\nexport type ElementType<P = Record<string, unknown>> =\n | string\n | typeof Fragment\n | typeof Suspense\n | typeof SuspenseList\n | typeof Activity\n | typeof Profiler\n | typeof ERROR_BOUNDARY_TYPE\n | typeof REACTIVE_DOM_BLOCK_TYPE\n | typeof STRICT_MODE_TYPE\n | ReactCompatContextProviderShorthand\n | ReactCompatProviderType\n | ForwardRefType<P>\n | MemoType<P>\n | LazyType<P>\n | ((props: P) => ReactCompatNode | PromiseLike<ReactCompatNode>)\n | (new (props: P) => { render(): ReactCompatNode });\n\n/** Element-shaped renderable value accepted regardless of its original prop shape. */\nexport interface ReactCompatRenderableElement {\n /** React-compatible element marker. */\n $$typeof: typeof REACT_COMPAT_ELEMENT_TYPE;\n /** Host tag, component, or special element type. */\n type: unknown;\n /** Normalized React key. */\n key: string | null;\n /** Normalized React ref. */\n ref: unknown;\n /** Element props with children widened to the renderable node surface. */\n props: { children?: ReactCompatNode };\n}\n\n/** Renderable value accepted by the React-compatible renderer. */\nexport type ReactCompatNode =\n | ReactCompatRenderableElement\n | ReactCompatPortal\n | string\n | number\n | boolean\n | null\n | undefined\n | ReactCompatNode[];\n\n/** React-compatible element record produced by createElement and JSX transforms. */\nexport interface ReactCompatElement<P = Record<string, unknown>> {\n $$typeof: typeof REACT_COMPAT_ELEMENT_TYPE;\n type: ElementType<P>;\n key: string | null;\n ref: unknown;\n props: P & { children?: ReactCompatNode };\n}\n\n/** Portal record that renders children into an external DOM container. */\nexport interface ReactCompatPortal {\n $$typeof: typeof PORTAL_TYPE;\n container: Element;\n children: ReactCompatNode;\n key: string | null;\n}\n\nexport interface ReactiveDomBlockResult {\n node: ChildNode;\n dispose?: (() => void) | undefined;\n}\n\n// The render receives a stable reactive props proxy when the block is created\n// with props (createReactiveDomBlock(render, props)); state-only blocks ignore\n// the argument.\nexport type ReactiveDomBlockRender<P = unknown> = (props: P) => ReactiveDomBlockResult;\n\nexport interface ReactiveDomBlockProps {\n render: ReactiveDomBlockRender;\n // Present when the block bridges its component's props into the reactive\n // runtime; carries the latest props on every re-render so the reconciler can\n // push them into the block's prop cell.\n blockProps?: Record<string, unknown> | undefined;\n}\n\n/** Creates a React-compatible element from a type, config object, and children. */\nexport function createElement<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps) | null,\n ...children: ReactCompatNode[]\n): ReactCompatElement<P>;\nexport function createElement<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps) | null,\n): ReactCompatElement<P> {\n const childCount = arguments.length - 2;\n\n if (typeof type === \"string\") {\n const key = config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n const props = copyHostCreateElementProps(config) as P & {\n children?: ReactCompatNode;\n };\n\n assignCreateElementChildren(props, childCount, arguments);\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type,\n key,\n ref,\n props,\n };\n }\n\n const normalizedType =\n typeof type === \"object\" && type !== null ? normalizeElementType(type) : type;\n const key = config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n const props = applyDefaultProps(\n normalizedType,\n copyCreateElementProps(config),\n ) as P & {\n children?: ReactCompatNode;\n };\n\n assignCreateElementChildren(props, childCount, arguments);\n\n if (typeof normalizedType === \"string\") {\n setHostOwnPropsMeta(props);\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: normalizedType as ElementType<P>,\n key,\n ref,\n props: props as P & { children?: ReactCompatNode },\n };\n}\n\nfunction assignCreateElementChildren(\n props: { children?: ReactCompatNode },\n childCount: number,\n args: IArguments,\n): void {\n if (childCount === 1) {\n props.children = args[2] as ReactCompatNode;\n return;\n }\n\n if (childCount <= 1) {\n return;\n }\n\n const children: ReactCompatNode[] = [];\n children.length = childCount;\n\n for (let index = 0; index < childCount; index += 1) {\n children[index] = args[index + 2] as ReactCompatNode;\n }\n\n props.children = children;\n}\n\n/** Creates a React-compatible element from JSX runtime arguments. */\nexport function createElementFromJsxConfig<P extends object>(\n type: ElementType<P>,\n config: (P & ReactReservedProps & { children?: ReactCompatNode }) | null,\n keyArgument?: unknown,\n): ReactCompatElement<P> {\n const normalizedType =\n typeof type === \"object\" && type !== null ? normalizeElementType(type) : type;\n const key = keyArgument !== undefined\n ? String(keyArgument)\n : config?.key === undefined ? null : String(config.key);\n const ref = config?.ref ?? null;\n if (canReuseJsxConfigAsComponentProps(normalizedType, config)) {\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: normalizedType as ElementType<P>,\n key,\n ref,\n props: config as P & { children?: ReactCompatNode },\n };\n }\n\n const hasChildren = config !== null && config !== undefined && hasOwnProperty.call(config, \"children\");\n const children = config?.children;\n const copiedProps = copyElementProps(config, undefined, true);\n const props = (typeof normalizedType === \"string\"\n ? copiedProps\n : applyDefaultProps(normalizedType, copiedProps)) as P & {\n children?: ReactCompatNode;\n };\n\n if (hasChildren) {\n props.children = children;\n }\n\n if (typeof normalizedType === \"string\") {\n setHostOwnPropsMeta(props);\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: normalizedType as ElementType<P>,\n key,\n ref,\n props,\n };\n}\n\nfunction canReuseJsxConfigAsComponentProps(\n type: unknown,\n config: object | null | undefined,\n): boolean {\n if (\n config === null ||\n config === undefined ||\n typeof type === \"string\" ||\n hasDefaultProps(type)\n ) {\n return false;\n }\n\n for (const name in config) {\n if (\n hasOwnProperty.call(config, name) &&\n (name === \"key\" ||\n name === \"ref\" ||\n name === \"__self\" ||\n name === \"__source\")\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** Returns true when a value is a React-compatible element record. */\nexport function isReactCompatElement(\n value: unknown,\n): value is ReactCompatElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n (value as { $$typeof?: unknown }).$$typeof === REACT_COMPAT_ELEMENT_TYPE\n );\n}\n\n/** Creates a portal that renders children into a DOM container outside the parent tree. */\nexport function createPortal(\n children: ReactCompatNode,\n container: Element,\n key?: unknown,\n): ReactCompatPortal {\n return {\n $$typeof: PORTAL_TYPE,\n container,\n children,\n key: key === undefined ? null : String(key),\n };\n}\n\n/** Returns true when a value is a React-compatible portal record. */\nexport function isReactCompatPortal(value: unknown): value is ReactCompatPortal {\n return (\n typeof value === \"object\" &&\n value !== null &&\n (value as { $$typeof?: unknown }).$$typeof === PORTAL_TYPE\n );\n}\n\n/** Creates a mutable ref object with a null initial current value. */\nexport function createRef<T>(): { current: T | null } {\n return { current: null };\n}\n\n/** Element type record produced by forwardRef. */\nexport interface ForwardRefType<P = Record<string, unknown>> {\n $$typeof: typeof FORWARD_REF_TYPE;\n render: (props: P, ref: unknown) => ReactCompatNode;\n}\n\n/** Element type record produced by memo. */\nexport interface MemoType<P = Record<string, unknown>> {\n $$typeof: typeof MEMO_TYPE;\n type: ElementType<P>;\n compare?: (previous: P, next: P) => boolean;\n __mreactMemoCompareProps?: readonly string[];\n}\n\n/** Element type record produced by lazy. */\nexport interface LazyType<P = Record<string, unknown>> {\n $$typeof: typeof LAZY_TYPE;\n load: () => Promise<{ default: ElementType<P> }>;\n status: \"uninitialized\" | \"pending\" | \"resolved\" | \"rejected\";\n promise?: Promise<void>;\n resolved?: ElementType<P>;\n error?: unknown;\n}\n\n/** Wraps a component so it can receive a ref as the second render argument. */\nexport function forwardRef<P, T>(\n render: (props: P, ref: { current: T | null } | ((value: T | null) => void) | null) => ReactCompatNode,\n): ForwardRefType<P & { ref?: unknown }> {\n return { $$typeof: FORWARD_REF_TYPE, render: render as ForwardRefType<P>[\"render\"] };\n}\n\n/** Wraps an element type with optional prop comparison for memoized renders. */\nexport function memo<P>(\n type: ElementType<P>,\n compare?: (previous: P, next: P) => boolean,\n): MemoType<P> {\n return compare === undefined\n ? { $$typeof: MEMO_TYPE, type }\n : { $$typeof: MEMO_TYPE, type, compare };\n}\n\n/** Creates a lazy element type that resolves its implementation on demand. */\nexport function lazy<P>(\n load: () => Promise<{ default: ElementType<P> }>,\n): LazyType<P> {\n return {\n $$typeof: LAZY_TYPE,\n load,\n status: \"uninitialized\",\n };\n}\n\n/** Symbol used to mark a subtree for strict-mode development checks. */\nexport const StrictMode = STRICT_MODE_TYPE;\n\n/** Clones an existing element with merged props and optional replacement children. */\nexport function cloneElement<P extends object>(\n element: ReactCompatElement<P>,\n props: (Partial<P> & ReactReservedProps) | null,\n ...children: ReactCompatNode[]\n): ReactCompatElement<P> {\n const key = props === null || props.key === undefined ? element.key : String(props.key);\n const ref = props === null || props.ref === undefined ? element.ref : props.ref;\n const nextProps = copyElementProps(props, element.props) as P & {\n children?: ReactCompatNode;\n };\n\n if (children.length === 1) {\n (nextProps as P & { children?: ReactCompatNode }).children = children[0];\n } else if (children.length > 1) {\n (nextProps as P & { children?: ReactCompatNode }).children = children;\n }\n\n return {\n $$typeof: REACT_COMPAT_ELEMENT_TYPE,\n type: element.type,\n key,\n ref,\n props: nextProps as P & { children?: ReactCompatNode },\n };\n}\n\nfunction copyElementProps(\n source: object | null | undefined,\n base?: object,\n omitChildren = false,\n copySymbols: boolean | \"internal\" = true,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (base !== undefined) {\n copyOwnStringElementProps(base, props, omitChildren);\n }\n\n if (source === null || source === undefined) {\n return props as Record<string, unknown>;\n }\n\n copyOwnStringElementProps(source, props, omitChildren);\n if (copySymbols === \"internal\") {\n copyInternalElementSymbolProps(source, props);\n } else if (copySymbols) {\n copyOwnSymbolElementProps(source, props);\n }\n return props as Record<string, unknown>;\n}\n\nfunction copyCreateElementProps(\n source: object | null | undefined,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (source === null || source === undefined) {\n return props as Record<string, unknown>;\n }\n\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\"\n ) {\n props[name] = stringSource[name];\n }\n }\n\n copyInternalElementSymbolProps(source, props);\n return props as Record<string, unknown>;\n}\n\nfunction copyHostCreateElementProps(\n source: object | null | undefined,\n): Record<string, unknown> {\n const props: Record<PropertyKey, unknown> = {};\n\n if (source === null || source === undefined) {\n props[HOST_CHILDREN_ONLY_PROPS_META] = true;\n return props as Record<string, unknown>;\n }\n\n let hasNonChildrenProp = false;\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\"\n ) {\n props[name] = stringSource[name];\n hasNonChildrenProp ||= name !== \"children\";\n }\n }\n\n copyInternalElementSymbolProps(source, props);\n if (!hasNonChildrenProp) {\n props[HOST_CHILDREN_ONLY_PROPS_META] = true;\n }\n return props as Record<string, unknown>;\n}\n\nfunction copyOwnStringElementProps(\n source: object,\n target: Record<string, unknown>,\n omitChildren: boolean,\n): void {\n const stringSource = source as Record<string, unknown>;\n for (const name in source) {\n if (!hasOwnProperty.call(source, name)) {\n continue;\n }\n\n if (\n name !== \"key\" &&\n name !== \"ref\" &&\n name !== \"__self\" &&\n name !== \"__source\" &&\n (!omitChildren || name !== \"children\")\n ) {\n target[name] = stringSource[name];\n }\n }\n}\n\nfunction copyOwnSymbolElementProps(\n source: object,\n target: Record<PropertyKey, unknown>,\n): void {\n const symbolSource = source as Record<PropertyKey, unknown>;\n for (const symbol of Object.getOwnPropertySymbols(source)) {\n target[symbol] = symbolSource[symbol];\n }\n}\n\nfunction copyInternalElementSymbolProps(\n source: object,\n target: Record<PropertyKey, unknown>,\n): void {\n const symbolSource = source as Record<PropertyKey, unknown>;\n if (hasOwnProperty.call(source, REACTIVE_TEXT_BINDING_META)) {\n target[REACTIVE_TEXT_BINDING_META] = symbolSource[REACTIVE_TEXT_BINDING_META];\n }\n}\n\nfunction normalizeElementType<P>(type: ElementType<P>): ElementType<P> {\n return isReactCompatContextProviderShorthand(type) ? (type.Provider as ElementType<P>) : type;\n}\n\nfunction applyDefaultProps(\n type: unknown,\n props: Record<string, unknown>,\n): Record<string, unknown> {\n if (!canHaveDefaultProps(type)) {\n return props;\n }\n\n const defaultProps = (type as { defaultProps?: Record<string, unknown> } | undefined)\n ?.defaultProps;\n\n if (defaultProps === undefined) {\n return props;\n }\n\n for (const [name, value] of Object.entries(defaultProps)) {\n if (props[name] === undefined) {\n props[name] = value;\n }\n }\n\n return props;\n}\n\nfunction hasDefaultProps(type: unknown): boolean {\n return canHaveDefaultProps(type) &&\n (type as { defaultProps?: Record<string, unknown> }).defaultProps !== undefined;\n}\n\nfunction canHaveDefaultProps(type: unknown): boolean {\n return typeof type === \"function\" || (typeof type === \"object\" && type !== null);\n}\n\ninterface ReactReservedProps {\n key?: unknown;\n ref?: unknown;\n __self?: unknown;\n __source?: unknown;\n}\n\nfunction isReactCompatContextProviderShorthand(\n value: unknown,\n): value is ReactCompatContextProviderShorthand {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n\n const provider = (value as { Provider?: unknown }).Provider;\n\n return (\n typeof provider === \"object\" &&\n provider !== null &&\n (provider as { $$typeof?: unknown }).$$typeof === REACT_COMPAT_PROVIDER_TYPE\n );\n}\n\nfunction setHostOwnPropsMeta(props: Record<string, unknown>): void {\n if (hostPropsAreChildrenOnly(props)) {\n (props as { [HOST_CHILDREN_ONLY_PROPS_META]?: true })[\n HOST_CHILDREN_ONLY_PROPS_META\n ] = true;\n }\n}\n\nfunction hostPropsAreChildrenOnly(props: Record<string, unknown>): boolean {\n for (const name in props) {\n if (hasOwnProperty.call(props, name) && name !== \"children\") {\n return false;\n }\n }\n\n return true;\n}\n\n/** Alias for checking whether a value is a React-compatible element. */\nexport const isValidElement = isReactCompatElement;\n\n/** Helpers for iterating, counting, flattening, and validating children. */\nexport const Children = {\n map<T>(\n children: ReactCompatNode,\n fn: (child: Exclude<ReactCompatNode, null | undefined | boolean>, index: number) => T,\n ): T[] | null {\n if (children === null || children === undefined) {\n return null;\n }\n\n return flattenChildren(children).map((child, index) =>\n fn(child as Exclude<ReactCompatNode, null | undefined | boolean>, index),\n );\n },\n forEach(\n children: ReactCompatNode,\n fn: (child: Exclude<ReactCompatNode, null | undefined | boolean>, index: number) => void,\n ): void {\n toChildArray(children).forEach((child, index) => {\n fn(child, index);\n });\n },\n count(children: ReactCompatNode): number {\n if (children === null || children === undefined) {\n return 0;\n }\n\n return flattenChildren(children).length;\n },\n toArray(children: ReactCompatNode): Exclude<ReactCompatNode, null | undefined | boolean>[] {\n return toChildArray(children);\n },\n only(children: ReactCompatNode): Exclude<ReactCompatNode, null | undefined | boolean> {\n const array = toChildArray(children);\n\n if (array.length !== 1) {\n throw new Error(\"Expected exactly one child.\");\n }\n\n return array[0] as Exclude<ReactCompatNode, null | undefined | boolean>;\n },\n};\n\nfunction toChildArray(\n children: ReactCompatNode,\n): Exclude<ReactCompatNode, null | undefined | boolean>[] {\n return flattenChildren(children).filter(\n (child): child is Exclude<ReactCompatNode, null | undefined | boolean> =>\n child !== null && child !== undefined && typeof child !== \"boolean\",\n );\n}\n\nfunction flattenChildren(children: ReactCompatNode): ReactCompatNode[] {\n if (Array.isArray(children)) {\n return children.flatMap((child) => flattenChildren(child));\n }\n\n return [children];\n}\n\n/** Options used to render and observe a React-compatible error boundary. */\nexport interface ErrorBoundaryOptions {\n fallback: (error: Error) => ReactCompatNode;\n onError?: (error: Error) => void;\n}\n\n/** Creates an error boundary element with a fallback renderer. */\nexport function createErrorBoundary(\n options: ErrorBoundaryOptions,\n children: ReactCompatNode,\n): ReactCompatElement<ErrorBoundaryOptions & { children: ReactCompatNode }> {\n return createElement(ERROR_BOUNDARY_TYPE, {\n ...options,\n children,\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"host-reconciler.d.ts","sourceRoot":"","sources":["../src/host-reconciler.ts"],"names":[],"mappings":"AAAA,OAAO,EAoBL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAkBtB,OAAO,EAOL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAqC,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC3F,OAAO,EAaL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAUpB,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,MAAM,gBAAgB,CAAC;AAyBxB,UAAU,qBAAsB,SAAQ,aAAa;IACnD,aAAa,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC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OST_CHILDREN_ONLY_PROPS_META, LAZY_TYPE, MEMO_TYPE, Profiler, REACTIVE_DOM_BLOCK_TYPE, REACTIVE_TEXT_BINDING_META, STRICT_MODE_TYPE, Suspense, SuspenseList, isReactCompatElement, isReactCompatPortal, } from "./element.js";
2
- import { createReactivePropCell, createReactivePropProxy, setReactivePropCell, } from "./reactive-prop-cell.js";
2
+ import { batchReactivePropCellUpdates, createReactivePropCell, createReactivePropProxy, setReactivePropCell, } from "./reactive-prop-cell.js";
3
3
  import { consumerContext, isReactCompatConsumer, isReactCompatProvider, renderWithContextProvider, useContext, } from "./context.js";
4
4
  import { applyPostChildFormProps, applyProps } from "./dom-props.js";
5
5
  import { syncChildNodes, syncOwnedChildNodes, syncScopedChildNodes } from "./dom-children.js";
@@ -78,7 +78,10 @@ export function canRenderHostFiber(node) {
78
78
  export function renderHostFiberRoot(root, element, runtime, options = {}) {
79
79
  const workInProgress = createWorkInProgress(root.current, { children: element });
80
80
  const rootDocument = root.container.ownerDocument;
81
- const result = reconcileHostChild(workInProgress, root.current.child, element, runtime, options.previousNodes === undefined ? "0" : "", { ...options, documentRef: options.documentRef ?? rootDocument });
81
+ const result = batchReactivePropCellUpdates(() => reconcileHostChild(workInProgress, root.current.child, element, runtime, options.previousNodes === undefined ? "0" : "", {
82
+ ...options,
83
+ documentRef: options.documentRef ?? rootDocument,
84
+ }));
82
85
  workInProgress.child = result.fiber;
83
86
  workInProgress.memoizedProps = { children: element };
84
87
  root.refCleanupKnown = true;
@@ -488,10 +491,82 @@ function isKeyedMemoRowCandidate(node) {
488
491
  // reconciler can drive its committed block straight through the prop cell instead
489
492
  // of re-invoking the component (the block's bound DOM updates via subscriptions).
490
493
  const STATIC_REACTIVE_BLOCK_MARKER = "__mreactStaticBlock";
494
+ const MEMO_COMPARE_PROPS_MARKER = "__mreactMemoCompareProps";
491
495
  function isStaticReactiveBlockComponent(type) {
492
496
  return (typeof type === "function" &&
493
497
  type[STATIC_REACTIVE_BLOCK_MARKER] === true);
494
498
  }
499
+ function areCompilerMemoComparePropsEqual(memoType, previousProps, nextProps) {
500
+ const keys = memoType[MEMO_COMPARE_PROPS_MARKER];
501
+ if (keys === undefined) {
502
+ return undefined;
503
+ }
504
+ if (keys.length === 1) {
505
+ const key = keys[0];
506
+ return previousProps[key] === nextProps[key];
507
+ }
508
+ if (keys.length === 2) {
509
+ const first = keys[0];
510
+ const second = keys[1];
511
+ return previousProps[first] === nextProps[first] &&
512
+ previousProps[second] === nextProps[second];
513
+ }
514
+ if (keys.length === 3) {
515
+ const first = keys[0];
516
+ const second = keys[1];
517
+ const third = keys[2];
518
+ return previousProps[first] === nextProps[first] &&
519
+ previousProps[second] === nextProps[second] &&
520
+ previousProps[third] === nextProps[third];
521
+ }
522
+ for (const key of keys) {
523
+ if (previousProps[key] !== nextProps[key]) {
524
+ return false;
525
+ }
526
+ }
527
+ return true;
528
+ }
529
+ function tryCreateInitialStaticBlockMemoFiber(node, key, memoType, runtime, memoPath, options) {
530
+ if (options.previousNodes !== undefined ||
531
+ node.ref !== null ||
532
+ !isStaticReactiveBlockComponent(memoType.type)) {
533
+ return undefined;
534
+ }
535
+ const props = node.props;
536
+ const componentType = memoType.type;
537
+ const rendered = componentType(props);
538
+ if (!isReactCompatElement(rendered) || rendered.type !== REACTIVE_DOM_BLOCK_TYPE) {
539
+ return undefined;
540
+ }
541
+ const memoFiber = createFiber("memo", props, key);
542
+ memoFiber.type = memoType;
543
+ const componentFiber = createFiber("function-component", props, key);
544
+ componentFiber.type = componentType;
545
+ const childResult = createHostFiber(componentFiber, undefined, rendered, key, runtime, `${memoPath}.0`, options);
546
+ componentFiber.child = childResult.fiber;
547
+ if (componentFiber.child !== undefined) {
548
+ componentFiber.child.return = componentFiber;
549
+ componentFiber.child.sibling = undefined;
550
+ bubbleHostChild(componentFiber, componentFiber.child);
551
+ }
552
+ componentFiber.stateNode = {
553
+ element: node,
554
+ props,
555
+ instanceKeys: emptyInstanceKeys,
556
+ hasContextDependencies: false,
557
+ };
558
+ memoFiber.child = componentFiber;
559
+ componentFiber.return = memoFiber;
560
+ bubbleHostChild(memoFiber, componentFiber);
561
+ memoFiber.memoizedState = {
562
+ props,
563
+ instanceKeys: emptyInstanceKeys,
564
+ hasDirtyInstanceDependencies: false,
565
+ hasUnflushedEffectDependencies: false,
566
+ hasRetainedInstanceDependencies: false,
567
+ };
568
+ return { fiber: memoFiber, consumed: childResult.consumed };
569
+ }
495
570
  // In-place bailout for a keyed memo row whose props are unchanged and which has
496
571
  // no hook/context/effect dependencies. The caller has proven the key order is
497
572
  // unchanged (hasSameKeyOrderPrefix), so the fiber keeps its position and can be
@@ -512,8 +587,14 @@ function tryReuseDependencyFreeKeyedMemoRow(matched, child) {
512
587
  if (state === undefined ||
513
588
  state.hasDirtyInstanceDependencies !== false ||
514
589
  state.hasUnflushedEffectDependencies !== false ||
515
- state.hasRetainedInstanceDependencies !== false ||
516
- !areMemoPropsEqual(child.type, state.props, child.props)) {
590
+ state.hasRetainedInstanceDependencies !== false) {
591
+ return undefined;
592
+ }
593
+ const memoType = child.type;
594
+ const nextProps = child.props;
595
+ const propsEqual = areCompilerMemoComparePropsEqual(memoType, state.props, nextProps) ??
596
+ areMemoPropsEqual(memoType, state.props, nextProps);
597
+ if (!propsEqual) {
517
598
  return undefined;
518
599
  }
519
600
  matched.pendingProps = child.props;
@@ -566,8 +647,10 @@ function tryCellUpdateStaticBlockMemoRow(matched, child) {
566
647
  }
567
648
  // Drive the bound DOM through the prop cell (the marker guarantees the block's
568
649
  // props are the component's props verbatim), then reuse the memo fiber in place.
569
- setReactivePropCell(blockState.propCell, child.props);
570
- matched.memoizedState = { ...state, props: child.props };
650
+ const nextProps = child.props;
651
+ setReactivePropCell(blockState.propCell, nextProps);
652
+ state.props = nextProps;
653
+ matched.memoizedState = state;
571
654
  matched.pendingProps = child.props;
572
655
  matched.flags = NoFlags;
573
656
  matched.subtreeFlags = NoFlags;
@@ -578,19 +661,25 @@ function tryCellUpdateStaticBlockMemoRow(matched, child) {
578
661
  return matched;
579
662
  }
580
663
  // Fast path for a keyed list of memo-wrapped rows (e.g. `<RowMemo key={id} />`)
581
- // whose key order is UNCHANGED between renders the js-framework-benchmark
582
- // "select row" and "partial update" shapes. Walks current fibers and new
583
- // children in lockstep: unchanged rows bail in place (no allocation, no general
584
- // keyed-reconcile machinery), changed rows re-render through the proven
585
- // per-child path. Any reorder / insert / delete / non-memo child / length change
586
- // makes it return undefined so the general reconcile takes over.
664
+ // whose key order is UNCHANGED, append-only, or a single deletion between
665
+ // renders — the js-framework-benchmark "select row", "partial update",
666
+ // "append rows", and "remove row" shapes. Walks current fibers and new children
667
+ // in lockstep: unchanged rows bail in place (no allocation, no general
668
+ // keyed-reconcile machinery), changed rows cell-update through the proven
669
+ // per-child path, appended rows are created as a suffix, and a single deleted
670
+ // row is removed while the suffix is retained. Any reorder / insert /
671
+ // multi-delete / non-memo child makes it return undefined so the general
672
+ // reconcile takes over.
587
673
  function reconcileKeyedMemoRowHostChildren(parent, currentFirstChild, children, runtime, path, options) {
588
674
  if (children.length === 0 ||
589
675
  currentFirstChild === undefined ||
590
676
  runtime === undefined ||
591
677
  options.previousNodes !== undefined ||
592
- !isKeyedMemoRowCandidate(children[0]) ||
593
- !hasSameKeyOrderPrefix(currentFirstChild, children)) {
678
+ !isKeyedMemoRowCandidate(children[0])) {
679
+ return undefined;
680
+ }
681
+ const memoRowType = children[0].type;
682
+ if (!hasSameAppendOrSingleDeleteKeyOrder(currentFirstChild, children, memoRowType)) {
594
683
  return undefined;
595
684
  }
596
685
  let currentKeyed = currentFirstChild;
@@ -600,27 +689,49 @@ function reconcileKeyedMemoRowHostChildren(parent, currentFirstChild, children,
600
689
  let subtreeChildListChanged = false;
601
690
  let hasRefSubtree = false;
602
691
  let hasDisposableResources = false;
692
+ let listShapeChanged = false;
693
+ let appendSuffix;
694
+ let removedFiber;
603
695
  let dirtyChildren;
604
696
  for (let index = 0; index < children.length; index += 1) {
605
697
  const child = children[index];
606
- if (currentKeyed === undefined || !isKeyedMemoRowCandidate(child)) {
698
+ const childElement = child;
699
+ let matched = currentKeyed;
700
+ if (matched === undefined) {
701
+ // append-only suffix
702
+ }
703
+ else if (matched.key === childElement.key) {
704
+ currentKeyed = matched.sibling;
705
+ }
706
+ else if (removedFiber === undefined &&
707
+ matched.sibling?.key === childElement.key &&
708
+ canSkipSingleDeletedKeyedFiber(children, index, matched.sibling)) {
709
+ removedFiber = matched;
710
+ matched = matched.sibling;
711
+ currentKeyed = matched.sibling;
712
+ listShapeChanged = true;
713
+ }
714
+ else {
607
715
  return undefined;
608
716
  }
609
- const matched = currentKeyed;
610
- currentKeyed = currentKeyed.sibling;
611
- const childElement = child;
612
- let fiber = tryReuseDependencyFreeKeyedMemoRow(matched, childElement) ??
613
- tryCellUpdateStaticBlockMemoRow(matched, childElement);
717
+ let fiber = matched === undefined
718
+ ? undefined
719
+ : tryReuseDependencyFreeKeyedMemoRow(matched, childElement) ??
720
+ tryCellUpdateStaticBlockMemoRow(matched, childElement);
614
721
  if (fiber === undefined) {
615
722
  const result = createHostFiber(parent, matched, child, childElement.key ?? undefined, runtime, getReconcileChildPath(path, child, index, options), options, false);
616
723
  fiber = result.fiber;
617
724
  if (fiber === undefined) {
618
725
  return undefined;
619
726
  }
620
- if (fiber !== matched && fiber.alternate !== matched) {
727
+ if (matched !== undefined && fiber !== matched && fiber.alternate !== matched) {
621
728
  markOptimizedChildForDeletion(parent, matched);
622
729
  }
623
730
  }
731
+ if (matched === undefined) {
732
+ listShapeChanged = true;
733
+ appendSuffix ??= { fiber, index };
734
+ }
624
735
  if (first === undefined) {
625
736
  first = fiber;
626
737
  }
@@ -648,16 +759,62 @@ function reconcileKeyedMemoRowHostChildren(parent, currentFirstChild, children,
648
759
  previous = fiber;
649
760
  }
650
761
  if (currentKeyed !== undefined) {
651
- return undefined;
762
+ if (removedFiber !== undefined || currentKeyed.sibling !== undefined) {
763
+ return undefined;
764
+ }
765
+ removedFiber = currentKeyed;
766
+ listShapeChanged = true;
652
767
  }
653
768
  parent.hasRefSubtree = hasRefSubtree;
654
769
  parent.hasDisposableResources = hasDisposableResources;
655
770
  parent.subtreeFlags = subtreeFlags;
656
771
  parent.subtreeChildListChanged = subtreeChildListChanged;
657
- parent.childListChanged = false;
772
+ parent.childListChanged = listShapeChanged;
773
+ if (appendSuffix !== undefined && canStoreAppendSuffixCommitHint(parent)) {
774
+ parent.memoizedState = appendSuffix;
775
+ }
776
+ if (removedFiber !== undefined) {
777
+ parent.deletions = [removedFiber];
778
+ markOptimizedChildForDeletion(parent, removedFiber);
779
+ }
658
780
  recordDirtyChildCommitHints(parent, dirtyChildren);
659
781
  return { fiber: first, consumed: 0 };
660
782
  }
783
+ function hasSameAppendOrSingleDeleteKeyOrder(currentFirstChild, children, expectedType) {
784
+ let current = currentFirstChild;
785
+ let skippedDeletion = false;
786
+ for (let index = 0; index < children.length; index += 1) {
787
+ const child = children[index];
788
+ if (!isSameKeyedMemoRowCandidate(child, expectedType)) {
789
+ return false;
790
+ }
791
+ const key = child.key;
792
+ if (current === undefined) {
793
+ return true;
794
+ }
795
+ if (current.key === key) {
796
+ current = current.sibling;
797
+ continue;
798
+ }
799
+ const sibling = current.sibling;
800
+ if (!skippedDeletion &&
801
+ sibling !== undefined &&
802
+ sibling.key === key &&
803
+ canSkipSingleDeletedKeyedFiber(children, index, sibling)) {
804
+ skippedDeletion = true;
805
+ current = sibling.sibling;
806
+ continue;
807
+ }
808
+ return false;
809
+ }
810
+ return current === undefined || (!skippedDeletion && current.sibling === undefined);
811
+ }
812
+ function isSameKeyedMemoRowCandidate(node, expectedType) {
813
+ return (isReactCompatElement(node) &&
814
+ node.key !== null &&
815
+ node.ref === null &&
816
+ node.type === expectedType);
817
+ }
661
818
  function canReuseDependencyFreeMemoAtKey(current, node, key) {
662
819
  return (current !== undefined &&
663
820
  current.key === key &&
@@ -1226,6 +1383,12 @@ function createHostFiberImpl(parent, current, node, key, runtime, path, options
1226
1383
  const memoType = node.type;
1227
1384
  const memoPath = `${path}.memo`;
1228
1385
  const previousMemoFiber = current?.tag === "memo" && current.type === memoType ? current : undefined;
1386
+ const initialStaticBlockMemoFiber = previousMemoFiber === undefined
1387
+ ? tryCreateInitialStaticBlockMemoFiber(node, key, memoType, runtime, memoPath, options)
1388
+ : undefined;
1389
+ if (initialStaticBlockMemoFiber !== undefined) {
1390
+ return initialStaticBlockMemoFiber;
1391
+ }
1229
1392
  const previousMemoState = previousMemoFiber !== undefined
1230
1393
  ? previousMemoFiber.memoizedState
1231
1394
  : undefined;
@@ -1871,6 +2034,7 @@ function commitHostSingleRemoval(fiber, parent) {
1871
2034
  removedAny = true;
1872
2035
  }
1873
2036
  if (removedAny) {
2037
+ disposeHostFiberResources(removed);
1874
2038
  fiber.deletions = undefined;
1875
2039
  }
1876
2040
  return removedAny;