dsh-ccx 0.8.9 → 0.9.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 (49) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +23 -23
  3. package/README.md +151 -143
  4. package/assets/icon.svg +27 -27
  5. package/cordis.patch.yml +16 -16
  6. package/lib/client.js +1481 -2244
  7. package/lib/index.js +716 -449
  8. package/lib/vendor/code-codex/ascii-tiles.js +145 -0
  9. package/lib/vendor/code-codex/aurora-ionosphere.js +7 -6
  10. package/lib/vendor/code-codex/black-hole.js +10 -7
  11. package/lib/vendor/code-codex/blinking-squares.js +6 -13
  12. package/lib/vendor/code-codex/cloud-train.js +9 -8
  13. package/lib/vendor/code-codex/galleries.json +100 -100
  14. package/lib/vendor/code-codex/glow-horizon.js +1 -1
  15. package/lib/vendor/code-codex/heavenly-cloud.js +5 -4
  16. package/lib/vendor/code-codex/milky-way.js +3 -2
  17. package/lib/vendor/code-codex/mountain.js +5 -4
  18. package/lib/vendor/code-codex/particle-image.js +435 -14
  19. package/lib/vendor/code-codex/pixel-sculpt.js +85 -5
  20. package/lib/vendor/code-codex/scene-defaults.json +94 -1
  21. package/lib/vendor/code-codex/scene-schemas.json +1008 -0
  22. package/lib/vendor/code-codex/shallow-ocean-thumbnails.json +12 -0
  23. package/lib/vendor/code-codex/shallow-ocean.js +5094 -0
  24. package/lib/vendor/code-codex/spectral-drape.js +172 -0
  25. package/package.json +70 -59
  26. package/src/client/api.ts +90 -0
  27. package/src/client/background/layer.ts +187 -0
  28. package/src/client/background/pixel-sculpt.ts +167 -0
  29. package/src/client/background/scene-runner.ts +317 -0
  30. package/src/client/background/shallow-ocean.ts +344 -0
  31. package/src/client/background/vendor-loader.ts +297 -0
  32. package/src/client/background/wallpaper.ts +87 -0
  33. package/src/client/index.ts +247 -0
  34. package/src/client/surfaces/corner-patch.ts +100 -0
  35. package/src/client/surfaces/surface-css.ts +155 -0
  36. package/src/client/ui/draft.ts +105 -0
  37. package/src/client/ui/icons.ts +47 -0
  38. package/src/client/ui/panel.ts +1524 -0
  39. package/src/client/ui/shallow-ocean-panel.ts +376 -0
  40. package/src/client/ui/styles.ts +1471 -0
  41. package/src/host/fence.ts +78 -0
  42. package/src/host/index.ts +26 -0
  43. package/src/host/routes.ts +367 -0
  44. package/src/host/storage.ts +109 -0
  45. package/src/host/window-chrome.ts +53 -0
  46. package/src/shared/constants.ts +239 -0
  47. package/src/shared/sanitize.ts +110 -0
  48. package/src/shared/types.ts +145 -0
  49. package/tsconfig.json +16 -0
