@kunpeng-js/properties-panel 2026.0.0-alpha2 → 2026.10.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.
Files changed (127) hide show
  1. package/LICENSE +9 -2
  2. package/dist/index.esm.js +3760 -3762
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +3724 -3804
  5. package/dist/index.js.map +1 -1
  6. package/package.json +22 -48
  7. package/preact/README.md +5 -5
  8. package/preact/compat/client.d.ts +1 -3
  9. package/preact/compat/dist/compat.mjs +2 -2
  10. package/preact/compat/dist/compat.mjs.map +1 -0
  11. package/preact/compat/package.json +2 -41
  12. package/preact/compat/scheduler.d.ts +12 -0
  13. package/preact/compat/server.d.ts +17 -0
  14. package/preact/compat/src/Children.js +3 -3
  15. package/preact/compat/src/PureComponent.js +20 -12
  16. package/preact/compat/src/forwardRef.js +4 -17
  17. package/preact/compat/src/hooks.js +17 -51
  18. package/preact/compat/src/index.d.ts +249 -164
  19. package/preact/compat/src/index.js +52 -43
  20. package/preact/compat/src/internal.d.ts +1 -2
  21. package/preact/compat/src/memo.js +2 -2
  22. package/preact/compat/src/portals.js +2 -68
  23. package/preact/compat/src/render.js +182 -73
  24. package/preact/compat/src/suspense.d.ts +1 -3
  25. package/preact/compat/src/suspense.js +169 -179
  26. package/preact/compat/src/util.js +5 -22
  27. package/preact/debug/dist/debug.mjs +2 -2
  28. package/preact/debug/dist/debug.mjs.map +1 -0
  29. package/preact/debug/package.json +3 -14
  30. package/preact/debug/src/check-props.js +2 -6
  31. package/preact/debug/src/component-stack.js +67 -16
  32. package/preact/debug/src/debug.js +80 -35
  33. package/preact/debug/src/index.d.ts +11 -1
  34. package/preact/debug/src/index.js +3 -1
  35. package/preact/debug/src/util.js +1 -11
  36. package/preact/devtools/dist/devtools.mjs +2 -2
  37. package/preact/devtools/dist/devtools.mjs.map +1 -0
  38. package/preact/devtools/package.json +3 -15
  39. package/preact/devtools/src/devtools.js +1 -1
  40. package/preact/dist/preact.mjs +2 -2
  41. package/preact/dist/preact.mjs.map +1 -0
  42. package/preact/hooks/dist/hooks.mjs +2 -2
  43. package/preact/hooks/dist/hooks.mjs.map +1 -0
  44. package/preact/hooks/package.json +5 -24
  45. package/preact/hooks/src/index.d.ts +6 -13
  46. package/preact/hooks/src/index.js +95 -73
  47. package/preact/hooks/src/internal.d.ts +8 -3
  48. package/preact/jsx-runtime/dist/jsxRuntime.mjs +2 -2
  49. package/preact/jsx-runtime/dist/jsxRuntime.mjs.map +1 -0
  50. package/preact/jsx-runtime/package.json +4 -16
  51. package/preact/jsx-runtime/src/index.d.ts +11 -11
  52. package/preact/jsx-runtime/src/index.js +25 -40
  53. package/preact/jsx-runtime/src/utils.js +3 -3
  54. package/preact/package.json +59 -115
  55. package/preact/src/component.js +54 -47
  56. package/preact/src/constants.js +17 -2
  57. package/preact/src/create-context.js +4 -14
  58. package/preact/src/create-element.js +42 -17
  59. package/preact/src/create-portal.js +20 -0
  60. package/preact/src/diff/catch-error.js +26 -8
  61. package/preact/src/diff/children.js +158 -96
  62. package/preact/src/diff/index.js +265 -146
  63. package/preact/src/diff/props.js +39 -50
  64. package/preact/src/dom.d.ts +796 -147
  65. package/preact/src/index.d.ts +7 -18
  66. package/preact/src/index.js +2 -1
  67. package/preact/src/internal.d.ts +16 -24
  68. package/preact/src/jsx.d.ts +222 -2910
  69. package/preact/src/render.js +30 -34
  70. package/preact/src/util.js +5 -20
  71. package/preact/test-utils/dist/testUtils.mjs +1 -1
  72. package/preact/test-utils/dist/testUtils.mjs.map +1 -0
  73. package/preact/test-utils/package.json +5 -17
  74. package/README.md +0 -35
  75. package/preact/compat/dist/compat.js +0 -2
  76. package/preact/compat/dist/compat.js.map +0 -1
  77. package/preact/compat/dist/compat.module.js +0 -2
  78. package/preact/compat/dist/compat.module.js.map +0 -1
  79. package/preact/compat/dist/compat.umd.js +0 -2
  80. package/preact/compat/dist/compat.umd.js.map +0 -1
  81. package/preact/compat/src/suspense-list.d.ts +0 -16
  82. package/preact/compat/src/suspense-list.js +0 -127
  83. package/preact/debug/dist/debug.js +0 -2
  84. package/preact/debug/dist/debug.js.map +0 -1
  85. package/preact/debug/dist/debug.module.js +0 -2
  86. package/preact/debug/dist/debug.module.js.map +0 -1
  87. package/preact/debug/dist/debug.umd.js +0 -2
  88. package/preact/debug/dist/debug.umd.js.map +0 -1
  89. package/preact/devtools/dist/devtools.js +0 -2
  90. package/preact/devtools/dist/devtools.js.map +0 -1
  91. package/preact/devtools/dist/devtools.module.js +0 -2
  92. package/preact/devtools/dist/devtools.module.js.map +0 -1
  93. package/preact/devtools/dist/devtools.umd.js +0 -2
  94. package/preact/devtools/dist/devtools.umd.js.map +0 -1
  95. package/preact/dist/preact.js +0 -2
  96. package/preact/dist/preact.js.map +0 -1
  97. package/preact/dist/preact.min.js +0 -2
  98. package/preact/dist/preact.min.js.map +0 -1
  99. package/preact/dist/preact.min.module.js +0 -2
  100. package/preact/dist/preact.min.module.js.map +0 -1
  101. package/preact/dist/preact.min.umd.js +0 -2
  102. package/preact/dist/preact.min.umd.js.map +0 -1
  103. package/preact/dist/preact.module.js +0 -2
  104. package/preact/dist/preact.module.js.map +0 -1
  105. package/preact/dist/preact.umd.js +0 -2
  106. package/preact/dist/preact.umd.js.map +0 -1
  107. package/preact/hooks/dist/hooks.js +0 -2
  108. package/preact/hooks/dist/hooks.js.map +0 -1
  109. package/preact/hooks/dist/hooks.module.js +0 -2
  110. package/preact/hooks/dist/hooks.module.js.map +0 -1
  111. package/preact/hooks/dist/hooks.umd.js +0 -2
  112. package/preact/hooks/dist/hooks.umd.js.map +0 -1
  113. package/preact/jsx-runtime/dist/jsxRuntime.js +0 -2
  114. package/preact/jsx-runtime/dist/jsxRuntime.js.map +0 -1
  115. package/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -2
  116. package/preact/jsx-runtime/dist/jsxRuntime.module.js.map +0 -1
  117. package/preact/jsx-runtime/dist/jsxRuntime.umd.js +0 -2
  118. package/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +0 -1
  119. package/preact/src/cjs.js +0 -3
  120. package/preact/src/clone-element.js +0 -48
  121. package/preact/src/index-5.d.ts +0 -399
  122. package/preact/test-utils/dist/testUtils.js +0 -2
  123. package/preact/test-utils/dist/testUtils.js.map +0 -1
  124. package/preact/test-utils/dist/testUtils.module.js +0 -2
  125. package/preact/test-utils/dist/testUtils.module.js.map +0 -1
  126. package/preact/test-utils/dist/testUtils.umd.js +0 -2
  127. package/preact/test-utils/dist/testUtils.umd.js.map +0 -1
