marko 5.38.0 → 5.38.1

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.
@@ -148,7 +148,7 @@ exports.p = function (htmlCompat) {
148
148
  {}
149
149
  );
150
150
 
151
- htmlCompat.patchDynamicTag(function getRenderer(scopeId, accessor, tag) {
151
+ htmlCompat.patchDynamicTag(function getRenderer(tag, scopeId, accessor) {
152
152
  if (!tag || isMarko6(tag._ || tag.content || tag)) {
153
153
  return tag;
154
154
  }
@@ -588,13 +588,15 @@ function getRuntimeEntryFiles(output, optimize) {
588
588
  `${base}core-tags/core/__flush_here_and_after__.js`,
589
589
  `${base}core-tags/core/await/renderer.js`,
590
590
  `${base}core-tags/core/await/reorderer-renderer.js`,
591
- `${base}runtime/helpers/skip-serialize.js`] :
591
+ `${base}runtime/helpers/skip-serialize.js`,
592
+ `${base}runtime/helpers/tags-compat/html${optimize ? "" : "-debug"}.mjs`] :
592
593
 
593
594
  [
594
595
  `${base}runtime/vdom/index.js`,
595
596
  `${base}runtime/vdom/hot-reload.js`,
596
597
  `${base}runtime/vdom/helpers/attrs.js`,
597
- `${base}runtime/vdom/helpers/const-element.js`])];
598
+ `${base}runtime/vdom/helpers/const-element.js`,
599
+ `${base}runtime/helpers/tags-compat/dom${optimize ? "" : "-debug"}.mjs`])];
598
600
 
599
601
 
600
602
  }
@@ -78,7 +78,11 @@ const analyzeStaticVisitor = {
78
78
  !(0, _keyManager.hasUserKey)(path);
79
79
 
80
80
  const tagDef = (0, _babelUtils.getTagDef)(path);
81
- isStatic = isStatic && !tagDef.translator;
81
+ isStatic =
82
+ isStatic && (
83
+ !tagDef.translator ||
84
+ tagDef.name === "script" ||
85
+ tagDef.name === "style");
82
86
 
83
87
  // check attributes
84
88
  isStatic =
@@ -0,0 +1,13 @@
1
+ "use strict";exports.__esModule = true;exports.translate = exports.transform = exports.taglibs = exports.tagDiscoveryDirs = exports.preferAPI = exports.getRuntimeEntryFiles = exports.analyze = void 0;var tagsAPI = _interopRequireWildcard(require("@marko/runtime-tags/translator"));
2
+
3
+ var classAPI = _interopRequireWildcard(require("./translator/index"));function _interopRequireWildcard(e, t) {if ("function" == typeof WeakMap) var r = new WeakMap(),n = new WeakMap();return (_interopRequireWildcard = function (e, t) {if (!t && e && e.__esModule) return e;var o,i,f = { __proto__: null, default: e };if (null === e || "object" != typeof e && "function" != typeof e) return f;if (o = t ? n : r) {if (o.has(e)) return o.get(e);o.set(e, f);}for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]);return f;})(e, t);}
4
+
5
+ const {
6
+ preferAPI,
7
+ tagDiscoveryDirs,
8
+ transform,
9
+ analyze,
10
+ translate,
11
+ taglibs,
12
+ getRuntimeEntryFiles
13
+ } = tagsAPI.createInteropTranslator(classAPI);exports.getRuntimeEntryFiles = getRuntimeEntryFiles;exports.taglibs = taglibs;exports.translate = translate;exports.analyze = analyze;exports.transform = transform;exports.tagDiscoveryDirs = tagDiscoveryDirs;exports.preferAPI = preferAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.38.0",
3
+ "version": "5.38.1",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -70,7 +70,8 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@babel/runtime": "^7.28.2",
73
- "@marko/compiler": "^5.39.44",
73
+ "@marko/compiler": "^5.39.45",
74
+ "@marko/runtime-tags": "^6.0.122",
74
75
  "app-module-path": "^2.2.0",
75
76
  "argly": "^1.2.0",
76
77
  "browser-refresh-client": "1.1.4",
@@ -148,7 +148,7 @@ exports.p = function (htmlCompat) {
148
148
  {},
149
149
  );
150
150
 
151
- htmlCompat.patchDynamicTag(function getRenderer(scopeId, accessor, tag) {
151
+ htmlCompat.patchDynamicTag(function getRenderer(tag, scopeId, accessor) {
152
152
  if (!tag || isMarko6(tag._ || tag.content || tag)) {
153
153
  return tag;
154
154
  }
@@ -589,12 +589,14 @@ export function getRuntimeEntryFiles(output, optimize) {
589
589
  `${base}core-tags/core/await/renderer.js`,
590
590
  `${base}core-tags/core/await/reorderer-renderer.js`,
591
591
  `${base}runtime/helpers/skip-serialize.js`,
592
+ `${base}runtime/helpers/tags-compat/html${optimize ? "" : "-debug"}.mjs`,
592
593
  ]
593
594
  : [
594
595
  `${base}runtime/vdom/index.js`,
595
596
  `${base}runtime/vdom/hot-reload.js`,
596
597
  `${base}runtime/vdom/helpers/attrs.js`,
597
598
  `${base}runtime/vdom/helpers/const-element.js`,
599
+ `${base}runtime/helpers/tags-compat/dom${optimize ? "" : "-debug"}.mjs`,
598
600
  ]),
599
601
  ];
600
602
  }
@@ -78,7 +78,11 @@ const analyzeStaticVisitor = {
78
78
  !hasUserKey(path);
79
79
 
80
80
  const tagDef = getTagDef(path);
81
- isStatic = isStatic && !tagDef.translator;
81
+ isStatic =
82
+ isStatic &&
83
+ (!tagDef.translator ||
84
+ tagDef.name === "script" ||
85
+ tagDef.name === "style");
82
86
 
83
87
  // check attributes
84
88
  isStatic =
@@ -0,0 +1,13 @@
1
+ import * as tagsAPI from "@marko/runtime-tags/translator";
2
+
3
+ import * as classAPI from "./translator/index";
4
+
5
+ export const {
6
+ preferAPI,
7
+ tagDiscoveryDirs,
8
+ transform,
9
+ analyze,
10
+ translate,
11
+ taglibs,
12
+ getRuntimeEntryFiles,
13
+ } = tagsAPI.createInteropTranslator(classAPI);
@@ -1,5 +1,5 @@
1
1
  {
2
- "main": "../dist/translator/index.js",
2
+ "main": "../dist/translator.js",
3
3
  "types": "index.d.ts",
4
- "main:override": "../src/translator/index.js"
4
+ "main:override": "../src/translator.js"
5
5
  }