@@ -0,0 +1,47 @@
1
+ const GLYPHS: Record<string, string> = {
2
+ custom:
3
+ '<rect x="2" y="2.5" width="12" height="11" rx="2"/><circle cx="5.5" cy="6" r="1"/><path d="m3 12 3.5-3.5 2 2L11 8l2 2.5"/>',
4
+ surface:
5
+ '<rect x="2" y="2" width="8" height="8" rx="1.5"/><rect x="6" y="6" width="8" height="8" rx="1.5"/><path d="m7 9 2-2m-2 5 5-5m-2 6 3-3"/>',
6
+ 'milky-way':
7
+ '<path d="M2 12C3 5 9 1 13 3c4 3-4 10-8 9-3-1 0-5 4-6 3-1 2 2 0 3M3 2v2M2 3h2M12 12v2M11 13h2"/>',
8
+ 'glow-horizon':
9
+ '<path d="M2 10h12M3 13h10M5 10a3 3 0 0 1 6 0M8 2v2M3 4l1.5 1.5M13 4l-1.5 1.5M1.5 7h2M12.5 7h2"/>',
10
+ mountain:
11
+ '<path d="m1.5 13 5-10 5 10zm6-6 3-3 4 9h-3M4.5 7l2 1.5L8 7M2 14.5h12"/>',
12
+ 'heavenly-cloud':
13
+ '<path d="M4 12a3 3 0 1 1 .5-6 4 4 0 0 1 7.7 1A2.5 2.5 0 0 1 12 12zM5 14h6"/>',
14
+ 'aurora-ionosphere':
15
+ '<path d="M2 12c2-14 3 2 5-8s3 14 5 1l2-3M2 14c2-9 3 1 5-4s3 7 5 0l2-4"/>',
16
+ 'black-hole':
17
+ '<circle cx="8" cy="8" r="2.5"/><ellipse cx="8" cy="8" rx="6.5" ry="3" transform="rotate(-25 8 8)"/><path d="M5 3a6 6 0 0 1 8 4M3 9a6 6 0 0 0 8 4"/>',
18
+ 'cloud-train':
19
+ '<rect x="5" y="6" width="8" height="6" rx="1.5"/><path d="M7 6V4H4a1.5 1.5 0 1 1 1-2M6 9h6M9 6v3M3 14h11"/><circle cx="7" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/>',
20
+ 'particle-image':
21
+ '<circle cx="3" cy="3" r=".65"/><circle cx="7" cy="2.5" r=".65"/><circle cx="2.5" cy="7" r=".65"/><circle cx="6.5" cy="6" r=".65"/><path d="M10 3h3v10H3v-3m1.5 1 3-3 2 2 2-3 1.5 2"/>',
22
+ 'pixel-sculpt':
23
+ '<path d="M2 14V8h3V5h3V2h3v4h3v8zM2 11h12M5 8v6M8 5v9M11 6v8"/>',
24
+ 'blinking-squares':
25
+ '<rect x="2" y="2" width="4" height="4" rx=".5"/><rect x="9" y="3" width="3" height="3" rx=".5"/><rect x="3" y="10" width="3" height="3" rx=".5"/><rect x="9" y="9" width="5" height="5" rx=".5"/>',
26
+ 'ascii-tiles':
27
+ '<path d="m3 2 5 1-1 5-5-1zM9 3l5 1-1 5-5-1zM2 9l5 1-1 4-5-1zM8 10l5 1-1 3-5-1zM4.5 4l-1 2M4 5.5h1.5"/>',
28
+ 'shallow-ocean':
29
+ '<path d="M1.5 5.5c2-3 4 3 6 0s4 3 6 0M1.5 10.5c2-3 4 3 6 0s4 3 6 0M8 2v1M12 12.5v1.5"/>',
30
+ 'spectral-drape':
31
+ '<circle cx="2" cy="4" r=".55"/><circle cx="2" cy="7" r=".55"/><circle cx="2" cy="10" r=".55"/><circle cx="2" cy="13" r=".55"/><circle cx="5" cy="2" r=".55"/><circle cx="5" cy="5" r=".55"/><circle cx="5" cy="8" r=".55"/><circle cx="5" cy="11" r=".55"/><circle cx="8" cy="3" r=".55"/><circle cx="8" cy="6" r=".55"/><circle cx="8" cy="9" r=".55"/><circle cx="8" cy="12" r=".55"/><circle cx="11" cy="5" r=".55"/><circle cx="11" cy="8" r=".55"/><circle cx="11" cy="11" r=".55"/><circle cx="11" cy="14" r=".55"/><circle cx="14" cy="3" r=".55"/><circle cx="14" cy="6" r=".55"/><circle cx="14" cy="9" r=".55"/><circle cx="14" cy="12" r=".55"/>',
32
+ };
33
+
34
+ export function cardIconMarkup(id: string): string {
35
+ const path = GLYPHS[id] ?? GLYPHS.custom;
36
+ return `<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">${path}</svg>`;
37
+ }
38
+
39
+ export const GEAR_SVG =
40
+ '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="3.2"/>' +
41
+ '<path d="M19.4 15a1.7 1.7 0 0 0 .34 1.87l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.7 1.7 0 0 0-1.87-.34 1.7 1.7 0 0 0-1 1.55V21a2 2 0 1 1-4 0v-.09a1.7 1.7 0 0 0-1-1.55 1.7 1.7 0 0 0-1.87.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.7 1.7 0 0 0 .34-1.87 1.7 1.7 0 0 0-1.55-1H3a2 2 0 1 1 0-4h.09a1.7 1.7 0 0 0 1.55-1 1.7 1.7 0 0 0-.34-1.87l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.7 1.7 0 0 0 1.87.34h.01a1.7 1.7 0 0 0 1-1.55V3a2 2 0 1 1 4 0v.09a1.7 1.7 0 0 0 1 1.55 1.7 1.7 0 0 0 1.87-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.7 1.7 0 0 0-.34 1.87v.01a1.7 1.7 0 0 0 1.55 1H21a2 2 0 1 1 0 4h-.09a1.7 1.7 0 0 0-1.55 1z"/></svg>';
42
+
43
+ export const CLOSE_SVG =
44
+ '<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="m3.25 3.25 9.5 9.5M12.75 3.25l-9.5 9.5"/></svg>';
45
+
46
+ export const SLIDERS_SVG =
47
+ '<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M2 4h3M9 4h5M2 8h7M13 8h1M2 12h1M7 12h7"/><circle cx="7" cy="4" r="2"/><circle cx="11" cy="8" r="2"/><circle cx="5" cy="12" r="2"/></svg>';