@netlify/spark-ui 1.4.5 → 1.5.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/assets/AskNetlify.css +1 -0
  2. package/dist/assets/Orb.css +1 -0
  3. package/dist/assets/SearchLink.css +1 -1
  4. package/dist/assets/SearchModal.css +1 -1
  5. package/dist/chunks/compat.module.BNbXPLVY.js +298 -0
  6. package/dist/chunks/hooks.module.DGkdD5n9.js +177 -0
  7. package/dist/chunks/{useTimeout.YR4eKwj7.js → useTimeout.Cq4aqnDe.js} +1 -1
  8. package/dist/components/index.d.ts +1 -0
  9. package/dist/components/preact/AskNetlify/AskNetlify.d.ts +2 -0
  10. package/dist/components/preact/AskNetlify/AskNetlify.js +5653 -0
  11. package/dist/components/preact/Modal/Modal.js +1 -1
  12. package/dist/components/preact/Orb/Orb.d.ts +2 -0
  13. package/dist/components/preact/Orb/Orb.js +5 -0
  14. package/dist/components/preact/SearchModal/components/SearchInput.d.ts +2 -0
  15. package/dist/components/preact/SearchModal/components/SearchInput.js +2 -2
  16. package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.d.ts +1 -1
  17. package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +35 -17
  18. package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +81 -51
  19. package/dist/components/preact/SearchModal/components/SearchToggle/SearchToggle.js +1 -1
  20. package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
  21. package/dist/components/preact/SearchModal/components/SearchWindow.js +46 -30
  22. package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
  23. package/dist/components/preact/SearchModal/hooks/useSearch.js +2 -2
  24. package/dist/components/preact/SearchModal/hooks/useSearchHotkeys.js +1 -1
  25. package/dist/components/preact/SearchModal/hooks/useSearchLogger.js +1 -1
  26. package/dist/components/preact/SearchModal/hooks/useSearchParams.js +1 -1
  27. package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +1 -1
  28. package/dist/components/preact/SearchModal/types/search.types.d.ts +6 -1
  29. package/dist/components/preact/index.d.ts +1 -0
  30. package/dist/components/preact/index.js +7 -5
  31. package/dist/utils/handleThemeChange.d.ts +1 -0
  32. package/package.json +4 -2
  33. package/packages/components/CodeBlock.astro +1 -1
  34. package/packages/components/index.ts +1 -0
  35. package/packages/components/preact/AskNetlify/AskNetlify.css +168 -0
  36. package/packages/components/preact/AskNetlify/AskNetlify.tsx +126 -0
  37. package/packages/components/preact/Orb/Orb.css +94 -0
  38. package/packages/components/preact/Orb/Orb.tsx +7 -0
  39. package/packages/components/preact/SearchModal/components/SearchInput.tsx +9 -7
  40. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +7 -2
  41. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.tsx +27 -7
  42. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +81 -18
  43. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +67 -30
  44. package/packages/components/preact/SearchModal/components/SearchWindow.tsx +31 -16
  45. package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
  46. package/packages/components/preact/SearchModal/types/search.types.tsx +5 -2
  47. package/packages/components/preact/index.ts +1 -0
  48. package/packages/styles/tokens.css +28 -0
  49. package/packages/utils/handleThemeChange.ts +11 -0
  50. package/dist/chunks/compat.module.DJD78v1z.js +0 -175
  51. package/dist/chunks/hooks.module.D9IrxdEh.js +0 -138
  52. package/packages/themes/poimandres.json +0 -311
