@stnd/modules 0.5.1

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 (65) hide show
  1. package/Backlinks.astro +56 -0
  2. package/CHANGELOG.md +60 -0
  3. package/Comments.astro +115 -0
  4. package/README.md +404 -0
  5. package/ReadingTime.astro +60 -0
  6. package/brand-manual/index.module.js +12 -0
  7. package/brand-manual/route.astro +341 -0
  8. package/confetti/Confetti.astro +42 -0
  9. package/confetti/index.module.js +22 -0
  10. package/content/index.module.js +19 -0
  11. package/content/route.astro +59 -0
  12. package/copy-buttons/index.module.js +9 -0
  13. package/deep-link/index.module.js +9 -0
  14. package/deep-link/init.js +14 -0
  15. package/eink/index.module.js +9 -0
  16. package/fonts/index.module.js +76 -0
  17. package/gestures/index.module.js +9 -0
  18. package/gestures/init.js +13 -0
  19. package/gsap/client.js +41 -0
  20. package/gsap/index.module.js +20 -0
  21. package/headers/index.module.js +16 -0
  22. package/headers/route.js +93 -0
  23. package/humans/index.module.js +17 -0
  24. package/humans/route.js +79 -0
  25. package/iconify/index.module.js +9 -0
  26. package/image-zoom/index.module.js +9 -0
  27. package/keyboard/index.module.js +9 -0
  28. package/lab/index.module.js +26 -0
  29. package/launcher/index.module.js +27 -0
  30. package/maintenance/index.module.js +18 -0
  31. package/maintenance/middleware.js +34 -0
  32. package/maintenance/routes/index.astro +45 -0
  33. package/manifest/index.module.js +16 -0
  34. package/manifest/route.js +57 -0
  35. package/math/client.js +98 -0
  36. package/math/index.module.js +19 -0
  37. package/math/styles.css +25 -0
  38. package/mermaid/client.js +125 -0
  39. package/mermaid/index.module.js +19 -0
  40. package/mermaid/styles.css +114 -0
  41. package/p5/client.js +25 -0
  42. package/p5/index.module.js +24 -0
  43. package/package.json +35 -0
  44. package/prism/README.md +13 -0
  45. package/prism/index.module.js +19 -0
  46. package/robots/index.module.js +16 -0
  47. package/robots/route.js +67 -0
  48. package/rss/index.module.js +18 -0
  49. package/rss/route.js +163 -0
  50. package/scroll-wrappers/index.module.js +9 -0
  51. package/security-txt/index.module.js +17 -0
  52. package/security-txt/route.js +90 -0
  53. package/sitemap/index.module.js +22 -0
  54. package/stripe/client.js +27 -0
  55. package/stripe/components/MockBuyButton.svelte +38 -0
  56. package/stripe/index.module.js +33 -0
  57. package/stripe/routes/mock-checkout.js +64 -0
  58. package/stripe/views/CheckoutView.svelte +181 -0
  59. package/styles/index.module.js +11 -0
  60. package/theme-utils/README.md +74 -0
  61. package/theme-utils/client.js +79 -0
  62. package/theme-utils/index.module.js +27 -0
  63. package/themes/index.module.js +50 -0
  64. package/toast/index.module.js +17 -0
  65. package/toast/toast.js +17 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Core Themes Module
3
+ * Loads individual theme folios so their fonts and styles are registered via the module system.
4
+ *
5
+ * Reason: loading the theme folios (instead of a single aggregated stylesheet)
6
+ * ensures each theme's `dependencies` (fonts) are processed and available when
7
+ * the theme is applied.
8
+ */
9
+ export default {
10
+ id: "stnd-themes",
11
+ name: "Stnd :: Themes",
12
+ description:
13
+ "Loads all shipped theme folios so each can register styles & font dependencies.",
14
+
15
+ // Declare module-level dependencies so the loader will import each theme folio.
16
+ // Each theme folio in packages/themes/<name>/ has its own `styles` and `dependencies`
17
+ // (e.g. font folios) and should be loaded via `dependencies` here.
18
+ dependencies: [
19
+ "@stnd/themes/forest",
20
+ "@stnd/themes/kernel",
21
+ "@stnd/themes/frank",
22
+ "@stnd/themes/book",
23
+ "@stnd/themes/venetian",
24
+ "@stnd/themes/academic",
25
+ "@stnd/themes/editorial",
26
+ "@stnd/themes/eink",
27
+ "@stnd/themes/gallery",
28
+ "@stnd/themes/humanist",
29
+ "@stnd/themes/international",
30
+ "@stnd/themes/technical",
31
+ "@stnd/themes/dev",
32
+ "@stnd/themes/mono",
33
+ "@stnd/themes/reveal",
34
+ // Experimental variants (now promoted into the main themes folder)
35
+ "@stnd/themes/blueprint",
36
+ "@stnd/themes/claude",
37
+ "@stnd/themes/chalky",
38
+ "@stnd/themes/occult",
39
+ "@stnd/themes/calm",
40
+ "@stnd/themes/dyslexia",
41
+ "@stnd/themes/contrast",
42
+ // Vault-originated themes (migrated from cssclasses)
43
+ "@stnd/themes/apex",
44
+ "@stnd/themes/avantgarde",
45
+ "@stnd/themes/manifeste",
46
+ "@stnd/themes/documentation",
47
+ // stnd.build's own identity — 1970s graphic-standards-manual (NASA/EPA)
48
+ "@stnd/themes/federal",
49
+ ],
50
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Toast Module Manifest
3
+ *
4
+ * Global notification system. Provides `window.toast(message, type)` on every page.
5
+ * Registered as a Gold Standard module — every @stnd site ships with this.
6
+ *
7
+ * Zone: stnd:base (static Astro SSR, no hydration needed)
8
+ */
9
+ export default {
10
+ id: "stnd-toast",
11
+ name: "Stnd :: Toast",
12
+ description: "Zero-dependency global notification system.",
13
+
14
+ hooks: {
15
+ "stnd:base": ["@stnd/ui/Toast.astro"],
16
+ },
17
+ };
package/toast/toast.js ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Standard Toast Logic
3
+ * Triggers custom 'toast' events that the Toast.astro component listens for.
4
+ */
5
+ export const toast = (message, type = "default", duration = 3000, action = null) => {
6
+ if (typeof window === "undefined") return;
7
+
8
+ const detail = { message, type, duration };
9
+ if (action) detail.action = action;
10
+
11
+ window.dispatchEvent(new CustomEvent("toast", { detail }));
12
+ };
13
+
14
+ // Also attach to window for non-module scripts
15
+ if (typeof window !== "undefined") {
16
+ window.toast = toast;
17
+ }