@publier/shell 2.1.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 (141) hide show
  1. package/README.md +1 -0
  2. package/dist/build-integration.d.mts +7 -0
  3. package/dist/build-integration.mjs +1 -0
  4. package/dist/index-DWtFsw7E.d.mts +1033 -0
  5. package/dist/index.d.mts +33 -0
  6. package/dist/index.mjs +1 -0
  7. package/dist/integration-BIJIcnAT.mjs +99 -0
  8. package/dist/integration-CKjtSkwa.d.mts +183 -0
  9. package/dist/integration.d.mts +2 -0
  10. package/dist/integration.mjs +1 -0
  11. package/dist/loaders/index.d.mts +54 -0
  12. package/dist/loaders/index.mjs +1 -0
  13. package/dist/plugins/remark-asides.d.mts +8 -0
  14. package/dist/plugins/remark-asides.mjs +2 -0
  15. package/dist/plugins/remark-snippets.d.mts +11 -0
  16. package/dist/plugins/remark-snippets.mjs +1 -0
  17. package/dist/plugins/remark-structure.d.mts +13 -0
  18. package/dist/plugins/remark-structure.mjs +1 -0
  19. package/dist/plugins/remark-vars.d.mts +7 -0
  20. package/dist/plugins/remark-vars.mjs +1 -0
  21. package/dist/presets-C7z73xlB.d.mts +16 -0
  22. package/dist/presets-DL0qjtya.mjs +1 -0
  23. package/dist/runtime/code-group-sync.d.mts +30 -0
  24. package/dist/runtime/code-group-sync.mjs +103 -0
  25. package/dist/runtime/lazy-upgrade-registry.d.mts +29 -0
  26. package/dist/runtime/lazy-upgrade-registry.mjs +1 -0
  27. package/dist/runtime/tabs-sync.d.mts +25 -0
  28. package/dist/runtime/tabs-sync.mjs +106 -0
  29. package/dist/search/index.d.mts +92 -0
  30. package/dist/search/index.mjs +1 -0
  31. package/dist/tailwind/css-plugin.d.mts +16 -0
  32. package/dist/tailwind/css-plugin.mjs +1 -0
  33. package/dist/tailwind/index.d.mts +6 -0
  34. package/dist/tailwind/index.mjs +1 -0
  35. package/dist/tailwind/loader.d.mts +94 -0
  36. package/dist/tailwind/loader.mjs +2 -0
  37. package/dist/theme-toggle-element-DzFjxwpS.mjs +1 -0
  38. package/dist/themes/almond.css +115 -0
  39. package/dist/themes/aspen.css +95 -0
  40. package/dist/themes/catppuccin.css +98 -0
  41. package/dist/themes/dark.css +98 -0
  42. package/dist/themes/dusk.css +98 -0
  43. package/dist/themes/emerald.css +95 -0
  44. package/dist/themes/light.css +95 -0
  45. package/dist/themes/maple.css +119 -0
  46. package/dist/themes/neutral.css +73 -0
  47. package/dist/themes/ocean.css +98 -0
  48. package/dist/themes/purple.css +95 -0
  49. package/dist/themes/ruby.css +95 -0
  50. package/dist/themes/solar.css +98 -0
  51. package/dist/themes/vitepress.css +95 -0
  52. package/package.json +189 -0
  53. package/publier-gate +0 -0
  54. package/src/astro-modules.d.ts +20 -0
  55. package/src/components/LastModified.astro +25 -0
  56. package/src/components/announcement-banner.astro +25 -0
  57. package/src/components/aside.astro +17 -0
  58. package/src/components/ask-ai.tsx +146 -0
  59. package/src/components/badge.astro +18 -0
  60. package/src/components/breadcrumbs.astro +23 -0
  61. package/src/components/callouts/caution.astro +13 -0
  62. package/src/components/callouts/check.astro +13 -0
  63. package/src/components/callouts/danger.astro +13 -0
  64. package/src/components/callouts/info.astro +13 -0
  65. package/src/components/callouts/note.astro +13 -0
  66. package/src/components/callouts/tip.astro +13 -0
  67. package/src/components/callouts/warning.astro +13 -0
  68. package/src/components/card-grid.astro +14 -0
  69. package/src/components/card.astro +18 -0
  70. package/src/components/code-group.astro +55 -0
  71. package/src/components/columns.astro +18 -0
  72. package/src/components/docs-layout.astro +25 -0
  73. package/src/components/file-tree-node.astro +13 -0
  74. package/src/components/file-tree.astro +9 -0
  75. package/src/components/icon.astro +18 -0
  76. package/src/components/index.ts +155 -0
  77. package/src/components/link-button.astro +21 -0
  78. package/src/components/link-card.astro +21 -0
  79. package/src/components/open-in-ai.astro +13 -0
  80. package/src/components/package-install.astro +17 -0
  81. package/src/components/panels.astro +16 -0
  82. package/src/components/search-button.astro +21 -0
  83. package/src/components/sidebar.astro +12 -0
  84. package/src/components/skip-link.astro +12 -0
  85. package/src/components/steps.astro +13 -0
  86. package/src/components/table-of-contents.astro +22 -0
  87. package/src/components/tabs.astro +17 -0
  88. package/src/components/theme-storage.ts +5 -0
  89. package/src/components/theme-toggle-element.ts +85 -0
  90. package/src/components/theme-toggle.astro +25 -0
  91. package/src/components/tile-grid.astro +13 -0
  92. package/src/components/tile.astro +17 -0
  93. package/src/components/top-nav-mobile.astro +11 -0
  94. package/src/components/top-nav.astro +20 -0
  95. package/src/components/types.ts +510 -0
  96. package/src/components/ui/blur-image.astro +60 -0
  97. package/src/components/ui/changelog-entry.astro +56 -0
  98. package/src/components/ui/cta-band.astro +30 -0
  99. package/src/components/ui/feature-grid.astro +38 -0
  100. package/src/components/ui/feature-section.astro +85 -0
  101. package/src/components/ui/frame.astro +52 -0
  102. package/src/components/ui/hero.astro +47 -0
  103. package/src/components/ui/jobs-list.astro +53 -0
  104. package/src/components/ui/logo-cloud.astro +68 -0
  105. package/src/components/ui/press-gallery.astro +52 -0
  106. package/src/components/ui/pricing-comparison-table.astro +73 -0
  107. package/src/components/ui/pricing-section.astro +113 -0
  108. package/src/components/ui/pricing-table.astro +54 -0
  109. package/src/components/ui/status-indicator.astro +38 -0
  110. package/src/components/ui/team-grid.astro +63 -0
  111. package/src/components/ui/testimonial-card.astro +42 -0
  112. package/src/components/ui/types.ts +323 -0
  113. package/src/components/update-badge.astro +15 -0
  114. package/src/components/version-switcher.astro +20 -0
  115. package/src/icons/index.tsx +246 -0
  116. package/src/icons/resolve.tsx +45 -0
  117. package/src/layouts/base-layout.astro +63 -0
  118. package/src/qwik.ts +3 -0
  119. package/src/routes/blog-index.astro +20 -0
  120. package/src/routes/blog-rss.xml.ts +40 -0
  121. package/src/routes/blog-slug.astro +32 -0
  122. package/src/routes/changelog-index.astro +25 -0
  123. package/src/routes/changelog-rss.xml.ts +47 -0
  124. package/src/routes/docs-slug.astro +31 -0
  125. package/src/routes/not-found.astro +14 -0
  126. package/src/runtime/banner-init.ts +9 -0
  127. package/src/runtime/lazy-upgrade-init.ts +5 -0
  128. package/src/runtime/sidebar-scroll-init.ts +3 -0
  129. package/src/runtime/theme-init.ts +16 -0
  130. package/src/schemas/blog.ts +37 -0
  131. package/src/schemas/changelog.ts +28 -0
  132. package/src/schemas/common.ts +82 -0
  133. package/src/schemas/docs.ts +101 -0
  134. package/src/schemas/index.ts +14 -0
  135. package/src/schemas/pages.ts +22 -0
  136. package/src/styles/base.css +627 -0
  137. package/src/styles/expressive-code.css +41 -0
  138. package/src/styles/rules.css +66 -0
  139. package/src/styles/tailwind-sources.css +17 -0
  140. package/src/tailwind/preset.css +193 -0
  141. package/src/virtual-modules.d.ts +164 -0
