marko 5.25.5 → 5.25.7
Sign up to get free protection for your applications and to get access to all the features.
- package/docs/typescript.md +43 -0
- package/package.json +3 -3
- package/tags-html.d.ts +202 -1019
package/docs/typescript.md
CHANGED
@@ -357,3 +357,46 @@ _components/color-rotate-button/index.marko_
|
|
357
357
|
<${input.renderBody}/>
|
358
358
|
</button>
|
359
359
|
```
|
360
|
+
|
361
|
+
## Extend Native Tags (for custom elements)
|
362
|
+
|
363
|
+
```ts
|
364
|
+
interface MyCustomElementAttributes {
|
365
|
+
// ...
|
366
|
+
}
|
367
|
+
|
368
|
+
declare global {
|
369
|
+
namespace Marko {
|
370
|
+
namespace NativeTags {
|
371
|
+
// By adding this entry, you can now use `my-custom-element` as a native html tag.
|
372
|
+
"my-custom-element": MyCustomElementAttributes
|
373
|
+
}
|
374
|
+
}
|
375
|
+
}
|
376
|
+
```
|
377
|
+
|
378
|
+
## Extending the "global" HTML Attributes
|
379
|
+
|
380
|
+
```ts
|
381
|
+
declare global {
|
382
|
+
namespace Marko {
|
383
|
+
interface HTMLAttributes {
|
384
|
+
"my-non-standard-attribute"?: string; // Adds this attribute as available on all HTML tags.
|
385
|
+
}
|
386
|
+
}
|
387
|
+
}
|
388
|
+
```
|
389
|
+
|
390
|
+
## Extending CSS Properties (for custom properties)
|
391
|
+
|
392
|
+
```ts
|
393
|
+
declare global {
|
394
|
+
namespace Marko {
|
395
|
+
namespace CSS {
|
396
|
+
interface Properties {
|
397
|
+
"--foo"?: string; // adds a support for a custom `--foo` css property.
|
398
|
+
}
|
399
|
+
}
|
400
|
+
}
|
401
|
+
}
|
402
|
+
```
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "5.25.
|
3
|
+
"version": "5.25.7",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
6
6
|
"dependencies": {
|
7
|
-
"@marko/compiler": "^5.27.
|
8
|
-
"@marko/translator-default": "^5.25.
|
7
|
+
"@marko/compiler": "^5.27.7",
|
8
|
+
"@marko/translator-default": "^5.25.7",
|
9
9
|
"app-module-path": "^2.2.0",
|
10
10
|
"argly": "^1.2.0",
|
11
11
|
"browser-refresh-client": "1.1.4",
|