decap-cms-widget-markdown 3.1.2 → 3.1.4
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/CHANGELOG.md +8 -0
- package/dist/decap-cms-widget-markdown.js +3 -3
- package/dist/decap-cms-widget-markdown.js.map +1 -1
- package/dist/esm/MarkdownControl/Toolbar.js +2 -2
- package/dist/esm/MarkdownControl/components/Shortcode.js +2 -2
- package/dist/esm/MarkdownControl/index.js +2 -2
- package/dist/esm/MarkdownControl/plugins/blocks/events/keyDown.js +10 -0
- package/dist/esm/MarkdownControl/plugins/blocks/locations/isCursorAfterSoftBreak.js +16 -0
- package/dist/esm/MarkdownControl/plugins/blocks/locations/isCursorCollapsedAfterSoftBreak.js +17 -0
- package/dist/esm/MarkdownControl/plugins/blocks/locations/isCursorInNonDefaultBlock copy.js +19 -0
- package/dist/esm/MarkdownControl/plugins/blocks/transforms/unwrapIfCursorAtStart.js +12 -4
- package/dist/esm/MarkdownControl/plugins/lists/events/keyDownShiftTab.js +2 -2
- package/dist/esm/MarkdownControl/plugins/lists/events/keyDownTab.js +2 -2
- package/dist/esm/MarkdownControl/plugins/lists/transforms/liftFirstMatchedParent.js +2 -2
- package/dist/esm/MarkdownControl/plugins/lists/transforms/unwrapSelectionFromList.js +2 -2
- package/dist/esm/MarkdownControl/renderers.js +17 -17
- package/dist/esm/MarkdownPreview.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/serializers/remarkAssertParents.js +2 -2
- package/dist/esm/serializers/remarkEscapeMarkdownEntities.js +2 -2
- package/dist/esm/serializers/remarkImagesToText.js +2 -2
- package/dist/esm/serializers/remarkPaddedLinks.js +2 -2
- package/dist/esm/serializers/remarkRehypeShortcodes.js +2 -2
- package/dist/esm/serializers/remarkSlate.js +12 -3
- package/dist/esm/serializers/remarkSquashReferences.js +2 -2
- package/dist/esm/serializers/slateRemark.js +2 -2
- package/package.json +2 -2
- package/src/MarkdownControl/plugins/blocks/events/keyDown.js +9 -0
- package/src/MarkdownControl/plugins/blocks/locations/isCursorCollapsedAfterSoftBreak.js +13 -0
- package/src/MarkdownControl/plugins/blocks/transforms/unwrapIfCursorAtStart.js +17 -4
- package/src/MarkdownControl/renderers.js +6 -1
- package/src/serializers/remarkSlate.js +9 -1
- package/dist/esm/MarkdownControl/PlateEditor.js +0 -149
- package/dist/esm/components/Icons.js +0 -174
- package/dist/esm/components/plate-ui/blockquote-element.js +0 -28
- package/dist/esm/components/plate-ui/button.js +0 -66
- package/dist/esm/components/plate-ui/code-block-combobox.js +0 -66
- package/dist/esm/components/plate-ui/code-block-element.css +0 -434
- package/dist/esm/components/plate-ui/code-block-element.js +0 -41
- package/dist/esm/components/plate-ui/code-leaf.js +0 -28
- package/dist/esm/components/plate-ui/code-line-element.js +0 -16
- package/dist/esm/components/plate-ui/code-syntax-leaf.js +0 -34
- package/dist/esm/components/plate-ui/command.js +0 -55
- package/dist/esm/components/plate-ui/dialog.js +0 -44
- package/dist/esm/components/plate-ui/dropdown-menu.js +0 -114
- package/dist/esm/components/plate-ui/editor.js +0 -71
- package/dist/esm/components/plate-ui/fixed-toolbar-buttons.js +0 -49
- package/dist/esm/components/plate-ui/fixed-toolbar.js +0 -9
- package/dist/esm/components/plate-ui/floating-toolbar-buttons.js +0 -34
- package/dist/esm/components/plate-ui/floating-toolbar.js +0 -50
- package/dist/esm/components/plate-ui/heading-element.js +0 -52
- package/dist/esm/components/plate-ui/input.js +0 -25
- package/dist/esm/components/plate-ui/insert-dropdown-menu.js +0 -200
- package/dist/esm/components/plate-ui/kbd-leaf.js +0 -27
- package/dist/esm/components/plate-ui/link-element.js +0 -34
- package/dist/esm/components/plate-ui/link-floating-toolbar.js +0 -116
- package/dist/esm/components/plate-ui/list-element.js +0 -38
- package/dist/esm/components/plate-ui/mark-toolbar-button.js +0 -34
- package/dist/esm/components/plate-ui/mode-dropdown-menu.js +0 -67
- package/dist/esm/components/plate-ui/more-dropdown-menu.js +0 -50
- package/dist/esm/components/plate-ui/paragraph-element.js +0 -9
- package/dist/esm/components/plate-ui/placeholder.js +0 -52
- package/dist/esm/components/plate-ui/popover.js +0 -45
- package/dist/esm/components/plate-ui/resizable.js +0 -50
- package/dist/esm/components/plate-ui/separator.js +0 -27
- package/dist/esm/components/plate-ui/table-cell-element.js +0 -97
- package/dist/esm/components/plate-ui/table-element.js +0 -182
- package/dist/esm/components/plate-ui/table-row-element.js +0 -27
- package/dist/esm/components/plate-ui/toolbar.js +0 -99
- package/dist/esm/components/plate-ui/tooltip.js +0 -49
- package/dist/esm/components/plate-ui/turn-into-dropdown-menu.js +0 -129
- package/dist/esm/style/global.css +0 -78
- package/dist/esm/style/input.css +0 -3
- package/dist/esm/style/output.css +0 -557
- package/dist/esm/styles/globals.css +0 -76
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One Light theme for prism.js
|
|
3
|
-
* Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* One Light colours (accurate as of commit eb064bf on 19 Feb 2021)
|
|
8
|
-
* From colors.less
|
|
9
|
-
* --mono-1: hsl(230, 8%, 24%);
|
|
10
|
-
* --mono-2: hsl(230, 6%, 44%);
|
|
11
|
-
* --mono-3: hsl(230, 4%, 64%)
|
|
12
|
-
* --hue-1: hsl(198, 99%, 37%);
|
|
13
|
-
* --hue-2: hsl(221, 87%, 60%);
|
|
14
|
-
* --hue-3: hsl(301, 63%, 40%);
|
|
15
|
-
* --hue-4: hsl(119, 34%, 47%);
|
|
16
|
-
* --hue-5: hsl(5, 74%, 59%);
|
|
17
|
-
* --hue-5-2: hsl(344, 84%, 43%);
|
|
18
|
-
* --hue-6: hsl(35, 99%, 36%);
|
|
19
|
-
* --hue-6-2: hsl(35, 99%, 40%);
|
|
20
|
-
* --syntax-fg: hsl(230, 8%, 24%);
|
|
21
|
-
* --syntax-bg: hsl(230, 1%, 98%);
|
|
22
|
-
* --syntax-gutter: hsl(230, 1%, 62%);
|
|
23
|
-
* --syntax-guide: hsla(230, 8%, 24%, 0.2);
|
|
24
|
-
* --syntax-accent: hsl(230, 100%, 66%);
|
|
25
|
-
* From syntax-variables.less
|
|
26
|
-
* --syntax-selection-color: hsl(230, 1%, 90%);
|
|
27
|
-
* --syntax-gutter-background-color-selected: hsl(230, 1%, 90%);
|
|
28
|
-
* --syntax-cursor-line: hsla(230, 8%, 24%, 0.05);
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
.slate-code_block code[class*='language-'],
|
|
32
|
-
.slate-code_block pre[class*='language-'] {
|
|
33
|
-
background: hsl(230, 1%, 98%);
|
|
34
|
-
color: hsl(230, 8%, 24%);
|
|
35
|
-
font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono',
|
|
36
|
-
monospace;
|
|
37
|
-
direction: ltr;
|
|
38
|
-
text-align: left;
|
|
39
|
-
white-space: pre;
|
|
40
|
-
word-spacing: normal;
|
|
41
|
-
word-break: normal;
|
|
42
|
-
line-height: 1.5;
|
|
43
|
-
-moz-tab-size: 2;
|
|
44
|
-
-o-tab-size: 2;
|
|
45
|
-
tab-size: 2;
|
|
46
|
-
-webkit-hyphens: none;
|
|
47
|
-
-moz-hyphens: none;
|
|
48
|
-
-ms-hyphens: none;
|
|
49
|
-
hyphens: none;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Selection */
|
|
53
|
-
.slate-code_block code[class*='language-']::-moz-selection,
|
|
54
|
-
.slate-code_block code[class*='language-'] *::-moz-selection,
|
|
55
|
-
.slate-code_block pre[class*='language-'] *::-moz-selection {
|
|
56
|
-
background: hsl(230, 1%, 90%);
|
|
57
|
-
color: inherit;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.slate-code_block code[class*='language-']::selection,
|
|
61
|
-
.slate-code_block code[class*='language-'] *::selection,
|
|
62
|
-
.slate-code_block pre[class*='language-'] *::selection {
|
|
63
|
-
background: hsl(230, 1%, 90%);
|
|
64
|
-
color: inherit;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* Code blocks */
|
|
68
|
-
.slate-code_block pre[class*='language-'] {
|
|
69
|
-
padding: 1em;
|
|
70
|
-
margin: 0.5em 0;
|
|
71
|
-
overflow: auto;
|
|
72
|
-
border-radius: 0.3em;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Inline code */
|
|
76
|
-
.slate-code_block :not(pre) > code[class*='language-'] {
|
|
77
|
-
padding: 0.2em 0.3em;
|
|
78
|
-
border-radius: 0.3em;
|
|
79
|
-
white-space: normal;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.token.comment,
|
|
83
|
-
.token.prolog,
|
|
84
|
-
.token.cdata {
|
|
85
|
-
color: hsl(230, 4%, 64%);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.token.doctype,
|
|
89
|
-
.token.punctuation,
|
|
90
|
-
.token.entity {
|
|
91
|
-
color: hsl(230, 8%, 24%);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.token.attr-name,
|
|
95
|
-
.token.class-name,
|
|
96
|
-
.token.boolean,
|
|
97
|
-
.token.constant,
|
|
98
|
-
.token.number,
|
|
99
|
-
.token.atrule {
|
|
100
|
-
color: hsl(35, 99%, 36%);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.token.keyword {
|
|
104
|
-
color: hsl(301, 63%, 40%);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.token.property,
|
|
108
|
-
.token.tag,
|
|
109
|
-
.token.symbol,
|
|
110
|
-
.token.deleted,
|
|
111
|
-
.token.important {
|
|
112
|
-
color: hsl(5, 74%, 59%);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.token.selector,
|
|
116
|
-
.token.string,
|
|
117
|
-
.token.char,
|
|
118
|
-
.token.builtin,
|
|
119
|
-
.token.inserted,
|
|
120
|
-
.token.regex,
|
|
121
|
-
.token.attr-value,
|
|
122
|
-
.token.attr-value > .token.punctuation {
|
|
123
|
-
color: hsl(119, 34%, 47%);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.token.variable,
|
|
127
|
-
.token.operator,
|
|
128
|
-
.token.function {
|
|
129
|
-
color: hsl(221, 87%, 60%);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.token.url {
|
|
133
|
-
color: hsl(198, 99%, 37%);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* HTML overrides */
|
|
137
|
-
.token.attr-value > .token.punctuation.attr-equals,
|
|
138
|
-
.token.special-attr > .token.attr-value > .token.value.css {
|
|
139
|
-
color: hsl(230, 8%, 24%);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* CSS overrides */
|
|
143
|
-
.language-css .token.selector {
|
|
144
|
-
color: hsl(5, 74%, 59%);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.language-css .token.property {
|
|
148
|
-
color: hsl(230, 8%, 24%);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.language-css .token.function,
|
|
152
|
-
.language-css .token.url > .token.function {
|
|
153
|
-
color: hsl(198, 99%, 37%);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.language-css .token.url > .token.string.url {
|
|
157
|
-
color: hsl(119, 34%, 47%);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.language-css .token.important,
|
|
161
|
-
.language-css .token.atrule .token.rule {
|
|
162
|
-
color: hsl(301, 63%, 40%);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* JS overrides */
|
|
166
|
-
.language-javascript .token.operator {
|
|
167
|
-
color: hsl(301, 63%, 40%);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.language-javascript
|
|
171
|
-
.token.template-string
|
|
172
|
-
> .token.interpolation
|
|
173
|
-
> .token.interpolation-punctuation.punctuation {
|
|
174
|
-
color: hsl(344, 84%, 43%);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* JSON overrides */
|
|
178
|
-
.language-json .token.operator {
|
|
179
|
-
color: hsl(230, 8%, 24%);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.language-json .token.null.keyword {
|
|
183
|
-
color: hsl(35, 99%, 36%);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* MD overrides */
|
|
187
|
-
.language-markdown .token.url,
|
|
188
|
-
.language-markdown .token.url > .token.operator,
|
|
189
|
-
.language-markdown .token.url-reference.url > .token.string {
|
|
190
|
-
color: hsl(230, 8%, 24%);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.language-markdown .token.url > .token.content {
|
|
194
|
-
color: hsl(221, 87%, 60%);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.language-markdown .token.url > .token.url,
|
|
198
|
-
.language-markdown .token.url-reference.url {
|
|
199
|
-
color: hsl(198, 99%, 37%);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.language-markdown .token.blockquote.punctuation,
|
|
203
|
-
.language-markdown .token.hr.punctuation {
|
|
204
|
-
color: hsl(230, 4%, 64%);
|
|
205
|
-
font-style: italic;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.language-markdown .token.code-snippet {
|
|
209
|
-
color: hsl(119, 34%, 47%);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.language-markdown .token.bold .token.content {
|
|
213
|
-
color: hsl(35, 99%, 36%);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.language-markdown .token.italic .token.content {
|
|
217
|
-
color: hsl(301, 63%, 40%);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.language-markdown .token.strike .token.content,
|
|
221
|
-
.language-markdown .token.strike .token.punctuation,
|
|
222
|
-
.language-markdown .token.list.punctuation,
|
|
223
|
-
.language-markdown .token.title.important > .token.punctuation {
|
|
224
|
-
color: hsl(5, 74%, 59%);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/* General */
|
|
228
|
-
.token.bold {
|
|
229
|
-
font-weight: bold;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.token.comment,
|
|
233
|
-
.token.italic {
|
|
234
|
-
font-style: italic;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.token.entity {
|
|
238
|
-
cursor: help;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.token.namespace {
|
|
242
|
-
opacity: 0.8;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/* Plugin overrides */
|
|
246
|
-
/* Selectors should have higher specificity than those in the plugins' default stylesheets */
|
|
247
|
-
|
|
248
|
-
/* Show Invisibles plugin overrides */
|
|
249
|
-
.token.token.tab:not(:empty):before,
|
|
250
|
-
.token.token.cr:before,
|
|
251
|
-
.token.token.lf:before,
|
|
252
|
-
.token.token.space:before {
|
|
253
|
-
color: hsla(230, 8%, 24%, 0.2);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/* Toolbar plugin overrides */
|
|
257
|
-
/* Space out all buttons and move them away from the right edge of the code block */
|
|
258
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item {
|
|
259
|
-
margin-right: 0.4em;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* Styling the buttons */
|
|
263
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button,
|
|
264
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a,
|
|
265
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span {
|
|
266
|
-
background: hsl(230, 1%, 90%);
|
|
267
|
-
color: hsl(230, 6%, 44%);
|
|
268
|
-
padding: 0.1em 0.4em;
|
|
269
|
-
border-radius: 0.3em;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover,
|
|
273
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus,
|
|
274
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover,
|
|
275
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus,
|
|
276
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover,
|
|
277
|
-
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus {
|
|
278
|
-
background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */
|
|
279
|
-
color: hsl(230, 8%, 24%);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/* Line Highlight plugin overrides */
|
|
283
|
-
/* The highlighted line itself */
|
|
284
|
-
.line-highlight.line-highlight {
|
|
285
|
-
background: hsla(230, 8%, 24%, 0.05);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/* Default line numbers in Line Highlight plugin */
|
|
289
|
-
.line-highlight.line-highlight:before,
|
|
290
|
-
.line-highlight.line-highlight[data-end]:after {
|
|
291
|
-
background: hsl(230, 1%, 90%);
|
|
292
|
-
color: hsl(230, 8%, 24%);
|
|
293
|
-
padding: 0.1em 0.6em;
|
|
294
|
-
border-radius: 0.3em;
|
|
295
|
-
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/* Hovering over a linkable line number (in the gutter area) */
|
|
299
|
-
/* Requires Line Numbers plugin as well */
|
|
300
|
-
pre[id].linkable-line-numbers.linkable-line-numbers
|
|
301
|
-
span.line-numbers-rows
|
|
302
|
-
> span:hover:before {
|
|
303
|
-
background-color: hsla(230, 8%, 24%, 0.05);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* Line Numbers and Command Line plugins overrides */
|
|
307
|
-
/* Line separating gutter from coding area */
|
|
308
|
-
.line-numbers.line-numbers .line-numbers-rows,
|
|
309
|
-
.command-line .command-line-prompt {
|
|
310
|
-
border-right-color: hsla(230, 8%, 24%, 0.2);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/* Stuff in the gutter */
|
|
314
|
-
.line-numbers .line-numbers-rows > span:before,
|
|
315
|
-
.command-line .command-line-prompt > span:before {
|
|
316
|
-
color: hsl(230, 1%, 62%);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/* Match Braces plugin overrides */
|
|
320
|
-
/* Note: Outline colour is inherited from the braces */
|
|
321
|
-
.rainbow-braces .token.token.punctuation.brace-level-1,
|
|
322
|
-
.rainbow-braces .token.token.punctuation.brace-level-5,
|
|
323
|
-
.rainbow-braces .token.token.punctuation.brace-level-9 {
|
|
324
|
-
color: hsl(5, 74%, 59%);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.rainbow-braces .token.token.punctuation.brace-level-2,
|
|
328
|
-
.rainbow-braces .token.token.punctuation.brace-level-6,
|
|
329
|
-
.rainbow-braces .token.token.punctuation.brace-level-10 {
|
|
330
|
-
color: hsl(119, 34%, 47%);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.rainbow-braces .token.token.punctuation.brace-level-3,
|
|
334
|
-
.rainbow-braces .token.token.punctuation.brace-level-7,
|
|
335
|
-
.rainbow-braces .token.token.punctuation.brace-level-11 {
|
|
336
|
-
color: hsl(221, 87%, 60%);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.rainbow-braces .token.token.punctuation.brace-level-4,
|
|
340
|
-
.rainbow-braces .token.token.punctuation.brace-level-8,
|
|
341
|
-
.rainbow-braces .token.token.punctuation.brace-level-12 {
|
|
342
|
-
color: hsl(301, 63%, 40%);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* Diff Highlight plugin overrides */
|
|
346
|
-
/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */
|
|
347
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix),
|
|
348
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) {
|
|
349
|
-
background-color: hsla(353, 100%, 66%, 0.15);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection,
|
|
353
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection,
|
|
354
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection,
|
|
355
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection {
|
|
356
|
-
background-color: hsla(353, 95%, 66%, 0.25);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection,
|
|
360
|
-
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection,
|
|
361
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection,
|
|
362
|
-
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection {
|
|
363
|
-
background-color: hsla(353, 95%, 66%, 0.25);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix),
|
|
367
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) {
|
|
368
|
-
background-color: hsla(137, 100%, 55%, 0.15);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection,
|
|
372
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection,
|
|
373
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection,
|
|
374
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection {
|
|
375
|
-
background-color: hsla(135, 73%, 55%, 0.25);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection,
|
|
379
|
-
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection,
|
|
380
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection,
|
|
381
|
-
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection {
|
|
382
|
-
background-color: hsla(135, 73%, 55%, 0.25);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/* Previewers plugin overrides */
|
|
386
|
-
/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */
|
|
387
|
-
/* Border around popup */
|
|
388
|
-
.prism-previewer.prism-previewer:before,
|
|
389
|
-
.prism-previewer-gradient.prism-previewer-gradient div {
|
|
390
|
-
border-color: hsl(0, 0, 95%);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/* Angle and time should remain as circles and are hence not included */
|
|
394
|
-
.prism-previewer-color.prism-previewer-color:before,
|
|
395
|
-
.prism-previewer-gradient.prism-previewer-gradient div,
|
|
396
|
-
.prism-previewer-easing.prism-previewer-easing:before {
|
|
397
|
-
border-radius: 0.3em;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/* Triangles pointing to the code */
|
|
401
|
-
.prism-previewer.prism-previewer:after {
|
|
402
|
-
border-top-color: hsl(0, 0, 95%);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.prism-previewer-flipped.prism-previewer-flipped.after {
|
|
406
|
-
border-bottom-color: hsl(0, 0, 95%);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/* Background colour within the popup */
|
|
410
|
-
.prism-previewer-angle.prism-previewer-angle:before,
|
|
411
|
-
.prism-previewer-time.prism-previewer-time:before,
|
|
412
|
-
.prism-previewer-easing.prism-previewer-easing {
|
|
413
|
-
background: hsl(0, 0%, 100%);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */
|
|
417
|
-
/* For time, this is the alternate colour */
|
|
418
|
-
.prism-previewer-angle.prism-previewer-angle circle,
|
|
419
|
-
.prism-previewer-time.prism-previewer-time circle {
|
|
420
|
-
stroke: hsl(230, 8%, 24%);
|
|
421
|
-
stroke-opacity: 1;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/* Stroke colours of the handle, direction point, and vector itself */
|
|
425
|
-
.prism-previewer-easing.prism-previewer-easing circle,
|
|
426
|
-
.prism-previewer-easing.prism-previewer-easing path,
|
|
427
|
-
.prism-previewer-easing.prism-previewer-easing line {
|
|
428
|
-
stroke: hsl(230, 8%, 24%);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/* Fill colour of the handle */
|
|
432
|
-
.prism-previewer-easing.prism-previewer-easing circle {
|
|
433
|
-
fill: transparent;
|
|
434
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CodeBlockElement = void 0;
|
|
8
|
-
require("./code-block-element.css");
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _cn = require("@udecode/cn");
|
|
11
|
-
var _plateCodeBlock = require("@udecode/plate-code-block");
|
|
12
|
-
var _plateCommon = require("@udecode/plate-common");
|
|
13
|
-
var _codeBlockCombobox = require("./code-block-combobox");
|
|
14
|
-
var _react2 = require("@emotion/react");
|
|
15
|
-
const _excluded = ["className", "children"];
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
const CodeBlockElement = exports.CodeBlockElement = (0, _cn.withRef)((_ref, ref) => {
|
|
21
|
-
let {
|
|
22
|
-
className,
|
|
23
|
-
children
|
|
24
|
-
} = _ref,
|
|
25
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
const {
|
|
27
|
-
element
|
|
28
|
-
} = props;
|
|
29
|
-
const state = (0, _plateCodeBlock.useCodeBlockElementState)({
|
|
30
|
-
element
|
|
31
|
-
});
|
|
32
|
-
return (0, _react2.jsx)(_plateCommon.PlateElement, _extends({
|
|
33
|
-
ref: ref,
|
|
34
|
-
className: (0, _cn.cn)('relative py-1', state.className, className)
|
|
35
|
-
}, props), (0, _react2.jsx)("pre", {
|
|
36
|
-
className: "overflow-x-auto rounded-md bg-muted px-6 py-8 font-mono text-sm leading-[normal] [tab-size:2]"
|
|
37
|
-
}, (0, _react2.jsx)("code", null, children)), state.syntax && (0, _react2.jsx)("div", {
|
|
38
|
-
className: "absolute right-2 top-2 z-10 select-none",
|
|
39
|
-
contentEditable: false
|
|
40
|
-
}, (0, _react2.jsx)(_codeBlockCombobox.CodeBlockCombobox, null)));
|
|
41
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CodeLeaf = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _cn = require("@udecode/cn");
|
|
10
|
-
var _plateCommon = require("@udecode/plate-common");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
const _excluded = ["className", "children"];
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
-
const CodeLeaf = exports.CodeLeaf = (0, _cn.withRef)((_ref, ref) => {
|
|
18
|
-
let {
|
|
19
|
-
className,
|
|
20
|
-
children
|
|
21
|
-
} = _ref,
|
|
22
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
-
return (0, _react2.jsx)(_plateCommon.PlateLeaf, _extends({
|
|
24
|
-
ref: ref,
|
|
25
|
-
asChild: true,
|
|
26
|
-
className: (0, _cn.cn)('whitespace-pre-wrap rounded-md bg-muted px-[0.3em] py-[0.2em] font-mono text-sm', className)
|
|
27
|
-
}, props), (0, _react2.jsx)("code", null, children));
|
|
28
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CodeLineElement = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _cn = require("@udecode/cn");
|
|
10
|
-
var _plateCommon = require("@udecode/plate-common");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
const CodeLineElement = exports.CodeLineElement = (0, _cn.withRef)((props, ref) => (0, _react2.jsx)(_plateCommon.PlateElement, _extends({
|
|
15
|
-
ref: ref
|
|
16
|
-
}, props)));
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CodeSyntaxLeaf = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _cn = require("@udecode/cn");
|
|
10
|
-
var _plateCodeBlock = require("@udecode/plate-code-block");
|
|
11
|
-
var _plateCommon = require("@udecode/plate-common");
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
const _excluded = ["children"];
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
const CodeSyntaxLeaf = exports.CodeSyntaxLeaf = (0, _cn.withRef)((_ref, ref) => {
|
|
19
|
-
let {
|
|
20
|
-
children
|
|
21
|
-
} = _ref,
|
|
22
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
-
const {
|
|
24
|
-
leaf
|
|
25
|
-
} = props;
|
|
26
|
-
const {
|
|
27
|
-
tokenProps
|
|
28
|
-
} = (0, _plateCodeBlock.useCodeSyntaxLeaf)({
|
|
29
|
-
leaf
|
|
30
|
-
});
|
|
31
|
-
return (0, _react2.jsx)(_plateCommon.PlateLeaf, _extends({
|
|
32
|
-
ref: ref
|
|
33
|
-
}, props), (0, _react2.jsx)("span", tokenProps, children));
|
|
34
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Command = void 0;
|
|
8
|
-
exports.CommandDialog = CommandDialog;
|
|
9
|
-
exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = void 0;
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _cn = require("@udecode/cn");
|
|
12
|
-
var _cmdk = require("cmdk");
|
|
13
|
-
var _icons = require("@/components/icons");
|
|
14
|
-
var _dialog = require("./dialog");
|
|
15
|
-
var _react2 = require("@emotion/react");
|
|
16
|
-
const _excluded = ["children"],
|
|
17
|
-
_excluded2 = ["className"];
|
|
18
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
22
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
const Command = exports.Command = (0, _cn.withCn)(_cmdk.Command, 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground');
|
|
24
|
-
function CommandDialog(_ref) {
|
|
25
|
-
let {
|
|
26
|
-
children
|
|
27
|
-
} = _ref,
|
|
28
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
return (0, _react2.jsx)(_dialog.Dialog, props, (0, _react2.jsx)(_dialog.DialogContent, {
|
|
30
|
-
className: "overflow-hidden p-0 shadow-lg"
|
|
31
|
-
}, (0, _react2.jsx)(Command, {
|
|
32
|
-
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"
|
|
33
|
-
}, children)));
|
|
34
|
-
}
|
|
35
|
-
const CommandInput = exports.CommandInput = (0, _cn.withRef)((_ref2, ref) => {
|
|
36
|
-
let {
|
|
37
|
-
className
|
|
38
|
-
} = _ref2,
|
|
39
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
40
|
-
return (0, _react2.jsx)("div", {
|
|
41
|
-
className: "flex items-center border-b px-3",
|
|
42
|
-
"cmdk-input-wrapper": ""
|
|
43
|
-
}, (0, _react2.jsx)(_icons.Icons.search, {
|
|
44
|
-
className: "mr-2 h-4 w-4 shrink-0 opacity-50"
|
|
45
|
-
}), (0, _react2.jsx)(_cmdk.Command.Input, _extends({
|
|
46
|
-
ref: ref,
|
|
47
|
-
className: (0, _cn.cn)('flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', className)
|
|
48
|
-
}, props)));
|
|
49
|
-
});
|
|
50
|
-
const CommandList = exports.CommandList = (0, _cn.withCn)(_cmdk.Command.List, 'max-h-[500px] overflow-y-auto overflow-x-hidden');
|
|
51
|
-
const CommandEmpty = exports.CommandEmpty = (0, _cn.withCn)(_cmdk.Command.Empty, 'py-6 text-center text-sm');
|
|
52
|
-
const CommandGroup = exports.CommandGroup = (0, _cn.withCn)(_cmdk.Command.Group, 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground');
|
|
53
|
-
const CommandSeparator = exports.CommandSeparator = (0, _cn.withCn)(_cmdk.Command.Separator, '-mx-1 h-px bg-border');
|
|
54
|
-
const CommandItem = exports.CommandItem = (0, _cn.withCn)(_cmdk.Command.Item, 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50');
|
|
55
|
-
const CommandShortcut = exports.CommandShortcut = (0, _cn.withCn)((0, _cn.createPrimitiveElement)('span'), 'ml-auto text-xs tracking-widest text-muted-foreground');
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var DialogPrimitive = _interopRequireWildcard(require("@radix-ui/react-dialog"));
|
|
10
|
-
var _cn = require("@udecode/cn");
|
|
11
|
-
var _icons = require("@/components/icons");
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
const _excluded = ["className", "children"];
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
const Dialog = exports.Dialog = DialogPrimitive.Root;
|
|
20
|
-
const DialogTrigger = exports.DialogTrigger = DialogPrimitive.Trigger;
|
|
21
|
-
const DialogPortal = exports.DialogPortal = DialogPrimitive.Portal;
|
|
22
|
-
const DialogClose = exports.DialogClose = DialogPrimitive.Close;
|
|
23
|
-
const DialogOverlay = exports.DialogOverlay = (0, _cn.withCn)(DialogPrimitive.Overlay, 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0');
|
|
24
|
-
const DialogContent = exports.DialogContent = (0, _cn.withRef)((_ref, ref) => {
|
|
25
|
-
let {
|
|
26
|
-
className,
|
|
27
|
-
children
|
|
28
|
-
} = _ref,
|
|
29
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
return (0, _react2.jsx)(DialogPortal, null, (0, _react2.jsx)(DialogOverlay, null), (0, _react2.jsx)(DialogPrimitive.Content, _extends({
|
|
31
|
-
ref: ref,
|
|
32
|
-
className: (0, _cn.cn)('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className)
|
|
33
|
-
}, props), children, (0, _react2.jsx)(DialogPrimitive.Close, {
|
|
34
|
-
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
35
|
-
}, (0, _react2.jsx)(_icons.Icons.close, {
|
|
36
|
-
className: "h-4 w-4"
|
|
37
|
-
}), (0, _react2.jsx)("span", {
|
|
38
|
-
className: "sr-only"
|
|
39
|
-
}, "Close"))));
|
|
40
|
-
});
|
|
41
|
-
const DialogHeader = exports.DialogHeader = (0, _cn.withCn)((0, _cn.createPrimitiveElement)('div'), 'flex flex-col space-y-1.5 text-center sm:text-left');
|
|
42
|
-
const DialogFooter = exports.DialogFooter = (0, _cn.withCn)((0, _cn.createPrimitiveElement)('div'), 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2');
|
|
43
|
-
const DialogTitle = exports.DialogTitle = (0, _cn.withCn)(DialogPrimitive.Title, 'text-lg font-semibold leading-none tracking-tight');
|
|
44
|
-
const DialogDescription = exports.DialogDescription = (0, _cn.withCn)(DialogPrimitive.Description, 'text-sm text-muted-foreground');
|