@praxisjs/runtime 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # @praxisjs/runtime
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4060b4f: Expand DOM event coverage and HTML/SVG attribute types.
8
+
9
+ **`@praxisjs/runtime` — EVENT_MAP expanded from 24 to 82 entries.**
10
+
11
+ Bug fix: `onToggle`, `onClose`, and `onCancel` were declared in their respective JSX interfaces but absent from `EVENT_MAP`. The runtime was treating them as reactive getters instead of event listeners. They are now wired correctly.
12
+
13
+ New event categories added to `EVENT_MAP`:
14
+ - **Pointer** — `onPointerDown`, `onPointerUp`, `onPointerMove`, `onPointerEnter`, `onPointerLeave`, `onPointerOver`, `onPointerOut`, `onPointerCancel`, `onGotPointerCapture`, `onLostPointerCapture`
15
+ - **Mouse** — `onMouseOver`, `onMouseOut` (bubbling variants)
16
+ - **Drag** — `onDrag`, `onDragEnter`, `onDragLeave`
17
+ - **Form** — `onBeforeInput`, `onSelect`, `onInvalid`
18
+ - **Clipboard** — `onCopy`, `onCut`, `onPaste`
19
+ - **Composition (IME)** — `onCompositionStart`, `onCompositionUpdate`, `onCompositionEnd`
20
+ - **Resource** — `onLoad`, `onError`
21
+ - **Scroll** — `onScrollEnd`
22
+ - **Element-specific** — `onBeforeToggle`
23
+ - **Media** — `onAbort`, `onCanPlay`, `onCanPlayThrough`, `onDurationChange`, `onEmptied`, `onEnded`, `onLoadedData`, `onLoadedMetadata`, `onLoadStart`, `onPause`, `onPlay`, `onPlaying`, `onProgress`, `onRateChange`, `onSeeked`, `onSeeking`, `onStalled`, `onSuspend`, `onTimeUpdate`, `onVolumeChange`, `onWaiting`
24
+
25
+ **`@praxisjs/jsx` — type additions.**
26
+
27
+ `AriaAttributes`:
28
+ - `"aria-expanded"` — was missing entirely; it is one of the most commonly used ARIA attributes (accordions, disclosures, dropdowns)
29
+ - `"aria-autocomplete"` — for combobox/searchbox widgets
30
+ - `"aria-errormessage"` — references the element that provides the validation error message
31
+
32
+ `DOMAttributes<T>`: all new event categories above are now typed with their correct native event types (`PointerEvent`, `ClipboardEvent`, `CompositionEvent`, `ProgressEvent`, etc.) and `currentTarget` narrowed to `T`.
33
+
34
+ `HTMLAttributes<T>`:
35
+ - `autoFocus` — `autofocus` is a global HTML5 attribute, not only valid on form controls
36
+ - `inert` — `Reactive<boolean>`; blocks all user interaction and assistive technology programmatically
37
+ - `popover` — Popover API; accepts `boolean` (empty attribute, defaults to `"auto"`) or `"auto"` / `"manual"`
38
+ - `accessKey` — keyboard shortcut hint
39
+ - `nonce` — CSP nonce passthrough
40
+ - `part` — CSS `::part()` export list for shadow DOM styling
41
+ - `data-*` — template-literal index signature `[key: \`data-${string}\`]: Reactive<string | number | boolean> | undefined`; data attributes are now accepted without a cast on any JSX element
42
+
43
+ `MediaHTMLAttributes<T>`: all 21 standard media events typed and wired.
44
+
45
+ `DetailsHTMLAttributes` / `DialogHTMLAttributes`: `onBeforeToggle` added to both.
46
+
47
+ `InputHTMLAttributes`: `popovertarget` and `popovertargetaction` added (consistent with `ButtonHTMLAttributes`).
48
+
49
+ `SVGAttributes<T>`:
50
+ - `pointerEvents` — typed with all valid SVG `pointer-events` keyword values
51
+ - `vectorEffect`, `shapeRendering`, `textRendering`, `imageRendering`, `colorInterpolation`, `paintOrder` — rendering hints
52
+ - `cursor` — cursor override on SVG elements
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [bcaad96]
57
+ - Updated dependencies [376e38c]
58
+ - @praxisjs/decorators@1.4.0
59
+ - @praxisjs/core@1.8.2
60
+
3
61
  ## 0.4.1
4
62
 
5
63
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/dom/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,eAAO,MAAM,QAAQ,aA2BnB,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6B5C,CAAC;AAEF,eAAO,MAAM,WAAW,aAAqE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/dom/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,eAAO,MAAM,QAAQ,aA2BnB,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+F5C,CAAC;AAEF,eAAO,MAAM,WAAW,aAAqE,CAAC"}
@@ -28,34 +28,100 @@ export const SVG_TAGS = new Set([
28
28
  "foreignObject",
29
29
  ]);
