octane 0.2.2 → 0.2.3
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/dist/cjs/compatibility.cjs +35 -0
- package/dist/cjs/component-flags.cjs +8 -1
- package/dist/cjs/dom-tables.cjs +2 -0
- package/dist/cjs/error-codes.client.generated.cjs +15 -2
- package/dist/cjs/error-codes.server.generated.cjs +5 -0
- package/dist/cjs/event-names.cjs +39 -0
- package/dist/cjs/index.cjs +13 -0
- package/dist/cjs/runtime.cjs +1223 -332
- package/dist/cjs/runtime.server.cjs +362 -120
- package/dist/cjs/server/index.cjs +22 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/compatibility.d.ts +7 -0
- package/dist/compatibility.js +10 -0
- package/dist/compiler/bundler.js +13 -30
- package/dist/compiler/compile-renderer-boundaries.js +1 -0
- package/dist/compiler/compile-universal.js +3 -0
- package/dist/compiler/compile.js +619 -99
- package/dist/compiler/hook-deps.js +100 -3
- package/dist/compiler/hook-names.js +1 -0
- package/dist/compiler/manual-hooks.js +171 -0
- package/dist/compiler/plain-hook-memo.js +54 -5
- package/dist/compiler/slot-hooks.d.ts +43 -0
- package/dist/compiler/slot-hooks.js +154 -35
- package/dist/component-flags.d.ts +1 -1
- package/dist/component-flags.js +8 -1
- package/dist/dom-tables.js +2 -0
- package/dist/error-codes.client.generated.d.ts +3 -1
- package/dist/error-codes.client.generated.js +15 -2
- package/dist/error-codes.server.generated.d.ts +1 -0
- package/dist/error-codes.server.generated.js +5 -0
- package/dist/event-names.d.ts +1 -0
- package/dist/event-names.js +15 -0
- package/dist/html-tree-validation.d.ts +17 -34
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12 -1
- package/dist/jsx-runtime.d.ts +6 -1
- package/dist/public-types.d.ts +188 -0
- package/dist/public-types.js +0 -0
- package/dist/runtime.d.ts +109 -66
- package/dist/runtime.js +1220 -332
- package/dist/runtime.server.d.ts +39 -14
- package/dist/runtime.server.js +356 -120
- package/dist/server/index.d.ts +4 -2
- package/dist/server/index.js +19 -0
- package/dist/static/index.d.ts +2 -1
- package/dist/static/index.js +3 -1
- package/dist/universal-core.d.ts +8 -1
- package/dist/universal-core.js +95 -9
- package/dist/version.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,35 @@
|
|
|
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 compatibility_exports = {};
|
|
20
|
+
__export(compatibility_exports, {
|
|
21
|
+
StrictMode: () => StrictMode,
|
|
22
|
+
unstable_batchedUpdates: () => unstable_batchedUpdates
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(compatibility_exports);
|
|
25
|
+
function StrictMode(props) {
|
|
26
|
+
return props.children;
|
|
27
|
+
}
|
|
28
|
+
function unstable_batchedUpdates(callback, ...args) {
|
|
29
|
+
return callback(...args);
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
StrictMode,
|
|
34
|
+
unstable_batchedUpdates
|
|
35
|
+
});
|
|
@@ -26,9 +26,16 @@ module.exports = __toCommonJS(component_flags_exports);
|
|
|
26
26
|
var import_has_own = require("./has-own.cjs");
|
|
27
27
|
const OCTANE_COMPONENT_FLAGS = /* @__PURE__ */ Symbol.for("octane.flags.component");
|
|
28
28
|
const COMPONENT_FLAG_BOUNDARY = 1 << 0;
|
|
29
|
-
function markComponentFlags(component, flags, name) {
|
|
29
|
+
function markComponentFlags(component, flags, name, kind) {
|
|
30
30
|
Object.defineProperty(component, OCTANE_COMPONENT_FLAGS, { value: flags });
|
|
31
31
|
Object.defineProperty(component, "name", { value: name, configurable: true });
|
|
32
|
+
if (kind !== void 0) {
|
|
33
|
+
Object.defineProperty(component, kind, {
|
|
34
|
+
get() {
|
|
35
|
+
return this === component;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
32
39
|
return component;
|
|
33
40
|
}
|
|
34
41
|
function hasComponentFlags(component, flags) {
|
package/dist/cjs/dom-tables.cjs
CHANGED
|
@@ -432,6 +432,7 @@ for (const base of [
|
|
|
432
432
|
"opacity",
|
|
433
433
|
"order",
|
|
434
434
|
"orphans",
|
|
435
|
+
"scale",
|
|
435
436
|
"tabSize",
|
|
436
437
|
"widows",
|
|
437
438
|
"zIndex",
|
|
@@ -462,6 +463,7 @@ function cssStyleValue(name, value) {
|
|
|
462
463
|
return typeof value === "string" ? value.trim() : "" + value;
|
|
463
464
|
}
|
|
464
465
|
function hyphenateStyleName(name) {
|
|
466
|
+
if (name === "cssFloat") return "float";
|
|
465
467
|
if (name.charCodeAt(0) === 45) return name;
|
|
466
468
|
let hasUpper = false;
|
|
467
469
|
for (let i = 0; i < name.length; i++) {
|
|
@@ -148,8 +148,6 @@ function formatClientError(code, ...args) {
|
|
|
148
148
|
"A hosted foreign-context request escaped its renderer-region owner; the owning bridge is gone or declined it.",
|
|
149
149
|
args
|
|
150
150
|
);
|
|
151
|
-
case 28:
|
|
152
|
-
return (0, import_error_message.formatDevErrorMessage)("Target container is not a DOM element.", args);
|
|
153
151
|
case 29:
|
|
154
152
|
return (0, import_error_message.formatDevErrorMessage)("Cannot update an unmounted root.", args);
|
|
155
153
|
case 46:
|
|
@@ -196,6 +194,21 @@ function formatClientError(code, ...args) {
|
|
|
196
194
|
);
|
|
197
195
|
case 58:
|
|
198
196
|
return (0, import_error_message.formatDevErrorMessage)("Unsupported native-read compiler/runtime version.", args);
|
|
197
|
+
case 61:
|
|
198
|
+
return (0, import_error_message.formatDevErrorMessage)(
|
|
199
|
+
"Hydration mismatch: the server-rendered text differed from the client; the text was updated to the client value.",
|
|
200
|
+
args
|
|
201
|
+
);
|
|
202
|
+
case 62:
|
|
203
|
+
return (0, import_error_message.formatDevErrorMessage)(
|
|
204
|
+
"Hydration mismatch: the server rendered extra children in a text element; the stale children were discarded.",
|
|
205
|
+
args
|
|
206
|
+
);
|
|
207
|
+
case 63:
|
|
208
|
+
return (0, import_error_message.formatDevErrorMessage)(
|
|
209
|
+
"Target container is not a DOM element. Pass an Element, Document, or DocumentFragment. If document.body is null after document hydration, update the existing document root or render a document shell containing <body>.",
|
|
210
|
+
args
|
|
211
|
+
);
|
|
199
212
|
default:
|
|
200
213
|
return (0, import_error_message.formatUnknownDevErrorMessage)(code);
|
|
201
214
|
}
|
|
@@ -144,6 +144,11 @@ function formatServerError(code, ...args) {
|
|
|
144
144
|
return (0, import_error_message.formatDevErrorMessage)("Unsupported native-read compiler/runtime version.", args);
|
|
145
145
|
case 59:
|
|
146
146
|
return (0, import_error_message.formatDevErrorMessage)("%s requires an active server component.", args);
|
|
147
|
+
case 60:
|
|
148
|
+
return (0, import_error_message.formatDevErrorMessage)(
|
|
149
|
+
"A component suspended without a Suspense boundary during synchronous server rendering. Use prerender() or a streaming renderer to await it.",
|
|
150
|
+
args
|
|
151
|
+
);
|
|
147
152
|
default:
|
|
148
153
|
return (0, import_error_message.formatUnknownDevErrorMessage)(code);
|
|
149
154
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 event_names_exports = {};
|
|
20
|
+
__export(event_names_exports, {
|
|
21
|
+
isDelegatedEventProp: () => isDelegatedEventProp
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(event_names_exports);
|
|
24
|
+
const names = "Abort AnimationEnd AnimationIteration AnimationStart AuxClick BeforeInput BeforeToggle Blur Cancel CanPlay CanPlayThrough Change Click Close CompositionEnd CompositionStart CompositionUpdate ContextMenu Copy Cut DoubleClick Drag DragEnd DragEnter DragExit DragLeave DragOver DragStart Drop DurationChange Emptied Encrypted Ended Error Focus GotPointerCapture Input Invalid KeyDown KeyPress KeyUp Load LoadedData LoadedMetadata LoadStart LostPointerCapture MouseDown MouseEnter MouseLeave MouseMove MouseOut MouseOver MouseUp Paste Pause Play Playing PointerCancel PointerDown PointerEnter PointerLeave PointerMove PointerOut PointerOver PointerUp Progress RateChange Reset Resize Scroll ScrollEnd Seeked Seeking Select Stalled Submit Suspend TimeUpdate Toggle TouchCancel TouchEnd TouchMove TouchStart TransitionCancel TransitionEnd TransitionRun TransitionStart VolumeChange Waiting Wheel";
|
|
25
|
+
let delegatedEventProps;
|
|
26
|
+
function isDelegatedEventProp(name) {
|
|
27
|
+
if (delegatedEventProps === void 0) {
|
|
28
|
+
delegatedEventProps = /* @__PURE__ */ new Set();
|
|
29
|
+
for (const event of names.split(" ")) {
|
|
30
|
+
delegatedEventProps.add("on" + event);
|
|
31
|
+
delegatedEventProps.add("on" + event + "Capture");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return delegatedEventProps.has(name);
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
isDelegatedEventProp
|
|
39
|
+
});
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(index_exports, {
|
|
|
27
27
|
HMR: () => import_runtime.HMR,
|
|
28
28
|
HYDRATION_RANGE_BOUNDARY: () => import_runtime.HYDRATION_RANGE_BOUNDARY,
|
|
29
29
|
Hydrate: () => import_runtime.Hydrate,
|
|
30
|
+
StrictMode: () => import_compatibility.StrictMode,
|
|
30
31
|
Suspense: () => import_runtime.Suspense,
|
|
31
32
|
TsrxErrorBoundary: () => import_runtime.TsrxErrorBoundary,
|
|
32
33
|
ViewTransition: () => import_runtime.ViewTransition,
|
|
@@ -117,15 +118,18 @@ __export(index_exports, {
|
|
|
117
118
|
ifBlock: () => import_runtime.ifBlock,
|
|
118
119
|
initializeHydrationEventCapture: () => import_event_capture.initializeHydrationEventCapture,
|
|
119
120
|
injectStyle: () => import_runtime.injectStyle,
|
|
121
|
+
invokeManualHook: () => import_runtime.invokeManualHook,
|
|
120
122
|
isChildrenBlock: () => import_runtime.isChildrenBlock,
|
|
121
123
|
isValidElement: () => import_runtime.isValidElement,
|
|
122
124
|
keyedForBlock: () => import_runtime.keyedForBlock,
|
|
123
125
|
lazy: () => import_runtime.lazy,
|
|
126
|
+
manualHook: () => import_runtime.manualHook,
|
|
124
127
|
mapSlot: () => import_runtime.mapSlot,
|
|
125
128
|
markChildrenBlock: () => import_runtime.markChildrenBlock,
|
|
126
129
|
markDangerouslySetInnerHTMLChildren: () => import_runtime.markDangerouslySetInnerHTMLChildren,
|
|
127
130
|
markNativeChangeDiagnosticStatic: () => import_runtime.markNativeChangeDiagnosticStatic,
|
|
128
131
|
markSingleRoot: () => import_runtime.markSingleRoot,
|
|
132
|
+
markWarm: () => import_runtime.markWarm,
|
|
129
133
|
memo: () => import_runtime.memo,
|
|
130
134
|
mountFragmentRef: () => import_runtime.mountFragmentRef,
|
|
131
135
|
namespaceHead: () => import_runtime.namespaceHead,
|
|
@@ -200,6 +204,7 @@ __export(index_exports, {
|
|
|
200
204
|
unstable_Activity: () => import_runtime.Activity,
|
|
201
205
|
unstable_ViewTransition: () => import_runtime.ViewTransition,
|
|
202
206
|
unstable_addTransitionType: () => import_runtime.addTransitionType,
|
|
207
|
+
unstable_batchedUpdates: () => import_compatibility.unstable_batchedUpdates,
|
|
203
208
|
use: () => import_runtime.use,
|
|
204
209
|
useActionState: () => import_runtime.useActionState,
|
|
205
210
|
useBatch: () => import_runtime.useBatch,
|
|
@@ -209,6 +214,7 @@ __export(index_exports, {
|
|
|
209
214
|
useDeferredValue: () => import_runtime.useDeferredValue,
|
|
210
215
|
useEffect: () => import_runtime.useEffect,
|
|
211
216
|
useEffectEvent: () => import_runtime.useEffectEvent,
|
|
217
|
+
useFormState: () => import_runtime.useActionState,
|
|
212
218
|
useFormStatus: () => import_runtime.useFormStatus,
|
|
213
219
|
useId: () => import_runtime.useId,
|
|
214
220
|
useImperativeHandle: () => import_runtime.useImperativeHandle,
|
|
@@ -229,6 +235,7 @@ __export(index_exports, {
|
|
|
229
235
|
});
|
|
230
236
|
module.exports = __toCommonJS(index_exports);
|
|
231
237
|
var import_version = require("./version.cjs");
|
|
238
|
+
var import_compatibility = require("./compatibility.cjs");
|
|
232
239
|
var import_event_capture = require("./hydration/event-capture.cjs");
|
|
233
240
|
var import_behavior_root = require("./behavior-root.cjs");
|
|
234
241
|
var import_sub_slot = require("./sub-slot.cjs");
|
|
@@ -246,6 +253,7 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
246
253
|
HMR,
|
|
247
254
|
HYDRATION_RANGE_BOUNDARY,
|
|
248
255
|
Hydrate,
|
|
256
|
+
StrictMode,
|
|
249
257
|
Suspense,
|
|
250
258
|
TsrxErrorBoundary,
|
|
251
259
|
ViewTransition,
|
|
@@ -336,15 +344,18 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
336
344
|
ifBlock,
|
|
337
345
|
initializeHydrationEventCapture,
|
|
338
346
|
injectStyle,
|
|
347
|
+
invokeManualHook,
|
|
339
348
|
isChildrenBlock,
|
|
340
349
|
isValidElement,
|
|
341
350
|
keyedForBlock,
|
|
342
351
|
lazy,
|
|
352
|
+
manualHook,
|
|
343
353
|
mapSlot,
|
|
344
354
|
markChildrenBlock,
|
|
345
355
|
markDangerouslySetInnerHTMLChildren,
|
|
346
356
|
markNativeChangeDiagnosticStatic,
|
|
347
357
|
markSingleRoot,
|
|
358
|
+
markWarm,
|
|
348
359
|
memo,
|
|
349
360
|
mountFragmentRef,
|
|
350
361
|
namespaceHead,
|
|
@@ -419,6 +430,7 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
419
430
|
unstable_Activity,
|
|
420
431
|
unstable_ViewTransition,
|
|
421
432
|
unstable_addTransitionType,
|
|
433
|
+
unstable_batchedUpdates,
|
|
422
434
|
use,
|
|
423
435
|
useActionState,
|
|
424
436
|
useBatch,
|
|
@@ -428,6 +440,7 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
428
440
|
useDeferredValue,
|
|
429
441
|
useEffect,
|
|
430
442
|
useEffectEvent,
|
|
443
|
+
useFormState,
|
|
431
444
|
useFormStatus,
|
|
432
445
|
useId,
|
|
433
446
|
useImperativeHandle,
|