marko 5.38.30 → 5.38.32
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/node_modules/@internal/components-define-widget-legacy/index-browser.js +3 -3
- package/dist/runtime/components/renderer.js +1 -1
- package/dist/translator/taglib/core/index.js +1 -1
- package/dist/translator/taglib/core/transform-style.js +3 -3
- package/docs/class-components.md +5 -5
- package/docs/custom-tags.md +1 -1
- package/docs/troubleshooting-streaming.md +1 -1
- package/index.d.ts +2 -2
- package/package.json +3 -3
- package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +3 -3
- package/src/runtime/components/renderer.js +1 -1
- package/src/taglib/index.js +1 -1
- package/src/translator/taglib/core/index.js +1 -1
- package/src/translator/taglib/core/transform-style.js +3 -3
- package/tags-html.d.ts +1 -1
|
@@ -149,7 +149,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
149
149
|
proto.G_ = proto.onDestroy;
|
|
150
150
|
Object.defineProperty(proto, "onDestroy", {
|
|
151
151
|
get: function () {
|
|
152
|
-
return
|
|
152
|
+
return modernOnDestroy;
|
|
153
153
|
},
|
|
154
154
|
set: function (v) {
|
|
155
155
|
proto.G_ = v;
|
|
@@ -178,7 +178,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
178
178
|
|
|
179
179
|
|
|
180
180
|
|
|
181
|
-
this.destroy =
|
|
181
|
+
this.destroy = modernOnDestroy;
|
|
182
182
|
this.J_ = false;
|
|
183
183
|
}
|
|
184
184
|
this.K_ = true;
|
|
@@ -248,7 +248,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
248
248
|
this.N_ = true;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
function
|
|
251
|
+
function modernOnDestroy() {
|
|
252
252
|
if (this.D_) {
|
|
253
253
|
this.onBeforeDestroy && this.onBeforeDestroy();
|
|
254
254
|
this.G_ && this.G_();
|
|
@@ -119,7 +119,7 @@ renderingLogic)
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
if (isServer) {
|
|
122
|
-
// If we are rendering on the server then things are
|
|
122
|
+
// If we are rendering on the server then things are simpler since
|
|
123
123
|
// we don't need to match up the UI component with a previously
|
|
124
124
|
// rendered component already mounted to the DOM. We also create
|
|
125
125
|
// a lightweight ServerComponent
|
|
@@ -236,7 +236,7 @@ var translateWhile = _interopRequireWildcard(require("./translate-while"));funct
|
|
|
236
236
|
autocomplete: [
|
|
237
237
|
{
|
|
238
238
|
description:
|
|
239
|
-
"The amount to increment during each
|
|
239
|
+
"The amount to increment during each iteration (with from/to)"
|
|
240
240
|
}]
|
|
241
241
|
|
|
242
242
|
},
|
|
@@ -39,16 +39,16 @@ function _default(tag) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const [startContent, type = ".css"] = matchedBlock;
|
|
42
|
-
const
|
|
42
|
+
const codeStartOffset = startContent.length;
|
|
43
43
|
const codeEndOffset = rawValue.lastIndexOf("}");
|
|
44
|
-
const code = rawValue.slice(
|
|
44
|
+
const code = rawValue.slice(codeStartOffset, codeEndOffset);
|
|
45
45
|
const base = _path.default.basename(hub.file.opts.filename);
|
|
46
46
|
const start = (0, _babelUtils.getStart)(hub.file, node.name);
|
|
47
47
|
let startPos = undefined;
|
|
48
48
|
let endPos = undefined;
|
|
49
49
|
|
|
50
50
|
if (start !== null) {
|
|
51
|
-
startPos = start +
|
|
51
|
+
startPos = start + codeStartOffset;
|
|
52
52
|
endPos = start + codeEndOffset;
|
|
53
53
|
}
|
|
54
54
|
|
package/docs/class-components.md
CHANGED
|
@@ -335,7 +335,7 @@ The `on-*` attribute syntax attaches an event listener to either a native DOM ev
|
|
|
335
335
|
|
|
336
336
|
### `once-[event](methodName|function, ...args)`
|
|
337
337
|
|
|
338
|
-
The same as the `on-*`
|
|
338
|
+
The same as the `on-*` attribute, except that its listener is only invoked for the first event, and then removed from memory. Please see the [Event handling](#event-handling) section above for more details.
|
|
339
339
|
|
|
340
340
|
### `key`
|
|
341
341
|
|
|
@@ -821,10 +821,10 @@ Adds the listener function to the end of the listeners array for the `eventName`
|
|
|
821
821
|
|
|
822
822
|
### `once(eventName, handler)`
|
|
823
823
|
|
|
824
|
-
| Signature | Type | Description
|
|
825
|
-
| ----------- | ---------- |
|
|
826
|
-
| `eventName` | `String` | Name of the event to listen for
|
|
827
|
-
| `handler` | `Function` |
|
|
824
|
+
| Signature | Type | Description |
|
|
825
|
+
| ----------- | ---------- | ----------------------------------------- |
|
|
826
|
+
| `eventName` | `String` | Name of the event to listen for |
|
|
827
|
+
| `handler` | `Function` | The function to call when the event fires |
|
|
828
828
|
|
|
829
829
|
Adds a one-time listener function for the `eventName` event. The next time `eventName` triggers, this listener is removed and then invoked.
|
|
830
830
|
|
package/docs/custom-tags.md
CHANGED
|
@@ -146,7 +146,7 @@ To use [tags from npm](https://www.npmjs.com/search?q=keywords%3Amarko%20compone
|
|
|
146
146
|
npm install --save @marko-tags/match-media
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Marko
|
|
149
|
+
Marko discovers tags from packages defined in your `package.json`, so you can start using them right away:
|
|
150
150
|
|
|
151
151
|
```marko
|
|
152
152
|
<div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
- Check if “upstream” connections are `keep-alive`: overhead from closing and reopening connections may delay responses.
|
|
14
14
|
|
|
15
|
-
- For typical modern webpage
|
|
15
|
+
- For typical modern webpage file sizes, the following bullet points probably won’t matter. But if you want to stream **small chunks of data with the lowest latency**, investigate these sources of buffering:
|
|
16
16
|
- Automatic gzip/brotli compression may have their buffer sizes set too high; you can tune their buffers to be smaller for faster streaming in exchange for slightly worse compression.
|
|
17
17
|
|
|
18
18
|
- You can [tune HTTPS record sizes for lower latency, as described in High Performance Browser Networking](https://hpbn.co/transport-layer-security-tls/#optimize-tls-record-size).
|
package/index.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ declare global {
|
|
|
226
226
|
replace(target: ChildNode): this;
|
|
227
227
|
/** Replaces the children of an existing DOM element with the dom for the current instance. */
|
|
228
228
|
replaceChildrenOf(target: ParentNode): this;
|
|
229
|
-
// /** Called when the component is
|
|
229
|
+
// /** Called when the component is first created. */
|
|
230
230
|
// onCreate?(input: this["input"], out: Marko.Out): void;
|
|
231
231
|
// /** Called every time the component receives input from it's parent. */
|
|
232
232
|
// onInput?(input: this["input"], out: Marko.Out): void | this["input"];
|
|
@@ -246,7 +246,7 @@ declare global {
|
|
|
246
246
|
createOut(): Out;
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
* The
|
|
249
|
+
* The following types are processed up by the @marko/language-tools
|
|
250
250
|
* and inlined into the compiled template.
|
|
251
251
|
*
|
|
252
252
|
* This is done to support generics on each of these methods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "5.38.
|
|
3
|
+
"version": "5.38.32",
|
|
4
4
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"front-end",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@marko/compiler": "^5.39.
|
|
73
|
-
"@marko/runtime-tags": "^6.0.
|
|
72
|
+
"@marko/compiler": "^5.39.62",
|
|
73
|
+
"@marko/runtime-tags": "^6.0.158",
|
|
74
74
|
"app-module-path": "^2.2.0",
|
|
75
75
|
"argly": "^1.2.0",
|
|
76
76
|
"browser-refresh-client": "1.1.4",
|
|
@@ -149,7 +149,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
149
149
|
proto.___legacyOnDestroy = proto.onDestroy;
|
|
150
150
|
Object.defineProperty(proto, "onDestroy", {
|
|
151
151
|
get: function () {
|
|
152
|
-
return
|
|
152
|
+
return modernOnDestroy;
|
|
153
153
|
},
|
|
154
154
|
set: function (v) {
|
|
155
155
|
proto.___legacyOnDestroy = v;
|
|
@@ -178,7 +178,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
this.destroy =
|
|
181
|
+
this.destroy = modernOnDestroy;
|
|
182
182
|
this.___destroyed = false;
|
|
183
183
|
}
|
|
184
184
|
this.___legacyExplicitUpdate = true;
|
|
@@ -248,7 +248,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
|
248
248
|
this.___didUpdate = true;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
function
|
|
251
|
+
function modernOnDestroy() {
|
|
252
252
|
if (this.___currentLegacyBindEl) {
|
|
253
253
|
this.onBeforeDestroy && this.onBeforeDestroy();
|
|
254
254
|
this.___legacyOnDestroy && this.___legacyOnDestroy();
|
|
@@ -119,7 +119,7 @@ function createRendererFunc(
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
if (isServer) {
|
|
122
|
-
// If we are rendering on the server then things are
|
|
122
|
+
// If we are rendering on the server then things are simpler since
|
|
123
123
|
// we don't need to match up the UI component with a previously
|
|
124
124
|
// rendered component already mounted to the DOM. We also create
|
|
125
125
|
// a lightweight ServerComponent
|
package/src/taglib/index.js
CHANGED
|
@@ -34,7 +34,7 @@ exports.lookup = {
|
|
|
34
34
|
// eslint-disable-next-line no-constant-condition
|
|
35
35
|
if ("MARKO_DEBUG") {
|
|
36
36
|
complain(
|
|
37
|
-
"buildTaglibLookup now requires passing in a
|
|
37
|
+
"buildTaglibLookup now requires passing in a translator as the second argument, eg `buildTaglibLookup(dir, require('marko/translator'))`.",
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -39,16 +39,16 @@ export default function (tag) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const [startContent, type = ".css"] = matchedBlock;
|
|
42
|
-
const
|
|
42
|
+
const codeStartOffset = startContent.length;
|
|
43
43
|
const codeEndOffset = rawValue.lastIndexOf("}");
|
|
44
|
-
const code = rawValue.slice(
|
|
44
|
+
const code = rawValue.slice(codeStartOffset, codeEndOffset);
|
|
45
45
|
const base = path.basename(hub.file.opts.filename);
|
|
46
46
|
const start = getStart(hub.file, node.name);
|
|
47
47
|
let startPos = undefined;
|
|
48
48
|
let endPos = undefined;
|
|
49
49
|
|
|
50
50
|
if (start !== null) {
|
|
51
|
-
startPos = start +
|
|
51
|
+
startPos = start + codeStartOffset;
|
|
52
52
|
endPos = start + codeEndOffset;
|
|
53
53
|
}
|
|
54
54
|
|
package/tags-html.d.ts
CHANGED
|
@@ -3632,7 +3632,7 @@ declare global {
|
|
|
3632
3632
|
/**
|
|
3633
3633
|
* Identifies the element (or elements) that labels the current element.
|
|
3634
3634
|
* @see https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby
|
|
3635
|
-
* @see aria-
|
|
3635
|
+
* @see aria-describedby
|
|
3636
3636
|
*/
|
|
3637
3637
|
"aria-labelledby"?: AttrString;
|
|
3638
3638
|
/**
|