30
30
  export const EVENT_MAP = {
31
+ // Mouse
31
32
  onClick: "click",
32
33
  onDblClick: "dblclick",
33
- onChange: "change",
34
- onInput: "input",
35
- onSubmit: "submit",
36
- onReset: "reset",
37
- onKeyDown: "keydown",
38
- onKeyUp: "keyup",
39
- onKeyPress: "keypress",
40
- onFocus: "focus",
41
- onBlur: "blur",
42
34
  onMouseDown: "mousedown",
43
35
  onMouseUp: "mouseup",
44
36
  onMouseEnter: "mouseenter",
45
37
  onMouseLeave: "mouseleave",
46
38
  onMouseMove: "mousemove",
39
+ onMouseOver: "mouseover",
40
+ onMouseOut: "mouseout",
47
41
  onContextMenu: "contextmenu",
48
- onScroll: "scroll",
49
- onWheel: "wheel",
42
+ // Keyboard
43
+ onKeyDown: "keydown",
44
+ onKeyUp: "keyup",
45
+ onKeyPress: "keypress",
46
+ // Focus
47
+ onFocus: "focus",
48
+ onBlur: "blur",
49
+ // Pointer
50
+ onPointerDown: "pointerdown",
51
+ onPointerUp: "pointerup",
52
+ onPointerMove: "pointermove",
53
+ onPointerEnter: "pointerenter",
54
+ onPointerLeave: "pointerleave",
55
+ onPointerOver: "pointerover",
56
+ onPointerOut: "pointerout",
57
+ onPointerCancel: "pointercancel",
58
+ onGotPointerCapture: "gotpointercapture",
59
+ onLostPointerCapture: "lostpointercapture",
60
+ // Touch
61
+ onTouchStart: "touchstart",
62
+ onTouchEnd: "touchend",
63
+ onTouchMove: "touchmove",
64
+ // Drag
65
+ onDrag: "drag",
50
66
  onDragStart: "dragstart",
51
67
  onDragEnd: "dragend",
68
+ onDragEnter: "dragenter",
69
+ onDragLeave: "dragleave",
52
70
  onDragOver: "dragover",
53
71
  onDrop: "drop",
54
- onTouchStart: "touchstart",
55
- onTouchEnd: "touchend",
56
- onTouchMove: "touchmove",
72
+ // Scroll / Wheel
73
+ onScroll: "scroll",
74
+ onScrollEnd: "scrollend",
75
+ onWheel: "wheel",
76
+ // Form
77
+ onChange: "change",
78
+ onInput: "input",
79
+ onBeforeInput: "beforeinput",
80
+ onSubmit: "submit",
81
+ onReset: "reset",
82
+ onSelect: "select",
83
+ onInvalid: "invalid",
84
+ // Clipboard
85
+ onCopy: "copy",
86
+ onCut: "cut",
87
+ onPaste: "paste",
88
+ // Composition (IME)
89
+ onCompositionStart: "compositionstart",
90
+ onCompositionUpdate: "compositionupdate",
91
+ onCompositionEnd: "compositionend",
92
+ // Resource
93
+ onLoad: "load",
94
+ onError: "error",
95
+ // Animation / Transition
57
96
  onAnimationEnd: "animationend",
58
97
  onTransitionEnd: "transitionend",
98
+ // Element-specific (details, dialog, popover)
99
+ onToggle: "toggle",
100
+ onBeforeToggle: "beforetoggle",
101
+ onClose: "close",
102
+ onCancel: "cancel",
103
+ // Media
104
+ onAbort: "abort",
105
+ onCanPlay: "canplay",
106
+ onCanPlayThrough: "canplaythrough",
107
+ onDurationChange: "durationchange",
108
+ onEmptied: "emptied",
109
+ onEnded: "ended",
110
+ onLoadedData: "loadeddata",
111
+ onLoadedMetadata: "loadedmetadata",
112
+ onLoadStart: "loadstart",
113
+ onPause: "pause",
114
+ onPlay: "play",
115
+ onPlaying: "playing",
116
+ onProgress: "progress",
117
+ onRateChange: "ratechange",
118
+ onSeeked: "seeked",
119
+ onSeeking: "seeking",
120
+ onStalled: "stalled",
121
+ onSuspend: "suspend",
122
+ onTimeUpdate: "timeupdate",
123
+ onVolumeChange: "volumechange",
124
+ onWaiting: "waiting",
59
125
  };
60
126
  export const VALUE_PROPS = new Set(["checked", "value", "disabled", "selected", "innerHTML"]);
61
127
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/dom/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IAC9B,KAAK;IACL,MAAM;IACN,QAAQ;IACR,MAAM;IACN,MAAM;IACN,UAAU;IACV,SAAS;IACT,SAAS;IACT,MAAM;IACN,GAAG;IACH,MAAM;IACN,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,MAAM;IACN,SAAS;IACT,OAAO;IACP,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAA2B;IAC/C,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,aAAa,EAAE,aAAa;IAC5B,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAA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,EAAE,cAAc;IAC9B,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,QAAQ;IACR,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,gBAAgB,EAAE,gBAAgB;IAClC,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,YAAY,EAAE,YAAY;IAC1B,cAAc,EAAE,cAAc;IAC9B,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisjs/runtime",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "typescript": "^5.9.3"
15
15
  },