@@ -1,138 +0,0 @@
1
- import { options as x } from "preact";
2
- var v, n, H, y, m = 0, C = [], u = x, A = u.__b, q = u.__r, F = u.diffed, g = u.__c, k = u.unmount, T = u.__;
3
- function d(_, t) {
4
- u.__h && u.__h(n, _, m || t), m = 0;
5
- var r = n.__H || (n.__H = { __: [], __h: [] });
6
- return _ >= r.__.length && r.__.push({}), r.__[_];
7
- }
8
- function S(_) {
9
- return m = 1, z(j, _);
10
- }
11
- function z(_, t, r) {
12
- var o = d(v++, 2);
13
- if (o.t = _, !o.__c && (o.__ = [r ? r(t) : j(void 0, t), function(c) {
14
- var e = o.__N ? o.__N[0] : o.__[0], f = o.t(e, c);
15
- e !== f && (o.__N = [f, o.__[1]], o.__c.setState({}));
16
- }], o.__c = n, !n.__f)) {
17
- var a = function(c, e, f) {
18
- if (!o.__c.__H) return !0;
19
- var l = o.__c.__H.__.filter(function(i) {
20
- return !!i.__c;
21
- });
22
- if (l.every(function(i) {
23
- return !i.__N;
24
- })) return !h || h.call(this, c, e, f);
25
- var E = o.__c.props !== c;
26
- return l.forEach(function(i) {
27
- if (i.__N) {
28
- var w = i.__[0];
29
- i.__ = i.__N, i.__N = void 0, w !== i.__[0] && (E = !0);
30
- }
31
- }), h && h.call(this, c, e, f) || E;
32
- };
33
- n.__f = !0;
34
- var h = n.shouldComponentUpdate, N = n.componentWillUpdate;
35
- n.componentWillUpdate = function(c, e, f) {
36
- if (this.__e) {
37
- var l = h;
38
- h = void 0, a(c, e, f), h = l;
39
- }
40
- N && N.call(this, c, e, f);
41
- }, n.shouldComponentUpdate = a;
42
- }
43
- return o.__N || o.__;
44
- }
45
- function G(_, t) {
46
- var r = d(v++, 3);
47
- !u.__s && W(r.__H, t) && (r.__ = _, r.u = t, n.__H.__h.push(r));
48
- }
49
- function I(_) {
50
- return m = 5, b(function() {
51
- return { current: _ };
52
- }, []);
53
- }
54
- function b(_, t) {
55
- var r = d(v++, 7);
56
- return W(r.__H, t) && (r.__ = _(), r.__H = t, r.__h = _), r.__;
57
- }
58
- function J(_, t) {
59
- return m = 8, b(function() {
60
- return _;
61
- }, t);
62
- }
63
- function B() {
64
- for (var _; _ = C.shift(); ) if (_.__P && _.__H) try {
65
- _.__H.__h.forEach(s), _.__H.__h.forEach(p), _.__H.__h = [];
66
- } catch (t) {
67
- _.__H.__h = [], u.__e(t, _.__v);
68
- }
69
- }
70
- u.__b = function(_) {
71
- n = null, A && A(_);
72
- }, u.__ = function(_, t) {
73
- _ && t.__k && t.__k.__m && (_.__m = t.__k.__m), T && T(_, t);
74
- }, u.__r = function(_) {
75
- q && q(_), v = 0;
76
- var t = (n = _.__c).__H;
77
- t && (H === n ? (t.__h = [], n.__h = [], t.__.forEach(function(r) {
78
- r.__N && (r.__ = r.__N), r.u = r.__N = void 0;
79
- })) : (t.__h.forEach(s), t.__h.forEach(p), t.__h = [], v = 0)), H = n;
80
- }, u.diffed = function(_) {
81
- F && F(_);
82
- var t = _.__c;
83
- t && t.__H && (t.__H.__h.length && (C.push(t) !== 1 && y === u.requestAnimationFrame || ((y = u.requestAnimationFrame) || D)(B)), t.__H.__.forEach(function(r) {
84
- r.u && (r.__H = r.u), r.u = void 0;
85
- })), H = n = null;
86
- }, u.__c = function(_, t) {
87
- t.some(function(r) {
88
- try {
89
- r.__h.forEach(s), r.__h = r.__h.filter(function(o) {
90
- return !o.__ || p(o);
91
- });
92
- } catch (o) {
93
- t.some(function(a) {
94
- a.__h && (a.__h = []);
95
- }), t = [], u.__e(o, r.__v);
96
- }
97
- }), g && g(_, t);
98
- }, u.unmount = function(_) {
99
- k && k(_);
100
- var t, r = _.__c;
101
- r && r.__H && (r.__H.__.forEach(function(o) {
102
- try {
103
- s(o);
104
- } catch (a) {
105
- t = a;
106
- }
107
- }), r.__H = void 0, t && u.__e(t, r.__v));
108
- };
109
- var U = typeof requestAnimationFrame == "function";
110
- function D(_) {
111
- var t, r = function() {
112
- clearTimeout(o), U && cancelAnimationFrame(t), setTimeout(_);
113
- }, o = setTimeout(r, 35);
114
- U && (t = requestAnimationFrame(r));
115
- }
116
- function s(_) {
117
- var t = n, r = _.__c;
118
- typeof r == "function" && (_.__c = void 0, r()), n = t;
119
- }
120
- function p(_) {
121
- var t = n;
122
- _.__c = _.__(), n = t;
123
- }
124
- function W(_, t) {
125
- return !_ || _.length !== t.length || t.some(function(r, o) {
126
- return r !== _[o];
127
- });
128
- }
129
- function j(_, t) {
130
- return typeof t == "function" ? t(_) : t;
131
- }
132
- export {
133
- I as A,
134
- b as T,
135
- S as d,
136
- J as q,
137
- G as y
138
- };
@@ -1,311 +0,0 @@
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
- }