@context-action/core 1.2.6 → 1.3.1

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 (38) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +31 -1
  3. package/dist/element-BRlY61kW.cjs +631 -0
  4. package/dist/element-BTaXgo7n.js +597 -0
  5. package/dist/element-BTaXgo7n.js.map +1 -0
  6. package/dist/element-DPioFL7C.d.cts +163 -0
  7. package/dist/element-DPioFL7C.d.cts.map +1 -0
  8. package/dist/element-DPioFL7C.d.ts +163 -0
  9. package/dist/element-DPioFL7C.d.ts.map +1 -0
  10. package/dist/element-react.cjs +91 -0
  11. package/dist/element-react.d.cts +11 -0
  12. package/dist/element-react.d.cts.map +1 -0
  13. package/dist/element-react.d.ts +11 -0
  14. package/dist/element-react.d.ts.map +1 -0
  15. package/dist/element-react.js +85 -0
  16. package/dist/element-react.js.map +1 -0
  17. package/dist/element.cjs +9 -0
  18. package/dist/element.d.cts +3 -0
  19. package/dist/element.d.ts +3 -0
  20. package/dist/element.js +3 -0
  21. package/dist/index.cjs +154 -47
  22. package/dist/index.d.cts +2 -1
  23. package/dist/index.d.cts.map +1 -1
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +154 -47
  27. package/dist/index.js.map +1 -1
  28. package/dist/public-action-methods-C_ppItRr.d.cts +5 -0
  29. package/dist/public-action-methods-C_ppItRr.d.cts.map +1 -0
  30. package/dist/public-action-methods-C_ppItRr.d.ts +5 -0
  31. package/dist/public-action-methods-C_ppItRr.d.ts.map +1 -0
  32. package/docs/action-contracts.md +78 -0
  33. package/docs/element-host-patterns.en.md +129 -0
  34. package/docs/element-host-patterns.ko.md +116 -0
  35. package/docs/element-interop.md +138 -0
  36. package/docs/interop-review.en.md +55 -0
  37. package/docs/interop-review.ko.md +51 -0
  38. package/package.json +35 -4
