marko 6.0.132 → 6.0.133

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/debug/dom.js CHANGED
@@ -1121,7 +1121,7 @@ function _attr_input_value(scope, nodeAccessor, value, valueChange) {
1121
1121
  const normalizedValue = normalizeStrProp(value);
1122
1122
  scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor] = valueChange;
1123
1123
  if (valueChange) {
1124
- scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */;
1124
+ scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 2 /* InputValue */;
1125
1125
  scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value;
1126
1126
  if (el.isConnected) {
1127
1127
  setValueAndUpdateSelection(el, normalizedValue);
@@ -1015,7 +1015,7 @@ function _attr_input_value(scope, nodeAccessor, value, valueChange) {
1015
1015
  const normalizedValue = normalizeStrProp(value);
1016
1016
  scope["ControlledHandler:" /* ControlledHandler */ + nodeAccessor] = valueChange;
1017
1017
  if (valueChange) {
1018
- scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */;
1018
+ scope["ControlledType:" /* ControlledType */ + nodeAccessor] = 2 /* InputValue */;
1019
1019
  scope["ControlledValue:" /* ControlledValue */ + nodeAccessor] = value;
1020
1020
  if (el.isConnected) {
1021
1021
  setValueAndUpdateSelection(el, normalizedValue);
package/dist/dom.js CHANGED
@@ -682,7 +682,7 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
682
682
  }
683
683
  function _attr_input_value(scope, nodeAccessor, value, valueChange) {
684
684
  let el = scope[nodeAccessor], normalizedValue = normalizeStrProp(value);
685
- scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */, scope["G" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
685
+ scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 2 /* InputValue */, scope["G" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
686
686
  }
687
687
  function _attr_input_value_script(scope, nodeAccessor) {
688
688
  let el = scope[nodeAccessor];
package/dist/dom.mjs CHANGED
@@ -579,7 +579,7 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
579
579
  }
580
580
  function _attr_input_value(scope, nodeAccessor, value, valueChange) {
581
581
  let el = scope[nodeAccessor], normalizedValue = normalizeStrProp(value);
582
- scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 0 /* InputChecked */, scope["G" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
582
+ scope["E" /* ControlledHandler */ + nodeAccessor] = valueChange, valueChange ? (scope["F" /* ControlledType */ + nodeAccessor] = 2 /* InputValue */, scope["G" /* ControlledValue */ + nodeAccessor] = value, el.isConnected ? setValueAndUpdateSelection(el, normalizedValue) : el.defaultValue = normalizedValue) : (scope["F" /* ControlledType */ + nodeAccessor] = 5 /* None */, el.defaultValue = normalizedValue);
583
583
  }
584
584
  function _attr_input_value_script(scope, nodeAccessor) {
585
585
  let el = scope[nodeAccessor];
@@ -1773,7 +1773,7 @@ function getOrCreateSection(path7) {
1773
1773
  let cur = path7;
1774
1774
  while (true) {
1775
1775
  if (cur.type === "Program" || cur.type === "MarkoTagBody" && !cur.node.attributeTags && !isNativeNode(cur.parentPath)) {
1776
- return (path7.node.extra ??= {}).section = startSection(cur);
1776
+ return startSection(cur);
1777
1777
  }
1778
1778
  cur = cur.parentPath;
1779
1779
  }
@@ -2370,9 +2370,7 @@ var entry_builder_default = {
2370
2370
  };
2371
2371
  const programExtra = file.path.node.extra;
2372
2372
  const { analyzedTags } = file.metadata.marko;
2373
- state.imports.push(
2374
- (0, import_babel_utils12.resolveRelativePath)(entryFile, file.opts.filename)
2375
- );
2373
+ state.imports.push((0, import_babel_utils12.resolveRelativePath)(entryFile, file.opts.filename));
2376
2374
  if (programExtra.isInteractive || programExtra.needsCompat) {
2377
2375
  state.init = true;
2378
2376
  }
@@ -8604,18 +8602,11 @@ function trackVarReferences(tag, type, upstreamAlias) {
8604
8602
  return tagVar.extra?.binding;
8605
8603
  }
8606
8604
  }
8607
- function trackParamsReferences(body, type, upstreamAlias) {
8605
+ function trackParamsReferences(body, type) {
8608
8606
  const params = body.node.params;
8609
8607
  if (body.node.body.length && params.length) {
8610
- const canonicalUpstreamAlias = upstreamAlias && getCanonicalBinding(upstreamAlias);
8611
- let section;
8612
- if (canonicalUpstreamAlias) {
8613
- section = canonicalUpstreamAlias.section;
8614
- type = canonicalUpstreamAlias.type;
8615
- } else {
8616
- section = getOrCreateSection(body);
8617
- }
8618
- const paramsBinding = canonicalUpstreamAlias || ((body.node.extra ??= {}).binding = createBinding(
8608
+ const section = getOrCreateSection(body);
8609
+ const paramsBinding = (body.node.extra ??= {}).binding = createBinding(
8619
8610
  generateUid("params"),
8620
8611
  type,
8621
8612
  section,
@@ -8623,8 +8614,11 @@ function trackParamsReferences(body, type, upstreamAlias) {
8623
8614
  void 0,
8624
8615
  void 0,
8625
8616
  params[0].loc
8626
- ));
8627
- section.params = paramsBinding;
8617
+ );
8618
+ const bodySection = getSectionForBody(body);
8619
+ if (bodySection) {
8620
+ bodySection.params = paramsBinding;
8621
+ }
8628
8622
  for (let i = 0; i < params.length; i++) {
8629
8623
  const param = params[i];
8630
8624
  if (param.type === "RestElement") {
@@ -94,7 +94,7 @@ export declare function createBinding(name: string, type: Binding["type"], secti
94
94
  export declare function getOrCreatePropertyAlias(binding: Binding, property: string): Binding;
95
95
  export declare function trackDomVarReferences(tag: t.NodePath<t.MarkoTag>, binding: Binding): Binding | undefined;
96
96
  export declare function trackVarReferences(tag: t.NodePath<t.MarkoTag>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
97
- export declare function trackParamsReferences(body: t.NodePath<t.MarkoTagBody | t.Program>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
97
+ export declare function trackParamsReferences(body: t.NodePath<t.MarkoTagBody | t.Program>, type: BindingType): Binding | undefined;
98
98
  export declare function trackHoistedReference(referencePath: t.NodePath<t.Identifier>, binding: Binding): void;
99
99
  export declare function isReferenceHoisted(bindingPath: t.NodePath, reference: t.NodePath): boolean;
100
100
  export declare function setReferencesScope(path: t.NodePath<any>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.132",
3
+ "version": "6.0.133",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -48,7 +48,7 @@
48
48
  "build": "node -r ~ts ./scripts/bundle.ts"
49
49
  },
50
50
  "dependencies": {
51
- "@marko/compiler": "^5.39.46",
51
+ "@marko/compiler": "^5.39.48",
52
52
  "csstype": "^3.1.3",
53
53
  "magic-string": "^0.30.17"
54
54
  },