@netlify/spark-ui 1.5.0-alpha.1 → 1.5.0-alpha.11

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.
Files changed (48) hide show
  1. package/dist/assets/AskNetlify.css +1 -1
  2. package/dist/assets/SearchHeading.css +1 -1
  3. package/dist/assets/SearchLink.css +1 -1
  4. package/dist/assets/SearchModal.css +1 -1
  5. package/dist/components/preact/AskNetlify/AskNetlify.d.ts +6 -1
  6. package/dist/components/preact/AskNetlify/AskNetlify.js +2166 -2057
  7. package/dist/components/preact/Icon/index.d.ts +2 -2
  8. package/dist/components/preact/Icon/index.js +108 -72
  9. package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +43 -50
  10. package/dist/components/preact/SearchModal/components/SearchWindow.js +15 -14
  11. package/dist/components/preact/SearchModal/hooks/useSearchToggles.d.ts +3 -1
  12. package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +13 -10
  13. package/dist/components/preact/SpriteIcon/index.d.ts +7 -0
  14. package/dist/components/preact/SpriteIcon/index.js +7 -0
  15. package/dist/components/preact/icons/AskNetlify.d.ts +5 -0
  16. package/dist/components/preact/icons/AskNetlify.js +69 -0
  17. package/dist/components/preact/icons/Book.d.ts +5 -0
  18. package/dist/components/preact/icons/Book.js +23 -0
  19. package/dist/components/preact/icons/CircleQuestion.d.ts +5 -0
  20. package/dist/components/preact/icons/CircleQuestion.js +25 -0
  21. package/dist/components/preact/icons/Comment.d.ts +5 -0
  22. package/dist/components/preact/icons/Comment.js +23 -0
  23. package/dist/components/preact/icons/Lightbulb.d.ts +5 -0
  24. package/dist/components/preact/icons/Lightbulb.js +34 -0
  25. package/dist/components/preact/icons/MagnifyingGlass.d.ts +5 -0
  26. package/dist/components/preact/icons/MagnifyingGlass.js +23 -0
  27. package/package.json +3 -2
  28. package/packages/assets/icons/AskNetlify.svg +23 -0
  29. package/packages/assets/icons/icons.svg +10 -0
  30. package/packages/assets/icons/lightbulb.svg +4 -0
  31. package/packages/components/CodeBlock.astro +1 -1
  32. package/packages/components/preact/AskNetlify/AskNetlify.css +67 -14
  33. package/packages/components/preact/AskNetlify/AskNetlify.tsx +27 -21
  34. package/packages/components/preact/Icon/index.tsx +72 -53
  35. package/packages/components/preact/SearchModal/components/SearchHeading/SearchHeading.css +5 -4
  36. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +8 -8
  37. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +9 -34
  38. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +4 -12
  39. package/packages/components/preact/SearchModal/components/SearchWindow.tsx +5 -4
  40. package/packages/components/preact/SearchModal/hooks/useSearchToggles.ts +11 -3
  41. package/packages/components/preact/SpriteIcon/index.tsx +13 -0
  42. package/packages/components/preact/icons/AskNetlify.tsx +46 -0
  43. package/packages/components/preact/icons/Book.tsx +20 -0
  44. package/packages/components/preact/icons/CircleQuestion.tsx +22 -0
  45. package/packages/components/preact/icons/Comment.tsx +20 -0
  46. package/packages/components/preact/icons/Lightbulb.tsx +26 -0
  47. package/packages/components/preact/icons/MagnifyingGlass.tsx +20 -0
  48. package/packages/themes/poimandres.json +311 -0
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'preact/jsx-runtime';
2
+
3
+ interface IconProps extends JSX.SVGAttributes<SVGSVGElement> {}
4
+
5
+ export function Book(props: IconProps) {
6
+ return (
7
+ <svg
8
+ id="icon-book"
9
+ viewBox="0 0 16 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ {...props}
13
+ >
14
+ <path
15
+ d="M4.57143 1C3.15179 1 2 2.17578 2 3.625V12.375C2 13.8242 3.15179 15 4.57143 15H12.2857H13.1429C13.617 15 14 14.609 14 14.125C14 13.641 13.617 13.25 13.1429 13.25V11.5C13.617 11.5 14 11.109 14 10.625V1.875C14 1.39102 13.617 1 13.1429 1H12.2857H4.57143ZM4.57143 11.5H11.4286V13.25H4.57143C4.09732 13.25 3.71429 12.859 3.71429 12.375C3.71429 11.891 4.09732 11.5 4.57143 11.5ZM5.42857 4.9375C5.42857 4.69687 5.62143 4.5 5.85714 4.5H11C11.2357 4.5 11.4286 4.69687 11.4286 4.9375C11.4286 5.17813 11.2357 5.375 11 5.375H5.85714C5.62143 5.375 5.42857 5.17813 5.42857 4.9375ZM5.85714 6.25H11C11.2357 6.25 11.4286 6.44687 11.4286 6.6875C11.4286 6.92813 11.2357 7.125 11 7.125H5.85714C5.62143 7.125 5.42857 6.92813 5.42857 6.6875C5.42857 6.44687 5.62143 6.25 5.85714 6.25Z"
16
+ fill="currentColor"
17
+ />
18
+ </svg>
19
+ );
20
+ }
@@ -0,0 +1,22 @@
1
+ import { JSX } from 'preact/jsx-runtime';
2
+
3
+ interface IconProps extends JSX.SVGAttributes<SVGSVGElement> {}
4
+
5
+ export function CircleQuestion(props: IconProps) {
6
+ return (
7
+ <svg
8
+ id="icon-circle-question"
9
+ viewBox="0 0 16 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ {...props}
13
+ >
14
+ <path
15
+ fill-rule="evenodd"
16
+ clip-rule="evenodd"
17
+ d="M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM7.48998 7.58293C7.24532 7.9418 7.1073 8.36489 7.09243 8.80158L7.09232 9.00062C7.09232 9.21263 7.17498 9.41595 7.32211 9.56587C7.46924 9.71578 7.6688 9.8 7.87688 9.8C8.08495 9.8 8.28451 9.71578 8.43164 9.56587C8.57878 9.41595 8.66143 9.21263 8.66143 9.00062V8.8172C8.67459 8.68789 8.72283 8.56481 8.80083 8.46179C8.82284 8.43271 8.87624 8.39281 8.96482 8.34893C9.04677 8.30834 9.13665 8.27475 9.21483 8.24583L9.2194 8.24414L9.22961 8.24053L9.23662 8.2376C9.7635 8.01739 10.1981 7.61624 10.4651 7.10372C10.7321 6.5912 10.8149 5.99957 10.6987 5.43153L10.6962 5.42197C10.5641 4.91215 10.2876 4.45323 9.90133 4.10235C9.51593 3.7523 9.03819 3.52522 8.52737 3.44924C8.1077 3.37054 7.67619 3.38633 7.26312 3.49553C6.849 3.605 6.46349 3.80568 6.13376 4.08342C5.58181 4.54443 5.25866 5.23048 5.25 5.95706V5.95934C5.25 6.17135 5.33266 6.37468 5.47979 6.52459C5.62692 6.6745 5.82648 6.75872 6.03456 6.75872C6.24264 6.75872 6.44219 6.6745 6.58933 6.52459C6.73595 6.37519 6.81855 6.17275 6.81911 5.96153C6.82486 5.70702 6.94287 5.46722 7.13988 5.30865C7.29566 5.18188 7.47721 5.09021 7.67067 5.04112C7.86413 4.99203 8.06566 4.98632 8.26159 5.02383L8.2716 5.02518C8.47683 5.05273 8.67003 5.13962 8.82831 5.27556C8.98372 5.40903 9.09909 5.5843 9.16133 5.78128C9.23237 6.20988 8.99652 6.63061 8.59639 6.78484L8.59136 6.78696C8.22065 6.94277 7.74615 7.20718 7.48998 7.58293ZM7.87406 12.6C8.42636 12.6 8.8741 12.1523 8.8741 11.6C8.8741 11.0477 8.42636 10.6 7.87406 10.6C7.32175 10.6 6.87402 11.0477 6.87402 11.6C6.87402 12.1523 7.32175 12.6 7.87406 12.6Z"
18
+ fill="currentColor"
19
+ />
20
+ </svg>
21
+ );
22
+ }
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'preact/jsx-runtime';
2
+
3
+ interface IconProps extends JSX.SVGAttributes<SVGSVGElement> {}
4
+
5
+ export function Comment(props: IconProps) {
6
+ return (
7
+ <svg
8
+ id="icon-comment"
9
+ viewBox="0 0 16 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ {...props}
13
+ >
14
+ <path
15
+ d="M15 7.57143C15 10.6491 11.8666 13.1429 8.00041 13.1429C6.98601 13.1429 6.02357 12.9714 5.15409 12.6634C4.82871 12.8964 4.29828 13.2152 3.66941 13.483C3.01319 13.7616 2.22301 14 1.43829 14C1.26056 14 1.10198 13.8955 1.03362 13.7348C0.965266 13.5741 1.00355 13.392 1.12658 13.2688L1.13479 13.2607C1.14299 13.2527 1.15393 13.242 1.17033 13.2232C1.20041 13.1911 1.24689 13.1402 1.30431 13.0705C1.41641 12.9366 1.56679 12.7384 1.71991 12.492C1.99333 12.0473 2.25308 11.4634 2.30503 10.8071C1.48477 9.89643 1.00081 8.77946 1.00081 7.57143C1.00081 4.49375 4.13422 2 8.00041 2C11.8666 2 15 4.49375 15 7.57143Z"
16
+ fill="currentColor"
17
+ />
18
+ </svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { JSX } from 'preact/jsx-runtime';
2
+
3
+ interface IconProps extends JSX.SVGAttributes<SVGSVGElement> {}
4
+
5
+ export function Lightbulb(props: IconProps) {
6
+ return (
7
+ <svg
8
+ id="icon-lightbulb"
9
+ viewBox="0 0 16 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ {...props}
13
+ >
14
+ <path
15
+ fill-rule="evenodd"
16
+ clip-rule="evenodd"
17
+ d="M4.04938 8.73798C3.2407 7.81172 2.75 6.59946 2.75 5.27071C2.75 2.48473 4.94068 0.00930912 7.98359 2.55322e-05C10.8908 -0.00895859 13.25 2.35416 13.25 5.27071C13.25 6.59946 12.7593 7.81172 11.9506 8.73798C11.4578 9.30248 10.687 10.9818 10.3932 11.9766L10.3899 12H5.61006L5.60678 11.9766C5.31295 10.9818 4.54216 9.30248 4.04938 8.73798ZM8.34274 2.03953C8.42611 2.41703 8.18767 2.79064 7.81017 2.87402C6.80315 3.09642 6.06073 3.89938 5.85994 4.87157C5.78174 5.25018 5.41143 5.49371 5.03282 5.41552C4.65421 5.33732 4.41068 4.96701 4.48888 4.5884C4.79524 3.10505 5.93379 1.85468 7.50825 1.50696C7.88575 1.42359 8.25936 1.66203 8.34274 2.03953Z"
18
+ fill="currentColor"
19
+ />
20
+ <path
21
+ d="M5.76932 14.9479C5.67636 14.81 5.62681 14.6478 5.62655 14.4823L5.62521 13.5L10.3752 13.5L10.3741 14.4823C10.374 14.648 10.3243 14.81 10.2314 14.9479L9.77614 15.6241C9.69838 15.7397 9.5929 15.8345 9.46909 15.9001C9.34529 15.9657 9.207 16 9.06653 16L6.93417 16C6.7937 16 6.65541 15.9657 6.5316 15.9001C6.4078 15.8345 6.30232 15.7397 6.22455 15.6241L5.76932 14.9479Z"
22
+ fill="currentColor"
23
+ />
24
+ </svg>
25
+ );
26
+ }
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'preact/jsx-runtime';
2
+
3
+ interface IconProps extends JSX.SVGAttributes<SVGSVGElement> {}
4
+
5
+ export function MagnifyingGlass(props: IconProps) {
6
+ return (
7
+ <svg
8
+ id="icon-magnifying-glass"
9
+ viewBox="0 0 16 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ {...props}
13
+ >
14
+ <path
15
+ d="M12.3756 6.68667C12.3756 7.94156 11.9681 9.10077 11.2818 10.0413L14.7436 13.5052C15.0855 13.8469 15.0855 14.4019 14.7436 14.7437C14.4018 15.0854 13.8467 15.0854 13.5049 14.7437L10.043 11.2797C9.10235 11.9687 7.94292 12.3733 6.68778 12.3733C3.54583 12.3733 1 9.828 1 6.68667C1 3.54533 3.54583 1 6.68778 1C9.82973 1 12.3756 3.54533 12.3756 6.68667ZM6.68778 10.6236C7.20488 10.6236 7.71692 10.5218 8.19467 10.3239C8.67241 10.1261 9.1065 9.83607 9.47215 9.47049C9.83779 9.10491 10.1278 8.67091 10.3257 8.19326C10.5236 7.71561 10.6255 7.20367 10.6255 6.68667C10.6255 6.16966 10.5236 5.65772 10.3257 5.18007C10.1278 4.70242 9.83779 4.26842 9.47215 3.90284C9.1065 3.53726 8.67241 3.24727 8.19467 3.04942C7.71692 2.85158 7.20488 2.74974 6.68778 2.74974C6.17067 2.74974 5.65863 2.85158 5.18089 3.04942C4.70315 3.24727 4.26906 3.53726 3.90341 3.90284C3.53776 4.26842 3.24771 4.70242 3.04982 5.18007C2.85194 5.65772 2.75009 6.16966 2.75009 6.68667C2.75009 7.20367 2.85194 7.71561 3.04982 8.19326C3.24771 8.67091 3.53776 9.10491 3.90341 9.47049C4.26906 9.83607 4.70315 10.1261 5.18089 10.3239C5.65863 10.5218 6.17067 10.6236 6.68778 10.6236Z"
16
+ fill="currentColor"
17
+ />
18
+ </svg>
19
+ );
20
+ }
@@ -0,0 +1,311 @@
1
+ {
2
+ "name": "poimandres",
3
+ "type": "dark",
4
+ "colors": {
5
+ "editor.background": "#1b1e28",
6
+ "editor.foreground": "#e4f0fb",
7
+ "editorCursor.foreground": "#add7ff",
8
+ "editorIndentGuide.background": "#303340",
9
+ "editorIndentGuide.activeBackground": "#5de4c7",
10
+ "editor.lineHighlightBackground": "#303340",
11
+ "editor.selectionBackground": "#303340",
12
+ "editorLineNumber.foreground": "#303340",
13
+ "editorLineNumber.activeForeground": "#5de4c7"
14
+ },
15
+ "tokenColors": [
16
+ {
17
+ "name": "Comment",
18
+ "scope": ["comment", "punctuation.definition.comment"],
19
+ "settings": {
20
+ "fontStyle": "italic",
21
+ "foreground": "#a6accd"
22
+ }
23
+ },
24
+ {
25
+ "name": "Variables",
26
+ "scope": ["variable", "string constant.other.placeholder"],
27
+ "settings": {
28
+ "foreground": "#e4f0fb"
29
+ }
30
+ },
31
+ {
32
+ "name": "Colors",
33
+ "scope": ["constant.other.color"],
34
+ "settings": {
35
+ "foreground": "#add7ff"
36
+ }
37
+ },
38
+ {
39
+ "name": "Invalid",
40
+ "scope": ["invalid", "invalid.illegal"],
41
+ "settings": {
42
+ "foreground": "#f95c5b"
43
+ }
44
+ },
45
+ {
46
+ "name": "Keyword, Storage",
47
+ "scope": ["keyword", "storage.type", "storage.modifier"],
48
+ "settings": {
49
+ "foreground": "#c792ea"
50
+ }
51
+ },
52
+ {
53
+ "name": "Operator, Misc",
54
+ "scope": [
55
+ "keyword.control",
56
+ "constant.other.color",
57
+ "punctuation",
58
+ "meta.tag",
59
+ "punctuation.definition.tag",
60
+ "punctuation.separator.inheritance.php",
61
+ "punctuation.definition.tag.html",
62
+ "punctuation.definition.tag.begin.html",
63
+ "punctuation.definition.tag.end.html",
64
+ "punctuation.section.embedded",
65
+ "keyword.other.template",
66
+ "keyword.other.substitution"
67
+ ],
68
+ "settings": {
69
+ "foreground": "#89ddff"
70
+ }
71
+ },
72
+ {
73
+ "name": "Tag",
74
+ "scope": [
75
+ "entity.name.tag",
76
+ "meta.tag.sgml",
77
+ "markup.deleted.git_gutter"
78
+ ],
79
+ "settings": {
80
+ "foreground": "#5de4c7"
81
+ }
82
+ },
83
+ {
84
+ "name": "Function, Special Method",
85
+ "scope": [
86
+ "entity.name.function",
87
+ "meta.function-call",
88
+ "variable.function",
89
+ "support.function",
90
+ "keyword.other.special-method"
91
+ ],
92
+ "settings": {
93
+ "foreground": "#5fb3ff"
94
+ }
95
+ },
96
+ {
97
+ "name": "Block Level Variables",
98
+ "scope": ["meta.block variable.other"],
99
+ "settings": {
100
+ "foreground": "#e4f0fb"
101
+ }
102
+ },
103
+ {
104
+ "name": "Other Variable, String Link",
105
+ "scope": ["support.other.variable", "string.other.link"],
106
+ "settings": {
107
+ "foreground": "#f95c5b"
108
+ }
109
+ },
110
+ {
111
+ "name": "Number, Constant, Function Argument, Tag Attribute, Embedded",
112
+ "scope": [
113
+ "constant.numeric",
114
+ "constant.language",
115
+ "support.constant",
116
+ "constant.character",
117
+ "constant.escape",
118
+ "variable.parameter",
119
+ "keyword.other.unit",
120
+ "keyword.other"
121
+ ],
122
+ "settings": {
123
+ "foreground": "#5de4c7"
124
+ }
125
+ },
126
+ {
127
+ "name": "String, Symbols, Inherited Class, Markup Heading",
128
+ "scope": [
129
+ "string",
130
+ "constant.other.symbol",
131
+ "constant.other.key",
132
+ "entity.other.inherited-class",
133
+ "markup.heading",
134
+ "markup.inserted.git_gutter",
135
+ "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js"
136
+ ],
137
+ "settings": {
138
+ "foreground": "#add7ff"
139
+ }
140
+ },
141
+ {
142
+ "name": "Class, Support",
143
+ "scope": [
144
+ "entity.name",
145
+ "support.type",
146
+ "support.class",
147
+ "support.other.namespace.use.php",
148
+ "meta.use.php",
149
+ "support.other.namespace.php",
150
+ "markup.changed.git_gutter",
151
+ "support.type.sys-types"
152
+ ],
153
+ "settings": {
154
+ "foreground": "#7fdbca"
155
+ }
156
+ },
157
+ {
158
+ "name": "Entity Types",
159
+ "scope": ["support.type"],
160
+ "settings": {
161
+ "foreground": "#7fdbca"
162
+ }
163
+ },
164
+ {
165
+ "name": "CSS Class and Support",
166
+ "scope": [
167
+ "source.css support.type.property-name",
168
+ "source.sass support.type.property-name",
169
+ "source.scss support.type.property-name",
170
+ "source.less support.type.property-name",
171
+ "source.stylus support.type.property-name",
172
+ "source.postcss support.type.property-name"
173
+ ],
174
+ "settings": {
175
+ "foreground": "#7fdbca"
176
+ }
177
+ },
178
+ {
179
+ "name": "Sub-methods",
180
+ "scope": [
181
+ "entity.name.module.js",
182
+ "variable.import.parameter.js",
183
+ "variable.other.class.js"
184
+ ],
185
+ "settings": {
186
+ "foreground": "#f95c5b"
187
+ }
188
+ },
189
+ {
190
+ "name": "Language methods",
191
+ "scope": ["variable.language"],
192
+ "settings": {
193
+ "fontStyle": "italic",
194
+ "foreground": "#f95c5b"
195
+ }
196
+ },
197
+ {
198
+ "name": "entity.name.method.js",
199
+ "scope": ["entity.name.method.js"],
200
+ "settings": {
201
+ "fontStyle": "italic",
202
+ "foreground": "#5fb3ff"
203
+ }
204
+ },
205
+ {
206
+ "name": "meta.method.js",
207
+ "scope": [
208
+ "meta.class-method.js entity.name.function.js",
209
+ "variable.function.constructor"
210
+ ],
211
+ "settings": {
212
+ "foreground": "#5fb3ff"
213
+ }
214
+ },
215
+ {
216
+ "name": "Attributes",
217
+ "scope": ["entity.other.attribute-name"],
218
+ "settings": {
219
+ "foreground": "#c792ea"
220
+ }
221
+ },
222
+ {
223
+ "name": "HTML Attributes",
224
+ "scope": [
225
+ "text.html.basic entity.other.attribute-name.html",
226
+ "text.html.basic entity.other.attribute-name"
227
+ ],
228
+ "settings": {
229
+ "fontStyle": "italic",
230
+ "foreground": "#7fdbca"
231
+ }
232
+ },
233
+ {
234
+ "name": "CSS Classes",
235
+ "scope": ["entity.other.attribute-name.class"],
236
+ "settings": {
237
+ "foreground": "#7fdbca"
238
+ }
239
+ },
240
+ {
241
+ "name": "CSS ID's",
242
+ "scope": ["source.sass keyword.control"],
243
+ "settings": {
244
+ "foreground": "#5fb3ff"
245
+ }
246
+ },
247
+ {
248
+ "name": "Inserted",
249
+ "scope": ["markup.inserted"],
250
+ "settings": {
251
+ "foreground": "#add7ff"
252
+ }
253
+ },
254
+ {
255
+ "name": "Deleted",
256
+ "scope": ["markup.deleted"],
257
+ "settings": {
258
+ "foreground": "#f95c5b"
259
+ }
260
+ },
261
+ {
262
+ "name": "Changed",
263
+ "scope": ["markup.changed"],
264
+ "settings": {
265
+ "foreground": "#c792ea"
266
+ }
267
+ },
268
+ {
269
+ "name": "Regular Expressions",
270
+ "scope": ["string.regexp"],
271
+ "settings": {
272
+ "foreground": "#89ddff"
273
+ }
274
+ },
275
+ {
276
+ "name": "Escape Characters",
277
+ "scope": ["constant.character.escape"],
278
+ "settings": {
279
+ "foreground": "#89ddff"
280
+ }
281
+ },
282
+ {
283
+ "name": "URL",
284
+ "scope": ["*url*", "*link*", "*uri*"],
285
+ "settings": {
286
+ "fontStyle": "underline"
287
+ }
288
+ },
289
+ {
290
+ "name": "Decorators",
291
+ "scope": [
292
+ "tag.decorator.js entity.name.tag.js",
293
+ "tag.decorator.js punctuation.definition.tag.js"
294
+ ],
295
+ "settings": {
296
+ "fontStyle": "italic",
297
+ "foreground": "#5fb3ff"
298
+ }
299
+ },
300
+ {
301
+ "name": "ES7 Bind Operator",
302
+ "scope": [
303
+ "source.js constant.other.object.key.js string.unquoted.label.js"
304
+ ],
305
+ "settings": {
306
+ "fontStyle": "italic",
307
+ "foreground": "#f95c5b"
308
+ }
309
+ }
310
+ ]
311
+ }