ghostcn 1.5.0 → 1.7.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 (88) hide show
  1. package/dist/commands/create.js +10 -3
  2. package/dist/commands/diff.js +47 -5
  3. package/dist/commands/init.js +17 -8
  4. package/dist/commands/list.js +22 -4
  5. package/dist/registry/components/accordion.json +66 -0
  6. package/dist/registry/components/account-card.json +57 -0
  7. package/dist/registry/components/announcement-bar.json +79 -0
  8. package/dist/registry/components/archive-header.json +1 -1
  9. package/dist/registry/components/author-card.json +2 -2
  10. package/dist/registry/components/author-list.json +1 -1
  11. package/dist/registry/components/author-stack.json +63 -0
  12. package/dist/registry/components/avatar.json +62 -0
  13. package/dist/registry/components/back-to-top.json +72 -0
  14. package/dist/registry/components/breadcrumbs.json +59 -0
  15. package/dist/registry/components/button.json +1 -1
  16. package/dist/registry/components/callout.json +56 -0
  17. package/dist/registry/components/checkbox.json +82 -0
  18. package/dist/registry/components/code-copy.json +52 -0
  19. package/dist/registry/components/comments-section.json +56 -0
  20. package/dist/registry/components/dialog.json +83 -0
  21. package/dist/registry/components/dropdown.json +85 -0
  22. package/dist/registry/components/empty-state.json +65 -0
  23. package/dist/registry/components/error-card.json +74 -0
  24. package/dist/registry/components/faq-section.json +83 -0
  25. package/dist/registry/components/featured-posts.json +2 -2
  26. package/dist/registry/components/hero.json +89 -0
  27. package/dist/registry/components/image-lightbox.json +44 -0
  28. package/dist/registry/components/input.json +8 -2
  29. package/dist/registry/components/magazine-grid.json +62 -0
  30. package/dist/registry/components/member-cta.json +1 -1
  31. package/dist/registry/components/mobile-dock.json +69 -0
  32. package/dist/registry/components/newsletter-form.json +12 -3
  33. package/dist/registry/components/pagination.json +2 -2
  34. package/dist/registry/components/post-card.json +2 -2
  35. package/dist/registry/components/post-grid.json +2 -2
  36. package/dist/registry/components/post-header.json +2 -2
  37. package/dist/registry/components/post-list.json +62 -0
  38. package/dist/registry/components/pricing-table.json +24 -4
  39. package/dist/registry/components/pull-quote.json +70 -0
  40. package/dist/registry/components/radio-group.json +94 -0
  41. package/dist/registry/components/reader-controls.json +60 -0
  42. package/dist/registry/components/reading-meta.json +49 -0
  43. package/dist/registry/components/reading-progress.json +73 -0
  44. package/dist/registry/components/related-posts.json +7 -1
  45. package/dist/registry/components/search-trigger.json +68 -0
  46. package/dist/registry/components/select.json +94 -0
  47. package/dist/registry/components/separator.json +46 -0
  48. package/dist/registry/components/series-nav.json +62 -0
  49. package/dist/registry/components/share-buttons.json +76 -0
  50. package/dist/registry/components/site-footer.json +2 -2
  51. package/dist/registry/components/site-header.json +1 -1
  52. package/dist/registry/components/skeleton.json +48 -0
  53. package/dist/registry/components/skip-link.json +53 -0
  54. package/dist/registry/components/social-links.json +74 -0
  55. package/dist/registry/components/stat-strip.json +85 -0
  56. package/dist/registry/components/sticky-subscribe.json +82 -0
  57. package/dist/registry/components/subscribe-bar.json +61 -0
  58. package/dist/registry/components/switch.json +76 -0
  59. package/dist/registry/components/table-of-contents.json +12 -2
  60. package/dist/registry/components/tabs.json +81 -0
  61. package/dist/registry/components/tag-bar.json +63 -0
  62. package/dist/registry/components/tag-grid.json +1 -1
  63. package/dist/registry/components/tag-list.json +1 -1
  64. package/dist/registry/components/textarea.json +95 -0
  65. package/dist/registry/components/theme-toggle.json +65 -0
  66. package/dist/registry/components/tier-comparison.json +55 -0
  67. package/dist/registry/components/timeline.json +85 -0
  68. package/dist/registry/components/tooltip.json +65 -0
  69. package/dist/registry/components/visibility-badge.json +71 -0
  70. package/dist/registry/index.json +478 -4
  71. package/dist/templates/playground/index.html +2 -2
  72. package/dist/templates/playground/playground.css +8 -1
  73. package/dist/templates/playground/playground.js +39 -5
  74. package/dist/templates/playground/preview.css +1 -0
  75. package/dist/templates/theme-tools.mjs +62 -24
  76. package/dist/utils/component-diff.d.ts +1 -1
  77. package/dist/utils/component-diff.js +46 -17
  78. package/dist/utils/component-files.js +3 -2
  79. package/dist/utils/component-history.js +1 -1
  80. package/dist/utils/playground-server.js +40 -12
  81. package/dist/utils/preview-renderer.d.ts +77 -0
  82. package/dist/utils/preview-renderer.js +68 -8
  83. package/dist/utils/registry.js +15 -5
  84. package/dist/utils/theme-files.js +14 -7
  85. package/dist/utils/theme-project.js +6 -4
  86. package/dist/utils/theme-scaffold.js +22 -7
  87. package/dist/utils/theme.js +39 -32
  88. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "theme-toggle",
