@nldd/design-system 0.8.46 → 0.8.48
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/components/components.js +83 -78
- package/dist/components/content/{code/code.d.ts → code-viewer/code-viewer.d.ts} +12 -11
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -0
- package/dist/components/content/{code/code.js → code-viewer/code-viewer.js} +32 -25
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts +2 -0
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.styles.js +89 -0
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.template.d.ts +4 -0
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -0
- package/dist/components/content/{code/code.template.js → code-viewer/code-viewer.template.js} +3 -3
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -0
- package/dist/components/{index-BvNDgQGM.js → index-CHPElQwp.js} +2981 -1823
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/app-view/app-view.d.ts +2 -2
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +2 -2
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +2 -0
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +8 -0
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +4 -0
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.template.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.template.js +5 -2
- package/dist/components/layout/collection/collection.template.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +62 -8
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +113 -11
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +261 -15
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/container/container.template.d.ts.map +1 -1
- package/dist/components/layout/container/container.template.js +5 -1
- package/dist/components/layout/container/container.template.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +2 -2
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +1 -1
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.js +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts +84 -0
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.i18n.d.ts +5 -0
- package/dist/components/layout/page-footer/page-footer.i18n.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.i18n.js +4 -0
- package/dist/components/layout/page-footer/page-footer.i18n.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.js +217 -0
- package/dist/components/layout/page-footer/page-footer.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.styles.d.ts +4 -0
- package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.styles.js +198 -0
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -0
- package/dist/components/layout/page-footer/page-footer.template.d.ts +6 -0
- package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -0
- package/dist/components/layout/page-footer/page-footer.template.js +73 -0
- package/dist/components/layout/page-footer/page-footer.template.js.map +1 -0
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +26 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +10 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +23 -35
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +26 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +10 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +26 -53
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +26 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +10 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +33 -51
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/page-section-controls.d.ts +226 -0
- package/dist/components/layout/page-sections/page-section-controls.d.ts.map +1 -0
- package/dist/components/layout/page-sections/page-section-controls.js +104 -0
- package/dist/components/layout/page-sections/page-section-controls.js.map +1 -0
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +26 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +10 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +24 -38
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +26 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +10 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +33 -51
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +2 -2
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +2 -2
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +2 -2
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts +2 -2
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +1 -1
- package/dist/components/layout/window/window.d.ts +5 -0
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +28 -13
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/layout/window/window.styles.d.ts.map +1 -1
- package/dist/components/layout/window/window.styles.js +1 -7
- package/dist/components/layout/window/window.styles.js.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.d.ts +6 -5
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.js +16 -111
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.d.ts +2 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.d.ts.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.js +94 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.styles.js.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.d.ts +4 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.d.ts.map +1 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.js +20 -0
- package/dist/components/lists-and-menus/cells/timeline-track-cell/timeline-track-cell.template.js.map +1 -0
- package/dist/components/lists-and-menus/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-menus/list-item/list-item.styles.js +9 -13
- package/dist/components/lists-and-menus/list-item/list-item.styles.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +80 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.d.ts +6 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.js +5 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.i18n.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +192 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts +3 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js +124 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts +6 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +57 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -0
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +3 -4
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +14 -17
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +47 -46
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js +2 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.template.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +6 -0
- package/dist/components/navigation/pagination/pagination.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +15 -0
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +28 -26
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js +1 -1
- package/dist/components/prism-gherkin-CMPYyXOQ.js +82 -0
- package/dist/components/prism-python-ByhwnnUm.js +99 -0
- package/dist/components/prism-rust-BuyNemv0.js +157 -0
- package/dist/components/prism-sql-BGqCBMyJ.js +33 -0
- package/dist/components/prism-toml-Ubdq-a5x.js +45 -0
- package/dist/components/{prism-typescript-BX4tFNFm.js → prism-typescript-DNQwLx9f.js} +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +3 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +5 -0
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +20 -4
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js +16 -14
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.template.js.map +1 -1
- package/dist/css/form.css +4 -5
- package/dist/css/rich-text.css +27 -115
- package/dist/css/settings.css +45 -32
- package/dist/utilities/page-section-mixin.d.ts +53 -0
- package/dist/utilities/page-section-mixin.d.ts.map +1 -0
- package/dist/utilities/page-section-mixin.js +239 -0
- package/dist/utilities/page-section-mixin.js.map +1 -0
- package/package.json +12 -4
- package/dist/components/content/code/code.d.ts.map +0 -1
- package/dist/components/content/code/code.js.map +0 -1
- package/dist/components/content/code/code.styles.d.ts +0 -2
- package/dist/components/content/code/code.styles.d.ts.map +0 -1
- package/dist/components/content/code/code.styles.js +0 -89
- package/dist/components/content/code/code.styles.js.map +0 -1
- package/dist/components/content/code/code.template.d.ts +0 -4
- package/dist/components/content/code/code.template.d.ts.map +0 -1
- package/dist/components/content/code/code.template.js.map +0 -1
|
@@ -1,85 +1,90 @@
|
|
|
1
|
-
import { N, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as } from "./index-
|
|
1
|
+
import { N, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax } from "./index-CHPElQwp.js";
|
|
2
2
|
export {
|
|
3
3
|
N as NLDDAppView,
|
|
4
4
|
a as NLDDBadge,
|
|
5
5
|
b as NLDDBarSplitView,
|
|
6
6
|
c as NLDDBlockquote,
|
|
7
7
|
d as NLDDBox,
|
|
8
|
-
e as
|
|
9
|
-
f as
|
|
10
|
-
h as
|
|
11
|
-
i as
|
|
12
|
-
j as
|
|
13
|
-
k as
|
|
14
|
-
l as
|
|
15
|
-
m as
|
|
16
|
-
n as
|
|
17
|
-
o as
|
|
18
|
-
p as
|
|
19
|
-
q as
|
|
20
|
-
r as
|
|
21
|
-
s as
|
|
22
|
-
t as
|
|
23
|
-
u as
|
|
24
|
-
v as
|
|
25
|
-
w as
|
|
26
|
-
x as
|
|
27
|
-
y as
|
|
28
|
-
z as
|
|
29
|
-
A as
|
|
30
|
-
B as
|
|
31
|
-
C as
|
|
32
|
-
D as
|
|
33
|
-
E as
|
|
34
|
-
F as
|
|
35
|
-
G as
|
|
36
|
-
H as
|
|
37
|
-
I as
|
|
38
|
-
J as
|
|
39
|
-
K as
|
|
40
|
-
L as
|
|
41
|
-
M as
|
|
42
|
-
O as
|
|
43
|
-
P as
|
|
44
|
-
Q as
|
|
45
|
-
R as
|
|
46
|
-
S as
|
|
47
|
-
T as
|
|
48
|
-
U as
|
|
49
|
-
V as
|
|
50
|
-
W as
|
|
51
|
-
X as
|
|
52
|
-
Y as
|
|
53
|
-
Z as
|
|
54
|
-
_ as
|
|
55
|
-
$ as
|
|
56
|
-
a0 as
|
|
57
|
-
a1 as
|
|
58
|
-
a2 as
|
|
59
|
-
a3 as
|
|
60
|
-
a4 as
|
|
61
|
-
a5 as
|
|
62
|
-
a6 as
|
|
63
|
-
a7 as
|
|
64
|
-
a8 as
|
|
65
|
-
a9 as
|
|
66
|
-
aa as
|
|
67
|
-
ab as
|
|
68
|
-
ac as
|
|
69
|
-
ad as
|
|
70
|
-
ae as
|
|
71
|
-
af as
|
|
72
|
-
ag as
|
|
73
|
-
ah as
|
|
74
|
-
ai as
|
|
75
|
-
aj as
|
|
76
|
-
ak as
|
|
77
|
-
al as
|
|
78
|
-
am as
|
|
79
|
-
an as
|
|
80
|
-
ao as
|
|
81
|
-
ap as
|
|
82
|
-
aq as
|
|
83
|
-
ar as
|
|
84
|
-
as as
|
|
8
|
+
e as NLDDBreadcrumbs,
|
|
9
|
+
f as NLDDBreadcrumbsItem,
|
|
10
|
+
h as NLDDButton,
|
|
11
|
+
i as NLDDButtonBar,
|
|
12
|
+
j as NLDDButtonGroup,
|
|
13
|
+
k as NLDDCard,
|
|
14
|
+
l as NLDDCell,
|
|
15
|
+
m as NLDDCheckbox,
|
|
16
|
+
n as NLDDCheckboxField,
|
|
17
|
+
o as NLDDCodeEditor,
|
|
18
|
+
p as NLDDCodeViewer,
|
|
19
|
+
q as NLDDCollection,
|
|
20
|
+
r as NLDDComboBox,
|
|
21
|
+
s as NLDDContainer,
|
|
22
|
+
t as NLDDDescriptionCell,
|
|
23
|
+
u as NLDDDivider,
|
|
24
|
+
v as NLDDDocumentTabBar,
|
|
25
|
+
w as NLDDDragHandleCell,
|
|
26
|
+
x as NLDDDropdown,
|
|
27
|
+
y as NLDDForm,
|
|
28
|
+
z as NLDDFormActions,
|
|
29
|
+
A as NLDDFormField,
|
|
30
|
+
B as NLDDFormSection,
|
|
31
|
+
C as NLDDFullBleedSection,
|
|
32
|
+
D as NLDDIcon,
|
|
33
|
+
E as NLDDIconButton,
|
|
34
|
+
F as NLDDIconCell,
|
|
35
|
+
G as NLDDInlineDialog,
|
|
36
|
+
H as NLDDKeyboardShortcut,
|
|
37
|
+
I as NLDDLink,
|
|
38
|
+
J as NLDDList,
|
|
39
|
+
K as NLDDListItem,
|
|
40
|
+
L as NLDDMenu,
|
|
41
|
+
M as NLDDMenuBar,
|
|
42
|
+
O as NLDDMenuBarItem,
|
|
43
|
+
P as NLDDModalDialog,
|
|
44
|
+
Q as NLDDMultiLineTextField,
|
|
45
|
+
R as NLDDNavigationSplitView,
|
|
46
|
+
S as NLDDNumberField,
|
|
47
|
+
T as NLDDOneHalfOneHalfSection,
|
|
48
|
+
U as NLDDOneThirdTwoThirdsSection,
|
|
49
|
+
V as NLDDPage,
|
|
50
|
+
W as NLDDPageFooter,
|
|
51
|
+
X as NLDDPageFooterLegalBar,
|
|
52
|
+
Y as NLDDPageFooterLegalBarItem,
|
|
53
|
+
Z as NLDDPagination,
|
|
54
|
+
_ as NLDDPasswordField,
|
|
55
|
+
$ as NLDDPopover,
|
|
56
|
+
a0 as NLDDRadioButton,
|
|
57
|
+
a1 as NLDDRadioButtonField,
|
|
58
|
+
a2 as NLDDRadioButtonGroup,
|
|
59
|
+
a3 as NLDDRichText,
|
|
60
|
+
a4 as NLDDSearchField,
|
|
61
|
+
a5 as NLDDSegmentedControl,
|
|
62
|
+
a6 as NLDDSheet,
|
|
63
|
+
a7 as NLDDSideBySideSplitView,
|
|
64
|
+
a8 as NLDDSimpleSection,
|
|
65
|
+
a9 as NLDDSkipLink,
|
|
66
|
+
aa as NLDDSpacer,
|
|
67
|
+
ab as NLDDSpacerCell,
|
|
68
|
+
ac as NLDDSplitButton,
|
|
69
|
+
ad as NLDDSplitViewPane,
|
|
70
|
+
ae as NLDDStackedSplitView,
|
|
71
|
+
af as NLDDStepper,
|
|
72
|
+
ag as NLDDSwitch,
|
|
73
|
+
ah as NLDDSwitchField,
|
|
74
|
+
ai as NLDDTabBar,
|
|
75
|
+
aj as NLDDTag,
|
|
76
|
+
ak as NLDDTextCell,
|
|
77
|
+
al as NLDDTextField,
|
|
78
|
+
am as NLDDTimelineTrackCell,
|
|
79
|
+
an as NLDDTitle,
|
|
80
|
+
ao as NLDDTitleCell,
|
|
81
|
+
ap as NLDDToggleButton,
|
|
82
|
+
aq as NLDDToggleButtonGroup,
|
|
83
|
+
ar as NLDDToken,
|
|
84
|
+
as as NLDDToolbar,
|
|
85
|
+
at as NLDDTooltip,
|
|
86
|
+
au as NLDDTopNavigationBar,
|
|
87
|
+
av as NLDDTopTitleBar,
|
|
88
|
+
aw as NLDDTwoThirdsOneThirdSection,
|
|
89
|
+
ax as NLDDWindow
|
|
85
90
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Nederlandse Digitale Dienst Code Component (Lit + TypeScript)
|
|
2
|
+
* Nederlandse Digitale Dienst Code Viewer Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
4
|
* A block of monospaced text for code, traces, output dumps, etc.
|
|
5
5
|
* Renders a styled `<pre>` with the design-system's monospace family,
|
|
@@ -13,31 +13,32 @@
|
|
|
13
13
|
*
|
|
14
14
|
* ## Syntax highlighting
|
|
15
15
|
* Set `language` to one of the supported grammars (yaml, json, javascript,
|
|
16
|
-
* typescript, css, html, bash, markdown
|
|
16
|
+
* typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql,
|
|
17
|
+
* python) to highlight the slot content
|
|
17
18
|
* with Prism. Without `language` the slot content is rendered raw, no
|
|
18
19
|
* highlighting applied. Grammars are loaded lazily on first use, so a
|
|
19
20
|
* page that never sets `language` ships zero grammar code.
|
|
20
21
|
*
|
|
21
22
|
* ### Theming
|
|
22
|
-
* Token colors are exposed as `--components-code-token-*` custom
|
|
23
|
+
* Token colors are exposed as `--components-code-viewer-token-*` custom
|
|
23
24
|
* properties on the host. Override them per-instance to swap the theme:
|
|
24
25
|
*
|
|
25
26
|
* ```css
|
|
26
|
-
* nldd-code {
|
|
27
|
-
* --components-code-token-keyword-color: var(--my-purple);
|
|
28
|
-
* --components-code-token-string-color: var(--my-green);
|
|
27
|
+
* nldd-code-viewer {
|
|
28
|
+
* --components-code-viewer-token-keyword-color: var(--my-purple);
|
|
29
|
+
* --components-code-viewer-token-string-color: var(--my-green);
|
|
29
30
|
* }
|
|
30
31
|
* ```
|
|
31
32
|
*
|
|
32
|
-
* @element nldd-code
|
|
33
|
+
* @element nldd-code-viewer
|
|
33
34
|
*
|
|
34
|
-
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, bash, markdown). Empty disables highlighting.
|
|
35
|
+
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python). Empty disables highlighting.
|
|
35
36
|
* @attr {boolean} wrap - Wrap long lines instead of horizontal scroll
|
|
36
37
|
*
|
|
37
38
|
* @slot - Default slot for the code/text content
|
|
38
39
|
*/
|
|
39
40
|
import { LitElement } from 'lit';
|
|
40
|
-
export declare class
|
|
41
|
+
export declare class NLDDCodeViewer extends LitElement {
|
|
41
42
|
static styles: import("lit").CSSResult;
|
|
42
43
|
language: string;
|
|
43
44
|
wrap: boolean;
|
|
@@ -56,7 +57,7 @@ export declare class NLDDCode extends LitElement {
|
|
|
56
57
|
}
|
|
57
58
|
declare global {
|
|
58
59
|
interface HTMLElementTagNameMap {
|
|
59
|
-
'nldd-code':
|
|
60
|
+
'nldd-code-viewer': NLDDCodeViewer;
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
//# sourceMappingURL=code.d.ts.map
|
|
63
|
+
//# sourceMappingURL=code-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AA8CjC,qBACa,cAAe,SAAQ,UAAU;IAC7C,OAAgB,MAAM,0BAAoB;IAG1C,QAAQ,SAAM;IAGd,IAAI,UAAS;IAGb,gBAAgB,SAAM;IAEtB,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,kBAAkB,CAAC,CAAa;IAE/B,MAAM;IAIN,iBAAiB,IAAI,IAAI;IAUzB,oBAAoB,IAAI,IAAI;IAMrC,aAAa,CAAC,CAAC,EAAE,KAAK;IAIb,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAI9C,OAAO,CAAC,iBAAiB;IAQV,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAMpD,OAAO,CAAC,iBAAiB;YAIX,aAAa;CA4B3B;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,cAAc,CAAC;KACnC;CACD"}
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* Nederlandse Digitale Dienst Code Component (Lit + TypeScript)
|
|
8
|
+
* Nederlandse Digitale Dienst Code Viewer Component (Lit + TypeScript)
|
|
9
9
|
*
|
|
10
10
|
* A block of monospaced text for code, traces, output dumps, etc.
|
|
11
11
|
* Renders a styled `<pre>` with the design-system's monospace family,
|
|
@@ -19,25 +19,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
*
|
|
20
20
|
* ## Syntax highlighting
|
|
21
21
|
* Set `language` to one of the supported grammars (yaml, json, javascript,
|
|
22
|
-
* typescript, css, html, bash, markdown
|
|
22
|
+
* typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql,
|
|
23
|
+
* python) to highlight the slot content
|
|
23
24
|
* with Prism. Without `language` the slot content is rendered raw, no
|
|
24
25
|
* highlighting applied. Grammars are loaded lazily on first use, so a
|
|
25
26
|
* page that never sets `language` ships zero grammar code.
|
|
26
27
|
*
|
|
27
28
|
* ### Theming
|
|
28
|
-
* Token colors are exposed as `--components-code-token-*` custom
|
|
29
|
+
* Token colors are exposed as `--components-code-viewer-token-*` custom
|
|
29
30
|
* properties on the host. Override them per-instance to swap the theme:
|
|
30
31
|
*
|
|
31
32
|
* ```css
|
|
32
|
-
* nldd-code {
|
|
33
|
-
* --components-code-token-keyword-color: var(--my-purple);
|
|
34
|
-
* --components-code-token-string-color: var(--my-green);
|
|
33
|
+
* nldd-code-viewer {
|
|
34
|
+
* --components-code-viewer-token-keyword-color: var(--my-purple);
|
|
35
|
+
* --components-code-viewer-token-string-color: var(--my-green);
|
|
35
36
|
* }
|
|
36
37
|
* ```
|
|
37
38
|
*
|
|
38
|
-
* @element nldd-code
|
|
39
|
+
* @element nldd-code-viewer
|
|
39
40
|
*
|
|
40
|
-
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, bash, markdown). Empty disables highlighting.
|
|
41
|
+
* @attr {string} language - Grammar to highlight with (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python). Empty disables highlighting.
|
|
41
42
|
* @attr {boolean} wrap - Wrap long lines instead of horizontal scroll
|
|
42
43
|
*
|
|
43
44
|
* @slot - Default slot for the code/text content
|
|
@@ -45,11 +46,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
45
46
|
import { LitElement } from 'lit';
|
|
46
47
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
47
48
|
import Prism from 'prismjs';
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
49
|
+
import { codeViewerStyles } from './code-viewer.styles.js';
|
|
50
|
+
import { codeViewerTemplate } from './code-viewer.template.js';
|
|
50
51
|
import { onColorSchemeChange, forceScrollLayerRepaint } from '../../../utilities/color-scheme-repaint.js';
|
|
51
|
-
/* Map our public language names to Prism grammar loaders. `html`
|
|
52
|
-
* the markup grammar (covers html/xml/svg). Static `import()` calls let
|
|
52
|
+
/* Map our public language names to Prism grammar loaders. `html` and `xml`
|
|
53
|
+
* share the markup grammar (covers html/xml/svg). Static `import()` calls let
|
|
53
54
|
* the bundler emit one chunk per file, so consumers only download
|
|
54
55
|
* grammars they actually render. */
|
|
55
56
|
const GRAMMAR_LOADERS = {
|
|
@@ -59,8 +60,14 @@ const GRAMMAR_LOADERS = {
|
|
|
59
60
|
typescript: () => import('prismjs/components/prism-typescript.js'),
|
|
60
61
|
css: () => import('prismjs/components/prism-css.js'),
|
|
61
62
|
html: () => import('prismjs/components/prism-markup.js'),
|
|
63
|
+
xml: () => import('prismjs/components/prism-markup.js'),
|
|
62
64
|
bash: () => import('prismjs/components/prism-bash.js'),
|
|
63
65
|
markdown: () => import('prismjs/components/prism-markdown.js'),
|
|
66
|
+
rust: () => import('prismjs/components/prism-rust.js'),
|
|
67
|
+
gherkin: () => import('prismjs/components/prism-gherkin.js'),
|
|
68
|
+
toml: () => import('prismjs/components/prism-toml.js'),
|
|
69
|
+
sql: () => import('prismjs/components/prism-sql.js'),
|
|
70
|
+
python: () => import('prismjs/components/prism-python.js'),
|
|
64
71
|
};
|
|
65
72
|
const grammarLoads = new Map();
|
|
66
73
|
function loadGrammar(language) {
|
|
@@ -79,7 +86,7 @@ function loadGrammar(language) {
|
|
|
79
86
|
}
|
|
80
87
|
return pending;
|
|
81
88
|
}
|
|
82
|
-
let
|
|
89
|
+
let NLDDCodeViewer = class NLDDCodeViewer extends LitElement {
|
|
83
90
|
constructor() {
|
|
84
91
|
super(...arguments);
|
|
85
92
|
this.language = '';
|
|
@@ -88,11 +95,11 @@ let NLDDCode = class NLDDCode extends LitElement {
|
|
|
88
95
|
this._highlightPending = Promise.resolve();
|
|
89
96
|
}
|
|
90
97
|
render() {
|
|
91
|
-
return
|
|
98
|
+
return codeViewerTemplate(this);
|
|
92
99
|
}
|
|
93
100
|
connectedCallback() {
|
|
94
101
|
super.connectedCallback();
|
|
95
|
-
/* The .code block has overflow-x: auto and tends to scroll wide
|
|
102
|
+
/* The .code-viewer block has overflow-x: auto and tends to scroll wide
|
|
96
103
|
* content. Browsers cache off-screen tiles for its scroll layer and
|
|
97
104
|
* don't reliably invalidate them when light-dark() colours flip with
|
|
98
105
|
* color-scheme, so scroll back after a theme switch shows stale
|
|
@@ -112,7 +119,7 @@ let NLDDCode = class NLDDCode extends LitElement {
|
|
|
112
119
|
this._refreshHighlight();
|
|
113
120
|
}
|
|
114
121
|
_repaintCodeBlock() {
|
|
115
|
-
const block = this.shadowRoot?.querySelector('.code');
|
|
122
|
+
const block = this.shadowRoot?.querySelector('.code-viewer');
|
|
116
123
|
if (block)
|
|
117
124
|
forceScrollLayerRepaint(block);
|
|
118
125
|
}
|
|
@@ -158,18 +165,18 @@ let NLDDCode = class NLDDCode extends LitElement {
|
|
|
158
165
|
this._highlightedHtml = Prism.highlight(text, grammar, language);
|
|
159
166
|
}
|
|
160
167
|
};
|
|
161
|
-
|
|
168
|
+
NLDDCodeViewer.styles = codeViewerStyles;
|
|
162
169
|
__decorate([
|
|
163
170
|
property({ type: String, reflect: true })
|
|
164
|
-
],
|
|
171
|
+
], NLDDCodeViewer.prototype, "language", void 0);
|
|
165
172
|
__decorate([
|
|
166
173
|
property({ type: Boolean, reflect: true })
|
|
167
|
-
],
|
|
174
|
+
], NLDDCodeViewer.prototype, "wrap", void 0);
|
|
168
175
|
__decorate([
|
|
169
176
|
state()
|
|
170
|
-
],
|
|
171
|
-
|
|
172
|
-
customElement('nldd-code')
|
|
173
|
-
],
|
|
174
|
-
export {
|
|
175
|
-
//# sourceMappingURL=code.js.map
|
|
177
|
+
], NLDDCodeViewer.prototype, "_highlightedHtml", void 0);
|
|
178
|
+
NLDDCodeViewer = __decorate([
|
|
179
|
+
customElement('nldd-code-viewer')
|
|
180
|
+
], NLDDCodeViewer);
|
|
181
|
+
export { NLDDCodeViewer };
|
|
182
|
+
//# sourceMappingURL=code-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.js","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAm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CAAC;YACd,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;YAC3B,OAAO;QACR,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,IAAI,GAAG,MAAM;aACjB,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;aAChC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC;aAC/B,IAAI,CAAC,EAAE,CAAC,CAAC;QACX,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;;AAvFe,qBAAM,GAAG,gBAAgB,AAAnB,CAAoB;AAG1C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC5B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC9B;AAGb;IADC,KAAK,EAAE;wDACc;AAVV,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAyF1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,yBAsF5B,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const codeViewerStyles = css `
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/* # Host */
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
--_corner-radius: var(--primitives-corner-radius-lg);
|
|
9
|
+
--_background-color: var(--semantics-surfaces-tinted-background-color);
|
|
10
|
+
--_block-padding: var(--primitives-space-16);
|
|
11
|
+
--_inline-padding: var(--primitives-space-16);
|
|
12
|
+
--_content-color: var(--semantics-content-color);
|
|
13
|
+
--_font: var(--primitives-font-monospace-sm-regular-snug);
|
|
14
|
+
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([hidden]) {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/* # Block */
|
|
24
|
+
|
|
25
|
+
.code-viewer {
|
|
26
|
+
margin: 0;
|
|
27
|
+
border-radius: var(--_corner-radius);
|
|
28
|
+
background-color: var(--_background-color);
|
|
29
|
+
overflow-x: auto;
|
|
30
|
+
padding: var(--_block-padding) var(--_inline-padding);
|
|
31
|
+
color: var(--_content-color);
|
|
32
|
+
font: var(--_font);
|
|
33
|
+
white-space: pre;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([wrap]) .code-viewer {
|
|
37
|
+
overflow-x: visible;
|
|
38
|
+
white-space: pre-wrap;
|
|
39
|
+
word-break: break-word;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Lit reflects empty-string props as language=""; exclude that case */
|
|
43
|
+
:host([language]:not([language=""])) slot {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.code__highlighted {
|
|
48
|
+
color: inherit;
|
|
49
|
+
font: inherit;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/* # Tokens */
|
|
54
|
+
|
|
55
|
+
.token.comment,
|
|
56
|
+
.token.prolog,
|
|
57
|
+
.token.doctype,
|
|
58
|
+
.token.cdata { color: var(--components-code-viewer-token-comment-color); font-style: italic; }
|
|
59
|
+
.token.punctuation { color: var(--components-code-viewer-token-punctuation-color); }
|
|
60
|
+
.token.namespace { opacity: 0.7; }
|
|
61
|
+
.token.keyword { color: var(--components-code-viewer-token-keyword-color); }
|
|
62
|
+
.token.string, .token.char { color: var(--components-code-viewer-token-string-color); }
|
|
63
|
+
.token.number { color: var(--components-code-viewer-token-number-color); }
|
|
64
|
+
.token.boolean { color: var(--components-code-viewer-token-boolean-color); }
|
|
65
|
+
.token.null { color: var(--components-code-viewer-token-null-color); }
|
|
66
|
+
.token.function { color: var(--components-code-viewer-token-function-color); }
|
|
67
|
+
.token.class-name { color: var(--components-code-viewer-token-class-color); }
|
|
68
|
+
.token.builtin { color: var(--components-code-viewer-token-builtin-color); }
|
|
69
|
+
.token.tag { color: var(--components-code-viewer-token-tag-color); }
|
|
70
|
+
.token.attr-name { color: var(--components-code-viewer-token-attr-name-color); }
|
|
71
|
+
.token.attr-value { color: var(--components-code-viewer-token-attr-value-color); }
|
|
72
|
+
.token.property { color: var(--components-code-viewer-token-property-color); }
|
|
73
|
+
.token.selector { color: var(--components-code-viewer-token-selector-color); }
|
|
74
|
+
.token.atrule { color: var(--components-code-viewer-token-atrule-color); }
|
|
75
|
+
.token.regex { color: var(--components-code-viewer-token-regex-color); }
|
|
76
|
+
.token.url { color: var(--components-code-viewer-token-url-color); }
|
|
77
|
+
.token.operator { color: var(--components-code-viewer-token-operator-color); }
|
|
78
|
+
.token.constant { color: var(--components-code-viewer-token-constant-color); }
|
|
79
|
+
.token.deleted { color: var(--components-code-viewer-token-deleted-color); }
|
|
80
|
+
.token.inserted { color: var(--components-code-viewer-token-inserted-color); }
|
|
81
|
+
.token.important { color: var(--components-code-viewer-token-important-color); font-weight: bold; }
|
|
82
|
+
.token.symbol { color: var(--components-code-viewer-token-symbol-color); }
|
|
83
|
+
.token.entity { color: var(--components-code-viewer-token-entity-color); }
|
|
84
|
+
.token.variable { color: var(--components-code-viewer-token-variable-color); }
|
|
85
|
+
.token.key { color: var(--components-code-viewer-token-property-color); }
|
|
86
|
+
.token.bold { font-weight: bold; }
|
|
87
|
+
.token.italic { font-style: italic; }
|
|
88
|
+
`;
|
|
89
|
+
//# sourceMappingURL=code-viewer.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.styles.js","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAgB5E"}
|
package/dist/components/content/{code/code.template.js → code-viewer/code-viewer.template.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
3
|
-
export function
|
|
3
|
+
export function codeViewerTemplate(component) {
|
|
4
4
|
// `language` is interpolated into a class name. Lit's tagged template
|
|
5
5
|
// literal escapes attribute values, so a malicious string can't break
|
|
6
6
|
// out of the attribute — but it can still produce a wonky class name.
|
|
@@ -11,8 +11,8 @@ export function codeTemplate(component) {
|
|
|
11
11
|
// Prism escapes HTML entities in its input (`<` → `<`) before
|
|
12
12
|
// wrapping tokens in spans, so the only HTML in the output is the
|
|
13
13
|
// span scaffolding Prism itself emits. Safe by construction.
|
|
14
|
-
return html `<pre class="code"><slot @slotchange=${component._onSlotChange}></slot>${component.language && component._highlightedHtml
|
|
14
|
+
return html `<pre class="code-viewer"><slot @slotchange=${component._onSlotChange}></slot>${component.language && component._highlightedHtml
|
|
15
15
|
? html `<code class="code__highlighted language-${component.language}">${unsafeHTML(component._highlightedHtml)}</code>`
|
|
16
16
|
: ''}</pre>`;
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=code.template.js.map
|
|
18
|
+
//# sourceMappingURL=code-viewer.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-viewer.template.js","sourceRoot":"","sources":["../../../../src/components/content/code-viewer/code-viewer.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,MAAM,UAAU,kBAAkB,CAAC,SAAyB;IAC3D,sEAAsE;IACtE,sEAAsE;IACtE,sEAAsE;IACtE,qEAAqE;IACrE,yBAAyB;IACzB,EAAE;IACF,oEAAoE;IACpE,iEAAiE;IACjE,kEAAkE;IAClE,6DAA6D;IAC7D,OAAO,IAAI,CAAA,8CAA8C,SAAS,CAAC,aAAa,WAC/E,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,gBAAgB;QAC/C,CAAC,CAAC,IAAI,CAAA,2CAA2C,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS;QACvH,CAAC,CAAC,EACJ,QAAQ,CAAC;AACV,CAAC"}
|