@ui-doc/html-renderer 0.3.0 → 1.0.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/README.md +586 -151
- package/dist/HtmlCurlyBraceLexer.d.ts +4 -1
- package/dist/HtmlRenderer.d.ts +5 -5
- package/dist/InlineReader.d.ts +3 -2
- package/dist/{types/lexer.d.ts → Lexer.types.d.ts} +8 -5
- package/dist/NodeParser.d.ts +3 -2
- package/dist/{types/parser.d.ts → Parser.types.d.ts} +8 -8
- package/dist/{types/base.d.ts → Primitive.types.d.ts} +1 -1
- package/dist/{types/reader.d.ts → Reader.types.d.ts} +9 -7
- package/dist/Renderer.types.d.ts +14 -0
- package/dist/TemplateLoader.d.ts +3 -2
- package/dist/{types/token.d.ts → Token.types.d.ts} +1 -1
- package/dist/assets/services/expand.d.ts +19 -0
- package/dist/assets/ui-doc.cjs +283 -9
- package/dist/assets/ui-doc.cjs.map +1 -1
- package/dist/assets/ui-doc.css +1169 -250
- package/dist/assets/ui-doc.css.map +1 -1
- package/dist/assets/ui-doc.min.css +9 -1
- package/dist/assets/ui-doc.min.js +1 -1
- package/dist/assets/ui-doc.mjs +283 -9
- package/dist/assets/ui-doc.mjs.map +1 -1
- package/dist/assets/utils/delay.d.ts +1 -0
- package/dist/assets/utils/dom.d.ts +31 -0
- package/dist/assets/utils/select.d.ts +12 -0
- package/dist/index.cjs +161 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +160 -126
- package/dist/index.mjs.map +1 -1
- package/dist/nodes/CommentNode.d.ts +2 -1
- package/dist/nodes/Node.d.ts +1 -1
- package/dist/nodes/TemplateNode.d.ts +2 -1
- package/dist/nodes/index.d.ts +4 -2
- package/dist/nodes/tags/debug.d.ts +2 -1
- package/dist/nodes/tags/for.d.ts +4 -3
- package/dist/nodes/tags/if.d.ts +5 -4
- package/dist/nodes/tags/index.d.ts +1 -1
- package/dist/nodes/tags/page.d.ts +2 -1
- package/dist/nodes/tags/partial.d.ts +2 -1
- package/dist/nodes/tags/var.d.ts +2 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +32 -29
- package/scripts/app.ts +5 -3
- package/scripts/{src → services}/example.ts +3 -3
- package/scripts/services/expand.ts +214 -0
- package/scripts/{src → services}/sidebar.ts +4 -3
- package/scripts/utils/delay.ts +12 -0
- package/scripts/utils/dom.ts +77 -0
- package/scripts/utils/select.ts +46 -0
- package/styles/01_resets/initial.css +8 -3
- package/styles/01_resets/root/color.css +19 -0
- package/styles/01_resets/root/font.css +28 -0
- package/styles/01_resets/root/space.css +30 -0
- package/styles/01_resets/root/witdh.css +12 -0
- package/styles/01_resets/root.css +61 -23
- package/styles/01_resets/typography.css +105 -8
- package/styles/02_utils/background.css +14 -0
- package/styles/02_utils/control.css +41 -0
- package/styles/02_utils/margin.css +150 -0
- package/styles/02_utils/padding.css +134 -0
- package/styles/02_utils/width.css +39 -0
- package/styles/03_components/button.css +42 -0
- package/styles/03_components/colors.css +7 -19
- package/styles/03_components/container.css +16 -0
- package/styles/03_components/example-markup.css +1 -6
- package/styles/03_components/grid-auto.css +49 -0
- package/styles/03_components/icons.css +7 -19
- package/styles/03_components/navigation/burger-control.css +75 -0
- package/styles/03_components/{nav → navigation}/list.css +9 -11
- package/styles/03_components/navigation/main.css +102 -0
- package/styles/03_components/spaces.css +8 -7
- package/styles/04_layout/body.css +22 -0
- package/styles/04_layout/inline-code.css +6 -0
- package/styles/04_layout/page.css +73 -0
- package/styles/index.css +58 -17
- package/templates/layouts/default.html +4 -6
- package/templates/layouts/example.html +1 -1
- package/templates/pages/default.html +13 -13
- package/templates/pages/index.html +9 -3
- package/templates/partials/code.html +1 -1
- package/templates/partials/colors.html +2 -2
- package/templates/partials/content.html +1 -1
- package/templates/partials/icons.html +3 -3
- package/templates/partials/nav-main.html +19 -8
- package/templates/partials/section.html +1 -1
- package/templates/partials/spaces.html +2 -2
- package/LICENSE.md +0 -9
- package/dist/assets/src/utils.d.ts +0 -2
- package/dist/types/index.d.ts +0 -6
- package/dist/types/renderer.d.ts +0 -14
- package/scripts/src/utils.ts +0 -20
- package/styles/02_objects/background.css +0 -7
- package/styles/02_objects/control.css +0 -25
- package/styles/02_objects/margin.css +0 -44
- package/styles/02_objects/padding.css +0 -44
- package/styles/02_objects/text.css +0 -3
- package/styles/02_objects/width.css +0 -16
- package/styles/03_components/nav/main.css +0 -39
- package/styles/03_components/text-flow.css +0 -5
- package/styles/04_layouts/page.css +0 -70
- /package/dist/assets/{src → services}/example.d.ts +0 -0
- /package/dist/assets/{src → services}/sidebar.d.ts +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
.nav-main {
|
|
2
|
+
--bg-color: var(--na-main-bg-color, var(--color-blue));
|
|
3
|
+
--font-color: var(--nav-main-bg-color, var(--color-white));
|
|
4
|
+
--accent-color: var(--nav-main-accent-color, var(--color-yellow));
|
|
5
|
+
|
|
6
|
+
position: sticky;
|
|
7
|
+
z-index: 100;
|
|
8
|
+
top: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nav-main > .bar,
|
|
12
|
+
.nav-main > .bar > .menu {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--nav-main-item-gap, calc(var(--space-unit) * var(--nav-main-item-gap-space, 0)));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.nav-main > .bar {
|
|
18
|
+
--width-content-offset: var(--nav-main-bar-item-space-x) * var(--space-unit);
|
|
19
|
+
|
|
20
|
+
container-name: nav-bar;
|
|
21
|
+
container-type: inline-size;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
background: rgb(var(--bg-color));
|
|
24
|
+
|
|
25
|
+
> .logo,
|
|
26
|
+
> .burger.control,
|
|
27
|
+
> .menu > .control {
|
|
28
|
+
--space-px: var(--nav-main-bar-item-space-x);
|
|
29
|
+
--space-py: var(--nav-main-bar-item-space-y);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> .logo {
|
|
33
|
+
height: var(--nav-main-bar-item-height);
|
|
34
|
+
|
|
35
|
+
> svg {
|
|
36
|
+
width: auto;
|
|
37
|
+
height: 100%;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> .menu > .control {
|
|
42
|
+
--font-weight: var(--font-weight-bold);
|
|
43
|
+
|
|
44
|
+
display: block;
|
|
45
|
+
|
|
46
|
+
&[aria-current="page"] {
|
|
47
|
+
--font-color: var(--accent-color);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@container nav-bar (width > 1000px) {
|
|
52
|
+
> .burger.control {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
> .menu {
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@container nav-bar (width <= 1000px) {
|
|
62
|
+
position: relative;
|
|
63
|
+
|
|
64
|
+
> .burger.control {
|
|
65
|
+
--nav-burger-control-size: var(--nav-main-bar-item-height);
|
|
66
|
+
|
|
67
|
+
margin-left: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
> .menu {
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: calc(var(--nav-main-bar-item-height));
|
|
73
|
+
left: 0;
|
|
74
|
+
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
|
|
78
|
+
width: 100%;
|
|
79
|
+
max-height: calc(100vh - var(--nav-main-height));
|
|
80
|
+
padding: calc(var(--space-unit) * var(--nav-main-menu-space-t)) var(--width-calc)
|
|
81
|
+
calc(var(--space-unit) * var(--nav-main-menu-space-b));
|
|
82
|
+
|
|
83
|
+
opacity: 1;
|
|
84
|
+
background: rgb(var(--bg-color));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
> .menu.menu-show-enter-active,
|
|
88
|
+
> .menu.menu-show-leave-active {
|
|
89
|
+
transition: opacity 0.3s ease-in-out;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> .menu.menu-show-enter-from,
|
|
93
|
+
> .menu.menu-show-leave-to {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
> .menu[hidden],
|
|
98
|
+
> .burger.control[aria-expanded="false"] ~ .menu {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
gap: var(--spaces-gap, var(--
|
|
7
|
+
gap: var(--spaces-gap, calc(var(--spaces-gap-space, var(--space-xs)) * var(--space-unit)));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.spaces > .item {
|
|
@@ -15,20 +15,21 @@
|
|
|
15
15
|
--font-color: var(--spaces-font-color);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
>
|
|
19
|
-
|
|
18
|
+
> .pxy {
|
|
19
|
+
--space-px: var(--space-normal);
|
|
20
|
+
--space-py: var(--space-xs);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
> div:first-child {
|
|
23
|
-
margin-right: var(--space-value);
|
|
24
|
+
margin-right: calc(var(--space-value) * var(--space-unit));
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
>
|
|
27
|
+
> .info {
|
|
27
28
|
display: flex;
|
|
28
29
|
|
|
29
30
|
> *:not(:last-child) {
|
|
30
|
-
margin-right: var(--
|
|
31
|
-
padding-right: var(--
|
|
31
|
+
margin-right: calc(var(--space-xs) * var(--space-unit));
|
|
32
|
+
padding-right: calc(var(--space-xs) * var(--space-unit));
|
|
32
33
|
border-right: 1px solid currentcolor;
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
html {
|
|
2
|
+
height: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
html > body:has(.expand-full-height) {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
min-height: 100%;
|
|
9
|
+
|
|
10
|
+
> .expand-full-height {
|
|
11
|
+
flex: 1 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html > body > footer {
|
|
16
|
+
--bg-color: var(--footer-bg-color, var(--color-blue));
|
|
17
|
+
--font-color: var(--footer-font-color, var(--color-white));
|
|
18
|
+
|
|
19
|
+
> .text {
|
|
20
|
+
text-align: right;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
body.page {
|
|
2
|
+
--main-sidebar-width: 25ch;
|
|
3
|
+
--main-content-sidebar-space: var(--space-xl);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body.page > .content {
|
|
7
|
+
--space-py: var(--space-xl);
|
|
8
|
+
|
|
9
|
+
.headline + .description {
|
|
10
|
+
margin-top: calc(var(--page-headline-description-space, var(--space-md)) * var(--space-unit));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> main > section + section {
|
|
14
|
+
margin-top: calc(var(--page-content-section-space, var(--space-xl)) * var(--space-unit));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
> main * + .example,
|
|
18
|
+
> main *:not(.example) + .markup {
|
|
19
|
+
margin-top: 1em;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body.page > .content > main {
|
|
24
|
+
container-name: content;
|
|
25
|
+
container-type: inline-size;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media screen and (width >= 1000px) {
|
|
29
|
+
body.page > .content:has(> .sidebar) {
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: var(--main-sidebar-width) 1fr;
|
|
32
|
+
grid-template-rows: auto 1fr;
|
|
33
|
+
gap: var(
|
|
34
|
+
--page-header-main-garp,
|
|
35
|
+
calc(var(--page-header-main-space, var(--space-lg)) * var(--space-unit))
|
|
36
|
+
)
|
|
37
|
+
var(
|
|
38
|
+
--page-content-sidebar-garp,
|
|
39
|
+
calc(var(--page-content-sidebar-space, var(--space-xl)) * var(--space-unit))
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
> .sidebar {
|
|
43
|
+
grid-column: 1 / span 1;
|
|
44
|
+
grid-row: 1 / span 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> header {
|
|
48
|
+
grid-column: 2 / span 1;
|
|
49
|
+
grid-row: 1 / span 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> main {
|
|
53
|
+
grid-column: 2 / span 1;
|
|
54
|
+
grid-row: 2 / span 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
> .sidebar > .scrollbar {
|
|
58
|
+
position: sticky;
|
|
59
|
+
top: var(--nav-main-height);
|
|
60
|
+
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
|
|
63
|
+
height: 100%;
|
|
64
|
+
max-height: calc(100vh - var(--nav-main-height));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media screen and (width < 1000px) {
|
|
70
|
+
body.page > .content > .sidebar {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
package/styles/index.css
CHANGED
|
@@ -1,20 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Text for the index page
|
|
3
|
+
*
|
|
4
|
+
* @page index UI-Doc
|
|
5
|
+
*/
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@
|
|
9
|
-
@
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Variables used in the project.
|
|
9
|
+
*
|
|
10
|
+
* @page variables Variables
|
|
11
|
+
* @order 10
|
|
12
|
+
*/
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@
|
|
16
|
-
@
|
|
17
|
-
|
|
18
|
-
@import url("
|
|
14
|
+
/**
|
|
15
|
+
* Resets used to normalize the browser styles.
|
|
16
|
+
*
|
|
17
|
+
* @page resets Resets
|
|
18
|
+
* @order 20
|
|
19
|
+
*/
|
|
20
|
+
@import url("01_resets/root.css");
|
|
21
|
+
@import url("01_resets/initial.css");
|
|
22
|
+
@import url("01_resets/typography.css");
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Utility classes are building the base of all styles. They can be applyed everywhere to modify/control one specific thing.
|
|
26
|
+
*
|
|
27
|
+
* @page utils Utilities
|
|
28
|
+
* @order 30
|
|
29
|
+
*/
|
|
30
|
+
@import url("02_utils/background.css");
|
|
31
|
+
@import url("02_utils/padding.css");
|
|
32
|
+
@import url("02_utils/margin.css");
|
|
33
|
+
@import url("02_utils/control.css");
|
|
34
|
+
@import url("02_utils/width.css");
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Objects are build out of objects and define style for it's inner children.
|
|
38
|
+
*
|
|
39
|
+
* @page components Components
|
|
40
|
+
* @order 40
|
|
41
|
+
*/
|
|
42
|
+
@import url("03_components/button.css");
|
|
43
|
+
@import url("03_components/container.css");
|
|
44
|
+
@import url("03_components/grid-auto.css");
|
|
45
|
+
@import url("03_components/navigation/burger-control.css");
|
|
46
|
+
@import url("03_components/navigation/main.css");
|
|
47
|
+
@import url("03_components/navigation/list.css");
|
|
48
|
+
@import url("03_components/example-markup.css");
|
|
49
|
+
@import url("03_components/colors.css");
|
|
50
|
+
@import url("03_components/icons.css");
|
|
51
|
+
@import url("03_components/spaces.css");
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Layouts are the outermost layer of the design. They define the structure of the page.
|
|
55
|
+
*
|
|
56
|
+
* @page layout Layout
|
|
57
|
+
* @order 50
|
|
58
|
+
*/
|
|
59
|
+
@import url("04_layout/body.css");
|
|
60
|
+
@import url("04_layout/inline-code.css");
|
|
61
|
+
@import url("04_layout/page.css");
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
{{var:styles}}
|
|
9
9
|
</head>
|
|
10
|
-
<body class="{{var:page.id}}">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</main>
|
|
15
|
-
<footer class="width-content py mt">
|
|
10
|
+
<body class="page {{var:page.id}}">
|
|
11
|
+
{{partial:nav-main}}
|
|
12
|
+
{{page:page.id page}}
|
|
13
|
+
<footer class="width-content py bg">
|
|
16
14
|
<div class="text">{{var:footerText}}</div>
|
|
17
15
|
</footer>
|
|
18
16
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<div class="content">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<div class="content width-content expand-full-height py">
|
|
2
|
+
<header class="container">
|
|
3
|
+
<h1 class="headline">{{var:title}}</h1>
|
|
4
|
+
{{if:description}}<div class="container description">{{var:description}}</div>{{/if}}
|
|
5
|
+
</header>
|
|
6
|
+
<main class="container">
|
|
7
|
+
{{for:sections}}
|
|
8
|
+
{{partial:section}}
|
|
9
|
+
{{/for}}
|
|
10
|
+
</main>
|
|
11
|
+
<aside class="sidebar">
|
|
12
|
+
<div class="scrollbar">{{partial:nav-sidebar}}</div>
|
|
13
|
+
</aside>
|
|
9
14
|
</div>
|
|
10
|
-
<aside class="sidebar">
|
|
11
|
-
<div class="scroll">{{partial:nav-sidebar}}</div>
|
|
12
|
-
</aside>
|
|
13
|
-
|
|
14
|
-
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
{{if:description}}<div class="description">{{var:description}}</div>{{/if}}
|
|
1
|
+
<header class="width-content">
|
|
2
|
+
<h1 class="headline">{{var:title}}</h1>
|
|
3
|
+
{{if:description}}<div class="container description">{{var:description}}</div>{{/if}}
|
|
4
|
+
</header>
|
|
5
|
+
<main class="width-content expand-full-height">
|
|
6
|
+
{{for:sections}}
|
|
7
|
+
{{partial:section}}
|
|
8
|
+
{{/for}}
|
|
9
|
+
</main>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<div class="colors">
|
|
1
|
+
<div class="colors grid-auto">
|
|
2
2
|
{{for:this}}
|
|
3
3
|
<div
|
|
4
|
-
class="item bg"
|
|
4
|
+
class="item bg pxy"
|
|
5
5
|
style="--bg-color: {{var:value.output}};{{if:font}} --font-color: {{var:font.output}};{{/if}}"
|
|
6
6
|
>
|
|
7
7
|
{{if:value.hex}}<span class="value">{{var:value.hex}}</span>{{/if}}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<div class="icons">
|
|
1
|
+
<div class="icons grid-auto">
|
|
2
2
|
{{for:this}}
|
|
3
3
|
{{if:value.name}}
|
|
4
|
-
<div class="item from-var" style="--icon: {{var:value.output}}">
|
|
4
|
+
<div class="item pxy from-var" style="--icon: {{var:value.output}}">
|
|
5
5
|
<span class="show"></span>
|
|
6
6
|
<span class="text">{{var:text}}</span>
|
|
7
7
|
<span class="name">{{var:name}}</span>
|
|
8
8
|
</div>
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{if:value.value}}
|
|
11
|
-
<div class="item from-data">
|
|
11
|
+
<div class="item pxy from-data">
|
|
12
12
|
<span class="show">{{var:value.output}}</span>
|
|
13
13
|
<span class="text" data-icon="{{var:value.output}}">{{var:text}}</span>
|
|
14
14
|
<span class="name">{{var:name}}</span>
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
<
|
|
2
|
-
<div class="bar">
|
|
3
|
-
<a href="{{var:homeLink}}"
|
|
4
|
-
|
|
1
|
+
<div class="nav-main" aria-label="Main navigation" role="menu">
|
|
2
|
+
<div class="bar width-content">
|
|
3
|
+
<a class="control logo" role="menuitem" href="{{var:homeLink}}" aria-label="To homepage">{{var:logo}}</a>
|
|
4
|
+
|
|
5
|
+
<button
|
|
6
|
+
class="control burger"
|
|
7
|
+
aria-label="Toggle menu"
|
|
8
|
+
aria-haspopup="true"
|
|
9
|
+
aria-expanded="false"
|
|
10
|
+
aria-controls="nav-main-menu"
|
|
11
|
+
>
|
|
12
|
+
<span class="line"></span>
|
|
13
|
+
<span class="line"></span>
|
|
14
|
+
<span class="line"></span>
|
|
15
|
+
</button>
|
|
16
|
+
<nav class="menu" role="menubar" id="nav-main-menu" data-animate="menu-show" data-inert="body > .content, body > footer">
|
|
17
|
+
{{for:menu}}<a class="control" role="menuitem" tabindex="0" href="{{var:href}}"{{if:active}} aria-current="page"{{/if}}>{{var:text}}</a>{{/for}}
|
|
18
|
+
</nav>
|
|
5
19
|
</div>
|
|
6
|
-
|
|
7
|
-
{{for:menu}}<a href="{{var:href}}" class="control" role="menuitem" tabindex="0"{{if:active}} aria-current="page"{{/if}}>{{var:text}}</a>{{/for}}
|
|
8
|
-
</div>
|
|
9
|
-
</nav>
|
|
20
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<section class="
|
|
1
|
+
<section class="container">{{partial:section-inner}}</section>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
class="item"
|
|
5
5
|
style="--space-value: {{var:value.output}};"
|
|
6
6
|
>
|
|
7
|
-
<div class="bg"></div>
|
|
8
|
-
<div class="bg">
|
|
7
|
+
<div class="bg pxy"></div>
|
|
8
|
+
<div class="bg pxy info">
|
|
9
9
|
<span class="name">{{var:name}}</span>
|
|
10
10
|
<span class="value">{{var:value.output}}</span>
|
|
11
11
|
<span class="text">{{var:text}}</span>
|
package/LICENSE.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/types/index.d.ts
DELETED
package/dist/types/renderer.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Renderer as CoreRenderer } from '@ui-doc/core';
|
|
2
|
-
import type { Reader } from './reader';
|
|
3
|
-
export type RenderContext = Record<string, any>;
|
|
4
|
-
export type SourceInput = {
|
|
5
|
-
source: string;
|
|
6
|
-
content: string;
|
|
7
|
-
} | Reader;
|
|
8
|
-
export interface Renderer extends CoreRenderer {
|
|
9
|
-
addLayout(name: string, layout: SourceInput): this;
|
|
10
|
-
addPartial(name: string, partial: SourceInput): this;
|
|
11
|
-
addPage(name: string, page: SourceInput): this;
|
|
12
|
-
page(name: string, context: RenderContext): string;
|
|
13
|
-
partial(name: string, context?: RenderContext): string;
|
|
14
|
-
}
|
package/scripts/src/utils.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function ready(callback: () => void) {
|
|
2
|
-
if (document.readyState !== 'loading') {
|
|
3
|
-
callback()
|
|
4
|
-
} else {
|
|
5
|
-
document.addEventListener('DOMContentLoaded', callback)
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function throttle(callback: (...args: any[]) => void, delay: number) {
|
|
10
|
-
let timerFlag: number | null = null
|
|
11
|
-
|
|
12
|
-
return (...args: any[]) => {
|
|
13
|
-
if (timerFlag === null) {
|
|
14
|
-
callback(...args)
|
|
15
|
-
timerFlag = window.setTimeout(() => {
|
|
16
|
-
timerFlag = null
|
|
17
|
-
}, delay)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.control {
|
|
2
|
-
--px: 0;
|
|
3
|
-
--py: 0;
|
|
4
|
-
|
|
5
|
-
@extend .pxy;
|
|
6
|
-
@extend .font;
|
|
7
|
-
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
|
|
10
|
-
display: inline-block;
|
|
11
|
-
|
|
12
|
-
text-align: center;
|
|
13
|
-
text-decoration: none;
|
|
14
|
-
|
|
15
|
-
appearance: none;
|
|
16
|
-
background: rgb(var(--control-bg-color, transparent));
|
|
17
|
-
border: none;
|
|
18
|
-
border-radius: unset;
|
|
19
|
-
outline: none;
|
|
20
|
-
|
|
21
|
-
&[aria-disabled="true"],
|
|
22
|
-
&:disabled {
|
|
23
|
-
cursor: not-allowed;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
.margin,
|
|
2
|
-
.mxy {
|
|
3
|
-
margin: var(--mt, var(--size-normal)) var(--mr, var(--size-normal)) var(--mb, var(--size-normal))
|
|
4
|
-
var(--ml, var(--size-normal));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.mt {
|
|
8
|
-
margin-top: var(--mt, var(--size-normal));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.mr {
|
|
12
|
-
margin-right: var(--mr, var(--size-normal));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.mb {
|
|
16
|
-
margin-bottom: var(--mb, var(--size-normal));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ml {
|
|
20
|
-
margin-left: var(--ml, var(--size-normal));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.mxy {
|
|
24
|
-
--mt: var(--my, var(--size-normal));
|
|
25
|
-
--mb: var(--my, var(--size-normal));
|
|
26
|
-
--ml: var(--mx, var(--size-normal));
|
|
27
|
-
--mr: var(--mx, var(--size-normal));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.my {
|
|
31
|
-
--mt: var(--my, var(--size-normal));
|
|
32
|
-
--mb: var(--my, var(--size-normal));
|
|
33
|
-
|
|
34
|
-
@extend .mt;
|
|
35
|
-
@extend .mb;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.mx {
|
|
39
|
-
--ml: var(--mx, var(--size-normal));
|
|
40
|
-
--mr: var(--mx, var(--size-normal));
|
|
41
|
-
|
|
42
|
-
@extend .ml;
|
|
43
|
-
@extend .mr;
|
|
44
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
.padding,
|
|
2
|
-
.pxy {
|
|
3
|
-
padding: var(--pt, var(--size-normal)) var(--pr, var(--size-normal)) var(--pb, var(--size-normal))
|
|
4
|
-
var(--pl, var(--size-normal));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.pt {
|
|
8
|
-
padding-top: var(--pt, var(--size-normal));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.pr {
|
|
12
|
-
padding-right: var(--pr, var(--size-normal));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.pb {
|
|
16
|
-
padding-bottom: var(--pb, var(--size-normal));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.pl {
|
|
20
|
-
padding-left: var(--pl, var(--size-normal));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.pxy {
|
|
24
|
-
--pt: var(--py, var(--size-normal));
|
|
25
|
-
--pb: var(--py, var(--size-normal));
|
|
26
|
-
--pl: var(--px, var(--size-normal));
|
|
27
|
-
--pr: var(--px, var(--size-normal));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.py {
|
|
31
|
-
--pt: var(--py, var(--size-normal));
|
|
32
|
-
--pb: var(--py, var(--size-normal));
|
|
33
|
-
|
|
34
|
-
@extend .pt;
|
|
35
|
-
@extend .pb;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.px {
|
|
39
|
-
--pl: var(--px, var(--size-normal));
|
|
40
|
-
--pr: var(--px, var(--size-normal));
|
|
41
|
-
|
|
42
|
-
@extend .pl;
|
|
43
|
-
@extend .pr;
|
|
44
|
-
}
|