octane 0.2.3 → 0.2.5

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 (41) hide show
  1. package/dist/cjs/constants.cjs +9 -0
  2. package/dist/cjs/css.cjs +9 -0
  3. package/dist/cjs/dom-tables.cjs +6 -1
  4. package/dist/cjs/error-codes.client.generated.cjs +2 -0
  5. package/dist/cjs/host-property-diagnostics.cjs +2 -0
  6. package/dist/cjs/index.cjs +2 -0
  7. package/dist/cjs/runtime.cjs +604 -78
  8. package/dist/cjs/runtime.server.cjs +280 -68
  9. package/dist/cjs/server/index.cjs +4 -0
  10. package/dist/cjs/version.cjs +1 -1
  11. package/dist/compiler/bundler.js +14 -1
  12. package/dist/compiler/compile.js +270 -528
  13. package/dist/compiler/hook-methods.js +164 -0
  14. package/dist/compiler/hydrate-boundaries.js +165 -15
  15. package/dist/compiler/parser-output.js +37 -0
  16. package/dist/compiler/parser.browser.js +145 -1
  17. package/dist/compiler/parser.node.js +28 -36
  18. package/dist/compiler/plain-hook-memo.js +37 -0
  19. package/dist/compiler/slot-hooks.js +129 -5
  20. package/dist/compiler/strong-mode.js +836 -3
  21. package/dist/compiler/style-scopes.js +1134 -0
  22. package/dist/compiler/volar.LICENSES.txt +1 -1
  23. package/dist/compiler/volar.js +5781 -3934
  24. package/dist/constants.d.ts +3 -0
  25. package/dist/constants.js +6 -0
  26. package/dist/css.d.ts +7 -0
  27. package/dist/css.js +8 -0
  28. package/dist/dom-tables.js +6 -1
  29. package/dist/error-codes.client.generated.d.ts +1 -0
  30. package/dist/error-codes.client.generated.js +2 -0
  31. package/dist/host-property-diagnostics.js +2 -0
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +2 -0
  34. package/dist/runtime.d.ts +35 -15
  35. package/dist/runtime.js +612 -79
  36. package/dist/runtime.server.d.ts +30 -1
  37. package/dist/runtime.server.js +287 -69
  38. package/dist/server/index.d.ts +1 -1
  39. package/dist/server/index.js +4 -0
  40. package/dist/version.js +1 -1
  41. package/package.json +5 -5
