octane 0.1.34 → 0.1.35

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/README.md CHANGED
@@ -30,6 +30,19 @@ taking ownership of the existing markup. See the
30
30
  For the full story, see the
31
31
  [main README](https://github.com/octanejs/octane#readme).
32
32
 
33
+ ## Browser compatibility
34
+
35
+ Configure your application's build target for the browser engines you support.
36
+ The Rsbuild integration's `modules` target includes Chromium 87 and Samsung
37
+ Internet 14; Samsung Internet can also be selected directly with targets such as
38
+ `samsung24`. Samsung Internet versions do not match their Chromium engine
39
+ versions, and Android System WebView is updated independently from the browser.
40
+
41
+ Build targets transpile JavaScript syntax; they do not polyfill application Web
42
+ APIs. Features such as native `inert` may require a polyfill on older supported
43
+ browsers. Validate text entry with the keyboards, languages, and browser or
44
+ WebView versions your application supports.
45
+
33
46
  Octane is alpha software. It is ready to try, but not yet ready for production.
34
47
 
35
48
  ## License
@@ -23,6 +23,7 @@ __export(component_flags_exports, {
23
23
  markComponentFlags: () => markComponentFlags
24
24
  });
25
25
  module.exports = __toCommonJS(component_flags_exports);
26
+ var import_has_own = require("./has-own.cjs");
26
27
  const OCTANE_COMPONENT_FLAGS = /* @__PURE__ */ Symbol.for("octane.flags.component");
27
28
  const COMPONENT_FLAG_BOUNDARY = 1 << 0;
28
29
  function markComponentFlags(component, flags, name) {
@@ -31,7 +32,7 @@ function markComponentFlags(component, flags, name) {
31
32
  return component;
32
33
  }
33
34
  function hasComponentFlags(component, flags) {
34
- return typeof component === "function" && Object.hasOwn(component, OCTANE_COMPONENT_FLAGS) && (component[OCTANE_COMPONENT_FLAGS] & flags) === flags;
35
+ return typeof component === "function" && import_has_own.hasOwnProp.call(component, OCTANE_COMPONENT_FLAGS) && (component[OCTANE_COMPONENT_FLAGS] & flags) === flags;
35
36
  }
36
37
  // Annotate the CommonJS export names for ESM import in node:
37
38
  0 && (module.exports = {
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var has_own_exports = {};
20
+ __export(has_own_exports, {
21
+ hasOwnProp: () => hasOwnProp
22
+ });
23
+ module.exports = __toCommonJS(has_own_exports);
24
+ const hasOwnProp = Object.prototype.hasOwnProperty;
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ hasOwnProp
28
+ });
@@ -23,6 +23,7 @@ __export(event_capture_exports, {
23
23
  initializeHydrationEventCapture: () => initializeHydrationEventCapture,
24
24
  markDelegatedDynamicHydrationIntent: () => markDelegatedDynamicHydrationIntent,
25
25
  registerHydrationIntentBoundary: () => registerHydrationIntentBoundary,
26
+ shouldPreventHydrationInteractionDefault: () => shouldPreventHydrationInteractionDefault,
26
27
  takeDelegatedDynamicHydrationIntent: () => takeDelegatedDynamicHydrationIntent,
27
28
  takePendingHydrationIntents: () => takePendingHydrationIntents,
28
29
  unregisterHydrationIntentBoundary: () => unregisterHydrationIntentBoundary,
@@ -41,10 +42,15 @@ function isHydrationElement(target) {
41
42
  }
42
43
  const HYDRATE_SUPPORTED_INTERACTION_EVENTS = [
43
44
  "auxclick",
45
+ "beforeinput",
44
46
  "click",
47
+ "compositionend",
48
+ "compositionstart",
49
+ "compositionupdate",
45
50
  "contextmenu",
46
51
  "dblclick",
47
52
  "focusin",
53
+ "input",
48
54
  "keydown",
49
55
  "keyup",
50
56
  "mousedown",
@@ -54,8 +60,26 @@ const HYDRATE_SUPPORTED_INTERACTION_EVENTS = [
54
60
  "pointerdown",
55
61
  "pointerenter",
56
62
  "pointerover",
57
- "pointerup"
63
+ "pointerup",
64
+ "touchend",
65
+ "touchstart"
58
66
  ];
67
+ function shouldPreventHydrationInteractionDefault(event) {
68
+ switch (event.type) {
69
+ case "beforeinput":
70
+ case "compositionend":
71
+ case "compositionstart":
72
+ case "compositionupdate":
73
+ case "input":
74
+ case "mousedown":
75
+ case "pointerdown":
76
+ case "touchend":
77
+ case "touchstart":
78
+ return false;
79
+ default:
80
+ return event.cancelable;
81
+ }
82
+ }
59
83
  const HYDRATE_BOUNDARIES = /* @__PURE__ */ new WeakMap();
60
84
  const HYDRATE_PENDING_INTENTS = /* @__PURE__ */ new WeakMap();
61
85
  const HYDRATE_DELEGATED_DYNAMIC_MARKERS = /* @__PURE__ */ new WeakSet();
@@ -130,7 +154,7 @@ function handleEarlyHydrationIntent(event) {
130
154
  const intent = { event, path };
131
155
  HYDRATE_HANDLED_INTENT_EVENTS.add(event);
132
156
  if (event.bubbles) {
133
- event.preventDefault();
157
+ if (shouldPreventHydrationInteractionDefault(event)) event.preventDefault();
134
158
  event.stopPropagation();
135
159
  event.stopImmediatePropagation();
136
160
  }
@@ -181,6 +205,7 @@ function markDelegatedDynamicHydrationIntent(marker) {
181
205
  initializeHydrationEventCapture,
182
206
  markDelegatedDynamicHydrationIntent,
183
207
  registerHydrationIntentBoundary,
208
+ shouldPreventHydrationInteractionDefault,
184
209
  takeDelegatedDynamicHydrationIntent,
185
210
  takePendingHydrationIntents,
186
211
  unregisterHydrationIntentBoundary,
@@ -27,6 +27,13 @@ const HYDRATE_DEFAULT_INTERACTION_EVENTS = [
27
27
  "pointerenter",
28
28
  "focusin",
29
29
  "pointerdown",
30
+ "touchstart",
31
+ "touchend",
32
+ "beforeinput",
33
+ "input",
34
+ "compositionstart",
35
+ "compositionupdate",
36
+ "compositionend",
30
37
  "click"
31
38
  ];
32
39
  // Annotate the CommonJS export names for ESM import in node:
@@ -70,6 +70,7 @@ __export(index_exports, {
70
70
  cloneElement: () => import_runtime.cloneElement,
71
71
  compilerCacheArray: () => import_runtime.compilerCacheArray,
72
72
  compilerCacheContext: () => import_runtime.compilerCacheContext,
73
+ compilerCacheImmutableArrayFilter: () => import_runtime.compilerCacheImmutableArrayFilter,
73
74
  compilerCacheMappedArray: () => import_runtime.compilerCacheMappedArray,
74
75
  compilerOwnsContextProvider: () => import_runtime.compilerOwnsContextProvider,
75
76
  componentSlot: () => import_runtime.componentSlot,
@@ -170,6 +171,7 @@ __export(index_exports, {
170
171
  setSpread: () => import_runtime.setSpread,
171
172
  setStringData: () => import_runtime.setStringData,
172
173
  setStyle: () => import_runtime.setStyle,
174
+ setStyleProperty: () => import_runtime.setStyleProperty,
173
175
  setText: () => import_runtime.setText,
174
176
  setTransitionFallbackTimeout: () => import_runtime.setTransitionFallbackTimeout,
175
177
  setValue: () => import_runtime.setValue,
@@ -271,6 +273,7 @@ var import_method_dep = require("./method-dep.cjs");
271
273
  cloneElement,
272
274
  compilerCacheArray,
273
275
  compilerCacheContext,
276
+ compilerCacheImmutableArrayFilter,
274
277
  compilerCacheMappedArray,
275
278
  compilerOwnsContextProvider,
276
279
  componentSlot,
@@ -371,6 +374,7 @@ var import_method_dep = require("./method-dep.cjs");
371
374
  setSpread,
372
375
  setStringData,
373
376
  setStyle,
377
+ setStyleProperty,
374
378
  setText,
375
379
  setTransitionFallbackTimeout,
376
380
  setValue,
@@ -21,12 +21,12 @@ __export(method_dep_exports, {
21
21
  __methodDep: () => __methodDep
22
22
  });
23
23
  module.exports = __toCommonJS(method_dep_exports);
24
- const hasOwnProp = Object.prototype.hasOwnProperty;
24
+ var import_has_own = require("./has-own.cjs");
25
25
  function __methodDep(receiver, name) {
26
26
  if ((typeof receiver !== "object" || receiver === null) && typeof receiver !== "function") {
27
27
  return receiver;
28
28
  }
29
- if (hasOwnProp.call(receiver, name)) return receiver[name];
29
+ if (import_has_own.hasOwnProp.call(receiver, name)) return receiver[name];
30
30
  return name in receiver ? receiver : void 0;
31
31
  }
32
32
  // Annotate the CommonJS export names for ESM import in node: