@orbitcommerce/constellation-docs 0.0.0-stage → 1.0.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 (62) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +6 -2
  3. package/dist/docs.css +8260 -0
  4. package/dist/index.d.ts +33 -0
  5. package/dist/index.js +308 -0
  6. package/dist/pages/Playground-CNbBbErC.js +129 -0
  7. package/dist/pages/_figures-data-BDmScEny.js +606 -0
  8. package/dist/pages/_foundations-blXWyYh8.js +30 -0
  9. package/dist/pages/_overlays-specimens-Dpn6oiyH.js +310 -0
  10. package/dist/pages/alert-BD4e6QTh.js +769 -0
  11. package/dist/pages/app-shell-KbA-nRqZ.js +1479 -0
  12. package/dist/pages/area-chart-B91dLcGo.js +562 -0
  13. package/dist/pages/avatar-DPPHXJAu.js +713 -0
  14. package/dist/pages/badge-C9JR0thI.js +729 -0
  15. package/dist/pages/button-D3V912P4.js +518 -0
  16. package/dist/pages/calendar-DSDZ9nRH.js +630 -0
  17. package/dist/pages/card-DUggbis3.js +659 -0
  18. package/dist/pages/checkbox-DwimQaK3.js +365 -0
  19. package/dist/pages/colour-BwuO8xAv.js +1498 -0
  20. package/dist/pages/command-palette-xAD7fOg6.js +1243 -0
  21. package/dist/pages/date-picker-BYSa816m.js +1421 -0
  22. package/dist/pages/delta-CtAo0eIM.js +574 -0
  23. package/dist/pages/dialog-BRAf4LMh.js +1451 -0
  24. package/dist/pages/docs-BNOb7AqR.js +515 -0
  25. package/dist/pages/empty-state-C-mLrXW2.js +417 -0
  26. package/dist/pages/figure-tabs-CoPFzzKz.js +460 -0
  27. package/dist/pages/home-dashboard-CFQwDtC9.js +959 -0
  28. package/dist/pages/host-B6znjEgQ.js +109 -0
  29. package/dist/pages/icon-button-C9eSVPPW.js +861 -0
  30. package/dist/pages/icons-sxkTs5Ob.js +473 -0
  31. package/dist/pages/input-KF9Gkawf.js +1093 -0
  32. package/dist/pages/installation-DpsX8G_n.js +445 -0
  33. package/dist/pages/kbd-cNfDoikz.js +544 -0
  34. package/dist/pages/live-globe-ClvLn9Lb.js +571 -0
  35. package/dist/pages/logo-BfGF1Pq9.js +571 -0
  36. package/dist/pages/menu-by2sgQ09.js +1618 -0
  37. package/dist/pages/motion-BvTGc2Dk.js +855 -0
  38. package/dist/pages/orbit-spinner-Dil1Z3Oy.js +332 -0
  39. package/dist/pages/overview-BPEbZQ6g.js +130 -0
  40. package/dist/pages/pagination-BBUnGvv5.js +249 -0
  41. package/dist/pages/popover-Db1gLDpb.js +1136 -0
  42. package/dist/pages/principles-CeAIOIdt.js +483 -0
  43. package/dist/pages/radio-group-CkdBWWfG.js +1077 -0
  44. package/dist/pages/registry-CroHzK9I.js +244 -0
  45. package/dist/pages/release-Dvo684UJ.js +13 -0
  46. package/dist/pages/rolling-number-qmvH84Mq.js +529 -0
  47. package/dist/pages/search-field-BN7MWGQ4.js +693 -0
  48. package/dist/pages/segmented-control-CTbIpRBW.js +777 -0
  49. package/dist/pages/select-DguELoRR.js +1429 -0
  50. package/dist/pages/separator-CPZub9pv.js +351 -0
  51. package/dist/pages/shape-DKvA0YKr.js +627 -0
  52. package/dist/pages/skeleton-DLuBhP46.js +561 -0
  53. package/dist/pages/sparkline-DMMYGbHn.js +668 -0
  54. package/dist/pages/switch-B-Qe4kcT.js +517 -0
  55. package/dist/pages/table-AMoODng4.js +607 -0
  56. package/dist/pages/tabs-B4M-usCV.js +1455 -0
  57. package/dist/pages/textarea-fTuUZRQb.js +693 -0
  58. package/dist/pages/toast-CKP03zjy.js +1176 -0
  59. package/dist/pages/tooltip-CBYil3kt.js +697 -0
  60. package/dist/pages/typography-PCbg8Bhg.js +735 -0
  61. package/manifest.json +3125 -0
  62. package/package.json +35 -4
@@ -0,0 +1,571 @@
1
+ "use client";
2
+ import { a as DocTable, d as Section, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-BNOb7AqR.js";
3
+ import { t as Playground } from "./Playground-CNbBbErC.js";
4
+ import { useState } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Button, LiveGlobe } from "@orbitcommerce/constellation";
7
+ import { MapPinIcon, PlusIcon } from "@orbitcommerce/constellation/icons";
8
+ //#region src/pages/components/live-globe.tsx
9
+ var UK = [
10
+ {
11
+ lat: 51.5074,
12
+ lng: -.1278,
13
+ live: true,
14
+ label: "London",
15
+ count: 3,
16
+ countryCode: "GB"
17
+ },
18
+ {
19
+ lat: 53.4808,
20
+ lng: -2.2426,
21
+ live: true,
22
+ label: "Manchester",
23
+ count: 1,
24
+ countryCode: "GB"
25
+ },
26
+ {
27
+ lat: 53.8008,
28
+ lng: -1.5491,
29
+ live: true,
30
+ label: "Leeds",
31
+ count: 1,
32
+ countryCode: "GB"
33
+ },
34
+ {
35
+ lat: 51.4545,
36
+ lng: -2.5879,
37
+ live: true,
38
+ label: "Bristol",
39
+ count: 1,
40
+ countryCode: "GB"
41
+ },
42
+ {
43
+ lat: 53.3498,
44
+ lng: -6.2603,
45
+ live: true,
46
+ label: "Dublin",
47
+ count: 1,
48
+ countryCode: "IE"
49
+ }
50
+ ];
51
+ var WORLD = [
52
+ ...UK,
53
+ {
54
+ lat: 40.7128,
55
+ lng: -74.006,
56
+ live: true,
57
+ label: "New York",
58
+ count: 2,
59
+ countryCode: "US"
60
+ },
61
+ {
62
+ lat: 48.8566,
63
+ lng: 2.3522,
64
+ live: true,
65
+ label: "Paris",
66
+ count: 1,
67
+ countryCode: "FR"
68
+ },
69
+ {
70
+ lat: -33.8688,
71
+ lng: 151.2093,
72
+ live: false,
73
+ label: "Sydney",
74
+ count: 1,
75
+ countryCode: "AU"
76
+ },
77
+ {
78
+ lat: 25.2048,
79
+ lng: 55.2708,
80
+ live: false,
81
+ label: "Dubai",
82
+ count: 1,
83
+ countryCode: "AE"
84
+ }
85
+ ];
86
+ var ONE_PLACE = [{
87
+ lat: 51.5074,
88
+ lng: -.1278,
89
+ live: true,
90
+ label: "London",
91
+ count: 4,
92
+ countryCode: "GB"
93
+ }];
94
+ var MARKER_SETS = {
95
+ uk: UK,
96
+ world: WORLD,
97
+ none: []
98
+ };
99
+ var ARRIVALS = [
100
+ {
101
+ lat: 55.8642,
102
+ lng: -4.2518,
103
+ live: true,
104
+ label: "Glasgow",
105
+ count: 1,
106
+ countryCode: "GB"
107
+ },
108
+ {
109
+ lat: 43.6532,
110
+ lng: -79.3832,
111
+ live: true,
112
+ label: "Toronto",
113
+ count: 1,
114
+ countryCode: "CA"
115
+ },
116
+ {
117
+ lat: 52.52,
118
+ lng: 13.405,
119
+ live: true,
120
+ label: "Berlin",
121
+ count: 1,
122
+ countryCode: "DE"
123
+ },
124
+ {
125
+ lat: 50.3755,
126
+ lng: -4.1427,
127
+ live: true,
128
+ label: "Plymouth",
129
+ count: 1,
130
+ countryCode: "GB"
131
+ }
132
+ ];
133
+ function Preview() {
134
+ return /* @__PURE__ */ jsx(LiveGlobe, {
135
+ size: 172,
136
+ markers: UK,
137
+ still: true
138
+ });
139
+ }
140
+ function Arrivals() {
141
+ const [markers, setMarkers] = useState(UK);
142
+ const [focus, setFocus] = useState(null);
143
+ const [n, setN] = useState(0);
144
+ const arrive = () => {
145
+ const next = ARRIVALS[n % ARRIVALS.length];
146
+ setMarkers((list) => [...list.filter((m) => m.label !== next.label), {
147
+ ...next,
148
+ arrivedAt: performance.now()
149
+ }]);
150
+ setFocus({
151
+ lat: next.lat,
152
+ lng: next.lng,
153
+ key: `arrival-${n}`
154
+ });
155
+ setN((v) => v + 1);
156
+ };
157
+ return /* @__PURE__ */ jsxs("div", {
158
+ className: "live-globe-demo",
159
+ children: [/* @__PURE__ */ jsx(LiveGlobe, {
160
+ size: 360,
161
+ markers,
162
+ focus,
163
+ zoomable: true,
164
+ zoomOutHint: "Click anywhere to zoom out",
165
+ title: "Live visitors"
166
+ }), /* @__PURE__ */ jsxs("div", {
167
+ className: "live-globe-demo__side",
168
+ children: [/* @__PURE__ */ jsx(Button, {
169
+ icon: /* @__PURE__ */ jsx(PlusIcon, {}),
170
+ onClick: arrive,
171
+ children: "Someone arrives"
172
+ }), /* @__PURE__ */ jsx("p", {
173
+ className: "live-globe-demo__note",
174
+ children: "The globe swings round to the new visitor, and their pin flashes one wide ring on top of its steady ping."
175
+ })]
176
+ })]
177
+ });
178
+ }
179
+ var PLAYGROUND = [
180
+ {
181
+ prop: "markers",
182
+ type: "select",
183
+ options: [
184
+ "uk",
185
+ "world",
186
+ "none"
187
+ ],
188
+ default: "uk",
189
+ toAttr: () => "markers={visitors}"
190
+ },
191
+ {
192
+ prop: "size",
193
+ type: "select",
194
+ options: [
195
+ "280",
196
+ "360",
197
+ "440"
198
+ ],
199
+ default: "360",
200
+ toAttr: (v) => `size={${v}}`
201
+ },
202
+ {
203
+ prop: "zoomable",
204
+ type: "boolean",
205
+ default: true,
206
+ toAttr: (v) => v ? "zoomable" : null
207
+ },
208
+ {
209
+ prop: "still",
210
+ type: "boolean",
211
+ default: false
212
+ }
213
+ ];
214
+ function Page() {
215
+ return /* @__PURE__ */ jsxs(DocPage, {
216
+ title: "Live globe",
217
+ status: "new",
218
+ importNames: ["LiveGlobe"],
219
+ lead: "The world as a dot grid in Orbit's hand-drawn style, with a teal pin wherever someone is browsing the shop right now. The live instrument at the top of the home page in Orbit Commerce's store dashboard.",
220
+ children: [
221
+ /* @__PURE__ */ jsx(Section, {
222
+ id: "playground",
223
+ title: "Playground",
224
+ description: /* @__PURE__ */ jsx("p", { children: "Drag to turn it. With zoom on, click a pin to fly in to that country and anywhere else to fly out." }),
225
+ children: /* @__PURE__ */ jsx(Playground, {
226
+ component: "LiveGlobe",
227
+ controls: PLAYGROUND,
228
+ minHeight: 480,
229
+ extraCode: (v) => v.zoomable ? ["zoomOutHint=\"Click anywhere to zoom out\"", "title=\"Live visitors\""] : [],
230
+ render: (v) => /* @__PURE__ */ jsx(LiveGlobe, {
231
+ size: Number(v.size),
232
+ markers: MARKER_SETS[String(v.markers)],
233
+ zoomable: Boolean(v.zoomable),
234
+ still: Boolean(v.still),
235
+ zoomOutHint: "Click anywhere to zoom out",
236
+ title: "Live visitors"
237
+ }, `${v.size}-${v.still}`)
238
+ })
239
+ }),
240
+ /* @__PURE__ */ jsxs(Section, {
241
+ id: "markers",
242
+ title: "Markers",
243
+ description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", { children: "A visitor does not get a pin of their own: the land dot nearest to them lights up, so pins sit on the map's own grid. Live visitors ping; recent ones sit faint. A chip names the place nearest the front, with a count when more than one person is there." }), /* @__PURE__ */ jsxs("p", { children: [
244
+ "Pass one marker per place, not per session: group sessions within about 11km (a city) and set",
245
+ " ",
246
+ /* @__PURE__ */ jsx("code", { children: "count" }),
247
+ ". With ",
248
+ /* @__PURE__ */ jsx("code", { children: "countryCode" }),
249
+ ", pins close together roll up into one per country when the globe is zoomed out."
250
+ ] })] }),
251
+ children: [/* @__PURE__ */ jsx(DocTable, {
252
+ columns: [
253
+ "Field",
254
+ "Type",
255
+ "What it does"
256
+ ],
257
+ rows: [
258
+ [
259
+ /* @__PURE__ */ jsx("code", { children: "lat" }),
260
+ /* @__PURE__ */ jsx("code", { children: "number" }),
261
+ "Latitude. 0,0 is not a real place: leave unknown locations out."
262
+ ],
263
+ [
264
+ /* @__PURE__ */ jsx("code", { children: "lng" }),
265
+ /* @__PURE__ */ jsx("code", { children: "number" }),
266
+ "Longitude."
267
+ ],
268
+ [
269
+ /* @__PURE__ */ jsx("code", { children: "live" }),
270
+ /* @__PURE__ */ jsx("code", { children: "boolean" }),
271
+ "Browsing right now: the pin pings. Without it the pin sits faint."
272
+ ],
273
+ [
274
+ /* @__PURE__ */ jsx("code", { children: "label" }),
275
+ /* @__PURE__ */ jsx("code", { children: "string" }),
276
+ "The city, or the country when the city is unknown. Shown in the chip."
277
+ ],
278
+ [
279
+ /* @__PURE__ */ jsx("code", { children: "count" }),
280
+ /* @__PURE__ */ jsx("code", { children: "number" }),
281
+ "Sessions at this place. Shown in the chip as \"London · 3\"."
282
+ ],
283
+ [
284
+ /* @__PURE__ */ jsx("code", { children: "countryCode" }),
285
+ /* @__PURE__ */ jsx("code", { children: "string" }),
286
+ "ISO 3166-1 alpha-2, e.g. \"GB\". Lets nearby pins roll up per country."
287
+ ],
288
+ [
289
+ /* @__PURE__ */ jsx("code", { children: "arrivedAt" }),
290
+ /* @__PURE__ */ jsx("code", { children: "number" }),
291
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
292
+ "The ",
293
+ /* @__PURE__ */ jsx("code", { children: "performance.now()" }),
294
+ " of the newest arrival here. Drives one wide flash."
295
+ ] })
296
+ ]
297
+ ]
298
+ }), /* @__PURE__ */ jsx(Example, {
299
+ minHeight: 420,
300
+ code: `
301
+ const visitors: GlobeMarker[] = [
302
+ { lat: 51.5074, lng: -0.1278, live: true, label: 'London', count: 3, countryCode: 'GB' },
303
+ { lat: 53.4808, lng: -2.2426, live: true, label: 'Manchester', count: 1, countryCode: 'GB' },
304
+ { lat: -33.8688, lng: 151.2093, label: 'Sydney', countryCode: 'AU' },
305
+ ]
306
+
307
+ <LiveGlobe size={360} markers={visitors} />`,
308
+ children: /* @__PURE__ */ jsx(LiveGlobe, {
309
+ size: 360,
310
+ markers: WORLD
311
+ })
312
+ })]
313
+ }),
314
+ /* @__PURE__ */ jsx(Section, {
315
+ id: "arrivals",
316
+ title: "Arrivals",
317
+ description: /* @__PURE__ */ jsxs("p", { children: [
318
+ "When someone new lands, give their marker an ",
319
+ /* @__PURE__ */ jsx("code", { children: "arrivedAt" }),
320
+ " and change ",
321
+ /* @__PURE__ */ jsx("code", { children: "focus" }),
322
+ " to their place with a new ",
323
+ /* @__PURE__ */ jsx("code", { children: "key" }),
324
+ ": the globe eases round to face them and their pin flashes."
325
+ ] }),
326
+ children: /* @__PURE__ */ jsx(Example, {
327
+ align: "fill",
328
+ code: `
329
+ const [focus, setFocus] = useState(null)
330
+
331
+ // When a session arrives:
332
+ setMarkers((list) => [...list, { ...place, live: true, arrivedAt: performance.now() }])
333
+ setFocus({ lat: place.lat, lng: place.lng, key: session.id })
334
+
335
+ <LiveGlobe size={360} markers={markers} focus={focus} zoomable zoomOutHint="Click anywhere to zoom out" />`,
336
+ children: /* @__PURE__ */ jsx(Arrivals, {})
337
+ })
338
+ }),
339
+ /* @__PURE__ */ jsxs(Section, {
340
+ id: "holding",
341
+ title: "Holding still",
342
+ description: /* @__PURE__ */ jsxs("p", { children: [
343
+ "When everyone is in one place, pass it as ",
344
+ /* @__PURE__ */ jsx("code", { children: "holdAt" }),
345
+ ": the globe eases there and stops spinning, so the view stays where the action is. A drag still works and is respected afterwards."
346
+ ] }),
347
+ children: [/* @__PURE__ */ jsx(Example, {
348
+ minHeight: 420,
349
+ code: `<LiveGlobe size={360} markers={visitors} holdAt={{ lat: 51.5074, lng: -0.1278 }} />`,
350
+ children: /* @__PURE__ */ jsx(LiveGlobe, {
351
+ size: 360,
352
+ markers: ONE_PLACE,
353
+ holdAt: {
354
+ lat: 51.5074,
355
+ lng: -.1278
356
+ }
357
+ })
358
+ }), /* @__PURE__ */ jsx(SubSection, {
359
+ title: "still",
360
+ description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "still" }), " draws the globe once and holds it: no spin and no pulsing pins. For thumbnails, print and anywhere motion would only distract. It still turns on drag."] })
361
+ })]
362
+ }),
363
+ /* @__PURE__ */ jsx(Section, {
364
+ id: "both-themes",
365
+ title: "In both themes",
366
+ description: /* @__PURE__ */ jsx("p", { children: "Land dots in ink, pins in the accent: teal in light, mint in dark. Chips sit on the canvas colour." }),
367
+ children: /* @__PURE__ */ jsx(ThemePair, {
368
+ minHeight: 360,
369
+ children: /* @__PURE__ */ jsx(LiveGlobe, {
370
+ size: 300,
371
+ markers: UK
372
+ })
373
+ })
374
+ }),
375
+ /* @__PURE__ */ jsx(Section, {
376
+ id: "sizing",
377
+ title: "Sizing",
378
+ description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "size" }), " is the canvas; the sphere is 0.76 of it, leaving room for chips and the zoom hint. So a 520px canvas draws a world about 400px across. The canvas is drawn at a fixed pixel size, so when its column changes width, measure it and pass a new size (in steps, as the store dashboard's home page does in 20px steps) rather than scaling it with CSS."] }), /* @__PURE__ */ jsxs("p", { children: [
379
+ /* @__PURE__ */ jsx("code", { children: "width" }),
380
+ " makes the canvas wider than tall, which gives a zoomed-in map room to breathe.",
381
+ " ",
382
+ /* @__PURE__ */ jsx("code", { children: "safeInset" }),
383
+ " keeps chips clear of a top and bottom band a parent may clip."
384
+ ] })] }),
385
+ children: /* @__PURE__ */ jsx(DocTable, {
386
+ columns: [
387
+ "Canvas",
388
+ "World",
389
+ "Use"
390
+ ],
391
+ rows: [
392
+ [
393
+ "520px",
394
+ "about 400px",
395
+ "The home hero on a desktop."
396
+ ],
397
+ [
398
+ "400px",
399
+ "about 300px",
400
+ "Laptops and tablets beside the takings."
401
+ ],
402
+ [
403
+ "300px",
404
+ "about 230px",
405
+ "Phones, leading the page."
406
+ ],
407
+ [
408
+ "120 to 180px",
409
+ "about 90 to 140px",
410
+ "Thumbnails, with still."
411
+ ]
412
+ ]
413
+ })
414
+ }),
415
+ /* @__PURE__ */ jsx(Section, {
416
+ id: "theming",
417
+ title: "Theming",
418
+ description: /* @__PURE__ */ jsxs("p", { children: [
419
+ "The canvas reads four custom properties at draw time. They map to tokens, so the globe follows light, dark and any ",
420
+ /* @__PURE__ */ jsx("code", { children: "ThemeScope" }),
421
+ " around it. Set them on a parent to restyle one globe."
422
+ ] }),
423
+ children: /* @__PURE__ */ jsx(DocTable, {
424
+ columns: [
425
+ "Property",
426
+ "Default",
427
+ "Paints"
428
+ ],
429
+ rows: [
430
+ [
431
+ /* @__PURE__ */ jsx("code", { children: "--o-globe-ink" }),
432
+ /* @__PURE__ */ jsx("code", { children: "--o-fg-1" }),
433
+ "The land dots (at 8 to 70% strength by depth), chip borders and chip text."
434
+ ],
435
+ [
436
+ /* @__PURE__ */ jsx("code", { children: "--o-globe-accent" }),
437
+ /* @__PURE__ */ jsx("code", { children: "--o-accent" }),
438
+ "Pins, pings, the arrival flash and journey arcs."
439
+ ],
440
+ [
441
+ /* @__PURE__ */ jsx("code", { children: "--o-globe-halo" }),
442
+ /* @__PURE__ */ jsx("code", { children: "--o-bg-canvas" }),
443
+ "The disc behind each pin and the chip fill. Match it to the surface."
444
+ ],
445
+ [
446
+ /* @__PURE__ */ jsx("code", { children: "--o-globe-font" }),
447
+ /* @__PURE__ */ jsx("code", { children: "--o-font-sans" }),
448
+ "Chip and hint lettering."
449
+ ]
450
+ ]
451
+ })
452
+ }),
453
+ /* @__PURE__ */ jsxs(Section, {
454
+ id: "guidelines",
455
+ title: "Guidelines",
456
+ children: [/* @__PURE__ */ jsx(DoDont, {
457
+ do: {
458
+ children: /* @__PURE__ */ jsxs("span", {
459
+ className: "live-globe-dodont",
460
+ children: [/* @__PURE__ */ jsx(MapPinIcon, { weight: "duotone" }), " 7 people browsing now"]
461
+ }),
462
+ caption: "Write the number down as well. The globe shows where; words say how many."
463
+ },
464
+ dont: {
465
+ children: /* @__PURE__ */ jsx("span", {
466
+ className: "live-globe-dodont",
467
+ "data-quiet": "",
468
+ children: "Nothing but the picture"
469
+ }),
470
+ caption: "A globe alone leaves people counting pins, and screen readers get nothing."
471
+ }
472
+ }), /* @__PURE__ */ jsx(Guidelines, { items: [
473
+ "Show real sessions only. A dashboard that invents visitors is lying to the merchant; sample data for review must be labelled as such.",
474
+ "One globe per page, as the hero. Several spinning globes compete and cost battery.",
475
+ "Pins are teal because they are live. Do not colour them by status, device or anything else.",
476
+ "Leave it room. It needs its full square; crop it only through safeInset, never by clipping the sphere."
477
+ ] })]
478
+ }),
479
+ /* @__PURE__ */ jsxs(Section, {
480
+ id: "accessibility",
481
+ title: "Accessibility",
482
+ children: [/* @__PURE__ */ jsx(Guidelines, { items: [
483
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
484
+ "It is a canvas. Without ",
485
+ /* @__PURE__ */ jsx("code", { children: "zoomable" }),
486
+ " or ",
487
+ /* @__PURE__ */ jsx("code", { children: "onClick" }),
488
+ " it is hidden from assistive tech as a picture; with either it becomes a button named by ",
489
+ /* @__PURE__ */ jsx("code", { children: "title" }),
490
+ "."
491
+ ] }),
492
+ "Pins and chips are drawn, so everything they say must also be written on the page: the browsing count, and a Live View page for the detail.",
493
+ "A sideways drag turns it; an up or down swipe still scrolls the page on a phone.",
494
+ "With reduced motion it holds still and the pins stop pulsing; it still turns on drag.",
495
+ "It pauses when scrolled off screen and rests when nothing is moving, so an idle tab costs nothing."
496
+ ] }), /* @__PURE__ */ jsx(Note, {
497
+ title: "Data",
498
+ children: "The coarse land grid ships with the component (about 24KB). The finer grid and the country outlines for deep zoom load only the first time someone zooms in."
499
+ })]
500
+ }),
501
+ /* @__PURE__ */ jsx(Section, {
502
+ id: "props",
503
+ title: "Props",
504
+ children: /* @__PURE__ */ jsx(PropsTable, { rows: [
505
+ {
506
+ name: "markers",
507
+ type: "GlobeMarker[]",
508
+ default: "[]",
509
+ description: "One per place. See Markers above."
510
+ },
511
+ {
512
+ name: "size",
513
+ type: "number",
514
+ default: "200",
515
+ description: "Canvas height in px (and width, unless width is set). The sphere is 0.76 of it."
516
+ },
517
+ {
518
+ name: "width",
519
+ type: "number",
520
+ description: "Canvas width, for a wider-than-tall map. Defaults to size."
521
+ },
522
+ {
523
+ name: "focus",
524
+ type: "{ lat, lng, key } | null",
525
+ description: "Change the key to ease the globe round to that place."
526
+ },
527
+ {
528
+ name: "holdAt",
529
+ type: "{ lat, lng } | null",
530
+ description: "Park on this place and stop spinning."
531
+ },
532
+ {
533
+ name: "zoomable",
534
+ type: "boolean",
535
+ default: "false",
536
+ description: "Click a pin to zoom in on it; click elsewhere to zoom out."
537
+ },
538
+ {
539
+ name: "zoomOutHint",
540
+ type: "string",
541
+ description: "Shown while zoomed in, e.g. \"Click anywhere to zoom out\"."
542
+ },
543
+ {
544
+ name: "onClick",
545
+ type: "() => void",
546
+ description: "A tap (not a drag) with nothing zoomed, e.g. to open Live View."
547
+ },
548
+ {
549
+ name: "title",
550
+ type: "string",
551
+ description: "Tooltip and accessible name while interactive."
552
+ },
553
+ {
554
+ name: "safeInset",
555
+ type: "number",
556
+ default: "0",
557
+ description: "A top and bottom band the parent may clip; chips stay clear of it."
558
+ },
559
+ {
560
+ name: "still",
561
+ type: "boolean",
562
+ default: "false",
563
+ description: "Draw once and hold still. For thumbnails and print."
564
+ }
565
+ ] })
566
+ })
567
+ ]
568
+ });
569
+ }
570
+ //#endregion
571
+ export { Page, Preview };