3
+ "type": "components:layout",
4
+ "description": "Light, dark, and system theme switcher syncing .dark-mode and .auto-color with localStorage persistence.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment; segmented 3-way pill, compact icon, or outline button.",
10
+ "options": [
11
+ "default",
12
+ "compact",
13
+ "outline"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "size": {
18
+ "description": "Control scale.",
19
+ "options": [
20
+ "sm",
21
+ "default",
22
+ "lg"
23
+ ],
24
+ "default": "default"
25
+ },
26
+ "ariaLabel": {
27
+ "description": "Accessible label for the theme toggle group.",
28
+ "default": "Color theme"
29
+ }
30
+ },
31
+ "files": [
32
+ {
33
+ "name": "theme-toggle.hbs",
34
+ "type": "partial",
35
+ "target": "partials/components/theme-toggle.hbs",
36
+ "content": "{{!-- Styling parameters: class, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n<div class=\"ghcn-theme-toggle{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-ghcn-theme-toggle data-variant=\"{{#match variant \"compact\"}}compact{{else}}{{#match variant \"outline\"}}outline{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\" role=\"group\" aria-label=\"{{#if ariaLabel}}{{ariaLabel}}{{else}}Color theme{{/if}}\">\n {{#match variant \"compact\"}}\n <button type=\"button\" class=\"ghcn-theme-toggle__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-theme-toggle__btn--cycle\" data-theme-cycle aria-label=\"Toggle color theme\"><svg class=\"ghcn-theme-toggle__sun\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"10\" r=\"3.5\"/><path d=\"M10 2.5v1.5M10 16v1.5M4.7 4.7l1.1 1.1M14.2 14.2l1.1 1.1M2.5 10H4M16 10h1.5M4.7 15.3l1.1-1.1M14.2 5.8l1.1-1.1\"/></svg><svg class=\"ghcn-theme-toggle__moon\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16.5 12.2A6.5 6.5 0 0 1 7.8 3.5a6.5 6.5 0 1 0 8.7 8.7Z\"/></svg></button>\n {{else}}{{#match variant \"outline\"}}\n <button type=\"button\" class=\"ghcn-theme-toggle__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-theme-toggle__btn--cycle\" data-theme-cycle aria-label=\"Toggle color theme\"><svg class=\"ghcn-theme-toggle__sun\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"10\" r=\"3.5\"/><path d=\"M10 2.5v1.5M10 16v1.5M4.7 4.7l1.1 1.1M14.2 14.2l1.1 1.1M2.5 10H4M16 10h1.5M4.7 15.3l1.1-1.1M14.2 5.8l1.1-1.1\"/></svg><svg class=\"ghcn-theme-toggle__moon\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16.5 12.2A6.5 6.5 0 0 1 7.8 3.5a6.5 6.5 0 1 0 8.7 8.7Z\"/></svg><span data-theme-label>Theme</span></button>\n {{else}}\n <button type=\"button\" class=\"ghcn-theme-toggle__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-theme-value=\"light\" aria-label=\"Light theme\" aria-pressed=\"false\"><svg class=\"ghcn-theme-toggle__sun\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"10\" r=\"3.5\"/><path d=\"M10 2.5v1.5M10 16v1.5M4.7 4.7l1.1 1.1M14.2 14.2l1.1 1.1M2.5 10H4M16 10h1.5M4.7 15.3l1.1-1.1M14.2 5.8l1.1-1.1\"/></svg></button>\n <button type=\"button\" class=\"ghcn-theme-toggle__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-theme-value=\"system\" aria-label=\"System theme\" aria-pressed=\"false\"><svg class=\"ghcn-theme-toggle__system\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"3.5\" width=\"15\" height=\"10\" rx=\"1.5\"/><path d=\"M7 16.5h6M10 13.5v3\"/></svg></button>\n <button type=\"button\" class=\"ghcn-theme-toggle__btn{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" data-theme-value=\"dark\" aria-label=\"Dark theme\" aria-pressed=\"false\"><svg class=\"ghcn-theme-toggle__moon\" aria-hidden=\"true\" viewBox=\"0 0 20 20\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16.5 12.2A6.5 6.5 0 0 1 7.8 3.5a6.5 6.5 0 1 0 8.7 8.7Z\"/></svg></button>\n {{/match}}{{/match}}\n</div>\n{{/with}}"
37
+ },
38
+ {
39
+ "name": "theme-toggle.css",
40
+ "type": "style",
41
+ "target": "assets/css/components/theme-toggle.css",
42
+ "content": ".ghcn-theme-toggle { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 9999px; background: var(--secondary); color: var(--foreground); font-family: inherit; font-size: var(--ghcn-text-small, 14px); line-height: 1; }\n.ghcn-theme-toggle *, .ghcn-theme-toggle *::before, .ghcn-theme-toggle *::after { box-sizing: border-box; }\n.ghcn-theme-toggle:where([data-variant=\"compact\"]), .ghcn-theme-toggle:where([data-variant=\"outline\"]) { padding: 0; background: transparent; border-color: transparent; }\n.ghcn-theme-toggle__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 9999px; background: transparent; color: var(--muted-foreground); font: inherit; font-weight: 600; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }\n.ghcn-theme-toggle:where([data-size=\"sm\"]) .ghcn-theme-toggle__btn { min-width: 28px; height: 28px; padding: 0 6px; font-size: 12px; }\n.ghcn-theme-toggle:where([data-size=\"lg\"]) .ghcn-theme-toggle__btn { min-width: 38px; height: 38px; padding: 0 12px; font-size: 15px; }\n.ghcn-theme-toggle__btn:hover { color: var(--foreground); }\n.ghcn-theme-toggle__btn[aria-pressed=\"true\"] { background: var(--background); color: var(--foreground); border-color: var(--border); box-shadow: 0 1px 2px #0001; }\n.ghcn-theme-toggle:where([data-variant=\"compact\"]) .ghcn-theme-toggle__btn--cycle,\n.ghcn-theme-toggle:where([data-variant=\"outline\"]) .ghcn-theme-toggle__btn--cycle { border-color: var(--border); background: var(--card); color: var(--foreground); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); padding: 0 10px; }\n.ghcn-theme-toggle:where([data-variant=\"compact\"]) .ghcn-theme-toggle__btn--cycle { padding: 0; }\n.ghcn-theme-toggle:where([data-variant=\"compact\"]) .ghcn-theme-toggle__btn--cycle:hover,\n.ghcn-theme-toggle:where([data-variant=\"outline\"]) .ghcn-theme-toggle__btn--cycle:hover { background: var(--muted); }\n.ghcn-theme-toggle__btn--cycle .ghcn-theme-toggle__moon { display: none; }\n.ghcn-theme-toggle[data-resolved=\"dark\"] .ghcn-theme-toggle__btn--cycle .ghcn-theme-toggle__sun { display: none; }\n.ghcn-theme-toggle[data-resolved=\"dark\"] .ghcn-theme-toggle__btn--cycle .ghcn-theme-toggle__moon { display: block; }\n.ghcn-theme-toggle:focus-visible, :where(.ghcn-theme-toggle) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ghcn-theme-toggle__btn { transition: none; } }\n"
43
+ },
44
+ {
45
+ "name": "theme-toggle.js",
46
+ "type": "js",
47
+ "target": "assets/js/components/theme-toggle.js",
48
+ "content": "/* ghostcn theme toggle: persists light/dark/system preference, repeat-safe, no dependencies. */\n(() => {\n const KEY = 'ghcn-theme';\n const root = document.documentElement;\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n\n function readPreference() {\n try {\n const saved = localStorage.getItem(KEY);\n if (saved === 'light' || saved === 'dark' || saved === 'system') return saved;\n } catch {}\n if (root.classList.contains('dark-mode') || root.classList.contains('dark')) return 'dark';\n if (root.classList.contains('auto-color')) return 'system';\n return 'light';\n }\n\n function applyTheme(mode, persist) {\n const resolved = mode === 'system' ? (media.matches ? 'dark' : 'light') : mode;\n root.classList.toggle('auto-color', mode === 'system');\n root.classList.toggle('dark-mode', resolved === 'dark');\n root.classList.toggle('dark', resolved === 'dark');\n root.setAttribute('data-theme', resolved);\n if (persist) {\n try { localStorage.setItem(KEY, mode); } catch {}\n }\n document.querySelectorAll('[data-ghcn-theme-toggle]').forEach(container => {\n container.dataset.mode = mode;\n container.dataset.resolved = resolved;\n container.querySelectorAll('[data-theme-value]').forEach(btn => {\n btn.setAttribute('aria-pressed', String(btn.dataset.themeValue === mode));\n });\n const cycle = container.querySelector('[data-theme-cycle]');\n if (cycle) {\n const next = resolved === 'dark' ? 'light' : 'dark';\n cycle.setAttribute('aria-label', 'Switch to ' + next + ' theme');\n const label = cycle.querySelector('[data-theme-label]');\n if (label) label.textContent = resolved === 'dark' ? 'Dark' : 'Light';\n }\n });\n }\n\n function init() {\n const mode = readPreference();\n applyTheme(mode, false);\n document.querySelectorAll('[data-ghcn-theme-toggle]').forEach(container => {\n if (container.dataset.ghcnThemeReady) return;\n container.dataset.ghcnThemeReady = 'true';\n container.querySelectorAll('[data-theme-value]').forEach(btn => {\n btn.addEventListener('click', () => applyTheme(btn.dataset.themeValue, true));\n });\n const cycle = container.querySelector('[data-theme-cycle]');\n if (cycle) {\n cycle.addEventListener('click', () => {\n const isDark = root.classList.contains('dark-mode') || root.classList.contains('dark');\n applyTheme(isDark ? 'light' : 'dark', true);\n });\n }\n });\n media.addEventListener?.('change', () => {\n if (readPreference() === 'system') applyTheme('system', false);\n });\n }\n\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true });\n else init();\n})();"
49
+ }
50
+ ],
51
+ "gscan": {
52
+ "rules_satisfied": [
53
+ "GS010-PJ-VALID"
54
+ ],
55
+ "notes": "Syncs html.dark-mode and html.auto-color with localStorage; zero external dependencies."
56
+ },
57
+ "styleSlots": {
58
+ "class": [
59
+ ".ghcn-theme-toggle"
60
+ ],
61
+ "buttonClass": [
62
+ ".ghcn-theme-toggle__btn"
63
+ ]
64
+ }
65
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "tier-comparison",
3
+ "type": "components:members",
4
+ "description": "Responsive Ghost membership tier comparison matrix displaying live monthly/yearly prices, benefits, and Portal CTAs.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Table style: default, striped, or bordered.",
10
+ "default": "default"
11
+ },
12
+ "heading": {
13
+ "description": "Section heading text.",
14
+ "default": "Compare membership plans"
15
+ },
16
+ "description": {
17
+ "description": "Optional subheading description."
18
+ }
19
+ },
20
+ "files": [
21
+ {
22
+ "name": "tier-comparison.hbs",
23
+ "type": "partial",
24
+ "target": "partials/components/tier-comparison.hbs",
25
+ "content": "{{!-- Styling parameters: class, titleClass, tableClass, buttonClass --}}\n{{#with this as |ghostcnStyles|}}\n{{#if @site.members_enabled}}\n{{#unless @site.members_invite_only}}\n{{#if @site.allow_self_signup}}\n{{#get \"tiers\" filter=\"visibility:public+active:true\" include=\"monthly_price,yearly_price,benefits\"}}\n{{#if tiers}}\n<section class=\"ghcn-tier-compare{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match ghostcnStyles.variant \"striped\"}}striped{{else}}{{#match ghostcnStyles.variant \"bordered\"}}bordered{{else}}default{{/match}}{{/match}}\">\n <header class=\"ghcn-tier-compare__header\">\n <h2 class=\"ghcn-tier-compare__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}Compare membership plans{{/if}}</h2>\n {{#if ghostcnStyles.description}}<p class=\"ghcn-tier-compare__desc\">{{ghostcnStyles.description}}</p>{{/if}}\n </header>\n <div class=\"ghcn-tier-compare__scroll\" role=\"region\" aria-label=\"{{#if ghostcnStyles.heading}}{{ghostcnStyles.heading}}{{else}}Compare membership plans{{/if}}\" tabindex=\"0\">\n <table class=\"ghcn-tier-compare__table{{#if ghostcnStyles.tableClass}} {{ghostcnStyles.tableClass}}{{/if}}\">\n <thead>\n <tr>\n <th scope=\"col\">Plan</th>\n <th scope=\"col\">Monthly</th>\n <th scope=\"col\">Yearly</th>\n <th scope=\"col\">Included</th>\n <th scope=\"col\"><span class=\"ghcn-sr-only\">Action</span></th>\n </tr>\n </thead>\n <tbody>\n {{#foreach tiers}}\n <tr class=\"ghcn-tier-compare__row{{#match type \"paid\"}} is-paid{{/match}}\">\n <th scope=\"row\" class=\"ghcn-tier-compare__plan\">\n <div class=\"ghcn-tier-compare__plan-head\">\n <span class=\"ghcn-tier-compare__name\">{{name}}</span>\n <span class=\"ghcn-tier-compare__badge\">{{#match type \"free\"}}Free{{else}}Paid{{/match}}</span>\n </div>\n {{#if description}}<p class=\"ghcn-tier-compare__plan-desc\">{{description}}</p>{{/if}}\n </th>\n <td class=\"ghcn-tier-compare__price\" data-label=\"Monthly\">\n {{#match type \"free\"}}\n <span class=\"ghcn-tier-compare__amount\">$0</span><span class=\"ghcn-tier-compare__period\">/mo</span>\n {{else}}\n {{#if monthly_price}}\n <span class=\"ghcn-tier-compare__amount\">{{price monthly_price currency=currency}}</span><span class=\"ghcn-tier-compare__period\">/mo</span>\n {{else}}—{{/if}}\n {{/match}}\n </td>\n <td class=\"ghcn-tier-compare__price\" data-label=\"Yearly\">\n {{#match type \"free\"}}\n <span class=\"ghcn-tier-compare__amount\">$0</span><span class=\"ghcn-tier-compare__period\">/yr</span>\n {{else}}\n {{#if yearly_price}}\n <span class=\"ghcn-tier-compare__amount\">{{price yearly_price currency=currency}}</span><span class=\"ghcn-tier-compare__period\">/yr</span>\n {{else}}—{{/if}}\n {{/match}}\n </td>\n <td class=\"ghcn-tier-compare__benefits\" data-label=\"Included\">\n {{#if benefits}}\n <ul class=\"ghcn-tier-compare__list\">\n {{#foreach benefits}}\n <li><svg class=\"ghcn-tier-compare__check\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 8.5 6.5 12 13 4\"/></svg><span>{{this}}</span></li>\n {{/foreach}}\n </ul>\n {{else}}—{{/if}}\n </td>\n <td class=\"ghcn-tier-compare__action\">\n {{#match type \"free\"}}\n {{#if @member}}\n <a class=\"ghcn-tier-compare__cta{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-tier-compare__cta--secondary\" href=\"#/portal/account\" data-portal=\"account\">Manage</a>\n {{else}}\n <a class=\"ghcn-tier-compare__cta{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}} ghcn-tier-compare__cta--secondary\" href=\"#/portal/signup\" data-portal=\"signup\">Join free</a>\n {{/if}}\n {{else}}\n {{#if @member.paid}}\n <a class=\"ghcn-tier-compare__cta{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/account/plans\" data-portal=\"account/plans\">Manage plan</a>\n {{else}}\n <a class=\"ghcn-tier-compare__cta{{#if ghostcnStyles.buttonClass}} {{ghostcnStyles.buttonClass}}{{/if}}\" href=\"#/portal/signup/{{id}}/monthly\" data-portal=\"signup/{{id}}/monthly\">Choose {{name}}</a>\n {{/if}}\n {{/match}}\n </td>\n </tr>\n {{/foreach}}\n </tbody>\n </table>\n </div>\n</section>\n{{/if}}\n{{/get}}\n{{/if}}\n{{/unless}}\n{{/if}}\n{{/with}}"
26
+ },
27
+ {
28
+ "name": "tier-comparison.css",
29
+ "type": "style",
30
+ "target": "assets/css/components/tier-comparison.css",
31
+ "content": ".ghcn-tier-compare { box-sizing: border-box; min-width: 0; margin-block: var(--ghcn-section-space, clamp(24px, 4vw, 48px)); font-family: inherit; font-size: var(--ghcn-text-body, 16px); line-height: 1.5; color: var(--foreground); width: min(100% - 32px, 1152px); margin-inline: auto; }\n.ghcn-tier-compare *, .ghcn-tier-compare *::before, .ghcn-tier-compare *::after { box-sizing: border-box; }\n.ghcn-tier-compare .ghcn-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n.ghcn-tier-compare__header { display: grid; gap: 6px; margin-bottom: 18px; }\n.ghcn-tier-compare__title { font-size: var(--ghcn-title-section, clamp(24px, 3vw, 32px)); font-weight: 700; line-height: 1.18; letter-spacing: -.035em; text-wrap: balance; margin: 0; }\n.ghcn-tier-compare__desc { margin: 0; max-width: 60ch; color: var(--muted-foreground); font-size: var(--ghcn-text-small, 14px); line-height: 1.55; }\n.ghcn-tier-compare__scroll { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); overflow-x: auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }\n.ghcn-tier-compare__table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }\n.ghcn-tier-compare__table thead th { padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--secondary); color: var(--muted-foreground); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }\n.ghcn-tier-compare__table tbody th,\n.ghcn-tier-compare__table tbody td { padding: 18px; vertical-align: top; border-bottom: 1px solid var(--border); }\n.ghcn-tier-compare__table tbody tr:last-child th,\n.ghcn-tier-compare__table tbody tr:last-child td { border-bottom: 0; }\n.ghcn-tier-compare:where([data-variant=\"striped\"]) .ghcn-tier-compare__table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--secondary) 55%, transparent); }\n.ghcn-tier-compare:where([data-variant=\"bordered\"]) .ghcn-tier-compare__table th,\n.ghcn-tier-compare:where([data-variant=\"bordered\"]) .ghcn-tier-compare__table td { border-right: 1px solid var(--border); }\n.ghcn-tier-compare:where([data-variant=\"bordered\"]) .ghcn-tier-compare__table th:last-child,\n.ghcn-tier-compare:where([data-variant=\"bordered\"]) .ghcn-tier-compare__table td:last-child { border-right: 0; }\n.ghcn-tier-compare__plan { min-width: 190px; font-weight: 400; }\n.ghcn-tier-compare__plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.ghcn-tier-compare__name { font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: var(--foreground); }\n.ghcn-tier-compare__badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; background: var(--secondary); color: var(--muted-foreground); font-size: 11px; font-weight: 600; }\n.ghcn-tier-compare__row.is-paid .ghcn-tier-compare__badge { background: color-mix(in srgb, var(--primary) 12%, var(--background)); color: var(--primary); }\n.ghcn-tier-compare__plan-desc { margin: 5px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.5; }\n.ghcn-tier-compare__price { white-space: nowrap; }\n.ghcn-tier-compare__amount { font-size: 18px; font-weight: 700; letter-spacing: -.025em; color: var(--foreground); }\n.ghcn-tier-compare__period { margin-left: 2px; font-size: 12px; color: var(--muted-foreground); }\n.ghcn-tier-compare__benefits { min-width: 220px; }\n.ghcn-tier-compare__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--foreground); }\n.ghcn-tier-compare__list li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }\n.ghcn-tier-compare__check { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }\n.ghcn-tier-compare__action { white-space: nowrap; text-align: right; }\n.ghcn-tier-compare__cta { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--primary); color: var(--primary-foreground); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; transition: opacity 150ms ease, background-color 150ms ease; }\n.ghcn-tier-compare__cta:hover { opacity: .9; }\n.ghcn-tier-compare__cta--secondary { background: var(--secondary); color: var(--secondary-foreground); border-color: var(--border); }\n.ghcn-tier-compare__cta--secondary:hover { opacity: 1; background: color-mix(in srgb, var(--foreground) 6%, var(--secondary)); }\n.ghcn-tier-compare:focus-visible, :where(.ghcn-tier-compare) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
32
+ }
33
+ ],
34
+ "gscan": {
35
+ "rules_satisfied": [
36
+ "GS010-PJ-VALID",
37
+ "GS050-MEMBERS-TIERS"
38
+ ],
39
+ "notes": "Uses Ghost native #get tiers helper, {{price}}, and data-portal signup actions."
40
+ },
41
+ "styleSlots": {
42
+ "class": [
43
+ ".ghcn-tier-compare"
44
+ ],
45
+ "titleClass": [
46
+ ".ghcn-tier-compare__title"
47
+ ],
48
+ "tableClass": [
49
+ ".ghcn-tier-compare__table"
50
+ ],
51
+ "buttonClass": [
52
+ ".ghcn-tier-compare__cta"
53
+ ]
54
+ }
55
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "timeline",
3
+ "type": "components:ui",
4
+ "description": "Vertical editorial timeline for publication changelogs, company milestones, and author biographies.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Timeline style: default, compact, or card.",
10
+ "options": [
11
+ "default",
12
+ "compact",
13
+ "card"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "item1Date": {
18
+ "description": "Milestone 1 date."
19
+ },
20
+ "item1Title": {
21
+ "description": "Milestone 1 heading."
22
+ },
23
+ "item1Body": {
24
+ "description": "Milestone 1 description."
25
+ },
26
+ "item2Date": {
27
+ "description": "Milestone 2 date."
28
+ },
29
+ "item2Title": {
30
+ "description": "Milestone 2 heading."
31
+ },
32
+ "item2Body": {
33
+ "description": "Milestone 2 description."
34
+ },
35
+ "item3Date": {
36
+ "description": "Optional milestone 3 date."
37
+ },
38
+ "item3Title": {
39
+ "description": "Optional milestone 3 heading."
40
+ },
41
+ "item3Body": {
42
+ "description": "Optional milestone 3 description."
43
+ },
44
+ "item4Date": {
45
+ "description": "Optional milestone 4 date."
46
+ },
47
+ "item4Title": {
48
+ "description": "Optional milestone 4 heading."
49
+ },
50
+ "item4Body": {
51
+ "description": "Optional milestone 4 description."
52
+ }
53
+ },
54
+ "files": [
55
+ {
56
+ "name": "timeline.hbs",
57
+ "type": "partial",
58
+ "target": "partials/components/timeline.hbs",
59
+ "content": "{{!-- Styling parameters: class, itemClass, titleClass --}}\n{{#with this as |ghostcnStyles|}}\n<ol class=\"ghcn-timeline{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-variant=\"{{#match variant \"compact\"}}compact{{else}}{{#match variant \"card\"}}card{{else}}default{{/match}}{{/match}}\">\n <li class=\"ghcn-timeline__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <span class=\"ghcn-timeline__dot\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-timeline__content\">\n <time class=\"ghcn-timeline__date\">{{#if item1Date}}{{item1Date}}{{else}}Nov 2026{{/if}}</time>\n <h3 class=\"ghcn-timeline__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if item1Title}}{{item1Title}}{{else}}Launched Ghostcn 1.6{{/if}}</h3>\n <p class=\"ghcn-timeline__body\">{{#if item1Body}}{{item1Body}}{{else}}Expanded the native Handlebars library with editorial, membership, and layout blocks.{{/if}}</p>\n </div>\n </li>\n <li class=\"ghcn-timeline__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <span class=\"ghcn-timeline__dot\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-timeline__content\">\n <time class=\"ghcn-timeline__date\">{{#if item2Date}}{{item2Date}}{{else}}Aug 2026{{/if}}</time>\n <h3 class=\"ghcn-timeline__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{#if item2Title}}{{item2Title}}{{else}}Reached 10,000 readers{{/if}}</h3>\n <p class=\"ghcn-timeline__body\">{{#if item2Body}}{{item2Body}}{{else}}Introduced paid supporter tiers and member-only weekly dispatches.{{/if}}</p>\n </div>\n </li>\n {{#if item3Title}}\n <li class=\"ghcn-timeline__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <span class=\"ghcn-timeline__dot\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-timeline__content\">\n {{#if item3Date}}<time class=\"ghcn-timeline__date\">{{item3Date}}</time>{{/if}}\n <h3 class=\"ghcn-timeline__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{item3Title}}</h3>\n {{#if item3Body}}<p class=\"ghcn-timeline__body\">{{item3Body}}</p>{{/if}}\n </div>\n </li>\n {{else}}\n <li class=\"ghcn-timeline__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <span class=\"ghcn-timeline__dot\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-timeline__content\">\n <time class=\"ghcn-timeline__date\">Jan 2026</time>\n <h3 class=\"ghcn-timeline__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">Published Issue #1</h3>\n <p class=\"ghcn-timeline__body\">Started an independent Ghost publication focused on thoughtful craft and design.</p>\n </div>\n </li>\n {{/if}}\n {{#if item4Title}}\n <li class=\"ghcn-timeline__item{{#if ghostcnStyles.itemClass}} {{ghostcnStyles.itemClass}}{{/if}}\">\n <span class=\"ghcn-timeline__dot\" aria-hidden=\"true\"></span>\n <div class=\"ghcn-timeline__content\">\n {{#if item4Date}}<time class=\"ghcn-timeline__date\">{{item4Date}}</time>{{/if}}\n <h3 class=\"ghcn-timeline__title{{#if ghostcnStyles.titleClass}} {{ghostcnStyles.titleClass}}{{/if}}\">{{item4Title}}</h3>\n {{#if item4Body}}<p class=\"ghcn-timeline__body\">{{item4Body}}</p>{{/if}}\n </div>\n </li>\n {{/if}}\n</ol>\n{{/with}}"
60
+ },
61
+ {
62
+ "name": "timeline.css",
63
+ "type": "style",
64
+ "target": "assets/css/components/timeline.css",
65
+ "content": ".ghcn-timeline { box-sizing: border-box; position: relative; display: grid; gap: 24px; margin: var(--ghcn-section-space, clamp(24px, 4vw, 48px)) 0; padding: 0 0 0 24px; list-style: none; font-family: inherit; color: var(--foreground); }\n.ghcn-timeline *, .ghcn-timeline *::before, .ghcn-timeline *::after { box-sizing: border-box; }\n.ghcn-timeline::before { content: \"\"; position: absolute; top: 8px; bottom: 8px; left: 5px; width: 2px; background: var(--border); }\n.ghcn-timeline__item { position: relative; display: grid; }\n.ghcn-timeline__dot { position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 9999px; border: 2px solid var(--primary); background: var(--background); box-shadow: 0 0 0 4px var(--background); }\n.ghcn-timeline__item:first-child .ghcn-timeline__dot { background: var(--primary); }\n.ghcn-timeline__content { display: grid; gap: 4px; }\n.ghcn-timeline__date { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }\n.ghcn-timeline__title { font-size: var(--ghcn-title-card, 20px); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; color: inherit; margin: 0; font-size: 16.5px; }\n.ghcn-timeline__body { margin: 2px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }\n.ghcn-timeline:where([data-variant=\"compact\"]) { gap: 14px; }\n.ghcn-timeline:where([data-variant=\"compact\"]) .ghcn-timeline__body { font-size: 13.5px; }\n.ghcn-timeline:where([data-variant=\"card\"]) { gap: 16px; }\n.ghcn-timeline:where([data-variant=\"card\"]) .ghcn-timeline__content { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border, #e4e4e7); border-radius: var(--ghcn-panel-radius, min(var(--radius, 8px), 24px)); background: var(--card, #fff); color: var(--card-foreground, #09090b); padding: 16px 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }\n.ghcn-timeline:where([data-variant=\"card\"]) .ghcn-timeline__dot { top: 20px; }"
66
+ }
67
+ ],
68
+ "gscan": {
69
+ "rules_satisfied": [
70
+ "GS010-PJ-VALID"
71
+ ],
72
+ "notes": "Pure CSS semantic ordered list timeline."
73
+ },
74
+ "styleSlots": {
75
+ "class": [
76
+ ".ghcn-timeline"
77
+ ],
78
+ "itemClass": [
79
+ ".ghcn-timeline__item"
80
+ ],
81
+ "titleClass": [
82
+ ".ghcn-timeline__title"
83
+ ]
84
+ }
85
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "tooltip",
3
+ "type": "components:ui",
4
+ "description": "Pure CSS hover and keyboard-focus tooltip for metadata hints, icons, and badges.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "placement": {
9
+ "description": "Bubble side: top, bottom, left, or right.",
10
+ "options": [
11
+ "top",
12
+ "bottom",
13
+ "left",
14
+ "right"
15
+ ],
16
+ "default": "top"
17
+ },
18
+ "variant": {
19
+ "description": "Bubble surface: default (inverted contrast) or light.",
20
+ "options": [
21
+ "default",
22
+ "light"
23
+ ],
24
+ "default": "default"
25
+ },
26
+ "label": {
27
+ "description": "Trigger button text when not used as a partial block.",
28
+ "default": "Hover or focus me"
29
+ },
30
+ "content": {
31
+ "description": "Tooltip message text."
32
+ }
33
+ },
34
+ "files": [
35
+ {
36
+ "name": "tooltip.hbs",
37
+ "type": "partial",
38
+ "target": "partials/components/tooltip.hbs",
39
+ "content": "{{!-- Styling parameters: class, triggerClass, bubbleClass --}}\n{{#with this as |ghostcnStyles|}}\n<span class=\"ghcn-ui-tooltip{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-placement=\"{{#match placement \"bottom\"}}bottom{{else}}{{#match placement \"left\"}}left{{else}}{{#match placement \"right\"}}right{{else}}top{{/match}}{{/match}}{{/match}}\" data-variant=\"{{#match variant \"light\"}}light{{else}}default{{/match}}\">\n <button type=\"button\" class=\"ghcn-ui-tooltip__trigger{{#if ghostcnStyles.triggerClass}} {{ghostcnStyles.triggerClass}}{{/if}}\">\n {{#> @partial-block}}{{#if label}}{{label}}{{else}}Hover or focus me{{/if}}{{/@partial-block}}\n </button>\n <span class=\"ghcn-ui-tooltip__bubble{{#if ghostcnStyles.bubbleClass}} {{ghostcnStyles.bubbleClass}}{{/if}}\" role=\"tooltip\">{{#if content}}{{content}}{{else}}Pure CSS tooltip — accessible via keyboard focus and hover.{{/if}}</span>\n</span>\n{{/with}}"
40
+ },
41
+ {
42
+ "name": "tooltip.css",
43
+ "type": "style",
44
+ "target": "assets/css/components/tooltip.css",
45
+ "content": ".ghcn-ui-tooltip { box-sizing: border-box; position: relative; display: inline-flex; align-items: center; font-family: inherit; }\n.ghcn-ui-tooltip *, .ghcn-ui-tooltip *::before, .ghcn-ui-tooltip *::after { box-sizing: border-box; }\n.ghcn-ui-tooltip__trigger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--ghcn-control-radius, var(--radius, 8px)); background: var(--card, var(--background)); color: var(--foreground); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }\n.ghcn-ui-tooltip__trigger:hover { background: var(--secondary); }\n.ghcn-ui-tooltip__bubble { position: absolute; z-index: 40; width: max-content; max-width: 240px; padding: 7px 11px; border-radius: 7px; background: var(--foreground); color: var(--background); font-size: 12px; font-weight: 500; line-height: 1.4; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease; }\n.ghcn-ui-tooltip:where([data-variant=\"light\"]) .ghcn-ui-tooltip__bubble { background: var(--popover, var(--card)); color: var(--popover-foreground, var(--foreground)); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }\n.ghcn-ui-tooltip:where([data-placement=\"top\"]) .ghcn-ui-tooltip__bubble { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); }\n.ghcn-ui-tooltip:where([data-placement=\"bottom\"]) .ghcn-ui-tooltip__bubble { top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px); }\n.ghcn-ui-tooltip:where([data-placement=\"left\"]) .ghcn-ui-tooltip__bubble { right: calc(100% + 8px); top: 50%; transform: translateY(-50%) translateX(4px); }\n.ghcn-ui-tooltip:where([data-placement=\"right\"]) .ghcn-ui-tooltip__bubble { left: calc(100% + 8px); top: 50%; transform: translateY(-50%) translateX(-4px); }\n.ghcn-ui-tooltip:hover .ghcn-ui-tooltip__bubble,\n.ghcn-ui-tooltip:focus-within .ghcn-ui-tooltip__bubble { opacity: 1; visibility: visible; }\n.ghcn-ui-tooltip:where([data-placement=\"top\"]):is(:hover, :focus-within) .ghcn-ui-tooltip__bubble,\n.ghcn-ui-tooltip:where([data-placement=\"bottom\"]):is(:hover, :focus-within) .ghcn-ui-tooltip__bubble { transform: translateX(-50%) translateY(0); }\n.ghcn-ui-tooltip:where([data-placement=\"left\"]):is(:hover, :focus-within) .ghcn-ui-tooltip__bubble,\n.ghcn-ui-tooltip:where([data-placement=\"right\"]):is(:hover, :focus-within) .ghcn-ui-tooltip__bubble { transform: translateY(-50%) translateX(0); }\n@media (prefers-reduced-motion: reduce) { .ghcn-ui-tooltip__bubble { transition: none; } }\n.ghcn-ui-tooltip:focus-visible, :where(.ghcn-ui-tooltip) :focus-visible { outline: 2px solid var(--ring, currentColor); outline-offset: 2px; }"
46
+ }
47
+ ],
48
+ "gscan": {
49
+ "rules_satisfied": [
50
+ "GS010-PJ-VALID"
51
+ ],
52
+ "notes": "Pure CSS tooltip responding to hover and keyboard :focus-within."
53
+ },
54
+ "styleSlots": {
55
+ "class": [
56
+ ".ghcn-ui-tooltip"
57
+ ],
58
+ "triggerClass": [
59
+ ".ghcn-ui-tooltip__trigger"
60
+ ],
61
+ "bubbleClass": [
62
+ ".ghcn-ui-tooltip__bubble"
63
+ ]
64
+ }
65
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "visibility-badge",
3
+ "type": "components:members",
4
+ "description": "Ghost-native access indicator pill for members-only, paid-only, tier-restricted, or public posts.",
5
+ "dependencies": [],
6
+ "ghost_version": ">=5.0.0",
7
+ "parameters": {
8
+ "variant": {
9
+ "description": "Visual treatment.",
10
+ "options": [
11
+ "default",
12
+ "outline",
13
+ "subtle"
14
+ ],
15
+ "default": "default"
16
+ },
17
+ "size": {
18
+ "description": "Badge scale.",
19
+ "options": [
20
+ "sm",
21
+ "default",
22
+ "lg"
23
+ ],
24
+ "default": "default"
25
+ },
26
+ "showPublic": {
27
+ "description": "Boolean. Render a Public badge for public posts (hidden by default)."
28
+ },
29
+ "membersLabel": {
30
+ "description": "Custom label for members-only posts.",
31
+ "default": "Members only"
32
+ },
33
+ "paidLabel": {
34
+ "description": "Custom label for paid-only posts.",
35
+ "default": "Paid only"
36
+ },
37
+ "tiersLabel": {
38
+ "description": "Custom label for specific-tier posts.",
39
+ "default": "Specific tiers"
40
+ },
41
+ "publicLabel": {
42
+ "description": "Custom label for public posts when showPublic=true.",
43
+ "default": "Public"
44
+ }
45
+ },
46
+ "files": [
47
+ {
48
+ "name": "visibility-badge.hbs",
49
+ "type": "partial",
50
+ "target": "partials/components/visibility-badge.hbs",
51
+ "content": "{{!-- Styling parameters: class --}}\n{{#with this as |ghostcnStyles|}}\n{{#match visibility \"members\"}}\n<span class=\"ghcn-visibility-badge{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-visibility=\"members\" data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"subtle\"}}subtle{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\"><svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"7\" width=\"10\" height=\"7\" rx=\"1.5\"/><path d=\"M5.5 7V5a2.5 2.5 0 0 1 5 0v2\"/></svg><span>{{#if membersLabel}}{{membersLabel}}{{else}}Members only{{/if}}</span></span>\n{{else}}{{#match visibility \"paid\"}}\n<span class=\"ghcn-visibility-badge{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-visibility=\"paid\" data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"subtle\"}}subtle{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\"><svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m8 2.2 1.8 3.6 4 .6-2.9 2.8.7 4L8 11.3l-3.6 1.9.7-4-2.9-2.8 4-.6L8 2.2Z\"/></svg><span>{{#if paidLabel}}{{paidLabel}}{{else}}Paid only{{/if}}</span></span>\n{{else}}{{#match visibility \"tiers\"}}\n<span class=\"ghcn-visibility-badge{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-visibility=\"tiers\" data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"subtle\"}}subtle{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\"><svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m8 2.2 1.8 3.6 4 .6-2.9 2.8.7 4L8 11.3l-3.6 1.9.7-4-2.9-2.8 4-.6L8 2.2Z\"/></svg><span>{{#if tiersLabel}}{{tiersLabel}}{{else}}Specific tiers{{/if}}</span></span>\n{{else}}{{#if showPublic}}\n<span class=\"ghcn-visibility-badge{{#if ghostcnStyles.class}} {{ghostcnStyles.class}}{{/if}}\" data-visibility=\"public\" data-variant=\"{{#match variant \"outline\"}}outline{{else}}{{#match variant \"subtle\"}}subtle{{else}}default{{/match}}{{/match}}\" data-size=\"{{#match size \"sm\"}}sm{{else}}{{#match size \"lg\"}}lg{{else}}default{{/match}}{{/match}}\"><svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"8\" cy=\"8\" r=\"5.5\"/><path d=\"M2.5 8h11M8 2.5a8.5 8.5 0 0 1 0 11 8.5 8.5 0 0 1 0-11Z\"/></svg><span>{{#if publicLabel}}{{publicLabel}}{{else}}Public{{/if}}</span></span>\n{{/if}}{{/match}}{{/match}}{{/match}}\n{{/with}}"
52
+ },
53
+ {
54
+ "name": "visibility-badge.css",
55
+ "type": "style",
56
+ "target": "assets/css/components/visibility-badge.css",
57
+ "content": ".ghcn-visibility-badge { box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 9999px; background: var(--secondary); color: var(--secondary-foreground); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.25; white-space: nowrap; }\n.ghcn-visibility-badge:where([data-visibility=\"paid\"]),\n.ghcn-visibility-badge:where([data-visibility=\"tiers\"]) { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }\n.ghcn-visibility-badge:where([data-size=\"sm\"]) { font-size: 11px; padding: 2px 7px; gap: 4px; }\n.ghcn-visibility-badge:where([data-size=\"lg\"]) { font-size: 14px; padding: 4px 11px; gap: 6px; }\n.ghcn-visibility-badge:where([data-variant=\"outline\"]) { background: transparent; color: var(--foreground); border-color: var(--border); }\n.ghcn-visibility-badge:where([data-variant=\"outline\"][data-visibility=\"paid\"]),\n.ghcn-visibility-badge:where([data-variant=\"outline\"][data-visibility=\"tiers\"]) { border-color: var(--primary); color: var(--primary); }\n.ghcn-visibility-badge:where([data-variant=\"subtle\"]) { background: transparent; border-color: transparent; padding-inline: 2px; color: var(--muted-foreground); }\n.ghcn-visibility-badge:where([data-variant=\"subtle\"][data-visibility=\"paid\"]),\n.ghcn-visibility-badge:where([data-variant=\"subtle\"][data-visibility=\"tiers\"]) { color: var(--foreground); }\n"
58
+ }
59
+ ],
60
+ "gscan": {
61
+ "rules_satisfied": [
62
+ "GS010-PJ-VALID"
63
+ ],
64
+ "notes": "Uses native Ghost post {{visibility}} property (public, members, paid, tiers)."
65
+ },
66
+ "styleSlots": {
67
+ "class": [
68
+ ".ghcn-visibility-badge"
69
+ ]
70
+ }
71
+ }