@@ -48,6 +48,9 @@ __export(constants_exports, {
48
48
  STREAM_SEED_ATTR: () => STREAM_SEED_ATTR,
49
49
  STREAM_SEED_COMMENT: () => STREAM_SEED_COMMENT,
50
50
  STREAM_SEGMENT_ATTR: () => STREAM_SEGMENT_ATTR,
51
+ SUSPENSE_RESOLVED_COMMENT: () => SUSPENSE_RESOLVED_COMMENT,
52
+ SUSPENSE_RESOLVED_NATIVE_ATTR: () => SUSPENSE_RESOLVED_NATIVE_ATTR,
53
+ SUSPENSE_RESOLVED_SEED_ATTR: () => SUSPENSE_RESOLVED_SEED_ATTR,
51
54
  SUSPENSE_SCRIPT_ATTR: () => SUSPENSE_SCRIPT_ATTR,
52
55
  SUSPENSE_SEED_WIRE_PREFIX: () => SUSPENSE_SEED_WIRE_PREFIX,
53
56
  SVG_ONLY_TAGS: () => SVG_ONLY_TAGS,
@@ -73,6 +76,9 @@ const FOR_BLOCK_OPEN_ITEMS = `<!--${HYDRATION_FOR_ITEMS}-->`;
73
76
  const EMPTY_COMMENT = "<!---->";
74
77
  const HYDRATION_TEXT_SEP = " ";
75
78
  const SUSPENSE_SCRIPT_ATTR = "data-octane-suspense";
79
+ const SUSPENSE_RESOLVED_COMMENT = "oct-suspense:";
80
+ const SUSPENSE_RESOLVED_SEED_ATTR = "data-octane-suspense-seeds";
81
+ const SUSPENSE_RESOLVED_NATIVE_ATTR = "data-octane-suspense-signals";
76
82
  const UNDEFINED_SENTINEL_KEY = "__octane_new_undefined__";
77
83
  const SUSPENSE_SEED_WIRE_PREFIX = "\0octane:ssr-seed:";
78
84
  const REJECTION_SENTINEL_KEY = "__octane_new_rejection__";
@@ -135,6 +141,9 @@ const cssStyleValue = import_dom_tables.cssStyleValue;
135
141
  STREAM_SEED_ATTR,
136
142
  STREAM_SEED_COMMENT,
137
143
  STREAM_SEGMENT_ATTR,
144
+ SUSPENSE_RESOLVED_COMMENT,
145
+ SUSPENSE_RESOLVED_NATIVE_ATTR,
146
+ SUSPENSE_RESOLVED_SEED_ATTR,
138
147
  SUSPENSE_SCRIPT_ATTR,
139
148
  SUSPENSE_SEED_WIRE_PREFIX,
140
149
  SVG_ONLY_TAGS,
package/dist/cjs/css.cjs CHANGED
@@ -20,6 +20,7 @@ var css_exports = {};
20
20
  __export(css_exports, {
21
21
  devWarnStyleCoercion: () => devWarnStyleCoercion,
22
22
  devWarnStyleProperty: () => devWarnStyleProperty,
23
+ mergeClass: () => mergeClass,
23
24
  normalizeClass: () => normalizeClass,
24
25
  styleName: () => styleName
25
26
  });
@@ -47,6 +48,13 @@ function normalizeClass(value) {
47
48
  }
48
49
  return str;
49
50
  }
51
+ function mergeClass(left, right) {
52
+ const a = normalizeClass(left);
53
+ const b = normalizeClass(right);
54
+ if (!a) return b;
55
+ if (!b) return a;
56
+ return a + " " + b;
57
+ }
50
58
  const styleNameCache = /* @__PURE__ */ new Map();
51
59
  function styleName(name) {
52
60
  const cached = styleNameCache.get(name);
@@ -111,6 +119,7 @@ function devWarnStyleCoercion(name, value) {
111
119
  0 && (module.exports = {
112
120
  devWarnStyleCoercion,
113
121
  devWarnStyleProperty,
122
+ mergeClass,
114
123
  normalizeClass,
115
124
  styleName
116
125
  });
@@ -453,8 +453,13 @@ for (const base of [
453
453
  UNITLESS_STYLE_PROPS.add("moz" + c);
454
454
  UNITLESS_STYLE_PROPS.add("o" + c);
455
455
  }
456
+ const unitlessStylePropCache = /* @__PURE__ */ new Map();
456
457
  function isUnitlessStyleProp(name) {
457
- return UNITLESS_STYLE_PROPS.has(name.replaceAll("-", "").toLowerCase());
458
+ const cached = unitlessStylePropCache.get(name);
459
+ if (cached !== void 0) return cached;
460
+ const result = UNITLESS_STYLE_PROPS.has(name.replaceAll("-", "").toLowerCase());
461
+ unitlessStylePropCache.set(name, result);
462
+ return result;
458
463
  }
459
464
  function cssStyleValue(name, value) {
460
465
  if (typeof value === "number" && value !== 0 && name.charCodeAt(0) !== 45 && !isUnitlessStyleProp(name)) {
@@ -209,6 +209,8 @@ function formatClientError(code, ...args) {
209
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
210
  args
211
211
  );
212
+ case 64:
213
+ return (0, import_error_message.formatDevErrorMessage)("Multiple errors were thrown during act.", args);
212
214
  default:
213
215
  return (0, import_error_message.formatUnknownDevErrorMessage)(code);
214
216
  }
@@ -42,6 +42,7 @@ const KNOWN_CAMELCASE_PROPERTIES = /* @__PURE__ */ new Set([
42
42
  "disablePictureInPicture",
43
43
  "disableRemotePlayback",
44
44
  "encType",
45
+ "enterKeyHint",
45
46
  "fetchPriority",
46
47
  "formAction",
47
48
  "formEncType",
@@ -57,6 +58,7 @@ const KNOWN_CAMELCASE_PROPERTIES = /* @__PURE__ */ new Set([
57
58
  "itemScope",
58
59
  "itemType",
59
60
  "maxLength",
61
+ "minLength",
60
62
  "noModule",
61
63
  "noValidate",
62
64
  "playsInline",
@@ -120,6 +120,7 @@ __export(index_exports, {
120
120
  injectStyle: () => import_runtime.injectStyle,
121
121
  invokeManualHook: () => import_runtime.invokeManualHook,
122
122
  isChildrenBlock: () => import_runtime.isChildrenBlock,
123
+ isInActScope: () => import_runtime.isInActScope,
123
124
  isValidElement: () => import_runtime.isValidElement,
124
125
  keyedForBlock: () => import_runtime.keyedForBlock,
125
126
  lazy: () => import_runtime.lazy,
@@ -346,6 +347,7 @@ var import_method_dep = require("./method-dep.cjs");
346
347
  injectStyle,
347
348
  invokeManualHook,
348
349
  isChildrenBlock,
350
+ isInActScope,
349
351
  isValidElement,
350
352
  keyedForBlock,
351
353
  lazy,