@@ -0,0 +1,163 @@
1
+ //#region src/facade/types.d.ts
2
+ type PublicHandleFactory<Target extends object, Handle> = (getTarget: () => Target | null) => Handle;
3
+ //#endregion
4
+ //#region src/element/contracts.d.ts
5
+ type ImperativeHandleFactory<Element extends HTMLElement, Handle> = PublicHandleFactory<Element, Handle>;
6
+ interface ElementBindingConfig<Props extends object> {
7
+ properties?: readonly (keyof Props)[];
8
+ attributes?: Partial<Record<keyof Props & string, string>>;
9
+ styles?: Partial<Record<keyof Props & string, string>>;
10
+ events?: Record<string, string>;
11
+ }
12
+ interface ElementBridgeConfig<Props extends object, Element extends HTMLElement = HTMLElement, Handle = Element> extends ElementBindingConfig<Props> {
13
+ createHandle?: ImperativeHandleFactory<Element, Handle>;
14
+ }
15
+ interface ElementBridgeContract<Props extends object, Element extends HTMLElement = HTMLElement, Handle = Element> extends ElementBridgeConfig<Props, Element, Handle> {
16
+ tagName: string;
17
+ }
18
+ interface ElementBindingOptions {
19
+ assignmentErrors?: 'ignore' | 'throw';
20
+ }
21
+ interface ElementBinding<Props extends object> {
22
+ readonly disposed: boolean;
23
+ update(input: Props): void;
24
+ updateProperties(input: Props): void;
25
+ updateAttributes(input: Props): void;
26
+ updateStyles(input: Props): void;
27
+ updateEvents(input: Props): void;
28
+ disconnectEvents(): void;
29
+ dispose(): void;
30
+ }
31
+ //#endregion
32
+ //#region src/element/create-element-facade.d.ts
33
+ declare function createElementFacade<Element extends HTMLElement, const Keys extends readonly (keyof Element)[]>(keys: Keys): ImperativeHandleFactory<Element, Pick<Element, Keys[number]>>;
34
+ //#endregion
35
+ //#region src/element/create-element-binding.d.ts
36
+ declare function createElementBinding<Props extends object>(element: HTMLElement, config: ElementBindingConfig<Props>, options?: ElementBindingOptions): ElementBinding<Props>;
37
+ //#endregion
38
+ //#region src/element/pointer-gesture-session.d.ts
39
+ interface PointerGestureModifiers {
40
+ readonly shiftKey: boolean;
41
+ readonly altKey: boolean;
42
+ readonly ctrlKey: boolean;
43
+ readonly metaKey: boolean;
44
+ }
45
+ interface PointerGestureSnapshot {
46
+ readonly active: boolean;
47
+ readonly pointerId: number | null;
48
+ readonly startX: number;
49
+ readonly startY: number;
50
+ readonly currentX: number;
51
+ readonly currentY: number;
52
+ readonly deltaX: number;
53
+ readonly deltaY: number;
54
+ readonly modifiers: PointerGestureModifiers;
55
+ }
56
+ interface PointerCaptureTargetLike {
57
+ setPointerCapture?(pointerId: number): void;
58
+ releasePointerCapture?(pointerId: number): void;
59
+ }
60
+ interface PointerGestureEventLike {
61
+ readonly pointerId?: number | undefined;
62
+ readonly button?: number | undefined;
63
+ readonly clientX: number;
64
+ readonly clientY: number;
65
+ readonly shiftKey?: boolean | undefined;
66
+ readonly altKey?: boolean | undefined;
67
+ readonly ctrlKey?: boolean | undefined;
68
+ readonly metaKey?: boolean | undefined;
69
+ readonly currentTarget?: PointerCaptureTargetLike | null | undefined;
70
+ }
71
+ interface PointerGestureKeyEventLike {
72
+ readonly key: string;
73
+ preventDefault?(): void;
74
+ }
75
+ interface PointerGestureOptions {
76
+ onStart?: ((snapshot: PointerGestureSnapshot) => boolean | void) | undefined;
77
+ onMove?: ((snapshot: PointerGestureSnapshot) => void) | undefined;
78
+ onCommit?: ((snapshot: PointerGestureSnapshot) => void) | undefined;
79
+ onCancel?: ((snapshot: PointerGestureSnapshot, reason?: string) => void) | undefined;
80
+ }
81
+ interface PointerGestureSession {
82
+ start(event: PointerGestureEventLike): boolean;
83
+ move(event: PointerGestureEventLike): boolean;
84
+ commit(event?: PointerGestureEventLike): boolean;
85
+ cancel(reason?: string): boolean;
86
+ handleKeyDown(event: PointerGestureKeyEventLike): boolean;
87
+ isActive(): boolean;
88
+ getSnapshot(): PointerGestureSnapshot;
89
+ dispose(): void;
90
+ }
91
+ declare function createPointerGestureSession(options?: PointerGestureOptions): PointerGestureSession;
92
+ //#endregion
93
+ //#region src/element/roving-focus.d.ts
94
+ type RovingFocusOrientation = 'horizontal' | 'vertical' | 'both';
95
+ interface RovingFocusItem {
96
+ readonly id: string;
97
+ readonly disabled?: boolean | undefined;
98
+ }
99
+ interface RovingFocusKeyEventLike {
100
+ readonly key: string;
101
+ preventDefault?(): void;
102
+ }
103
+ interface RovingFocusOptions {
104
+ readonly orientation?: RovingFocusOrientation | undefined;
105
+ readonly loop?: boolean | undefined;
106
+ getItems(): readonly RovingFocusItem[];
107
+ getActiveId(): string | null | undefined;
108
+ onFocusChange?: ((nextId: string) => void) | undefined;
109
+ }
110
+ interface RovingFocusController {
111
+ getTabIndex(itemId: string): 0 | -1;
112
+ handleKeyDown(currentId: string, event: RovingFocusKeyEventLike): string | null;
113
+ }
114
+ declare function createRovingFocusController(options: RovingFocusOptions): RovingFocusController;
115
+ //#endregion
116
+ //#region src/element/sync-action-pipeline.d.ts
117
+ interface SyncGuardController<TPayload = unknown> {
118
+ abort(reason?: string): void;
119
+ modifyPayload(updater: TPayload | ((prev: TPayload) => TPayload)): void;
120
+ getPayload(): TPayload;
121
+ }
122
+ interface SyncResultController<TPayload = unknown, TResult = unknown> extends SyncGuardController<TPayload> {
123
+ setResult(value: TResult): void;
124
+ getResult(): TResult | undefined;
125
+ }
126
+ interface SyncObserverMeta<TResult = unknown> {
127
+ readonly success: boolean;
128
+ readonly aborted: boolean;
129
+ readonly abortReason?: string | undefined;
130
+ readonly result: TResult | undefined;
131
+ readonly errors: readonly unknown[];
132
+ }
133
+ interface SyncDispatchOutcome<TPayload = unknown, TResult = unknown> {
134
+ readonly success: boolean;
135
+ readonly aborted: boolean;
136
+ readonly abortReason?: string | undefined;
137
+ readonly payload: TPayload;
138
+ readonly result: TResult | undefined;
139
+ readonly errors: readonly unknown[];
140
+ }
141
+ interface SyncHandlerConfig {
142
+ readonly priority?: number;
143
+ readonly id?: string;
144
+ readonly once?: boolean;
145
+ }
146
+ interface SyncObserverConfig extends SyncHandlerConfig {
147
+ readonly when?: 'success' | 'failure' | 'always';
148
+ }
149
+ interface SyncActionPipeline<TActions extends Record<string, unknown> = Record<string, unknown>> {
150
+ readonly name: string;
151
+ registerGuard<K extends keyof TActions & string>(action: K, handler: (payload: TActions[K], controller: SyncGuardController<TActions[K]>) => void, config?: SyncHandlerConfig): () => void;
152
+ register<K extends keyof TActions & string, TResult = unknown>(action: K, handler: (payload: TActions[K], controller: SyncResultController<TActions[K], TResult>) => TResult | undefined, config?: SyncHandlerConfig): () => void;
153
+ registerObserver<K extends keyof TActions & string, TResult = unknown>(action: K, handler: (payload: TActions[K], meta: SyncObserverMeta<TResult>) => void, config?: SyncObserverConfig): () => void;
154
+ dispatch<K extends keyof TActions & string, TResult = unknown>(action: K, payload?: TActions[K]): SyncDispatchOutcome<TActions[K], TResult>;
155
+ destroy(): void;
156
+ }
157
+ declare function createSyncActionPipeline<TActions extends Record<string, unknown> = Record<string, unknown>>(name: string): SyncActionPipeline<TActions>;
158
+ //#endregion
159
+ //#region src/element/to-react-part-props.d.ts
160
+ declare function toReactPartProps<Props extends object>(snapshot: Props, config?: ElementBindingConfig<Props>): Record<string, unknown>;
161
+ //#endregion
162
+ export { ElementBridgeContract as A, createPointerGestureSession as C, ElementBindingConfig as D, ElementBinding as E, ElementBindingOptions as O, PointerGestureSnapshot as S, createElementFacade as T, PointerGestureEventLike as _, SyncHandlerConfig as a, PointerGestureOptions as b, SyncResultController as c, RovingFocusItem as d, RovingFocusKeyEventLike as f, PointerCaptureTargetLike as g, createRovingFocusController as h, SyncGuardController as i, ImperativeHandleFactory as j, ElementBridgeConfig as k, createSyncActionPipeline as l, RovingFocusOrientation as m, SyncActionPipeline as n, SyncObserverConfig as o, RovingFocusOptions as p, SyncDispatchOutcome as r, SyncObserverMeta as s, toReactPartProps as t, RovingFocusController as u, PointerGestureKeyEventLike as v, createElementBinding as w, PointerGestureSession as x, PointerGestureModifiers as y };
163
+ //# sourceMappingURL=element-DPioFL7C.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-DPioFL7C.d.cts","names":[],"sources":["../src/facade/types.ts","../src/element/contracts.ts","../src/element/create-element-facade.ts","../src/element/create-element-binding.ts","../src/element/pointer-gesture-session.ts","../src/element/roving-focus.ts","../src/element/sync-action-pipeline.ts","../src/element/to-react-part-props.ts"],"mappings":";KACY,oBAAoB,uBAAuB,WACpD,iBAAiB,kBAAkB;;;KCA1B,wBAAwB,gBAAgB,aAAa,UAAU,oBAAoB,SAAS;UAGvF,qBAAqB;EACpC,6BAA6B;EAC7B,aAAa,QAAQ,aAAa;EAClC,SAAS,QAAQ,aAAa;EAC9B,SAAS;;UAGM,oBAAoB,sBAAsB,gBAAgB,cAAc,aAAa,SAAS,iBACrG,qBAAqB;EAC7B,eAAe,wBAAwB,SAAS;;UAGjC,sBAAsB,sBAAsB,gBAAgB,cAAc,aAAa,SAAS,iBACvG,oBAAoB,OAAO,SAAS;EAC5C;;UAGe;EACf;;UAIe,eAAe;WACrB;EAET,OAAO,OAAO;EACd,iBAAiB,OAAO;EACxB,iBAAiB,OAAO;EACxB,aAAa,OAAO;EACpB,aAAa,OAAO;EAEpB;EAEA;;;;iBClCc,oBAAoB,gBAAgB,mBAAmB,6BAA6B,YAClG,MAAM,OACL,wBAAwB,SAAS,KAAK,SAAS;;;iBCClC,qBAAqB,sBACnC,SAAS,aACT,QAAQ,qBAAqB,QAC7B,UAAS,wBACR,eAAe;;;UCXD;WACN;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,WAAW;;UAGL;EACf,mBAAmB;EACnB,uBAAuB;;UAGR;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB;;UAGV;WACN;EACT;;UAGe;EAEf,YAAY,UAAU;EACtB,WAAW,UAAU;EACrB,aAAa,UAAU;EACvB,aAAa,UAAU,wBAAwB;;UAGhC;EACf,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,OAAO,QAAQ;EACf,OAAO;EACP,cAAc,OAAO;EACrB;EACA,eAAe;EACf;;iBAwCc,4BACd,UAAS,wBACR;;;KCnGS;UAEK;WACN;WACA;;UAGM;WACN;EACT;;UAGe;WACN,cAAc;WACd;EACT,qBAAqB;EACrB;EACA,kBAAkB;;UAGH;EACf,YAAY;EACZ,cAAc,mBAAmB,OAAO;;iBAe1B,4BAA4B,SAAS,qBAAqB;;;UCrCzD,oBAAoB;EACnC,MAAM;EACN,cAAc,SAAS,aAAa,MAAM,aAAa;EACvD,cAAc;;UAGC,qBAAqB,oBAAoB,2BAChD,oBAAoB;EAC5B,UAAU,OAAO;EACjB,aAAa;;UAGE,iBAAiB;WACvB;WACA;WACA;WACA,QAAQ;WACR;;UAGM,oBAAoB,oBAAoB;WAC9C;WACA;WACA;WACA,SAAS;WACT,QAAQ;WACR;;UAGM;WACN;WACA;WACA;;UAGM,2BAA2B;WACjC;;UAGM,mBACf,iBAAiB,0BAA0B;WAElC;EACT,cAAc,gBAAgB,mBAC5B,QAAQ,GACR,UAAU,SAAS,SAAS,IAAI,YAAY,oBAAoB,SAAS,cACzE,SAAS;EAEX,SAAS,gBAAgB,mBAAmB,mBAC1C,QAAQ,GACR,UACE,SAAS,SAAS,IAClB,YAAY,qBAAqB,SAAS,IAAI,aAC3C,qBACL,SAAS;EAEX,iBAAiB,gBAAgB,mBAAmB,mBAClD,QAAQ,GACR,UAAU,SAAS,SAAS,IAAI,MAAM,iBAAiB,mBACvD,SAAS;EAEX,SAAS,gBAAgB,mBAAmB,mBAC1C,QAAQ,GACR,UAAU,SAAS,KAClB,oBAAoB,SAAS,IAAI;EACpC;;iBAac,yBACd,iBAAiB,0BAA0B,yBAC3C,eAAe,mBAAmB;;;iBChEpB,iBAAiB,sBAC/B,UAAU,OACV,SAAQ,qBAAqB,SAC5B"}
@@ -0,0 +1,163 @@
1
+ //#region src/facade/types.d.ts
2
+ type PublicHandleFactory<Target extends object, Handle> = (getTarget: () => Target | null) => Handle;
3
+ //#endregion
4
+ //#region src/element/contracts.d.ts
5
+ type ImperativeHandleFactory<Element extends HTMLElement, Handle> = PublicHandleFactory<Element, Handle>;
6
+ interface ElementBindingConfig<Props extends object> {
7
+ properties?: readonly (keyof Props)[];
8
+ attributes?: Partial<Record<keyof Props & string, string>>;
9
+ styles?: Partial<Record<keyof Props & string, string>>;
10
+ events?: Record<string, string>;
11
+ }
12
+ interface ElementBridgeConfig<Props extends object, Element extends HTMLElement = HTMLElement, Handle = Element> extends ElementBindingConfig<Props> {
13
+ createHandle?: ImperativeHandleFactory<Element, Handle>;
14
+ }
15
+ interface ElementBridgeContract<Props extends object, Element extends HTMLElement = HTMLElement, Handle = Element> extends ElementBridgeConfig<Props, Element, Handle> {
16
+ tagName: string;
17
+ }
18
+ interface ElementBindingOptions {
19
+ assignmentErrors?: 'ignore' | 'throw';
20
+ }
21
+ interface ElementBinding<Props extends object> {
22
+ readonly disposed: boolean;
23
+ update(input: Props): void;
24
+ updateProperties(input: Props): void;
25
+ updateAttributes(input: Props): void;
26
+ updateStyles(input: Props): void;
27
+ updateEvents(input: Props): void;
28
+ disconnectEvents(): void;
29
+ dispose(): void;
30
+ }
31
+ //#endregion
32
+ //#region src/element/create-element-facade.d.ts
33
+ declare function createElementFacade<Element extends HTMLElement, const Keys extends readonly (keyof Element)[]>(keys: Keys): ImperativeHandleFactory<Element, Pick<Element, Keys[number]>>;
34
+ //#endregion
35
+ //#region src/element/create-element-binding.d.ts
36
+ declare function createElementBinding<Props extends object>(element: HTMLElement, config: ElementBindingConfig<Props>, options?: ElementBindingOptions): ElementBinding<Props>;
37
+ //#endregion
38
+ //#region src/element/pointer-gesture-session.d.ts
39
+ interface PointerGestureModifiers {
40
+ readonly shiftKey: boolean;
41
+ readonly altKey: boolean;
42
+ readonly ctrlKey: boolean;
43
+ readonly metaKey: boolean;
44
+ }
45
+ interface PointerGestureSnapshot {
46
+ readonly active: boolean;
47
+ readonly pointerId: number | null;
48
+ readonly startX: number;
49
+ readonly startY: number;
50
+ readonly currentX: number;
51
+ readonly currentY: number;
52
+ readonly deltaX: number;
53
+ readonly deltaY: number;
54
+ readonly modifiers: PointerGestureModifiers;
55
+ }
56
+ interface PointerCaptureTargetLike {
57
+ setPointerCapture?(pointerId: number): void;
58
+ releasePointerCapture?(pointerId: number): void;
59
+ }
60
+ interface PointerGestureEventLike {
61
+ readonly pointerId?: number | undefined;
62
+ readonly button?: number | undefined;
63
+ readonly clientX: number;
64
+ readonly clientY: number;
65
+ readonly shiftKey?: boolean | undefined;
66
+ readonly altKey?: boolean | undefined;
67
+ readonly ctrlKey?: boolean | undefined;
68
+ readonly metaKey?: boolean | undefined;
69
+ readonly currentTarget?: PointerCaptureTargetLike | null | undefined;
70
+ }
71
+ interface PointerGestureKeyEventLike {
72
+ readonly key: string;
73
+ preventDefault?(): void;
74
+ }
75
+ interface PointerGestureOptions {
76
+ onStart?: ((snapshot: PointerGestureSnapshot) => boolean | void) | undefined;
77
+ onMove?: ((snapshot: PointerGestureSnapshot) => void) | undefined;
78
+ onCommit?: ((snapshot: PointerGestureSnapshot) => void) | undefined;
79
+ onCancel?: ((snapshot: PointerGestureSnapshot, reason?: string) => void) | undefined;
80
+ }
81
+ interface PointerGestureSession {
82
+ start(event: PointerGestureEventLike): boolean;
83
+ move(event: PointerGestureEventLike): boolean;
84
+ commit(event?: PointerGestureEventLike): boolean;
85
+ cancel(reason?: string): boolean;
86
+ handleKeyDown(event: PointerGestureKeyEventLike): boolean;
87
+ isActive(): boolean;
88
+ getSnapshot(): PointerGestureSnapshot;
89
+ dispose(): void;
90
+ }
91
+ declare function createPointerGestureSession(options?: PointerGestureOptions): PointerGestureSession;
92
+ //#endregion
93
+ //#region src/element/roving-focus.d.ts
94
+ type RovingFocusOrientation = 'horizontal' | 'vertical' | 'both';
95
+ interface RovingFocusItem {
96
+ readonly id: string;
97
+ readonly disabled?: boolean | undefined;
98
+ }
99
+ interface RovingFocusKeyEventLike {
100
+ readonly key: string;
101
+ preventDefault?(): void;
102
+ }
103
+ interface RovingFocusOptions {
104
+ readonly orientation?: RovingFocusOrientation | undefined;
105
+ readonly loop?: boolean | undefined;
106
+ getItems(): readonly RovingFocusItem[];
107
+ getActiveId(): string | null | undefined;
108
+ onFocusChange?: ((nextId: string) => void) | undefined;
109
+ }
110
+ interface RovingFocusController {
111
+ getTabIndex(itemId: string): 0 | -1;
112
+ handleKeyDown(currentId: string, event: RovingFocusKeyEventLike): string | null;
113
+ }
114
+ declare function createRovingFocusController(options: RovingFocusOptions): RovingFocusController;
115
+ //#endregion
116
+ //#region src/element/sync-action-pipeline.d.ts
117
+ interface SyncGuardController<TPayload = unknown> {
118
+ abort(reason?: string): void;
119
+ modifyPayload(updater: TPayload | ((prev: TPayload) => TPayload)): void;
120
+ getPayload(): TPayload;
121
+ }
122
+ interface SyncResultController<TPayload = unknown, TResult = unknown> extends SyncGuardController<TPayload> {
123
+ setResult(value: TResult): void;
124
+ getResult(): TResult | undefined;
125
+ }
126
+ interface SyncObserverMeta<TResult = unknown> {
127
+ readonly success: boolean;
128
+ readonly aborted: boolean;
129
+ readonly abortReason?: string | undefined;
130
+ readonly result: TResult | undefined;
131
+ readonly errors: readonly unknown[];
132
+ }
133
+ interface SyncDispatchOutcome<TPayload = unknown, TResult = unknown> {
134
+ readonly success: boolean;
135
+ readonly aborted: boolean;
136
+ readonly abortReason?: string | undefined;
137
+ readonly payload: TPayload;
138
+ readonly result: TResult | undefined;
139
+ readonly errors: readonly unknown[];
140
+ }
141
+ interface SyncHandlerConfig {
142
+ readonly priority?: number;
143
+ readonly id?: string;
144
+ readonly once?: boolean;
145
+ }
146
+ interface SyncObserverConfig extends SyncHandlerConfig {
147
+ readonly when?: 'success' | 'failure' | 'always';
148
+ }
149
+ interface SyncActionPipeline<TActions extends Record<string, unknown> = Record<string, unknown>> {
150
+ readonly name: string;
151
+ registerGuard<K extends keyof TActions & string>(action: K, handler: (payload: TActions[K], controller: SyncGuardController<TActions[K]>) => void, config?: SyncHandlerConfig): () => void;
152
+ register<K extends keyof TActions & string, TResult = unknown>(action: K, handler: (payload: TActions[K], controller: SyncResultController<TActions[K], TResult>) => TResult | undefined, config?: SyncHandlerConfig): () => void;
153
+ registerObserver<K extends keyof TActions & string, TResult = unknown>(action: K, handler: (payload: TActions[K], meta: SyncObserverMeta<TResult>) => void, config?: SyncObserverConfig): () => void;
154
+ dispatch<K extends keyof TActions & string, TResult = unknown>(action: K, payload?: TActions[K]): SyncDispatchOutcome<TActions[K], TResult>;
155
+ destroy(): void;
156
+ }
157
+ declare function createSyncActionPipeline<TActions extends Record<string, unknown> = Record<string, unknown>>(name: string): SyncActionPipeline<TActions>;
158
+ //#endregion
159
+ //#region src/element/to-react-part-props.d.ts
160
+ declare function toReactPartProps<Props extends object>(snapshot: Props, config?: ElementBindingConfig<Props>): Record<string, unknown>;
161
+ //#endregion
162
+ export { ElementBridgeContract as A, createPointerGestureSession as C, ElementBindingConfig as D, ElementBinding as E, ElementBindingOptions as O, PointerGestureSnapshot as S, createElementFacade as T, PointerGestureEventLike as _, SyncHandlerConfig as a, PointerGestureOptions as b, SyncResultController as c, RovingFocusItem as d, RovingFocusKeyEventLike as f, PointerCaptureTargetLike as g, createRovingFocusController as h, SyncGuardController as i, ImperativeHandleFactory as j, ElementBridgeConfig as k, createSyncActionPipeline as l, RovingFocusOrientation as m, SyncActionPipeline as n, SyncObserverConfig as o, RovingFocusOptions as p, SyncDispatchOutcome as r, SyncObserverMeta as s, toReactPartProps as t, RovingFocusController as u, PointerGestureKeyEventLike as v, createElementBinding as w, PointerGestureSession as x, PointerGestureModifiers as y };
163
+ //# sourceMappingURL=element-DPioFL7C.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-DPioFL7C.d.ts","names":[],"sources":["../src/facade/types.ts","../src/element/contracts.ts","../src/element/create-element-facade.ts","../src/element/create-element-binding.ts","../src/element/pointer-gesture-session.ts","../src/element/roving-focus.ts","../src/element/sync-action-pipeline.ts","../src/element/to-react-part-props.ts"],"mappings":";KACY,oBAAoB,uBAAuB,WACpD,iBAAiB,kBAAkB;;;KCA1B,wBAAwB,gBAAgB,aAAa,UAAU,oBAAoB,SAAS;UAGvF,qBAAqB;EACpC,6BAA6B;EAC7B,aAAa,QAAQ,aAAa;EAClC,SAAS,QAAQ,aAAa;EAC9B,SAAS;;UAGM,oBAAoB,sBAAsB,gBAAgB,cAAc,aAAa,SAAS,iBACrG,qBAAqB;EAC7B,eAAe,wBAAwB,SAAS;;UAGjC,sBAAsB,sBAAsB,gBAAgB,cAAc,aAAa,SAAS,iBACvG,oBAAoB,OAAO,SAAS;EAC5C;;UAGe;EACf;;UAIe,eAAe;WACrB;EAET,OAAO,OAAO;EACd,iBAAiB,OAAO;EACxB,iBAAiB,OAAO;EACxB,aAAa,OAAO;EACpB,aAAa,OAAO;EAEpB;EAEA;;;;iBClCc,oBAAoB,gBAAgB,mBAAmB,6BAA6B,YAClG,MAAM,OACL,wBAAwB,SAAS,KAAK,SAAS;;;iBCClC,qBAAqB,sBACnC,SAAS,aACT,QAAQ,qBAAqB,QAC7B,UAAS,wBACR,eAAe;;;UCXD;WACN;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,WAAW;;UAGL;EACf,mBAAmB;EACnB,uBAAuB;;UAGR;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB;;UAGV;WACN;EACT;;UAGe;EAEf,YAAY,UAAU;EACtB,WAAW,UAAU;EACrB,aAAa,UAAU;EACvB,aAAa,UAAU,wBAAwB;;UAGhC;EACf,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,OAAO,QAAQ;EACf,OAAO;EACP,cAAc,OAAO;EACrB;EACA,eAAe;EACf;;iBAwCc,4BACd,UAAS,wBACR;;;KCnGS;UAEK;WACN;WACA;;UAGM;WACN;EACT;;UAGe;WACN,cAAc;WACd;EACT,qBAAqB;EACrB;EACA,kBAAkB;;UAGH;EACf,YAAY;EACZ,cAAc,mBAAmB,OAAO;;iBAe1B,4BAA4B,SAAS,qBAAqB;;;UCrCzD,oBAAoB;EACnC,MAAM;EACN,cAAc,SAAS,aAAa,MAAM,aAAa;EACvD,cAAc;;UAGC,qBAAqB,oBAAoB,2BAChD,oBAAoB;EAC5B,UAAU,OAAO;EACjB,aAAa;;UAGE,iBAAiB;WACvB;WACA;WACA;WACA,QAAQ;WACR;;UAGM,oBAAoB,oBAAoB;WAC9C;WACA;WACA;WACA,SAAS;WACT,QAAQ;WACR;;UAGM;WACN;WACA;WACA;;UAGM,2BAA2B;WACjC;;UAGM,mBACf,iBAAiB,0BAA0B;WAElC;EACT,cAAc,gBAAgB,mBAC5B,QAAQ,GACR,UAAU,SAAS,SAAS,IAAI,YAAY,oBAAoB,SAAS,cACzE,SAAS;EAEX,SAAS,gBAAgB,mBAAmB,mBAC1C,QAAQ,GACR,UACE,SAAS,SAAS,IAClB,YAAY,qBAAqB,SAAS,IAAI,aAC3C,qBACL,SAAS;EAEX,iBAAiB,gBAAgB,mBAAmB,mBAClD,QAAQ,GACR,UAAU,SAAS,SAAS,IAAI,MAAM,iBAAiB,mBACvD,SAAS;EAEX,SAAS,gBAAgB,mBAAmB,mBAC1C,QAAQ,GACR,UAAU,SAAS,KAClB,oBAAoB,SAAS,IAAI;EACpC;;iBAac,yBACd,iBAAiB,0BAA0B,yBAC3C,eAAe,mBAAmB;;;iBChEpB,iBAAiB,sBAC/B,UAAU,OACV,SAAQ,qBAAqB,SAC5B"}
@@ -0,0 +1,91 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_element = require('./element-BRlY61kW.cjs');
3
+
4
+ //#region src/bridges/react-element/create-react-element-bridge.ts
5
+ function assignRef(ref, value) {
6
+ if (typeof ref === "function") ref(value);
7
+ else if (ref) ref.current = value;
8
+ }
9
+ /** Opt-in host adapter; inject the consuming runtime rather than importing another hook dispatcher. */
10
+ function createReactElementBridge(React, options, assignmentErrors = "ignore") {
11
+ const useLayout = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
12
+ const { tagName, createHandle } = options;
13
+ const properties = Array.from(new Set(options.properties ?? []));
14
+ const propertySet = new Set(properties);
15
+ const attributes = { ...options.attributes };
16
+ const attributeProps = new Set(Object.keys(attributes));
17
+ const styles = { ...options.styles };
18
+ const styleProps = new Set(Object.keys(styles));
19
+ const events = { ...options.events };
20
+ const eventProps = new Set(Object.keys(events));
21
+ const config = {
22
+ properties,
23
+ attributes,
24
+ styles,
25
+ events
26
+ };
27
+ const Bridge = React.forwardRef(function ElementBridge(props, forwardedRef) {
28
+ const elementRef = React.useRef(null);
29
+ const [element, setElement] = React.useState(null);
30
+ const bindingRef = React.useRef(null);
31
+ const rawForwardedRef = React.useRef(forwardedRef);
32
+ const ref = React.useCallback((node) => {
33
+ if (bindingRef.current && bindingRef.current.element !== node) {
34
+ bindingRef.current.binding.dispose();
35
+ bindingRef.current = null;
36
+ }
37
+ elementRef.current = node;
38
+ if (!createHandle) assignRef(rawForwardedRef.current, node);
39
+ setElement(node);
40
+ }, []);
41
+ React.useImperativeHandle(createHandle ? forwardedRef : null, () => createHandle ? createHandle(() => elementRef.current) : null, [createHandle]);
42
+ useLayout(() => {
43
+ if (createHandle || rawForwardedRef.current === forwardedRef) return;
44
+ const previousRef = rawForwardedRef.current;
45
+ rawForwardedRef.current = forwardedRef;
46
+ assignRef(previousRef, null);
47
+ assignRef(forwardedRef, elementRef.current);
48
+ }, [
49
+ createHandle,
50
+ element,
51
+ forwardedRef
52
+ ]);
53
+ useLayout(() => {
54
+ const currentElement = elementRef.current;
55
+ if (!element || !currentElement || element !== currentElement) return;
56
+ if (bindingRef.current?.element !== currentElement) {
57
+ bindingRef.current?.binding.dispose();
58
+ bindingRef.current = {
59
+ element: currentElement,
60
+ binding: require_element.createElementBinding(currentElement, config, { assignmentErrors })
61
+ };
62
+ }
63
+ bindingRef.current.binding.update(props);
64
+ }, [element, props]);
65
+ React.useEffect(() => {
66
+ const current = bindingRef.current;
67
+ const currentElement = elementRef.current;
68
+ if (currentElement && current?.element === currentElement) current.binding.updateEvents(props);
69
+ });
70
+ React.useEffect(() => () => {
71
+ bindingRef.current?.binding.disconnectEvents();
72
+ }, []);
73
+ const domProps = { ref };
74
+ for (const [key, value] of Object.entries(props)) {
75
+ if (propertySet.has(key) || attributeProps.has(key) || styleProps.has(key) || eventProps.has(key)) continue;
76
+ domProps[key === "className" ? "class" : key === "htmlFor" ? "for" : key] = value;
77
+ }
78
+ return React.createElement(tagName, domProps);
79
+ });
80
+ Bridge.displayName = `ElementBridge(${tagName})`;
81
+ return Bridge;
82
+ }
83
+
84
+ //#endregion
85
+ exports.createElementBinding = require_element.createElementBinding;
86
+ exports.createElementFacade = require_element.createElementFacade;
87
+ exports.createPointerGestureSession = require_element.createPointerGestureSession;
88
+ exports.createReactElementBridge = createReactElementBridge;
89
+ exports.createRovingFocusController = require_element.createRovingFocusController;
90
+ exports.createSyncActionPipeline = require_element.createSyncActionPipeline;
91
+ exports.toReactPartProps = require_element.toReactPartProps;
@@ -0,0 +1,11 @@
1
+ import { A as ElementBridgeContract, C as createPointerGestureSession, D as ElementBindingConfig, E as ElementBinding, O as ElementBindingOptions, S as PointerGestureSnapshot, T as createElementFacade, _ as PointerGestureEventLike, a as SyncHandlerConfig, b as PointerGestureOptions, c as SyncResultController, d as RovingFocusItem, f as RovingFocusKeyEventLike, g as PointerCaptureTargetLike, h as createRovingFocusController, i as SyncGuardController, j as ImperativeHandleFactory, k as ElementBridgeConfig, l as createSyncActionPipeline, m as RovingFocusOrientation, n as SyncActionPipeline, o as SyncObserverConfig, p as RovingFocusOptions, r as SyncDispatchOutcome, s as SyncObserverMeta, t as toReactPartProps, u as RovingFocusController, v as PointerGestureKeyEventLike, w as createElementBinding, x as PointerGestureSession, y as PointerGestureModifiers } from "./element-DPioFL7C.cjs";
2
+ import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.cjs";
3
+ import * as React from "react";
4
+ //#region src/bridges/react-element/types.d.ts
5
+ type ReactElementComponent<Props, Element extends HTMLElement, Handle = Element> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props & Omit<React.HTMLAttributes<Element>, keyof Props>> & React.RefAttributes<Handle>>;
6
+ //#endregion
7
+ //#region src/bridges/react-element/create-react-element-bridge.d.ts
8
+ export declare function createReactElementBridge<Props extends object = Record<string, unknown>, Element extends HTMLElement = HTMLElement, Handle = Element>(React: typeof import('react'), options: ElementBridgeContract<Props, Element, Handle>, assignmentErrors?: 'ignore' | 'throw'): ReactElementComponent<Props, Element, Handle>;
9
+ //#endregion
10
+ export { type ElementBinding, type ElementBindingConfig, type ElementBindingOptions, type ElementBridgeConfig, type ElementBridgeContract, type ImperativeHandleFactory, type PointerCaptureTargetLike, type PointerGestureEventLike, type PointerGestureKeyEventLike, type PointerGestureModifiers, type PointerGestureOptions, type PointerGestureSession, type PointerGestureSnapshot, type PublicActionMethods, type ReactElementComponent, type RovingFocusController, type RovingFocusItem, type RovingFocusKeyEventLike, type RovingFocusOptions, type RovingFocusOrientation, type SyncActionPipeline, type SyncDispatchOutcome, type SyncGuardController, type SyncHandlerConfig, type SyncObserverConfig, type SyncObserverMeta, type SyncResultController, createElementBinding, createElementFacade, createPointerGestureSession, createRovingFocusController, createSyncActionPipeline, toReactPartProps };
11
+ //# sourceMappingURL=element-react.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-react.d.cts","names":[],"sources":["../src/bridges/react-element/types.ts","../src/bridges/react-element/create-react-element-bridge.ts"],"mappings":";;;;KAEY,sBAAsB,OAAO,gBAAgB,aAAa,SAAS,WAAW,MAAM,0BAC9F,MAAM,gBAAgB,QAAQ,KAAK,MAAM,eAAe,gBAAgB,UAAU,MAAM,cAAc;;;wBCQxF,yBAAyB,uBAAuB,yBAAyB,gBAAgB,cAAc,aAAa,SAAS,SAC3I,+BACA,SAAS,sBAAsB,OAAO,SAAS,SAC/C,wCACC,sBAAsB,OAAO,SAAS"}
@@ -0,0 +1,11 @@
1
+ import { A as ElementBridgeContract, C as createPointerGestureSession, D as ElementBindingConfig, E as ElementBinding, O as ElementBindingOptions, S as PointerGestureSnapshot, T as createElementFacade, _ as PointerGestureEventLike, a as SyncHandlerConfig, b as PointerGestureOptions, c as SyncResultController, d as RovingFocusItem, f as RovingFocusKeyEventLike, g as PointerCaptureTargetLike, h as createRovingFocusController, i as SyncGuardController, j as ImperativeHandleFactory, k as ElementBridgeConfig, l as createSyncActionPipeline, m as RovingFocusOrientation, n as SyncActionPipeline, o as SyncObserverConfig, p as RovingFocusOptions, r as SyncDispatchOutcome, s as SyncObserverMeta, t as toReactPartProps, u as RovingFocusController, v as PointerGestureKeyEventLike, w as createElementBinding, x as PointerGestureSession, y as PointerGestureModifiers } from "./element-DPioFL7C.js";
2
+ import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.js";
3
+ import * as React from "react";
4
+ //#region src/bridges/react-element/types.d.ts
5
+ type ReactElementComponent<Props, Element extends HTMLElement, Handle = Element> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props & Omit<React.HTMLAttributes<Element>, keyof Props>> & React.RefAttributes<Handle>>;
6
+ //#endregion
7
+ //#region src/bridges/react-element/create-react-element-bridge.d.ts
8
+ export declare function createReactElementBridge<Props extends object = Record<string, unknown>, Element extends HTMLElement = HTMLElement, Handle = Element>(React: typeof import('react'), options: ElementBridgeContract<Props, Element, Handle>, assignmentErrors?: 'ignore' | 'throw'): ReactElementComponent<Props, Element, Handle>;
9
+ //#endregion
10
+ export { type ElementBinding, type ElementBindingConfig, type ElementBindingOptions, type ElementBridgeConfig, type ElementBridgeContract, type ImperativeHandleFactory, type PointerCaptureTargetLike, type PointerGestureEventLike, type PointerGestureKeyEventLike, type PointerGestureModifiers, type PointerGestureOptions, type PointerGestureSession, type PointerGestureSnapshot, type PublicActionMethods, type ReactElementComponent, type RovingFocusController, type RovingFocusItem, type RovingFocusKeyEventLike, type RovingFocusOptions, type RovingFocusOrientation, type SyncActionPipeline, type SyncDispatchOutcome, type SyncGuardController, type SyncHandlerConfig, type SyncObserverConfig, type SyncObserverMeta, type SyncResultController, createElementBinding, createElementFacade, createPointerGestureSession, createRovingFocusController, createSyncActionPipeline, toReactPartProps };
11
+ //# sourceMappingURL=element-react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-react.d.ts","names":[],"sources":["../src/bridges/react-element/types.ts","../src/bridges/react-element/create-react-element-bridge.ts"],"mappings":";;;;KAEY,sBAAsB,OAAO,gBAAgB,aAAa,SAAS,WAAW,MAAM,0BAC9F,MAAM,gBAAgB,QAAQ,KAAK,MAAM,eAAe,gBAAgB,UAAU,MAAM,cAAc;;;wBCQxF,yBAAyB,uBAAuB,yBAAyB,gBAAgB,cAAc,aAAa,SAAS,SAC3I,+BACA,SAAS,sBAAsB,OAAO,SAAS,SAC/C,wCACC,sBAAsB,OAAO,SAAS"}
@@ -0,0 +1,85 @@
1
+ import { a as createElementBinding, i as createPointerGestureSession, n as createSyncActionPipeline, o as createElementFacade, r as createRovingFocusController, t as toReactPartProps } from "./element-BTaXgo7n.js";
2
+
3
+ //#region src/bridges/react-element/create-react-element-bridge.ts
4
+ function assignRef(ref, value) {
5
+ if (typeof ref === "function") ref(value);
6
+ else if (ref) ref.current = value;
7
+ }
8
+ /** Opt-in host adapter; inject the consuming runtime rather than importing another hook dispatcher. */
9
+ function createReactElementBridge(React, options, assignmentErrors = "ignore") {
10
+ const useLayout = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
11
+ const { tagName, createHandle } = options;
12
+ const properties = Array.from(new Set(options.properties ?? []));
13
+ const propertySet = new Set(properties);
14
+ const attributes = { ...options.attributes };
15
+ const attributeProps = new Set(Object.keys(attributes));
16
+ const styles = { ...options.styles };
17
+ const styleProps = new Set(Object.keys(styles));
18
+ const events = { ...options.events };
19
+ const eventProps = new Set(Object.keys(events));
20
+ const config = {
21
+ properties,
22
+ attributes,
23
+ styles,
24
+ events
25
+ };
26
+ const Bridge = React.forwardRef(function ElementBridge(props, forwardedRef) {
27
+ const elementRef = React.useRef(null);
28
+ const [element, setElement] = React.useState(null);
29
+ const bindingRef = React.useRef(null);
30
+ const rawForwardedRef = React.useRef(forwardedRef);
31
+ const ref = React.useCallback((node) => {
32
+ if (bindingRef.current && bindingRef.current.element !== node) {
33
+ bindingRef.current.binding.dispose();
34
+ bindingRef.current = null;
35
+ }
36
+ elementRef.current = node;
37
+ if (!createHandle) assignRef(rawForwardedRef.current, node);
38
+ setElement(node);
39
+ }, []);
40
+ React.useImperativeHandle(createHandle ? forwardedRef : null, () => createHandle ? createHandle(() => elementRef.current) : null, [createHandle]);
41
+ useLayout(() => {
42
+ if (createHandle || rawForwardedRef.current === forwardedRef) return;
43
+ const previousRef = rawForwardedRef.current;
44
+ rawForwardedRef.current = forwardedRef;
45
+ assignRef(previousRef, null);
46
+ assignRef(forwardedRef, elementRef.current);
47
+ }, [
48
+ createHandle,
49
+ element,
50
+ forwardedRef
51
+ ]);
52
+ useLayout(() => {
53
+ const currentElement = elementRef.current;
54
+ if (!element || !currentElement || element !== currentElement) return;
55
+ if (bindingRef.current?.element !== currentElement) {
56
+ bindingRef.current?.binding.dispose();
57
+ bindingRef.current = {
58
+ element: currentElement,
59
+ binding: createElementBinding(currentElement, config, { assignmentErrors })
60
+ };
61
+ }
62
+ bindingRef.current.binding.update(props);
63
+ }, [element, props]);
64
+ React.useEffect(() => {
65
+ const current = bindingRef.current;
66
+ const currentElement = elementRef.current;
67
+ if (currentElement && current?.element === currentElement) current.binding.updateEvents(props);
68
+ });
69
+ React.useEffect(() => () => {
70
+ bindingRef.current?.binding.disconnectEvents();
71
+ }, []);
72
+ const domProps = { ref };
73
+ for (const [key, value] of Object.entries(props)) {
74
+ if (propertySet.has(key) || attributeProps.has(key) || styleProps.has(key) || eventProps.has(key)) continue;
75
+ domProps[key === "className" ? "class" : key === "htmlFor" ? "for" : key] = value;
76
+ }
77
+ return React.createElement(tagName, domProps);
78
+ });
79
+ Bridge.displayName = `ElementBridge(${tagName})`;
80
+ return Bridge;
81
+ }
82
+
83
+ //#endregion
84
+ export { createElementBinding, createElementFacade, createPointerGestureSession, createReactElementBridge, createRovingFocusController, createSyncActionPipeline, toReactPartProps };
85
+ //# sourceMappingURL=element-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-react.js","names":[],"sources":["../src/bridges/react-element/create-react-element-bridge.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ElementBinding, ElementBridgeContract } from '../../element/contracts.js';\nimport { createElementBinding } from '../../element/create-element-binding.js';\nimport type { ReactElementComponent } from './types.js';\n\nfunction assignRef<T>(ref: React.ForwardedRef<T>, value: T | null): void {\n if (typeof ref === 'function') ref(value);\n else if (ref) (ref as React.MutableRefObject<T | null>).current = value;\n}\n\n/** Opt-in host adapter; inject the consuming runtime rather than importing another hook dispatcher. */\nexport function createReactElementBridge<Props extends object = Record<string, unknown>, Element extends HTMLElement = HTMLElement, Handle = Element>(\n React: typeof import('react'),\n options: ElementBridgeContract<Props, Element, Handle>,\n assignmentErrors: 'ignore' | 'throw' = 'ignore',\n): ReactElementComponent<Props, Element, Handle> {\n const useLayout = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n const { tagName, createHandle } = options;\n const properties = Array.from(new Set(options.properties ?? []));\n const propertySet = new Set<PropertyKey>(properties);\n const attributes = { ...options.attributes };\n const attributeProps = new Set(Object.keys(attributes));\n const styles = { ...options.styles };\n const styleProps = new Set(Object.keys(styles));\n const events = { ...options.events };\n const eventProps = new Set(Object.keys(events));\n const config = { properties, attributes, styles, events };\n\n const Bridge = React.forwardRef<Handle, Props & Omit<React.HTMLAttributes<Element>, keyof Props>>(\n function ElementBridge(props, forwardedRef) {\n const elementRef = React.useRef<Element | null>(null);\n const [element, setElement] = React.useState<Element | null>(null);\n const bindingRef = React.useRef<{ element: Element; binding: ElementBinding<Props> } | null>(null);\n const rawForwardedRef = React.useRef<React.ForwardedRef<Handle>>(forwardedRef);\n const ref = React.useCallback((node: Element | null) => {\n if (bindingRef.current && bindingRef.current.element !== node) {\n bindingRef.current.binding.dispose();\n bindingRef.current = null;\n }\n elementRef.current = node;\n if (!createHandle) assignRef(rawForwardedRef.current, node as unknown as Handle | null);\n setElement(node);\n }, []);\n React.useImperativeHandle(\n createHandle ? forwardedRef : null,\n () => (createHandle ? createHandle(() => elementRef.current) : null) as unknown as Handle,\n [createHandle],\n );\n\n useLayout(() => {\n if (createHandle || rawForwardedRef.current === forwardedRef) return;\n const previousRef = rawForwardedRef.current;\n rawForwardedRef.current = forwardedRef;\n assignRef(previousRef, null);\n assignRef(forwardedRef, elementRef.current as unknown as Handle | null);\n }, [createHandle, element, forwardedRef]);\n\n useLayout(() => {\n const currentElement = elementRef.current;\n // Callback refs update state during commit. Wait for that state to\n // settle before binding so the initial mount and host replacement do\n // not reconcile the same snapshot against a stale element twice.\n if (!element || !currentElement || element !== currentElement) return;\n if (bindingRef.current?.element !== currentElement) {\n bindingRef.current?.binding.dispose();\n bindingRef.current = {\n element: currentElement,\n binding: createElementBinding<Props>(currentElement, config, { assignmentErrors }),\n };\n }\n bindingRef.current.binding.update(props as Props);\n }, [element, props]);\n\n React.useEffect(() => {\n const current = bindingRef.current;\n const currentElement = elementRef.current;\n if (currentElement && current?.element === currentElement) current.binding.updateEvents(props as Props);\n });\n\n // Effect replay only disconnects listeners. Terminal disposal here would\n // break StrictMode and lose the property-omission ledger on reconnect.\n React.useEffect(() => () => { bindingRef.current?.binding.disconnectEvents(); }, []);\n\n const domProps: Record<string, unknown> = { ref };\n for (const [key, value] of Object.entries(props)) {\n if (propertySet.has(key) || attributeProps.has(key) || styleProps.has(key) || eventProps.has(key)) continue;\n domProps[key === 'className' ? 'class' : key === 'htmlFor' ? 'for' : key] = value;\n }\n return React.createElement(tagName, domProps);\n },\n );\n Bridge.displayName = `ElementBridge(${tagName})`;\n return Bridge;\n}\n"],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_element = require('./element-BRlY61kW.cjs');
3
+
4
+ exports.createElementBinding = require_element.createElementBinding;
5
+ exports.createElementFacade = require_element.createElementFacade;
6
+ exports.createPointerGestureSession = require_element.createPointerGestureSession;
7
+ exports.createRovingFocusController = require_element.createRovingFocusController;
8
+ exports.createSyncActionPipeline = require_element.createSyncActionPipeline;
9
+ exports.toReactPartProps = require_element.toReactPartProps;
@@ -0,0 +1,3 @@
1
+ import { A as ElementBridgeContract, C as createPointerGestureSession, D as ElementBindingConfig, E as ElementBinding, O as ElementBindingOptions, S as PointerGestureSnapshot, T as createElementFacade, _ as PointerGestureEventLike, a as SyncHandlerConfig, b as PointerGestureOptions, c as SyncResultController, d as RovingFocusItem, f as RovingFocusKeyEventLike, g as PointerCaptureTargetLike, h as createRovingFocusController, i as SyncGuardController, j as ImperativeHandleFactory, k as ElementBridgeConfig, l as createSyncActionPipeline, m as RovingFocusOrientation, n as SyncActionPipeline, o as SyncObserverConfig, p as RovingFocusOptions, r as SyncDispatchOutcome, s as SyncObserverMeta, t as toReactPartProps, u as RovingFocusController, v as PointerGestureKeyEventLike, w as createElementBinding, x as PointerGestureSession, y as PointerGestureModifiers } from "./element-DPioFL7C.cjs";
2
+ import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.cjs";
3
+ export { type ElementBinding, type ElementBindingConfig, type ElementBindingOptions, type ElementBridgeConfig, type ElementBridgeContract, type ImperativeHandleFactory, type PointerCaptureTargetLike, type PointerGestureEventLike, type PointerGestureKeyEventLike, type PointerGestureModifiers, type PointerGestureOptions, type PointerGestureSession, type PointerGestureSnapshot, type PublicActionMethods, type RovingFocusController, type RovingFocusItem, type RovingFocusKeyEventLike, type RovingFocusOptions, type RovingFocusOrientation, type SyncActionPipeline, type SyncDispatchOutcome, type SyncGuardController, type SyncHandlerConfig, type SyncObserverConfig, type SyncObserverMeta, type SyncResultController, createElementBinding, createElementFacade, createPointerGestureSession, createRovingFocusController, createSyncActionPipeline, toReactPartProps };
@@ -0,0 +1,3 @@
1
+ import { A as ElementBridgeContract, C as createPointerGestureSession, D as ElementBindingConfig, E as ElementBinding, O as ElementBindingOptions, S as PointerGestureSnapshot, T as createElementFacade, _ as PointerGestureEventLike, a as SyncHandlerConfig, b as PointerGestureOptions, c as SyncResultController, d as RovingFocusItem, f as RovingFocusKeyEventLike, g as PointerCaptureTargetLike, h as createRovingFocusController, i as SyncGuardController, j as ImperativeHandleFactory, k as ElementBridgeConfig, l as createSyncActionPipeline, m as RovingFocusOrientation, n as SyncActionPipeline, o as SyncObserverConfig, p as RovingFocusOptions, r as SyncDispatchOutcome, s as SyncObserverMeta, t as toReactPartProps, u as RovingFocusController, v as PointerGestureKeyEventLike, w as createElementBinding, x as PointerGestureSession, y as PointerGestureModifiers } from "./element-DPioFL7C.js";
2
+ import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.js";
3
+ export { type ElementBinding, type ElementBindingConfig, type ElementBindingOptions, type ElementBridgeConfig, type ElementBridgeContract, type ImperativeHandleFactory, type PointerCaptureTargetLike, type PointerGestureEventLike, type PointerGestureKeyEventLike, type PointerGestureModifiers, type PointerGestureOptions, type PointerGestureSession, type PointerGestureSnapshot, type PublicActionMethods, type RovingFocusController, type RovingFocusItem, type RovingFocusKeyEventLike, type RovingFocusOptions, type RovingFocusOrientation, type SyncActionPipeline, type SyncDispatchOutcome, type SyncGuardController, type SyncHandlerConfig, type SyncObserverConfig, type SyncObserverMeta, type SyncResultController, createElementBinding, createElementFacade, createPointerGestureSession, createRovingFocusController, createSyncActionPipeline, toReactPartProps };
@@ -0,0 +1,3 @@
1
+ import { a as createElementBinding, i as createPointerGestureSession, n as createSyncActionPipeline, o as createElementFacade, r as createRovingFocusController, t as toReactPartProps } from "./element-BTaXgo7n.js";
2
+
3
+ export { createElementBinding, createElementFacade, createPointerGestureSession, createRovingFocusController, createSyncActionPipeline, toReactPartProps };