@@ -0,0 +1,246 @@
1
+ import { component$, type QwikIntrinsicElements } from '@qwik.dev/core';
2
+
3
+ type IconProps = QwikIntrinsicElements['svg'];
4
+
5
+ export interface IconDef {
6
+
7
+ path: string;
8
+
9
+ fill?: boolean;
10
+
11
+ viewBox?: string;
12
+
13
+ strokeWidth?: number;
14
+ }
15
+
16
+ export const ICON_DEFS = {
17
+
18
+ ChevronDown: { path: '<path d="m6 9 6 6 6-6"/>' },
19
+ ChevronRight: { path: '<path d="m9 18 6-6-6-6"/>' },
20
+ ChevronLeft: { path: '<path d="m15 18-6-6 6-6"/>' },
21
+ ArrowRight: { path: '<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>' },
22
+ ArrowUpRight: { path: '<path d="M7 17 17 7"/><path d="M7 7h10v10"/>' },
23
+ Menu: {
24
+ path: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
25
+ },
26
+ X: { path: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>' },
27
+ ExternalLink: {
28
+ path: '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
29
+ },
30
+
31
+
32
+ Search: { path: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>' },
33
+ Copy: {
34
+ path: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
35
+ },
36
+ Check: { path: '<path d="M20 6 9 17l-5-5"/>' },
37
+ Share: {
38
+ path: '<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"/><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"/>',
39
+ },
40
+
41
+
42
+ Sun: {
43
+ path: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',
44
+ },
45
+ Moon: { path: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>' },
46
+
47
+
48
+ FileText: {
49
+ path: '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>',
50
+ },
51
+ Book: {
52
+ path: '<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/>',
53
+ },
54
+ Webhook: {
55
+ path: '<path d="M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2"/><path d="m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06"/><path d="m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8"/>',
56
+ },
57
+ Tag: {
58
+ path: '<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"/><circle cx="7.5" cy="7.5" r=".5" fill="currentColor"/>',
59
+ },
60
+ Rss: {
61
+ path: '<path d="M4 11a9 9 0 0 1 9 9"/><path d="M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/>',
62
+ },
63
+
64
+
65
+ Github: {
66
+ path: '<path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/>',
67
+ },
68
+
69
+
70
+ Plus: { path: '<path d="M5 12h14"/><path d="M12 5v14"/>' },
71
+ Minus: { path: '<path d="M5 12h14"/>' },
72
+ Info: {
73
+ path: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
74
+ },
75
+ AlertTriangle: {
76
+ path: '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
77
+ },
78
+ Zap: {
79
+ path: '<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>',
80
+ },
81
+ Sparkles: {
82
+ path: '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/><path d="M20 3v4"/><path d="M22 5h-4"/><path d="M4 17v2"/><path d="M5 18H3"/>',
83
+ },
84
+ Mail: {
85
+ path: '<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>',
86
+ },
87
+ Users: {
88
+ path: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
89
+ },
90
+ User: {
91
+ path: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
92
+ },
93
+ HandCoins: {
94
+ path: '<path d="M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"/><path d="m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"/><path d="m2 16 6 6"/><circle cx="16" cy="9" r="2.9"/><circle cx="6" cy="5" r="3"/>',
95
+ },
96
+ BarChart: {
97
+ path: '<line x1="12" x2="12" y1="20" y2="10"/><line x1="18" x2="18" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="16"/>',
98
+ },
99
+ Settings: {
100
+ path: '<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>',
101
+ },
102
+ Palette: {
103
+ path: '<circle cx="13.5" cy="6.5" r=".5" fill="currentColor"/><circle cx="17.5" cy="10.5" r=".5" fill="currentColor"/><circle cx="8.5" cy="7.5" r=".5" fill="currentColor"/><circle cx="6.5" cy="12.5" r=".5" fill="currentColor"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"/>',
104
+ },
105
+ Code: {
106
+ path: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
107
+ },
108
+ Globe: {
109
+ path: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',
110
+ },
111
+ Shield: {
112
+ path: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
113
+ },
114
+ Layers: {
115
+ path: '<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.84z"/><path d="m6.08 9.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59"/><path d="m6.08 13.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59"/>',
116
+ },
117
+ Play: { path: '<polygon points="6 3 20 12 6 21 6 3"/>' },
118
+ Files: {
119
+ path: '<path d="M20 7h-3a2 2 0 0 1-2-2V2"/><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2z"/><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"/>',
120
+ },
121
+ Puzzle: {
122
+ path: '<path d="M15.39 4.39a1 1 0 0 0 .61.22 2.5 2.5 0 0 1 0 5 1 1 0 0 0-1 1v3.78a1 1 0 0 0 1 1 2.5 2.5 0 0 1 0 5 1 1 0 0 0-.61.22A1 1 0 0 1 14 21H4a1 1 0 0 1-1-1v-3.39a1 1 0 0 1 .22-.61A1 1 0 0 0 3.61 16a2.5 2.5 0 0 1 0-5 1 1 0 0 0 .39-.39A1 1 0 0 1 4 10h3.78a1 1 0 0 0 1-1 2.5 2.5 0 0 1 5 0 1 1 0 0 0 1 1H20a1 1 0 0 1 1 1v4"/>',
123
+ },
124
+ MessageCircle: { path: '<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22z"/>' },
125
+ History: {
126
+ path: '<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l4 2"/>',
127
+ },
128
+ Send: {
129
+ path: '<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>',
130
+ },
131
+ Trash: {
132
+ path: '<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>',
133
+ },
134
+ MoreVertical: {
135
+ path: '<circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/>',
136
+ },
137
+ Clipboard: {
138
+ path: '<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>',
139
+ },
140
+ RefreshCw: {
141
+ path: '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
142
+ },
143
+ Star: {
144
+ path: '<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>',
145
+ },
146
+ ChevronUp: { path: '<path d="m18 15-6-6-6 6"/>' },
147
+ ListIcon: {
148
+ path: '<line x1="8" x2="21" y1="6" y2="6"/><line x1="8" x2="21" y1="12" y2="12"/><line x1="8" x2="21" y1="18" y2="18"/><line x1="3" x2="3.01" y1="6" y2="6"/><line x1="3" x2="3.01" y1="12" y2="12"/><line x1="3" x2="3.01" y1="18" y2="18"/>',
149
+ },
150
+ } as const satisfies Record<string, IconDef>;
151
+
152
+ export type IconName = keyof typeof ICON_DEFS;
153
+
154
+ export function getIconDef(name: string | undefined): IconDef | undefined {
155
+ if (!name) return undefined;
156
+ return (ICON_DEFS as Record<string, IconDef>)[name];
157
+ }
158
+
159
+ // biome-ignore lint/correctness/useQwikValidLexicalScope: factory captures only primitive strings, which are serializable by Qwik's runtime.
160
+ const icon = (
161
+ rawPath: string,
162
+ opts?: { fill?: boolean; viewBox?: string; strokeWidth?: number },
163
+ ) => {
164
+
165
+
166
+
167
+
168
+
169
+ const viewBox = opts?.viewBox ?? '0 0 24 24';
170
+ const fill = opts?.fill ? 'currentColor' : 'none';
171
+ const stroke = opts?.fill ? 'none' : 'currentColor';
172
+ const strokeWidth = opts?.fill ? undefined : (opts?.strokeWidth ?? 2);
173
+ return component$<IconProps>((props) => (
174
+ <svg
175
+ xmlns="http://www.w3.org/2000/svg"
176
+ width="24"
177
+ height="24"
178
+ viewBox={viewBox}
179
+ fill={fill}
180
+ stroke={stroke}
181
+ stroke-width={strokeWidth}
182
+ stroke-linecap="round"
183
+ stroke-linejoin="round"
184
+ {...props}
185
+ dangerouslySetInnerHTML={rawPath}
186
+ />
187
+ ));
188
+ };
189
+
190
+ const fromDef = (def: IconDef) => icon(def.path, def);
191
+
192
+ export const ChevronDown = fromDef(ICON_DEFS.ChevronDown);
193
+ export const ChevronRight = fromDef(ICON_DEFS.ChevronRight);
194
+ export const ChevronLeft = fromDef(ICON_DEFS.ChevronLeft);
195
+ export const ArrowRight = fromDef(ICON_DEFS.ArrowRight);
196
+ export const ArrowUpRight = fromDef(ICON_DEFS.ArrowUpRight);
197
+ export const Menu = fromDef(ICON_DEFS.Menu);
198
+ export const X = fromDef(ICON_DEFS.X);
199
+ export const ExternalLink = fromDef(ICON_DEFS.ExternalLink);
200
+
201
+ export const Search = fromDef(ICON_DEFS.Search);
202
+ export const Copy = fromDef(ICON_DEFS.Copy);
203
+ export const Check = fromDef(ICON_DEFS.Check);
204
+ export const Share = fromDef(ICON_DEFS.Share);
205
+
206
+ export const Sun = fromDef(ICON_DEFS.Sun);
207
+ export const Moon = fromDef(ICON_DEFS.Moon);
208
+
209
+ export const FileText = fromDef(ICON_DEFS.FileText);
210
+ export const Book = fromDef(ICON_DEFS.Book);
211
+ export const Webhook = fromDef(ICON_DEFS.Webhook);
212
+ export const Tag = fromDef(ICON_DEFS.Tag);
213
+ export const Rss = fromDef(ICON_DEFS.Rss);
214
+
215
+ export const Github = fromDef(ICON_DEFS.Github);
216
+
217
+ export const Plus = fromDef(ICON_DEFS.Plus);
218
+ export const Minus = fromDef(ICON_DEFS.Minus);
219
+ export const Info = fromDef(ICON_DEFS.Info);
220
+ export const AlertTriangle = fromDef(ICON_DEFS.AlertTriangle);
221
+ export const Zap = fromDef(ICON_DEFS.Zap);
222
+ export const Sparkles = fromDef(ICON_DEFS.Sparkles);
223
+ export const Mail = fromDef(ICON_DEFS.Mail);
224
+ export const Users = fromDef(ICON_DEFS.Users);
225
+ export const User = fromDef(ICON_DEFS.User);
226
+ export const HandCoins = fromDef(ICON_DEFS.HandCoins);
227
+ export const BarChart = fromDef(ICON_DEFS.BarChart);
228
+ export const Settings = fromDef(ICON_DEFS.Settings);
229
+ export const Palette = fromDef(ICON_DEFS.Palette);
230
+ export const Code = fromDef(ICON_DEFS.Code);
231
+ export const Globe = fromDef(ICON_DEFS.Globe);
232
+ export const Shield = fromDef(ICON_DEFS.Shield);
233
+ export const Layers = fromDef(ICON_DEFS.Layers);
234
+ export const Play = fromDef(ICON_DEFS.Play);
235
+ export const Files = fromDef(ICON_DEFS.Files);
236
+ export const Puzzle = fromDef(ICON_DEFS.Puzzle);
237
+ export const MessageCircle = fromDef(ICON_DEFS.MessageCircle);
238
+ export const History = fromDef(ICON_DEFS.History);
239
+ export const Send = fromDef(ICON_DEFS.Send);
240
+ export const Trash = fromDef(ICON_DEFS.Trash);
241
+ export const MoreVertical = fromDef(ICON_DEFS.MoreVertical);
242
+ export const Clipboard = fromDef(ICON_DEFS.Clipboard);
243
+ export const RefreshCw = fromDef(ICON_DEFS.RefreshCw);
244
+ export const Star = fromDef(ICON_DEFS.Star);
245
+ export const ChevronUp = fromDef(ICON_DEFS.ChevronUp);
246
+ export const ListIcon = fromDef(ICON_DEFS.ListIcon);
@@ -0,0 +1,45 @@
1
+ import type { Component, QwikIntrinsicElements } from '@qwik.dev/core';
2
+ import * as icons from './index';
3
+
4
+ type IconComponent = Component<QwikIntrinsicElements['svg']>;
5
+
6
+ const iconMap: Record<string, IconComponent> = {
7
+ Book: icons.Book,
8
+ Webhook: icons.Webhook,
9
+ Sparkles: icons.Sparkles,
10
+ Palette: icons.Palette,
11
+ Play: icons.Play,
12
+ Files: icons.Files,
13
+ Puzzle: icons.Puzzle,
14
+ MessageCircle: icons.MessageCircle,
15
+ History: icons.History,
16
+ FileText: icons.FileText,
17
+ Code: icons.Code,
18
+ Globe: icons.Globe,
19
+ Shield: icons.Shield,
20
+ Layers: icons.Layers,
21
+ Zap: icons.Zap,
22
+ Settings: icons.Settings,
23
+ Users: icons.Users,
24
+ Tag: icons.Tag,
25
+ Search: icons.Search,
26
+ Mail: icons.Mail,
27
+ Info: icons.Info,
28
+ ArrowRight: icons.ArrowRight,
29
+ Plus: icons.Plus,
30
+ Check: icons.Check,
31
+ ListIcon: icons.ListIcon,
32
+ HandCoins: icons.HandCoins,
33
+ BarChart: icons.BarChart,
34
+ Send: icons.Send,
35
+ Rss: icons.Rss,
36
+ X: icons.X,
37
+ AlertTriangle: icons.AlertTriangle,
38
+ Star: icons.Star,
39
+ ChevronUp: icons.ChevronUp,
40
+ };
41
+
42
+ export function resolveIcon(name: string | undefined): IconComponent | undefined {
43
+ if (!name) return undefined;
44
+ return iconMap[name];
45
+ }
@@ -0,0 +1,63 @@
1
+ ---
2
+ import { Font } from 'astro:assets';
3
+ import { ClientRouter } from 'astro:transitions';
4
+ import { shellRenderBaseLayout, navigationMatchNavPath } from '@publier/native';
5
+ import SearchButton from '../components/search-button.astro';
6
+ import ThemeToggle from '../components/theme-toggle.astro';
7
+ import TopNavMobile from '../components/top-nav-mobile.astro';
8
+ import { TopNav } from '../components/index.ts';
9
+ import { announcement } from 'virtual:publier-announcement';
10
+ import { feeds } from 'virtual:publier-feeds';
11
+ import { fonts } from 'virtual:publier-fonts';
12
+ import { navConfig } from 'virtual:publier-nav-config';
13
+ import { site } from 'virtual:publier-site';
14
+
15
+ interface Props { title: string; description?: string; nav?: string | false; class?: string }
16
+ const { title, description, nav: navProp, class: className } = Astro.props;
17
+ const currentPath = Astro.url.pathname;
18
+ let navVariant: string | false;
19
+ if (navProp !== undefined) {
20
+ navVariant = navProp;
21
+ } else {
22
+ const matched = navigationMatchNavPath(JSON.stringify(navConfig.pathRules), currentPath);
23
+ navVariant = matched === 'false'
24
+ ? false
25
+ : matched === 'null'
26
+ ? navConfig.defaultVariant
27
+ : (JSON.parse(matched) as string);
28
+ }
29
+ const storageKey = announcement?.storageKey ?? 'publier-announcement';
30
+
31
+ const [head, bodyOpen, bodyClose] = JSON.parse(shellRenderBaseLayout(JSON.stringify({
32
+ title, description, className, favicon: site.favicon, footer: site.footer, serviceWorker: !!site.serviceWorker,
33
+ announcement: announcement && { ...announcement, variant: announcement.variant ?? 'info', storageKey, dismissible: true },
34
+ }))) as [string, string, string];
35
+ ---
36
+ <!doctype html>
37
+ <html lang="en">
38
+ <head>
39
+ <Fragment set:html={head} />
40
+ <Font cssVariable="--publier-font-builtin-sans" preload />
41
+ <Font cssVariable="--publier-font-builtin-mono" />
42
+ {fonts.slots.includes('heading') && <Font cssVariable="--publier-font-heading" preload />}
43
+ {fonts.slots.includes('body') && <Font cssVariable="--publier-font-body" preload />}
44
+ {fonts.slots.includes('mono') && <Font cssVariable="--publier-font-mono" />}
45
+ {site.url && feeds.map((f) => (
46
+ <link rel="alternate" type="application/rss+xml" title={f.title} href={`${site.url}${f.href}`} />
47
+ ))}
48
+ <ClientRouter />
49
+ <slot name="head" />
50
+ </head>
51
+ <body class={className}>
52
+ <Fragment set:html={bodyOpen} />
53
+ {navVariant !== false && (
54
+ <TopNav variant={navVariant} currentPath={currentPath}>
55
+ {navConfig.searchEnabled && <SearchButton slot="search" />}
56
+ <ThemeToggle slot="theme" />
57
+ <TopNavMobile slot="mobile" variant={navVariant} currentPath={currentPath} />
58
+ </TopNav>
59
+ )}
60
+ <slot />
61
+ <Fragment set:html={bodyClose} />
62
+ </body>
63
+ </html>
package/src/qwik.ts ADDED
@@ -0,0 +1,3 @@
1
+
2
+
3
+ export { AskAi } from './components/ask-ai';
@@ -0,0 +1,20 @@
1
+ ---
2
+ import { getCollection } from 'astro:content';
3
+ import BaseLayout from '../layouts/base-layout.astro';
4
+ import { shellRenderBlogIndex } from '@publier/native';
5
+
6
+ interface BlogEntry {
7
+ id: string;
8
+ data: { title: string; description?: string; author?: string; date?: Date; pubDate?: Date; draft?: boolean };
9
+ }
10
+
11
+ const posts = ((await getCollection('blog')) as unknown as BlogEntry[])
12
+ .filter((p) => !p.data.draft)
13
+ .map((p) => ({ ...p, resolvedDate: p.data.date ?? p.data.pubDate ?? new Date(0) }))
14
+ .sort((a, b) => b.resolvedDate.getTime() - a.resolvedDate.getTime());
15
+ const bodyHtml = shellRenderBlogIndex(JSON.stringify({ posts: posts.map((p) => ({ href: `/blog/${p.id.replace(/\.(mdx?|md)$/, '')}`, title: p.data.title, description: p.data.description ?? null, author: p.data.author ?? null, date_ms: p.resolvedDate.getTime() })) }));
16
+ ---
17
+
18
+ <BaseLayout title="Blog" description="News, updates, and articles." nav="blog">
19
+ <Fragment set:html={bodyHtml} />
20
+ </BaseLayout>
@@ -0,0 +1,40 @@
1
+
2
+
3
+ import { getCollection } from 'astro:content';
4
+ import { site as siteConfig } from 'virtual:publier-site';
5
+ import rss from '@astrojs/rss';
6
+
7
+ interface BlogEntry {
8
+ id: string;
9
+ data: {
10
+ title: string;
11
+ description?: string;
12
+ author?: string;
13
+ date: Date;
14
+ updated?: Date;
15
+ draft: boolean;
16
+ };
17
+ }
18
+
19
+ export async function GET(context: { site?: URL }) {
20
+ const all = (await getCollection('blog')) as unknown as BlogEntry[];
21
+ const items = all
22
+ .filter((entry) => !entry.data.draft)
23
+ .sort((a, b) => b.data.date.getTime() - a.data.date.getTime())
24
+ .map((entry) => ({
25
+ title: entry.data.title,
26
+ description: entry.data.description ?? '',
27
+ pubDate: entry.data.date,
28
+ link: `/blog/${entry.id.replace(/\.(mdx?|md)$/, '')}/`,
29
+ ...(entry.data.author ? { author: entry.data.author } : {}),
30
+ }));
31
+
32
+ return rss({
33
+ title: `${siteConfig.name || 'Publier'} — Blog`,
34
+ description: siteConfig.description ?? 'Latest blog posts.',
35
+
36
+
37
+ site: context.site ?? new URL(siteConfig.url ?? 'https://example.com'),
38
+ items,
39
+ });
40
+ }
@@ -0,0 +1,32 @@
1
+ ---
2
+ import { getCollection, render } from 'astro:content';
3
+ import BaseLayout from '../layouts/base-layout.astro';
4
+ import { LastModified } from '../components/index.ts';
5
+ import { shellRenderBlogSlug } from '@publier/native';
6
+
7
+ interface BlogEntry {
8
+ id: string;
9
+ data: { title: string; description?: string; author?: string; date?: Date; pubDate?: Date; updated?: Date };
10
+ }
11
+
12
+ export async function getStaticPaths() {
13
+ const posts = await getCollection('blog');
14
+ return posts.map((post) => ({
15
+ params: { slug: post.id.replace(/\.(mdx?|md)$/, '') },
16
+ props: { post },
17
+ }));
18
+ }
19
+
20
+ const { post } = Astro.props as { post: BlogEntry };
21
+ const { Content } = await render(post as unknown as Parameters<typeof render>[0]);
22
+ const d = post.data.date ?? post.data.pubDate;
23
+ const updated = post.data.updated instanceof Date ? post.data.updated : null;
24
+ const [head, tail] = shellRenderBlogSlug(JSON.stringify({ title: post.data.title, description: post.data.description ?? null, author: post.data.author ?? null, date_ms: d ? d.getTime() : null })).split('<!--publier-content-slot-->');
25
+ ---
26
+
27
+ <BaseLayout title={post.data.title} description={post.data.description} nav="blog">
28
+ <Fragment set:html={head} />
29
+ <Content />
30
+ {updated && <LastModified date={updated} />}
31
+ <Fragment set:html={tail} />
32
+ </BaseLayout>
@@ -0,0 +1,25 @@
1
+ ---
2
+ import { getCollection, render } from 'astro:content';
3
+ import BaseLayout from '../layouts/base-layout.astro';
4
+ import { shellRenderChangelogEntry, shellRenderChangelogFooter, shellRenderChangelogHeader } from '@publier/native';
5
+
6
+ interface ChangelogEntry {
7
+ id: string;
8
+ data: { title: string; description?: string; version?: string; date: Date; draft?: boolean; tags?: string[] };
9
+ }
10
+
11
+ const entries = ((await getCollection('changelog')) as unknown as ChangelogEntry[])
12
+ .filter((e) => !e.data.draft)
13
+ .sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
14
+ const rendered = await Promise.all(entries.map(async (entry) => {
15
+ const { Content } = await render(entry as unknown as Parameters<typeof render>[0]);
16
+ const [head, tail] = shellRenderChangelogEntry(JSON.stringify({ title: entry.data.title, date_ms: entry.data.date.getTime(), version: entry.data.version ?? null, tags: entry.data.tags ?? [] })).split('<!--publier-content-slot-->');
17
+ return { head, tail, Content };
18
+ }));
19
+ ---
20
+
21
+ <BaseLayout title="Changelog" description="Version history and release notes.">
22
+ <Fragment set:html={shellRenderChangelogHeader()} />
23
+ {rendered.map(({ head, tail, Content }) => (<><Fragment set:html={head} /><Content /><Fragment set:html={tail} /></>))}
24
+ <Fragment set:html={shellRenderChangelogFooter()} />
25
+ </BaseLayout>
@@ -0,0 +1,47 @@
1
+
2
+
3
+ import { getCollection } from 'astro:content';
4
+ import { site as siteConfig } from 'virtual:publier-site';
5
+ import rss from '@astrojs/rss';
6
+
7
+ interface ChangelogEntry {
8
+ id: string;
9
+ data: {
10
+ title: string;
11
+ description?: string;
12
+ version?: string;
13
+ date: Date;
14
+ draft: boolean;
15
+ tags?: string[];
16
+ };
17
+ }
18
+
19
+ export async function GET(context: { site?: URL }) {
20
+ const all = (await getCollection('changelog')) as unknown as ChangelogEntry[];
21
+ const items = all
22
+ .filter((entry) => !entry.data.draft)
23
+ .sort((a, b) => b.data.date.getTime() - a.data.date.getTime())
24
+ .map((entry) => {
25
+ const version = entry.data.version;
26
+ const baseTitle = entry.data.title;
27
+ const displayTitle =
28
+ version && !baseTitle.includes(version) ? `${baseTitle} (${version})` : baseTitle;
29
+ return {
30
+ title: displayTitle,
31
+ description: entry.data.description ?? '',
32
+ pubDate: entry.data.date,
33
+
34
+
35
+
36
+ link: `/changelog/#${entry.id.replace(/\.(mdx?|md)$/, '')}`,
37
+ ...(entry.data.tags ? { categories: entry.data.tags } : {}),
38
+ };
39
+ });
40
+
41
+ return rss({
42
+ title: `${siteConfig.name || 'Publier'} — Changelog`,
43
+ description: siteConfig.description ?? 'Version history and release notes.',
44
+ site: context.site ?? new URL(siteConfig.url ?? 'https://example.com'),
45
+ items,
46
+ });
47
+ }
@@ -0,0 +1,31 @@
1
+ ---
2
+ import { getCollection, render } from 'astro:content';
3
+ import BaseLayout from '../layouts/base-layout.astro';
4
+ import { type BreadcrumbItem, DocsLayout, LastModified, Sidebar, SkipLink, TableOfContents } from '../components/index.ts';
5
+ import { buildSidebar, entryToPage } from '@publier/shell/search';
6
+ import { shellPlanDocsSlug, shellRenderDocsSlug } from '@publier/native';
7
+ import { docsConfig } from 'virtual:publier-docs-config';
8
+ import '../styles/expressive-code.css';
9
+ export async function getStaticPaths() {
10
+ return (await getCollection('docs')).map((entry) => ({ params: { slug: entry.id.replace(/\.(mdx?|md)$/, '').replace(/\/index$/, '').replace(/^index$/, '') || undefined }, props: { entry } }));
11
+ }
12
+ const { entry } = Astro.props;
13
+ const { Content, headings } = await render(entry);
14
+ const all = await getCollection('docs');
15
+ const plan = JSON.parse(shellPlanDocsSlug(JSON.stringify({ entry_id: entry.id, title: entry.data.title, description: entry.data.description ?? null, tab_sections: docsConfig.tabSections, all_entry_ids: all.map((e) => e.id) }))) as { breadcrumbs: BreadcrumbItem[]; section_entry_ids: string[]; scope: string; current_path: string; sidebar_persist_key: string };
16
+ const ids = new Set(plan.section_entry_ids);
17
+ const sidebarItems = buildSidebar(all.filter((e) => ids.has(e.id)).map((e) => entryToPage({ slug: e.id.replace(/\.(mdx?|md)$/, ''), data: e.data, headings: [] }, { urlPrefix: '/docs' })), { urlPrefix: '/docs', meta: docsConfig.sidebarMeta });
18
+ const [bodyHead, bodyTail] = shellRenderDocsSlug(JSON.stringify({ title: entry.data.title, description: entry.data.description ?? null })).split('<!--publier-content-slot-->');
19
+ const lastUpdated = entry.data.lastUpdated instanceof Date ? entry.data.lastUpdated : null;
20
+ ---
21
+ <BaseLayout title={`${entry.data.title} — Docs`} description={entry.data.description} nav="docs">
22
+ <SkipLink targetId="main-content" />
23
+ <DocsLayout breadcrumbs={plan.breadcrumbs.length > 2 ? plan.breadcrumbs : undefined} sidebarPersistKey={plan.sidebar_persist_key}>
24
+ <Sidebar slot="sidebar" items={sidebarItems} currentPath={plan.current_path} versions={docsConfig.versions.length > 0 ? docsConfig.versions : undefined} anchors={docsConfig.anchors.length > 0 ? docsConfig.anchors : undefined} scope={plan.scope} />
25
+ <TableOfContents slot="toc" headings={headings} />
26
+ <Fragment set:html={bodyHead} />
27
+ <Content />
28
+ {lastUpdated && <LastModified date={lastUpdated} />}
29
+ <Fragment set:html={bodyTail} />
30
+ </DocsLayout>
31
+ </BaseLayout>
@@ -0,0 +1,14 @@
1
+ ---
2
+ import BaseLayout from '../layouts/base-layout.astro';
3
+ import { shellRenderNotFound } from '@publier/native';
4
+
5
+ const bodyHtml = shellRenderNotFound();
6
+ ---
7
+
8
+ <BaseLayout
9
+ title="Page not found"
10
+ description="The page you were looking for could not be found."
11
+ nav="default"
12
+ >
13
+ <Fragment set:html={bodyHtml} />
14
+ </BaseLayout>
@@ -0,0 +1,9 @@
1
+
2
+
3
+ import { shellBuildBannerInitScript } from '@publier/native';
4
+
5
+ export const BANNER_DEFAULT_STORAGE_KEY = 'publier-banner-dismissed';
6
+
7
+ export function buildBannerInitScript(storageKey: string = BANNER_DEFAULT_STORAGE_KEY): string {
8
+ return shellBuildBannerInitScript(storageKey);
9
+ }
@@ -0,0 +1,5 @@
1
+
2
+
3
+ import { shellLazyUpgradeScript } from '@publier/native';
4
+
5
+ export const LAZY_UPGRADE_SCRIPT = shellLazyUpgradeScript();
@@ -0,0 +1,3 @@
1
+
2
+
3
+ export const SIDEBAR_SCROLL_STORAGE_KEY = 'publier:docs-sidebar-scroll';
@@ -0,0 +1,16 @@
1
+
2
+
3
+ import { shellBuildThemeInitScript } from '@publier/native';
4
+
5
+ export interface AppearanceOptions {
6
+
7
+ default?: 'system' | 'light' | 'dark';
8
+
9
+ strict?: boolean;
10
+ }
11
+
12
+ export function buildThemeInitScript(appearance: AppearanceOptions = {}): string {
13
+ return shellBuildThemeInitScript(appearance.default ?? 'system', appearance.strict ?? false);
14
+ }
15
+
16
+ export const THEME_INIT_SCRIPT = buildThemeInitScript({ default: 'system', strict: false });
@@ -0,0 +1,37 @@
1
+
2
+
3
+ import { z } from 'astro/zod';
4
+
5
+ export const blogSchema = z.object({
6
+
7
+ title: z.string(),
8
+
9
+
10
+ description: z.string().optional(),
11
+
12
+
13
+ date: z.coerce.date(),
14
+
15
+
16
+ updated: z.coerce.date().optional(),
17
+
18
+
19
+ author: z.string().optional(),
20
+
21
+
22
+ tags: z.array(z.string()).optional(),
23
+
24
+
25
+ image: z.string().optional(),
26
+
27
+
28
+ imageAlt: z.string().optional(),
29
+
30
+
31
+ draft: z.boolean().default(false),
32
+
33
+
34
+ excerpt: z.string().optional(),
35
+ });
36
+
37
+ export type BlogEntry = z.infer<typeof blogSchema>;