@forsakringskassan/docs-live-example 1.3.0

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/main.css ADDED
@@ -0,0 +1,62 @@
1
+ /* sfc-style:/home/runner/work/docs-live-example/docs-live-example/src/LiveExample.vue?type=style&index=0 */
2
+ .collapsed[data-v-f5e7ab48] {
3
+ display: none;
4
+ }
5
+
6
+ .collapsed[aria-expanded=true][data-v-f5e7ab48] {
7
+ display: block;
8
+ }
9
+
10
+ :root {
11
+ --live-example-space: 1.5rem;
12
+ }
13
+
14
+ .live-example__container {
15
+ border: var(--f-border-width-small) solid #ddddde;
16
+ border-radius: 4px;
17
+ display: grid;
18
+ grid-template-columns: 1fr auto;
19
+ grid-template-areas: "example controls" "code code";
20
+ }
21
+ .live-example__example {
22
+ grid-area: example;
23
+ padding: var(--live-example-space);
24
+ background: repeating-conic-gradient(#fff 0 90deg, rgb(235, 235, 235) 0 180deg) 0 0/20px 20px round;
25
+ }
26
+ .live-example__controls {
27
+ grid-area: controls;
28
+ padding: var(--live-example-space);
29
+ border-left: var(--f-border-width-small) solid #ddddde;
30
+ }
31
+ .live-example__code {
32
+ grid-area: code;
33
+ border-top: var(--f-border-width-small) solid #ddddde;
34
+ background-color: #f4f4f4;
35
+ }
36
+ .live-example__code pre {
37
+ margin: 0;
38
+ overflow-x: auto;
39
+ }
40
+ .live-example__code pre code {
41
+ margin: 0;
42
+ padding: var(--live-example-space);
43
+ }
44
+ .live-example__code-toggle {
45
+ padding-left: var(--live-example-space);
46
+ }
47
+ .live-example__code .live-example__code-toggle button {
48
+ display: flex;
49
+ align-items: center;
50
+ width: fit-content;
51
+ margin: 0;
52
+ margin-left: -0.5rem;
53
+ padding: 0.5rem;
54
+ font-weight: 600;
55
+ color: var(--f-text-color-default);
56
+ }
57
+ .live-example__code-languages {
58
+ display: flex;
59
+ align-items: center;
60
+ margin: 0.75rem var(--live-example-space) 0 var(--live-example-space);
61
+ border-bottom: var(--f-border-width-small) solid #ddddde;
62
+ }
@@ -0,0 +1 @@
1
+ export declare function highlight(code: string): Promise<string>;
@@ -0,0 +1,2 @@
1
+ export { highlight } from "./highlight";
2
+ export { stripComments } from "./strip-comments";
@@ -0,0 +1 @@
1
+ export declare function stripComments(html: string): string;
@@ -0,0 +1,23 @@
1
+ const { defineMetadata } = require("html-validate");
2
+
3
+ module.exports = defineMetadata({
4
+ "live-example": {
5
+ flow: true,
6
+ phrasing: true,
7
+ attributes: {
8
+ components: {
9
+ required: false,
10
+ },
11
+ template: {
12
+ required: false,
13
+ },
14
+ livedata: {
15
+ required: false,
16
+ },
17
+ livemethods: {
18
+ required: false,
19
+ },
20
+ },
21
+ slots: ["default"],
22
+ },
23
+ });
@@ -0,0 +1,9 @@
1
+ const { definePlugin } = require("html-validate");
2
+ const pkg = require("../package.json");
3
+
4
+ module.exports = definePlugin({
5
+ name: pkg.name,
6
+ configs: {
7
+ recommended: require("./recommended"),
8
+ },
9
+ });
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ elements: [require.resolve("./elements")],
3
+ };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@forsakringskassan/docs-live-example",
3
+ "version": "1.3.0",
4
+ "description": "Components used for live examples",
5
+ "keywords": [
6
+ "documentation"
7
+ ],
8
+ "homepage": "https://github.com/Forsakringskassan/docs-live-example",
9
+ "bugs": "https://github.com/Forsakringskassan/docs-live-example/issues",
10
+ "repository": {
11
+ "url": "https://github.com/Forsakringskassan/docs-live-example.git"
12
+ },
13
+ "license": "MIT",
14
+ "author": "Försäkringskassan",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.js"
20
+ },
21
+ "./htmlvalidate": "./htmlvalidate/index.js",
22
+ "./dist/main.css": "./dist/main.css"
23
+ },
24
+ "main": "dist/index.js",
25
+ "files": [
26
+ "dist",
27
+ "main.css",
28
+ "htmlvalidate",
29
+ "!**/*.spec.js",
30
+ "!**/*.spec.d.ts"
31
+ ],
32
+ "peerDependencies": {
33
+ "html-validate": ">= 7.9.0",
34
+ "prettier": "2.8.8",
35
+ "vue": "^3"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "html-validate": {
39
+ "optional": true
40
+ }
41
+ },
42
+ "engines": {
43
+ "node": ">= 16"
44
+ }
45
+ }