@@ -39,9 +39,9 @@ export interface VNode<P = {}> {
39
39
 
40
40
  export type Key = string | number | any;
41
41
 
42
- export type RefObject<T> = { current: T | null };
42
+ export type RefObject<T> = { current: T };
43
43
  export type RefCallback<T> = (instance: T | null) => void | (() => void);
44
- export type Ref<T> = RefObject<T> | RefCallback<T> | null;
44
+ export type Ref<T> = RefCallback<T> | RefObject<T | null> | null;
45
45
 
46
46
  export type ComponentChild =
47
47
  | VNode<any>
@@ -92,14 +92,12 @@ export type ComponentProps<
92
92
  export interface FunctionComponent<P = {}> {
93
93
  (props: RenderableProps<P>, context?: any): ComponentChildren;
94
94
  displayName?: string;
95
- defaultProps?: Partial<P> | undefined;
96
95
  }
97
96
  export interface FunctionalComponent<P = {}> extends FunctionComponent<P> {}
98
97
 
99
98
  export interface ComponentClass<P = {}, S = {}> {
100
99
  new (props: P, context?: any): Component<P, S>;
101
100
  displayName?: string;
102
- defaultProps?: Partial<P>;
103
101
  contextType?: Context<any>;
104
102
  getDerivedStateFromProps?(
105
103
  props: Readonly<P>,
@@ -117,6 +115,7 @@ export type AnyComponent<P = {}, S = {}> =
117
115
  | FunctionComponent<P>
118
116
  | ComponentConstructor<P, S>;
119
117
 
118
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
120
119
  export interface Component<P = {}, S = {}> {
121
120
  componentWillMount?(): void;
122
121
  componentDidMount?(): void;
@@ -146,7 +145,6 @@ export abstract class Component<P, S> {
146
145
  constructor(props?: P, context?: any);
147
146
 
148
147
  static displayName?: string;
149
- static defaultProps?: any;
150
148
  static contextType?: Context<any>;
151
149
 
152
150
  // Static members cannot reference class type parameters. This is not
@@ -164,7 +162,6 @@ export abstract class Component<P, S> {
164
162
  state: Readonly<S>;
165
163
  props: RenderableProps<P>;
166
164
  context: any;
167
- base?: Element | Text;
168
165
 
169
166
  // From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
170
167
  // // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
@@ -269,25 +266,17 @@ export interface ContainerNode {
269
266
  readonly firstChild: ContainerNode | null;
270
267
  readonly childNodes: ArrayLike<ContainerNode>;
271
268
 
272
- contains(other: ContainerNode | null): boolean;
273
269
  insertBefore(node: ContainerNode, child: ContainerNode | null): ContainerNode;
274
270
  appendChild(node: ContainerNode): ContainerNode;
275
271
  removeChild(child: ContainerNode): ContainerNode;
276
272
  }
277
273
 
278
274
  export function render(vnode: ComponentChild, parent: ContainerNode): void;
279
- /**
280
- * @deprecated The `replaceNode` parameter will be removed in v11.
281
- *
282
- * Replacement Preact 10+ implementation can be found in the `preact-root-fragment` package.
283
- * Docs: https://github.com/preactjs/preact-root-fragment
284
- */
285
- export function render(
286
- vnode: ComponentChild,
287
- parent: ContainerNode,
288
- replaceNode?: Element | Text
289
- ): void;
290
275
  export function hydrate(vnode: ComponentChild, parent: ContainerNode): void;
276
+ export function createPortal(
277
+ vnode: ComponentChildren,
278
+ container: ContainerNode
279
+ ): VNode<any>;
291
280
  export function cloneElement(
292
281
  vnode: VNode<any>,
293
282
  props?: any,
@@ -4,10 +4,11 @@ export {
4
4
  createElement as h,
5
5
  Fragment,
6
6
  createRef,
7
+ cloneElement,
7
8
  isValidElement
8
9
  } from './create-element';
9
10
  export { BaseComponent as Component } from './component';
10
- export { cloneElement } from './clone-element';
11
11
  export { createContext } from './create-context';
12
+ export { createPortal } from './create-portal';
12
13
  export { toChildArray } from './diff/children';
13
14
  export { default as options } from './options';
@@ -1,6 +1,4 @@
1
- // Intentionally not using a relative path to take advantage of
2
- // the TS version resolution mechanism
3
- import * as preact from 'preact';
1
+ import * as preact from './index';
4
2
 
5
3
  export enum HookType {
6
4
  useState = 1,
@@ -67,10 +65,6 @@ export interface FunctionComponent<P = {}> extends preact.FunctionComponent<P> {
67
65
  // implement the Consumer component
68
66
  contextType?: PreactContext;
69
67
 
70
- // Internally, createContext stores a ref to the context object on the Provider
71
- // Function component to help devtools
72
- _contextRef?: PreactContext;
73
-
74
68
  // Define these properties as undefined on FunctionComponent to get rid of
75
69
  // some errors in `diff()`
76
70
  getDerivedStateFromProps?: undefined;
@@ -78,8 +72,6 @@ export interface FunctionComponent<P = {}> extends preact.FunctionComponent<P> {
78
72
  }
79
73
 
80
74
  export interface ComponentClass<P = {}> extends preact.ComponentClass<P> {
81
- _contextRef?: any;
82
-
83
75
  // Override public contextType with internal PreactContext type
84
76
  contextType?: PreactContext;
85
77
  }
@@ -94,6 +86,8 @@ export interface PreactElement extends preact.ContainerNode {
94
86
  data?: CharacterData['data'];
95
87
  // Property to set __dangerouslySetInnerHTML
96
88
  innerHTML?: Element['innerHTML'];
89
+ textContent?: Element['textContent'];
90
+ remove?: Element['remove'];
97
91
 
98
92
  // Attribute reading and setting
99
93
  readonly attributes?: Element['attributes'];
@@ -104,6 +98,11 @@ export interface PreactElement extends preact.ContainerNode {
104
98
  addEventListener?: Element['addEventListener'];
105
99
  removeEventListener?: Element['removeEventListener'];
106
100
 
101
+ // Used to match DOM nodes to VNodes during hydration
102
+ readonly ownerDocument: Document;
103
+ // Used to retarget a Document render to its root element
104
+ readonly documentElement?: PreactElement | null;
105
+
107
106
  // Setting styles
108
107
  readonly style?: CSSStyleDeclaration;
109
108
 
@@ -122,12 +121,14 @@ export interface PreactElement extends preact.ContainerNode {
122
121
  _children?: VNode<any> | null;
123
122
  /** Event listeners to support event delegation */
124
123
  _listeners?: Record<string, (e: Event) => void>;
124
+ /** Event clock value at which each listener was attached, kept when `_listeners` is reset on unmount */
125
+ _attached?: Record<string, number>;
125
126
  }
126
127
 
127
128
  export interface PreactEvent extends Event {
128
- // Keyed by a per-instance unique string (e.g. `__dXXXXX`) so that
129
- // multiple Preact copies on the same page don't share event clock stamps.
130
- [key: string]: any;
129
+ // Keyed by a per-instance unique Symbol so that multiple Preact copies
130
+ // on the same page don't share event clock stamps.
131
+ [key: symbol]: any;
131
132
  }
132
133
 
133
134
  // We use the `current` property to differentiate between the two kinds of Refs so
@@ -140,9 +141,7 @@ type RefCallback<T> = {
140
141
  export type Ref<T> = RefObject<T> | RefCallback<T>;
141
142
 
142
143
  export interface VNode<P = {}> extends preact.VNode<P> {
143
- // Redefine type here using our internal ComponentType type, and specify
144
- // string has an undefined `defaultProps` property to make TS happy
145
- type: (string & { defaultProps: undefined }) | ComponentType<P>;
144
+ type: string | ComponentType<P>;
146
145
  props: P & { children: ComponentChildren };
147
146
  ref?: Ref<any> | null;
148
147
  _children: Array<VNode<any>> | null;
@@ -166,26 +165,19 @@ export interface Component<P = {}, S = {}> extends Omit<
166
165
  // When component is functional component, this is reset to functional component
167
166
  constructor: ComponentType<P>;
168
167
  state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
169
- base?: PreactElement;
170
168
 
171
- _dirty: boolean;
172
- _force?: boolean;
169
+ _excess?: PreactElement;
173
170
  _renderCallbacks: Array<() => void>; // Only class components
174
171
  _stateCallbacks: Array<() => void>; // Only class components
175
172
  _globalContext?: any;
176
173
  _vnode?: VNode<P> | null;
177
174
  _nextState?: S | null; // Only class components
178
- /** Only used in the devtools to later dirty check if state has changed */
179
- _prevState?: S | null;
180
175
  /**
181
176
  * Pointer to the parent dom node. This is only needed for top-level Fragment
182
177
  * components or array returns.
183
178
  */
184
179
  _parentDom?: PreactElement | null;
185
- // Always read, set only when handling error
186
- _processingException?: Component<any, any> | null;
187
- // Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
188
- _pendingError?: Component<any, any> | null;
180
+ _bits: number;
189
181
  }
190
182
 
191
183
  export interface PreactContext extends preact.Context<any> {