@salesforcedevs/dx-components 1.18.5-layoutfix-alpha3 → 1.18.6-dynamic-pg-border2
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/package.json +3 -5
- package/src/modules/dx/codeBlock/codeBlock.css +16 -10
- package/src/modules/dx/codeBlock/codeBlock.ts +81 -71
- package/src/modules/dx/mainContentHeader/mainContentHeader.css +1 -1
- package/src/modules/dx/mainContentHeader/mainContentHeader.html +2 -0
- package/src/modules/dx/mainContentHeader/mainContentHeader.ts +1 -1
- package/src/modules/dx/tabbedCodeBlock/tabbedCodeBlock.css +0 -1
- package/src/modules/dx/toc/toc.css +2 -2
- package/src/modules/dxHelpers/code/code.css +19 -87
- package/src/modules/dxUtils/shiki/__mocks__/shiki.ts +110 -0
- package/src/modules/dxUtils/shiki/__mocks__/shikijs.ts +23 -0
- package/src/modules/dxUtils/shiki/shiki.html +3 -0
- package/src/modules/dxUtils/shiki/shiki.ts +192 -0
- package/src/modules/dxUtils/shikiGrammars/shikiGrammars.html +3 -0
- package/src/modules/dxUtils/shikiGrammars/shikiGrammars.ts +2165 -0
- package/src/modules/dx/codeBlock/customLanguages.js +0 -48
- package/src/modules/dx/codeBlock/darkAndLightThemes.css +0 -177
- package/src/modules/dxUtils/prismjs/prismjs.html +0 -3
- package/src/modules/dxUtils/prismjs/prismjs.ts +0 -4183
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export const ampscript = {
|
|
2
|
-
pattern: /%%=\s*([\s\S]*?)\s*=%%|%%\[([\s\S]*?)\]%%/,
|
|
3
|
-
greedy: true,
|
|
4
|
-
inside: {
|
|
5
|
-
delimiter: {
|
|
6
|
-
pattern: /%%=|=%%|%%\[|\]%%/,
|
|
7
|
-
alias: "operator"
|
|
8
|
-
},
|
|
9
|
-
comment: {
|
|
10
|
-
pattern: /(\/\/.*|\/\*[\s\S]*?\*\/)/,
|
|
11
|
-
greedy: true
|
|
12
|
-
},
|
|
13
|
-
string: {
|
|
14
|
-
pattern: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
15
|
-
greedy: true,
|
|
16
|
-
inside: {
|
|
17
|
-
escape: /\\./
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
function: {
|
|
21
|
-
pattern: /\b\w+\b(?=\()/i,
|
|
22
|
-
greedy: true
|
|
23
|
-
},
|
|
24
|
-
boolean: /\b(true|false|null)\b/i,
|
|
25
|
-
number: /\b(0(x|X)[0-9a-fA-F]+|([0-9]+(\.[0-9]+)?))\b/,
|
|
26
|
-
keyword:
|
|
27
|
-
/\b(do|else|elseif|for|if(?:\s+not)?|endif|next|then|to|downto|var|set)\b/i,
|
|
28
|
-
operator: /==|!=|>|<|>=|<=|=/,
|
|
29
|
-
variable: {
|
|
30
|
-
pattern: /@\w+|\[\w+\]/,
|
|
31
|
-
greedy: true
|
|
32
|
-
},
|
|
33
|
-
constant:
|
|
34
|
-
/\b(xtmonth|xtmonthnumeric|xtday|xtdayofweek|xtyear|xtshortdate|xtlongdate)\b/i,
|
|
35
|
-
logical: /\b(and|or|not)\b/i
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const sqlDocsTemplate = {
|
|
40
|
-
comment: /--.*/,
|
|
41
|
-
variable: [
|
|
42
|
-
/<[^>\s]+>/,
|
|
43
|
-
{ pattern: /(\s|\[|\[, ])\.\.\.(?=\]|\))/, lookbehind: true }
|
|
44
|
-
],
|
|
45
|
-
keyword: /\b[A-Z_]+\b/,
|
|
46
|
-
string: /'[^']*'/,
|
|
47
|
-
punctuation: /[;[\]{}]/
|
|
48
|
-
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
A11y syntax highlighting comes from this npm package (release 1.2.0):
|
|
3
|
-
https://github.com/ericwbailey/a11y-syntax-highlighting/releases
|
|
4
|
-
The colors used are from the files prism/a11y-light.css and prism/a11y-dark.css with
|
|
5
|
-
some minor modifications to work with our existing classes.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
.dx-theme-dark {
|
|
9
|
-
--prism-a11y-border-radius: 0.3em;
|
|
10
|
-
--prism-a11y-font-family: "consolas", "monaco", "Andale Mono", "Ubuntu Mono",
|
|
11
|
-
monospace;
|
|
12
|
-
--prism-a11y-line-height: 1.5;
|
|
13
|
-
--prism-a11y-code-block-margin: 0.5em 0;
|
|
14
|
-
--prism-a11y-code-block-padding: 1em;
|
|
15
|
-
--prism-a11y-code-inline-padding: 0.1em;
|
|
16
|
-
--prism-a11y-width-border: 1px;
|
|
17
|
-
--prism-a11y-width-tab: 2;
|
|
18
|
-
--prism-a11y-color-background: hsl(0deg 0% 17% / 100%);
|
|
19
|
-
--prism-a11y-color-text-no-token: hsl(60deg 30% 96% / 100%);
|
|
20
|
-
--prism-a11y-color-text-comment: hsl(54deg 32% 75% / 100%);
|
|
21
|
-
--prism-a11y-color-text-blue: hsl(180deg 100% 44% / 100%);
|
|
22
|
-
--prism-a11y-color-text-green: hsl(80deg 75% 55% / 100%);
|
|
23
|
-
--prism-a11y-color-text-gray: hsl(60deg 30% 96% / 100%);
|
|
24
|
-
--prism-a11y-color-text-purple: hsl(291deg 30% 83% / 100%);
|
|
25
|
-
--prism-a11y-color-text-red: hsl(17deg 100% 74% / 100%);
|
|
26
|
-
--prism-a11y-color-text-yellow: hsl(51deg 100% 50% / 100%);
|
|
27
|
-
--prism-a11y-plugin-color-border: hsl(51deg 100% 50% / 55%);
|
|
28
|
-
--prism-a11y-plugin-color-background: hsl(51deg 100% 50% / 10%);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.dx-theme-light {
|
|
32
|
-
--prism-a11y-border-radius: 0.3em;
|
|
33
|
-
--prism-a11y-font-family: "consolas", "monaco", "Andale Mono", "Ubuntu Mono",
|
|
34
|
-
monospace;
|
|
35
|
-
--prism-a11y-line-height: 1.5;
|
|
36
|
-
--prism-a11y-code-block-margin: 0.5em 0;
|
|
37
|
-
--prism-a11y-code-block-padding: 1em;
|
|
38
|
-
--prism-a11y-code-inline-padding: 0.1em;
|
|
39
|
-
--prism-a11y-width-border: 1px;
|
|
40
|
-
--prism-a11y-width-tab: 2;
|
|
41
|
-
--prism-a11y-color-background: hsl(0deg 0% 100% / 100%);
|
|
42
|
-
--prism-a11y-color-text-no-token: hsl(0deg 0% 33% / 100%);
|
|
43
|
-
--prism-a11y-color-text-comment: hsl(16deg 100% 25% / 100%);
|
|
44
|
-
--prism-a11y-color-text-blue: hsl(195deg 100% 30% / 100%);
|
|
45
|
-
--prism-a11y-color-text-green: hsl(120deg 100% 25% / 100%);
|
|
46
|
-
--prism-a11y-color-text-gray: hsl(0deg 0% 41% / 100%);
|
|
47
|
-
--prism-a11y-color-text-purple: hsl(282deg 100% 41% / 100%);
|
|
48
|
-
--prism-a11y-color-text-red: hsl(2deg 80% 47% / 100%);
|
|
49
|
-
--prism-a11y-color-text-yellow: hsl(43deg 74% 30% / 100%);
|
|
50
|
-
--prism-a11y-plugin-color-border: hsl(43deg 74% 30% / 55%);
|
|
51
|
-
--prism-a11y-plugin-color-background: hsl(43deg 74% 30% / 10%);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.dx-theme-dark pre[class*="language-"] {
|
|
55
|
-
background: var(--prism-a11y-color-background);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.dx-theme-light pre[class*="language-"] {
|
|
59
|
-
background: var(--prism-a11y-color-background);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:where(code[class*="language-"], pre[class*="language-"]) {
|
|
63
|
-
color: var(--prism-a11y-color-text-no-token);
|
|
64
|
-
background: var(--prism-a11y-color-background);
|
|
65
|
-
font-family: var(--prism-a11y-font-family);
|
|
66
|
-
text-align: start;
|
|
67
|
-
white-space: pre;
|
|
68
|
-
word-spacing: normal;
|
|
69
|
-
word-break: normal;
|
|
70
|
-
word-wrap: normal;
|
|
71
|
-
line-height: var(--prism-a11y-line-height);
|
|
72
|
-
tab-size: var(--prism-a11y-width-tab);
|
|
73
|
-
hyphens: none;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Code blocks */
|
|
77
|
-
pre[class*="language-"] {
|
|
78
|
-
padding: var(--prism-a11y-code-block-padding);
|
|
79
|
-
margin: var(--prism-a11y-code-block-margin);
|
|
80
|
-
overflow: auto;
|
|
81
|
-
border-radius: var(--prism-a11y-border-radius);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:where(:not(pre) > code[class*="language-"], pre[class*="language-"]) {
|
|
85
|
-
background: var(--prism-a11y-color-background);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Inline code */
|
|
89
|
-
:not(pre) > code[class*="language-"] {
|
|
90
|
-
padding: var(--prism-a11y-code-inline-padding);
|
|
91
|
-
border-radius: var(--prism-a11y-border-radius);
|
|
92
|
-
white-space: normal;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:where(.token.comment, .token.prolog, .token.doctype, .token.cdata) {
|
|
96
|
-
color: var(--prism-a11y-color-text-comment);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.token.punctuation {
|
|
100
|
-
color: var(--prism-a11y-color-text-gray);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:where(
|
|
104
|
-
.token.property,
|
|
105
|
-
.token.tag,
|
|
106
|
-
.token.constant,
|
|
107
|
-
.token.symbol,
|
|
108
|
-
.token.deleted
|
|
109
|
-
) {
|
|
110
|
-
color: var(--prism-a11y-color-text-red);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:where(
|
|
114
|
-
.token.operator,
|
|
115
|
-
.token.entity,
|
|
116
|
-
.token.url,
|
|
117
|
-
.language-css .token.string,
|
|
118
|
-
.style .token.string,
|
|
119
|
-
.token.variable,
|
|
120
|
-
.token.keyword
|
|
121
|
-
) {
|
|
122
|
-
color: var(--prism-a11y-color-text-blue);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:where(
|
|
126
|
-
.token.selector,
|
|
127
|
-
.token.attr-name,
|
|
128
|
-
.token.string,
|
|
129
|
-
.token.char,
|
|
130
|
-
.token.builtin,
|
|
131
|
-
.token.inserted
|
|
132
|
-
) {
|
|
133
|
-
color: var(--prism-a11y-color-text-green);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:where(
|
|
137
|
-
.token.atrule,
|
|
138
|
-
.token.attr-value,
|
|
139
|
-
.token.function,
|
|
140
|
-
.token.regex,
|
|
141
|
-
.token.important
|
|
142
|
-
) {
|
|
143
|
-
color: var(--prism-a11y-color-text-yellow);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:where(.token.boolean, .token.number, .token.keyword) {
|
|
147
|
-
color: var(--prism-a11y-color-text-purple);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:where(.token.important, .token.bold) {
|
|
151
|
-
font-weight: bold;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.token.italic {
|
|
155
|
-
font-style: italic;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.token.entity {
|
|
159
|
-
cursor: help;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.line-highlight {
|
|
163
|
-
background: var(--prism-a11y-plugin-color-background);
|
|
164
|
-
border-top: var(--prism-a11y-width-border) solid
|
|
165
|
-
var(--prism-a11y-plugin-color-border);
|
|
166
|
-
border-bottom: var(--prism-a11y-width-border) solid
|
|
167
|
-
var(--prism-a11y-plugin-color-border);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.line-numbers .line-numbers-rows {
|
|
171
|
-
border-right: var(--prism-a11y-width-border) solid
|
|
172
|
-
var(--prism-a11y-color-text-no-token);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.line-numbers-rows > span::before {
|
|
176
|
-
color: var(--prism-a11y-color-text-comment);
|
|
177
|
-
}
|