@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.
- package/CHANGELOG.md +22 -0
- package/README.md +31 -1
- package/dist/element-BRlY61kW.cjs +631 -0
- package/dist/element-BTaXgo7n.js +597 -0
- package/dist/element-BTaXgo7n.js.map +1 -0
- package/dist/element-DPioFL7C.d.cts +163 -0
- package/dist/element-DPioFL7C.d.cts.map +1 -0
- package/dist/element-DPioFL7C.d.ts +163 -0
- package/dist/element-DPioFL7C.d.ts.map +1 -0
- package/dist/element-react.cjs +91 -0
- package/dist/element-react.d.cts +11 -0
- package/dist/element-react.d.cts.map +1 -0
- package/dist/element-react.d.ts +11 -0
- package/dist/element-react.d.ts.map +1 -0
- package/dist/element-react.js +85 -0
- package/dist/element-react.js.map +1 -0
- package/dist/element.cjs +9 -0
- package/dist/element.d.cts +3 -0
- package/dist/element.d.ts +3 -0
- package/dist/element.js +3 -0
- package/dist/index.cjs +154 -47
- package/dist/index.d.cts +2 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -47
- package/dist/index.js.map +1 -1
- package/dist/public-action-methods-C_ppItRr.d.cts +5 -0
- package/dist/public-action-methods-C_ppItRr.d.cts.map +1 -0
- package/dist/public-action-methods-C_ppItRr.d.ts +5 -0
- package/dist/public-action-methods-C_ppItRr.d.ts.map +1 -0
- package/docs/action-contracts.md +78 -0
- package/docs/element-host-patterns.en.md +129 -0
- package/docs/element-host-patterns.ko.md +116 -0
- package/docs/element-interop.md +138 -0
- package/docs/interop-review.en.md +55 -0
- package/docs/interop-review.ko.md +51 -0
- package/package.json +35 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
Pending changes that are not part of a published version are recorded in the repository's [UNRELEASED.md](https://github.com/mineclover/context-action/blob/main/packages/core/UNRELEASED.md).
|
|
4
|
+
|
|
5
|
+
## [1.3.1] (2026-11-19)
|
|
6
|
+
|
|
7
|
+
### Element host interop & pipeline refinements
|
|
8
|
+
|
|
9
|
+
- Export attribute/style reconciliation helpers (`attribute-bindings`, `style-bindings`), pointer gesture session helpers (`createPointerGestureSession`), roving focus (`createRovingFocusController`), synchronous pipeline (`createSyncActionPipeline`), and `toReactPartProps` cleanly from `@context-action/core/element` and `@context-action/core/element/react`.
|
|
10
|
+
- Keep `@context-action/core` pure zero-dependency (`dependencies: undefined`), leaving XState v5/v6 and Effect integrations cleanly separated in `@context-action/xstate`.
|
|
11
|
+
|
|
12
|
+
## [1.3.0] (2026-10-29)
|
|
13
|
+
|
|
14
|
+
### Element interop
|
|
15
|
+
|
|
16
|
+
- Add the framework-neutral `./element` and React host `./element/react` entry
|
|
17
|
+
points for element lifecycle and property/event binding contracts.
|
|
18
|
+
- Support ownership-tracked `attributes` (`updateAttributes`) and `styles`
|
|
19
|
+
(`updateStyles`) alongside `properties` and `events`, plus headless
|
|
20
|
+
`createSyncActionPipeline`, `createRovingFocusController`,
|
|
21
|
+
`createPointerGestureSession`, and `toReactPartProps` in `./element`.
|
|
22
|
+
- Preserve the phase-specific action pipeline and asynchronous shutdown contracts
|
|
23
|
+
used by the current Core release cohort.
|
|
24
|
+
|
|
3
25
|
## [1.2.6] (2026-10-02)
|
|
4
26
|
|
|
5
27
|
- Reissue the coordinated state-management cohort with fresh provenance for the time-travel and hydration stability release.
|
package/README.md
CHANGED
|
@@ -4,6 +4,10 @@ Type-safe action pipeline management library for **vanilla JavaScript/TypeScript
|
|
|
4
4
|
|
|
5
5
|
> **✨ Framework-Agnostic**: Works with vanilla JavaScript, React, Vue, Svelte, or any JavaScript environment. No framework dependencies required!
|
|
6
6
|
|
|
7
|
+
> Local candidate: optional `/element` DOM bindings and `/element/react` host bridge.
|
|
8
|
+
> The default Action entry stays DOM/React-free. See [ownership, lifecycle and release limits](docs/element-interop.md).
|
|
9
|
+
> These exports are not in the current registry release.
|
|
10
|
+
|
|
7
11
|
## Installation
|
|
8
12
|
|
|
9
13
|
```bash
|
|
@@ -177,7 +181,7 @@ const actions = new ActionRegister<MyActions>({
|
|
|
177
181
|
// should be treated as a programming error.
|
|
178
182
|
```
|
|
179
183
|
|
|
180
|
-
## v1.
|
|
184
|
+
## v1.3 Pipeline Contract
|
|
181
185
|
|
|
182
186
|
### Phase-specific registration
|
|
183
187
|
|
|
@@ -465,6 +469,19 @@ await actions.dispatch('processFiles', files, {
|
|
|
465
469
|
});
|
|
466
470
|
```
|
|
467
471
|
|
|
472
|
+
### One-time handler lifecycle
|
|
473
|
+
|
|
474
|
+
`once: true` means at most one invocation per registration, including concurrent
|
|
475
|
+
dispatches and retries. A skipped condition does not consume the registration.
|
|
476
|
+
In parallel/race mode, all handler conditions are evaluated before execution;
|
|
477
|
+
if a condition throws, no result handler starts and uninvoked once handlers
|
|
478
|
+
remain available. Sequential mode evaluates conditions as it reaches each handler,
|
|
479
|
+
so previously executed handlers are not rolled back.
|
|
480
|
+
|
|
481
|
+
Once observers also run at most once, even when concurrent dispatches wait for
|
|
482
|
+
an earlier observer. Cleanup runs once after started work settles. This is an
|
|
483
|
+
in-memory registration guarantee, not persistent or cross-process deduplication.
|
|
484
|
+
|
|
468
485
|
### Error Handling & Recovery
|
|
469
486
|
|
|
470
487
|
```typescript
|
|
@@ -525,6 +542,19 @@ await registry.destroyAsync();
|
|
|
525
542
|
await registry.destroyAsync({ deferCleanup: true });
|
|
526
543
|
```
|
|
527
544
|
|
|
545
|
+
## Element Transport & Headless UI Primitives (`@context-action/core/element`)
|
|
546
|
+
|
|
547
|
+
Framework-neutral headless primitives and DOM host transport live in `@context-action/core/element` (and the optional injected-runtime React bridge in `@context-action/core/element/react`), keeping the package root (`@context-action/core`) free of DOM and React dependencies:
|
|
548
|
+
|
|
549
|
+
- `createElementBinding(element, config, options?)`: Reconciles complete input snapshots onto an `HTMLElement` in deterministic `events -> attributes -> styles -> properties` order, tracking per-binding ownership so omitted attributes, CSS custom properties (`--*`), inline styles, and properties are cleaned up once without touching host-owned state.
|
|
550
|
+
- `createElementFacade(allowlist)`: Creates a frozen, lazily bound imperative facade over a mounted host element.
|
|
551
|
+
- `createSyncActionPipeline(name)`: Three-phase synchronous UI pipeline (`registerGuard` with `abort`/`modifyPayload` -> `register` with `setResult` -> `registerObserver` with `when: 'success' | 'failure' | 'always'`, `priority`, and `once`) for DOM pointer and keyboard events.
|
|
552
|
+
- `createRovingFocusController(options)`: WAI-ARIA composite focus helper supporting `'horizontal'`, `'vertical'`, and `'both'` arrow keys, `Home`/`End`, disabled-item skipping, looping, and roving `getTabIndex(id)`.
|
|
553
|
+
- `createPointerGestureSession(options)`: Pointer capture gesture lifecycle manager with `onStart` admission guards, `deltaX`/`deltaY` and modifier-key tracking, and `Escape` cancellation.
|
|
554
|
+
- `toReactPartProps(partProps, config)` & `@context-action/core/element/react` (`createReactElementBridge`): Projects headless part props and config onto React 18/19 hosts without adding a package-level React dependency.
|
|
555
|
+
|
|
556
|
+
See [element transport and host lifecycle adapters](docs/element-interop.md) for ownership rules, host framework patterns, and release boundary details.
|
|
557
|
+
|
|
528
558
|
## API Reference
|
|
529
559
|
|
|
530
560
|
### ActionRegister<T>
|