16
16
  "dependencies": {
17
- "@praxisjs/core": "1.8.1",
18
- "@praxisjs/decorators": "1.3.1",
17
+ "@praxisjs/core": "1.8.2",
18
+ "@praxisjs/decorators": "1.4.0",
19
19
  "@praxisjs/shared": "0.3.0"
20
20
  },
21
21
  "scripts": {
@@ -30,34 +30,100 @@ export const SVG_TAGS = new Set([
30
30
  ]);
31
31
 
32
32
  export const EVENT_MAP: Record<string, string> = {
33
+ // Mouse
33
34
  onClick: "click",
34
35
  onDblClick: "dblclick",
35
- onChange: "change",
36
- onInput: "input",
37
- onSubmit: "submit",
38
- onReset: "reset",
39
- onKeyDown: "keydown",
40
- onKeyUp: "keyup",
41
- onKeyPress: "keypress",
42
- onFocus: "focus",
43
- onBlur: "blur",
44
36
  onMouseDown: "mousedown",
45
37
  onMouseUp: "mouseup",
46
38
  onMouseEnter: "mouseenter",
47
39
  onMouseLeave: "mouseleave",
48
40
  onMouseMove: "mousemove",
41
+ onMouseOver: "mouseover",
42
+ onMouseOut: "mouseout",
49
43
  onContextMenu: "contextmenu",
50
- onScroll: "scroll",
51
- onWheel: "wheel",
44
+ // Keyboard
45
+ onKeyDown: "keydown",
46
+ onKeyUp: "keyup",
47
+ onKeyPress: "keypress",
48
+ // Focus
49
+ onFocus: "focus",
50
+ onBlur: "blur",
51
+ // Pointer
52
+ onPointerDown: "pointerdown",
53
+ onPointerUp: "pointerup",
54
+ onPointerMove: "pointermove",
55
+ onPointerEnter: "pointerenter",
56
+ onPointerLeave: "pointerleave",
57
+ onPointerOver: "pointerover",
58
+ onPointerOut: "pointerout",
59
+ onPointerCancel: "pointercancel",
60
+ onGotPointerCapture: "gotpointercapture",
61
+ onLostPointerCapture: "lostpointercapture",
62
+ // Touch
63
+ onTouchStart: "touchstart",
64
+ onTouchEnd: "touchend",
65
+ onTouchMove: "touchmove",
66
+ // Drag
67
+ onDrag: "drag",
52
68
  onDragStart: "dragstart",
53
69
  onDragEnd: "dragend",
70
+ onDragEnter: "dragenter",
71
+ onDragLeave: "dragleave",
54
72
  onDragOver: "dragover",
55
73
  onDrop: "drop",
56
- onTouchStart: "touchstart",
57
- onTouchEnd: "touchend",
58
- onTouchMove: "touchmove",
74
+ // Scroll / Wheel
75
+ onScroll: "scroll",
76
+ onScrollEnd: "scrollend",
77
+ onWheel: "wheel",
78
+ // Form
79
+ onChange: "change",
80
+ onInput: "input",
81
+ onBeforeInput: "beforeinput",
82
+ onSubmit: "submit",
83
+ onReset: "reset",
84
+ onSelect: "select",
85
+ onInvalid: "invalid",
86
+ // Clipboard
87
+ onCopy: "copy",
88
+ onCut: "cut",
89
+ onPaste: "paste",
90
+ // Composition (IME)
91
+ onCompositionStart: "compositionstart",
92
+ onCompositionUpdate: "compositionupdate",
93
+ onCompositionEnd: "compositionend",
94
+ // Resource
95
+ onLoad: "load",
96
+ onError: "error",
97
+ // Animation / Transition
59
98
  onAnimationEnd: "animationend",
60
99
  onTransitionEnd: "transitionend",
100
+ // Element-specific (details, dialog, popover)
101
+ onToggle: "toggle",
102
+ onBeforeToggle: "beforetoggle",
103
+ onClose: "close",
104
+ onCancel: "cancel",
105
+ // Media
106
+ onAbort: "abort",
107
+ onCanPlay: "canplay",
108
+ onCanPlayThrough: "canplaythrough",
109
+ onDurationChange: "durationchange",
110
+ onEmptied: "emptied",
111
+ onEnded: "ended",
112
+ onLoadedData: "loadeddata",
113
+ onLoadedMetadata: "loadedmetadata",
114
+ onLoadStart: "loadstart",
115
+ onPause: "pause",
116
+ onPlay: "play",
117
+ onPlaying: "playing",
118
+ onProgress: "progress",
119
+ onRateChange: "ratechange",
120
+ onSeeked: "seeked",
121
+ onSeeking: "seeking",
122
+ onStalled: "stalled",
123
+ onSuspend: "suspend",
124
+ onTimeUpdate: "timeupdate",
125
+ onVolumeChange: "volumechange",
126
+ onWaiting: "waiting",
61
127
  };
62
128
 
63
129
  export const VALUE_PROPS = new Set(["checked", "value", "disabled", "selected", "innerHTML"]);