@loworbitstudio/visor 1.13.0 → 1.15.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.
- package/README.md +46 -0
- package/dist/CHANGELOG.json +1 -1
- package/dist/index.js +1137 -381
- package/dist/init-plays.json +22 -0
- package/dist/registry.json +2 -2
- package/dist/visor-manifest.json +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plays": [
|
|
3
|
+
{
|
|
4
|
+
"id": "pattern-build",
|
|
5
|
+
"loSubdir": "pattern-builds",
|
|
6
|
+
"label": "Pattern build",
|
|
7
|
+
"description": "Design + converge a reusable Borealis pattern (admin-ui, forms, ...)."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "new-web-app",
|
|
11
|
+
"loSubdir": "new-web-apps",
|
|
12
|
+
"label": "New web app",
|
|
13
|
+
"description": "A fresh NextJS app entering the Playbook lifecycle."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "feature-addition",
|
|
17
|
+
"loSubdir": "feature-additions",
|
|
18
|
+
"label": "Feature addition",
|
|
19
|
+
"description": "An existing project onboarding into the Playbook mid-stream (safe, idempotent)."
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
package/dist/registry.json
CHANGED
|
@@ -2687,7 +2687,7 @@
|
|
|
2687
2687
|
{
|
|
2688
2688
|
"path": "components/ui/page-header/page-header.tsx",
|
|
2689
2689
|
"type": "registry:ui",
|
|
2690
|
-
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./page-header.module.css\"\n\nconst pageHeaderVariants = cva(styles.base, {\n variants: {\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\ntype PageHeaderElement = \"header\" | \"section\" | \"div\"\ntype TitleElement = \"h1\" | \"h2\" | \"h3\"\n\n/** Token preset values for the `titleSize` prop. */\nconst TITLE_SIZE_TOKENS = [\"default\", \"marquee\"] as const\ntype TitleSizeToken = (typeof TITLE_SIZE_TOKENS)[number]\n\n/** Token preset values for the `titleFamily` prop. */\nconst TITLE_FAMILY_TOKENS = [\"heading\", \"display\"] as const\ntype TitleFamilyToken = (typeof TITLE_FAMILY_TOKENS)[number]\n\nfunction isTitleSizeToken(value: string): value is TitleSizeToken {\n return (TITLE_SIZE_TOKENS as readonly string[]).includes(value)\n}\n\nfunction isTitleFamilyToken(value: string): value is TitleFamilyToken {\n return (TITLE_FAMILY_TOKENS as readonly string[]).includes(value)\n}\n\nexport interface PageHeaderProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"title\">,\n VariantProps<typeof pageHeaderVariants> {\n /** Optional small uppercase label rendered above the title. */\n eyebrow?: React.ReactNode\n /** Page heading content. Rendered in the element given by `titleAs`. */\n title: React.ReactNode\n /** Optional supporting copy rendered below the title. */\n description?: React.ReactNode\n /** Optional ReactNode rendered above the title row (typically a Breadcrumb). */\n breadcrumb?: React.ReactNode\n /**\n * Optional media/identity node rendered to the LEFT of the title block inside\n * the title row (typically an Avatar or identity plate). When present the row\n * forms an identity lockup and the slot
|
|
2690
|
+
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./page-header.module.css\"\n\nconst pageHeaderVariants = cva(styles.base, {\n variants: {\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\ntype PageHeaderElement = \"header\" | \"section\" | \"div\"\ntype TitleElement = \"h1\" | \"h2\" | \"h3\"\n\n/** Token preset values for the `titleSize` prop. */\nconst TITLE_SIZE_TOKENS = [\"default\", \"marquee\"] as const\ntype TitleSizeToken = (typeof TITLE_SIZE_TOKENS)[number]\n\n/** Token preset values for the `titleFamily` prop. */\nconst TITLE_FAMILY_TOKENS = [\"heading\", \"display\"] as const\ntype TitleFamilyToken = (typeof TITLE_FAMILY_TOKENS)[number]\n\nfunction isTitleSizeToken(value: string): value is TitleSizeToken {\n return (TITLE_SIZE_TOKENS as readonly string[]).includes(value)\n}\n\nfunction isTitleFamilyToken(value: string): value is TitleFamilyToken {\n return (TITLE_FAMILY_TOKENS as readonly string[]).includes(value)\n}\n\nexport interface PageHeaderProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"title\">,\n VariantProps<typeof pageHeaderVariants> {\n /** Optional small uppercase label rendered above the title. */\n eyebrow?: React.ReactNode\n /** Page heading content. Rendered in the element given by `titleAs`. */\n title: React.ReactNode\n /** Optional supporting copy rendered below the title. */\n description?: React.ReactNode\n /** Optional ReactNode rendered above the title row (typically a Breadcrumb). */\n breadcrumb?: React.ReactNode\n /**\n * Optional media/identity node rendered to the LEFT of the title block inside\n * the title row (typically an Avatar or identity plate). When present the row\n * forms an identity lockup and the slot vertically centers against the\n * title/description stack (the VI-539 top-align was superseded by the VI-545\n * admin-editorial reconcile). Omitting it leaves the row exactly as the default\n * text|actions layout, so existing call sites render unchanged.\n */\n leading?: React.ReactNode\n /** Optional ReactNode rendered on the right side of the title row. */\n actions?: React.ReactNode\n /** Root element tag. Defaults to `header`. */\n as?: PageHeaderElement\n /** Heading level for the title. Defaults to `h1`. */\n titleAs?: TitleElement\n /**\n * Title font-size override. Token presets (`\"default\" | \"marquee\"`) map to\n * `data-title-size` attributes; any other string is forwarded as a raw CSS\n * length on the `--page-header-title-size` custom property.\n */\n titleSize?: \"default\" | \"marquee\" | (string & {})\n /**\n * Title font-family override. Token presets (`\"heading\" | \"display\"`) map\n * to `data-title-family` attributes; any other string is forwarded as a\n * raw CSS family on the `--page-header-title-family` custom property.\n */\n titleFamily?: \"heading\" | \"display\" | (string & {})\n /**\n * Title line-height override. Forwarded as a raw CSS `line-height` value\n * on the `--page-header-title-leading` custom property (a unitless number\n * like `1.05` or any CSS length). When omitted, the title falls back to its\n * default line-height (tight for the standard title, `1` for the marquee\n * scale), so existing call sites render unchanged.\n */\n titleLeading?: string | number\n}\n\nconst PageHeader = React.forwardRef<HTMLElement, PageHeaderProps>(\n (\n {\n className,\n size,\n eyebrow,\n title,\n description,\n breadcrumb,\n leading,\n actions,\n as = \"header\",\n titleAs = \"h1\",\n titleSize,\n titleFamily,\n titleLeading,\n ...props\n },\n ref\n ) => {\n const Root = as as React.ElementType\n const Title = titleAs as React.ElementType\n\n const titleSizeToken =\n typeof titleSize === \"string\" && isTitleSizeToken(titleSize)\n ? titleSize\n : undefined\n const titleFamilyToken =\n typeof titleFamily === \"string\" && isTitleFamilyToken(titleFamily)\n ? titleFamily\n : undefined\n\n const rawTitleSize =\n typeof titleSize === \"string\" && !titleSizeToken ? titleSize : undefined\n const rawTitleFamily =\n typeof titleFamily === \"string\" && !titleFamilyToken\n ? titleFamily\n : undefined\n\n const hasTitleLeading = titleLeading !== undefined && titleLeading !== null\n\n const titleStyle: React.CSSProperties | undefined =\n rawTitleSize || rawTitleFamily || hasTitleLeading\n ? {\n ...(rawTitleSize\n ? ({\n \"--page-header-title-size\": rawTitleSize,\n } as React.CSSProperties)\n : null),\n ...(rawTitleFamily\n ? ({\n \"--page-header-title-family\": rawTitleFamily,\n } as React.CSSProperties)\n : null),\n ...(hasTitleLeading\n ? ({\n \"--page-header-title-leading\": String(titleLeading),\n } as React.CSSProperties)\n : null),\n }\n : undefined\n\n // When a raw string is supplied, switch the title into the \"marquee\" /\n // \"display\" rules that consume the custom property so the override\n // actually takes effect. Token values map directly to data-attributes.\n const resolvedTitleSizeAttr =\n titleSizeToken ?? (rawTitleSize ? \"marquee\" : undefined)\n const resolvedTitleFamilyAttr =\n titleFamilyToken ?? (rawTitleFamily ? \"display\" : undefined)\n\n return (\n <Root\n ref={ref}\n data-slot=\"page-header\"\n className={cn(pageHeaderVariants({ size }), className)}\n {...props}\n >\n {breadcrumb ? (\n <div data-slot=\"page-header-breadcrumb\" className={styles.breadcrumb}>\n {breadcrumb}\n </div>\n ) : null}\n <div\n data-slot=\"page-header-row\"\n data-has-leading={leading ? \"\" : undefined}\n className={styles.row}\n >\n {leading ? (\n <div data-slot=\"page-header-leading\" className={styles.leading}>\n {leading}\n </div>\n ) : null}\n <div data-slot=\"page-header-text\" className={styles.text}>\n {eyebrow ? (\n <div data-slot=\"page-header-eyebrow\" className={styles.eyebrow}>\n {eyebrow}\n </div>\n ) : null}\n <Title\n data-slot=\"page-header-title\"\n data-title-size={resolvedTitleSizeAttr}\n data-title-family={resolvedTitleFamilyAttr}\n className={styles.title}\n style={titleStyle}\n >\n {title}\n </Title>\n {description ? (\n <p\n data-slot=\"page-header-description\"\n className={styles.description}\n >\n {description}\n </p>\n ) : null}\n </div>\n {actions ? (\n <div data-slot=\"page-header-actions\" className={styles.actions}>\n {actions}\n </div>\n ) : null}\n </div>\n </Root>\n )\n }\n)\nPageHeader.displayName = \"PageHeader\"\n\nexport { PageHeader, pageHeaderVariants }\n"
|
|
2691
2691
|
},
|
|
2692
2692
|
{
|
|
2693
2693
|
"path": "components/ui/page-header/page-header.module.css",
|
|
@@ -4831,7 +4831,7 @@
|
|
|
4831
4831
|
{
|
|
4832
4832
|
"path": "components/visual/hero-glow/hero-glow.module.css",
|
|
4833
4833
|
"type": "registry:ui",
|
|
4834
|
-
"content": "/* HeroGlow: breathing radial glow band for hero media\n *\n * Port of bl-hero-glow (blacklight-website globals-css, BL-326).\n *\n * Color contract:\n * Color is driven exclusively by --glow-color, which the consumer sets\n * inline or resets every rAF frame (ex. keyed to the active artist color).\n * No hex values are baked in. Fallback is transparent so nothing renders\n * when the var is unset — intentional: callers must supply a color.\n *\n * Layout:\n * position: absolute with negative inset so the glow bleeds outside the\n * parent's box. The parent must be position: relative. pointer-events: none\n * ensures the glow never captures clicks.\n *\n * Animation:\n * @keyframes hero-glow-breathe: opacity 0.75 ↔ 1, scale 1 ↔ 1.03, 7s cycle.\n * prefers-reduced-motion: animation is disabled — glow
|
|
4834
|
+
"content": "/* HeroGlow: breathing radial glow band for hero media\n *\n * Port of bl-hero-glow (blacklight-website globals-css, BL-326).\n *\n * Color contract:\n * Color is driven exclusively by --glow-color, which the consumer sets\n * inline or resets every rAF frame (ex. keyed to the active artist color).\n * No hex values are baked in. Fallback is transparent so nothing renders\n * when the var is unset — intentional: callers must supply a color.\n *\n * Layout:\n * position: absolute with negative inset so the glow bleeds outside the\n * parent's box. The parent must be position: relative. pointer-events: none\n * ensures the glow never captures clicks.\n *\n * Animation:\n * @keyframes hero-glow-breathe: opacity 0.75 ↔ 1, scale 1 ↔ 1.03, 7s cycle.\n * prefers-reduced-motion: animation is disabled — glow rests at full opacity (1),\n * faithful to the bl-hero-glow origin (not the keyframe's 0.75 rest value).\n */\n\n/* ── Keyframe ────────────────────────────────────────────────────────────── */\n\n@keyframes hero-glow-breathe {\n 0%,\n 100% {\n opacity: 0.75;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(1.03);\n }\n}\n\n/* ── Root ────────────────────────────────────────────────────────────────── */\n\n.root {\n position: absolute;\n inset: -6% -8% -10%;\n pointer-events: none;\n background: radial-gradient(\n 70% 60% at 50% 55%,\n color-mix(in srgb, var(--glow-color, transparent) 16%, transparent),\n transparent 72%\n );\n animation: hero-glow-breathe 7s ease-in-out infinite;\n}\n\n/* ── Reduced motion ─────────────────────────────────────────────────────── */\n\n@media (prefers-reduced-motion: reduce) {\n .root {\n animation: none;\n /* Rest at full opacity, faithful to the bl-hero-glow origin (BL-326);\n do not re-normalize to the keyframe's 0.75 rest value (VI-581). */\n opacity: 1;\n transform: scale(1);\n }\n}\n"
|
|
4835
4835
|
}
|
|
4836
4836
|
]
|
|
4837
4837
|
},
|
package/dist/visor-manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loworbitstudio/visor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "CLI for the Visor design system — add components, hooks, and utilities to your project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "npm run build:cli && npm run build:registry && npm run build:manifest",
|
|
11
|
+
"build": "npm run build:cli && npm run build:registry && npm run build:manifest && npm run build:init-plays",
|
|
12
12
|
"build:registry": "tsx src/generate/build-registry.ts",
|
|
13
13
|
"build:manifest": "tsx src/generate/build-manifest.ts",
|
|
14
|
+
"build:init-plays": "tsx src/generate/build-init-plays.ts",
|
|
14
15
|
"build:cli": "tsup",
|
|
15
16
|
"typecheck": "tsc --noEmit",
|
|
16
17
|
"test": "vitest run"
|
|
@@ -45,11 +46,12 @@
|
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@aws-sdk/client-s3": "^3.1021.0",
|
|
47
48
|
"@babel/parser": "^7.26.0",
|
|
48
|
-
"@loworbitstudio/visor-theme-engine": "^0.17.
|
|
49
|
+
"@loworbitstudio/visor-theme-engine": "^0.17.1",
|
|
49
50
|
"commander": "^13.1.0",
|
|
50
51
|
"diff": "^8.0.4",
|
|
51
52
|
"picocolors": "^1.1.1",
|
|
52
|
-
"yaml": "^2.8.3"
|
|
53
|
+
"yaml": "^2.8.3",
|
|
54
|
+
"zod": "^3.25.76"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
57
|
"@types/node": "^22.0.0",
|