@publish.os/nextjs 0.0.1-alpha.3 → 0.0.1-alpha.5
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 +3 -9
- package/dist/index.cjs +26 -23
- package/dist/index.js +26 -23
- package/dist/kernel/components/blocks/design-system-preview.cjs +18 -17
- package/dist/kernel/components/blocks/design-system-preview.js +18 -17
- package/dist/kernel/components/blocks/link-playground.cjs +3 -3
- package/dist/kernel/components/blocks/link-playground.js +3 -3
- package/dist/kernel/components/blocks/navbar.cjs +1 -1
- package/dist/kernel/components/blocks/navbar.js +1 -1
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +2 -2
- package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
- package/dist/kernel/components/ui/button-group.cjs +2 -3
- package/dist/kernel/components/ui/button-group.d.cts +2 -2
- package/dist/kernel/components/ui/button-group.d.ts +2 -2
- package/dist/kernel/components/ui/button-group.js +2 -3
- package/dist/kernel/components/ui/button.cjs +4 -12
- package/dist/kernel/components/ui/button.d.cts +3 -4
- package/dist/kernel/components/ui/button.d.ts +3 -4
- package/dist/kernel/components/ui/button.js +4 -12
- package/dist/kernel/components/ui/card.d.cts +1 -1
- package/dist/kernel/components/ui/card.d.ts +1 -1
- package/dist/kernel/components/ui/tag.cjs +104 -0
- package/dist/kernel/components/ui/tag.d.cts +14 -0
- package/dist/kernel/components/ui/tag.d.ts +14 -0
- package/dist/kernel/components/ui/tag.js +76 -0
- package/dist/kernel/components/ui/text.d.cts +1 -1
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/theme-toggle.cjs +1 -1
- package/dist/kernel/components/ui/theme-toggle.js +1 -1
- package/dist/kernel/defaults.registry.cjs +4 -4
- package/dist/kernel/defaults.registry.d.cts +4 -4
- package/dist/kernel/defaults.registry.d.ts +4 -4
- package/dist/kernel/defaults.registry.js +4 -4
- package/dist/kernel/routes/agent/markdown.cjs +5 -11
- package/dist/kernel/routes/agent/markdown.d.cts +0 -1
- package/dist/kernel/routes/agent/markdown.d.ts +0 -1
- package/dist/kernel/routes/agent/markdown.js +5 -11
- package/dist/kernel/routes/metadata/feed.cjs +17 -21
- package/dist/kernel/routes/metadata/feed.d.cts +0 -1
- package/dist/kernel/routes/metadata/feed.d.ts +0 -1
- package/dist/kernel/routes/metadata/feed.js +17 -21
- package/dist/kernel/routes/metadata/llms.cjs +21 -16
- package/dist/kernel/routes/metadata/llms.d.cts +0 -1
- package/dist/kernel/routes/metadata/llms.d.ts +0 -1
- package/dist/kernel/routes/metadata/llms.js +21 -16
- package/dist/kernel/routes/metadata/robots.cjs +21 -11
- package/dist/kernel/routes/metadata/robots.js +21 -11
- package/dist/kernel/routes/metadata/sitemap.cjs +29 -19
- package/dist/kernel/routes/metadata/sitemap.js +29 -19
- package/package.json +28 -5
- package/release/package.json +23 -0
- package/release/pnpm-lock.yaml +1215 -0
- package/release/release.json +39 -0
- package/dist/kernel/components/ui/badge.cjs +0 -75
- package/dist/kernel/components/ui/badge.d.cts +0 -12
- package/dist/kernel/components/ui/badge.d.ts +0 -12
- package/dist/kernel/components/ui/badge.js +0 -47
|
@@ -61,8 +61,8 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
61
61
|
{
|
|
62
62
|
variants: {
|
|
63
63
|
variant: {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
solid: "border-accent-solid bg-accent-solid text-accent-foreground shadow-sm hover:not-data-disabled:border-accent-solid-hover hover:not-data-disabled:bg-accent-solid-hover active:not-data-disabled:border-accent-solid-active active:not-data-disabled:bg-accent-solid-active data-[state=path-active]:border-accent-solid-hover data-[state=path-active]:bg-accent-solid-hover",
|
|
65
|
+
soft: "border-0 bg-accent-soft text-accent-1 hover:not-data-disabled:bg-accent-soft-hover active:not-data-disabled:bg-accent-soft-active data-[state=path-active]:bg-accent-soft-active",
|
|
66
66
|
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-border data-[state=path-active]:bg-accent-soft-hover data-[state=path-active]:text-accent-1",
|
|
67
67
|
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active data-[state=path-active]:bg-accent-soft-hover data-[state=path-active]:text-accent-1"
|
|
68
68
|
},
|
|
@@ -76,9 +76,6 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
76
76
|
iconOnly: {
|
|
77
77
|
false: "",
|
|
78
78
|
true: "gap-0 px-0"
|
|
79
|
-
},
|
|
80
|
-
color: {
|
|
81
|
-
default: ""
|
|
82
79
|
}
|
|
83
80
|
},
|
|
84
81
|
compoundVariants: [
|
|
@@ -89,10 +86,9 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
89
86
|
{ className: "size-12 p-0", iconOnly: true, size: "xl" }
|
|
90
87
|
],
|
|
91
88
|
defaultVariants: {
|
|
92
|
-
color: "default",
|
|
93
89
|
iconOnly: false,
|
|
94
90
|
size: "md",
|
|
95
|
-
variant: "
|
|
91
|
+
variant: "solid"
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
);
|
|
@@ -109,7 +105,6 @@ function Button({
|
|
|
109
105
|
active,
|
|
110
106
|
children,
|
|
111
107
|
className,
|
|
112
|
-
color,
|
|
113
108
|
disabled,
|
|
114
109
|
iconOnly,
|
|
115
110
|
leftIcon,
|
|
@@ -123,10 +118,7 @@ function Button({
|
|
|
123
118
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
124
119
|
import_button.Button,
|
|
125
120
|
{
|
|
126
|
-
className: cn(
|
|
127
|
-
buttonVariants({ color, iconOnly, size, variant }),
|
|
128
|
-
className
|
|
129
|
-
),
|
|
121
|
+
className: cn(buttonVariants({ iconOnly, size, variant }), className),
|
|
130
122
|
"data-state": active ? "path-active" : void 0,
|
|
131
123
|
disabled: disabled || loading,
|
|
132
124
|
focusableWhenDisabled: loading,
|
|
@@ -4,10 +4,9 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
8
8
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
9
|
iconOnly?: boolean | null | undefined;
|
|
10
|
-
color?: "default" | null | undefined;
|
|
11
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
11
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
13
12
|
type ButtonProps = {
|
|
@@ -17,7 +16,7 @@ type ButtonProps = {
|
|
|
17
16
|
leftIcon?: ReactNode;
|
|
18
17
|
loading?: boolean;
|
|
19
18
|
rightIcon?: ReactNode;
|
|
20
|
-
} & ButtonVariantProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className"
|
|
21
|
-
declare function Button({ active, children, className,
|
|
19
|
+
} & ButtonVariantProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className">;
|
|
20
|
+
declare function Button({ active, children, className, disabled, iconOnly, leftIcon, loading, rightIcon, size, type, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
22
21
|
|
|
23
22
|
export { Button, type ButtonProps, type ButtonVariantProps, buttonVariants };
|
|
@@ -4,10 +4,9 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
8
8
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
9
|
iconOnly?: boolean | null | undefined;
|
|
10
|
-
color?: "default" | null | undefined;
|
|
11
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
11
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
13
12
|
type ButtonProps = {
|
|
@@ -17,7 +16,7 @@ type ButtonProps = {
|
|
|
17
16
|
leftIcon?: ReactNode;
|
|
18
17
|
loading?: boolean;
|
|
19
18
|
rightIcon?: ReactNode;
|
|
20
|
-
} & ButtonVariantProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className"
|
|
21
|
-
declare function Button({ active, children, className,
|
|
19
|
+
} & ButtonVariantProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className">;
|
|
20
|
+
declare function Button({ active, children, className, disabled, iconOnly, leftIcon, loading, rightIcon, size, type, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
22
21
|
|
|
23
22
|
export { Button, type ButtonProps, type ButtonVariantProps, buttonVariants };
|
|
@@ -36,8 +36,8 @@ var buttonVariants = cva(
|
|
|
36
36
|
{
|
|
37
37
|
variants: {
|
|
38
38
|
variant: {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
solid: "border-accent-solid bg-accent-solid text-accent-foreground shadow-sm hover:not-data-disabled:border-accent-solid-hover hover:not-data-disabled:bg-accent-solid-hover active:not-data-disabled:border-accent-solid-active active:not-data-disabled:bg-accent-solid-active data-[state=path-active]:border-accent-solid-hover data-[state=path-active]:bg-accent-solid-hover",
|
|
40
|
+
soft: "border-0 bg-accent-soft text-accent-1 hover:not-data-disabled:bg-accent-soft-hover active:not-data-disabled:bg-accent-soft-active data-[state=path-active]:bg-accent-soft-active",
|
|
41
41
|
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-border data-[state=path-active]:bg-accent-soft-hover data-[state=path-active]:text-accent-1",
|
|
42
42
|
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active data-[state=path-active]:bg-accent-soft-hover data-[state=path-active]:text-accent-1"
|
|
43
43
|
},
|
|
@@ -51,9 +51,6 @@ var buttonVariants = cva(
|
|
|
51
51
|
iconOnly: {
|
|
52
52
|
false: "",
|
|
53
53
|
true: "gap-0 px-0"
|
|
54
|
-
},
|
|
55
|
-
color: {
|
|
56
|
-
default: ""
|
|
57
54
|
}
|
|
58
55
|
},
|
|
59
56
|
compoundVariants: [
|
|
@@ -64,10 +61,9 @@ var buttonVariants = cva(
|
|
|
64
61
|
{ className: "size-12 p-0", iconOnly: true, size: "xl" }
|
|
65
62
|
],
|
|
66
63
|
defaultVariants: {
|
|
67
|
-
color: "default",
|
|
68
64
|
iconOnly: false,
|
|
69
65
|
size: "md",
|
|
70
|
-
variant: "
|
|
66
|
+
variant: "solid"
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
69
|
);
|
|
@@ -84,7 +80,6 @@ function Button({
|
|
|
84
80
|
active,
|
|
85
81
|
children,
|
|
86
82
|
className,
|
|
87
|
-
color,
|
|
88
83
|
disabled,
|
|
89
84
|
iconOnly,
|
|
90
85
|
leftIcon,
|
|
@@ -98,10 +93,7 @@ function Button({
|
|
|
98
93
|
return /* @__PURE__ */ jsxs(
|
|
99
94
|
BaseButton,
|
|
100
95
|
{
|
|
101
|
-
className: cn(
|
|
102
|
-
buttonVariants({ color, iconOnly, size, variant }),
|
|
103
|
-
className
|
|
104
|
-
),
|
|
96
|
+
className: cn(buttonVariants({ iconOnly, size, variant }), className),
|
|
105
97
|
"data-state": active ? "path-active" : void 0,
|
|
106
98
|
disabled: disabled || loading,
|
|
107
99
|
focusableWhenDisabled: loading,
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const cardVariants: (props?: ({
|
|
7
|
-
variant?: "ghost" | "
|
|
7
|
+
variant?: "ghost" | "inset" | "default" | "elevated" | null | undefined;
|
|
8
8
|
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type CardProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>;
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const cardVariants: (props?: ({
|
|
7
|
-
variant?: "ghost" | "
|
|
7
|
+
variant?: "ghost" | "inset" | "default" | "elevated" | null | undefined;
|
|
8
8
|
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type CardProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/kernel/components/ui/tag.tsx
|
|
21
|
+
var tag_exports = {};
|
|
22
|
+
__export(tag_exports, {
|
|
23
|
+
Tag: () => Tag,
|
|
24
|
+
tagVariants: () => tagVariants
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(tag_exports);
|
|
27
|
+
|
|
28
|
+
// src/utils/cn.ts
|
|
29
|
+
var import_clsx = require("clsx");
|
|
30
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
32
|
+
extend: {
|
|
33
|
+
classGroups: {
|
|
34
|
+
z: [
|
|
35
|
+
"z-content",
|
|
36
|
+
"z-nav",
|
|
37
|
+
"z-overlay",
|
|
38
|
+
"z-modal",
|
|
39
|
+
"z-search",
|
|
40
|
+
"z-toast",
|
|
41
|
+
"z-progress"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function cn(...inputs) {
|
|
47
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/kernel/components/ui/tag.tsx
|
|
51
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
52
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
|
+
var tagVariants = (0, import_class_variance_authority.cva)(
|
|
54
|
+
"inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-tag border px-2 py-0.5 text-xs font-medium leading-5 [&_svg]:shrink-0",
|
|
55
|
+
{
|
|
56
|
+
variants: {
|
|
57
|
+
borderStyle: {
|
|
58
|
+
dotted: "",
|
|
59
|
+
solid: ""
|
|
60
|
+
},
|
|
61
|
+
tone: {
|
|
62
|
+
accent: "[--tag-color:var(--accent-1)] [--tag-solid-background:var(--accent-solid)] [--tag-solid-foreground:var(--accent-foreground)]",
|
|
63
|
+
neutral: "[--tag-color:var(--foreground-2)] [--tag-solid-background:var(--foreground-1)] [--tag-solid-foreground:var(--surface-1)]"
|
|
64
|
+
},
|
|
65
|
+
variant: {
|
|
66
|
+
outline: "border-[color-mix(in_oklch,var(--tag-color)_48%,transparent)] bg-transparent text-[var(--tag-color)]",
|
|
67
|
+
soft: "border-[color-mix(in_oklch,var(--tag-color)_20%,transparent)] bg-[color-mix(in_oklch,var(--tag-color)_9%,transparent)] text-[var(--tag-color)]",
|
|
68
|
+
solid: "border-[color-mix(in_oklch,var(--tag-solid-foreground)_12%,transparent)] bg-[var(--tag-solid-background)] text-[var(--tag-solid-foreground)] shadow-[inset_0_1px_0_rgb(255_255_255_/_0.035),0_1px_1px_rgb(0_0_0_/_0.025)]"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
compoundVariants: [
|
|
72
|
+
{
|
|
73
|
+
borderStyle: "dotted",
|
|
74
|
+
className: "border-dotted",
|
|
75
|
+
variant: ["solid", "soft", "outline"]
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
borderStyle: "solid",
|
|
80
|
+
tone: "neutral",
|
|
81
|
+
variant: "solid"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
function Tag({
|
|
86
|
+
borderStyle,
|
|
87
|
+
className,
|
|
88
|
+
tone,
|
|
89
|
+
variant,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: cn(tagVariants({ borderStyle, tone, variant }), className),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
Tag,
|
|
103
|
+
tagVariants
|
|
104
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const tagVariants: (props?: ({
|
|
7
|
+
borderStyle?: "solid" | "dotted" | null | undefined;
|
|
8
|
+
tone?: "accent" | "neutral" | null | undefined;
|
|
9
|
+
variant?: "solid" | "soft" | "outline" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
type TagProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof tagVariants>;
|
|
12
|
+
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps, tagVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const tagVariants: (props?: ({
|
|
7
|
+
borderStyle?: "solid" | "dotted" | null | undefined;
|
|
8
|
+
tone?: "accent" | "neutral" | null | undefined;
|
|
9
|
+
variant?: "solid" | "soft" | "outline" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
type TagProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof tagVariants>;
|
|
12
|
+
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps, tagVariants };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// src/utils/cn.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
+
var twMerge = extendTailwindMerge({
|
|
5
|
+
extend: {
|
|
6
|
+
classGroups: {
|
|
7
|
+
z: [
|
|
8
|
+
"z-content",
|
|
9
|
+
"z-nav",
|
|
10
|
+
"z-overlay",
|
|
11
|
+
"z-modal",
|
|
12
|
+
"z-search",
|
|
13
|
+
"z-toast",
|
|
14
|
+
"z-progress"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
function cn(...inputs) {
|
|
20
|
+
return twMerge(clsx(inputs));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/kernel/components/ui/tag.tsx
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { jsx } from "react/jsx-runtime";
|
|
26
|
+
var tagVariants = cva(
|
|
27
|
+
"inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-tag border px-2 py-0.5 text-xs font-medium leading-5 [&_svg]:shrink-0",
|
|
28
|
+
{
|
|
29
|
+
variants: {
|
|
30
|
+
borderStyle: {
|
|
31
|
+
dotted: "",
|
|
32
|
+
solid: ""
|
|
33
|
+
},
|
|
34
|
+
tone: {
|
|
35
|
+
accent: "[--tag-color:var(--accent-1)] [--tag-solid-background:var(--accent-solid)] [--tag-solid-foreground:var(--accent-foreground)]",
|
|
36
|
+
neutral: "[--tag-color:var(--foreground-2)] [--tag-solid-background:var(--foreground-1)] [--tag-solid-foreground:var(--surface-1)]"
|
|
37
|
+
},
|
|
38
|
+
variant: {
|
|
39
|
+
outline: "border-[color-mix(in_oklch,var(--tag-color)_48%,transparent)] bg-transparent text-[var(--tag-color)]",
|
|
40
|
+
soft: "border-[color-mix(in_oklch,var(--tag-color)_20%,transparent)] bg-[color-mix(in_oklch,var(--tag-color)_9%,transparent)] text-[var(--tag-color)]",
|
|
41
|
+
solid: "border-[color-mix(in_oklch,var(--tag-solid-foreground)_12%,transparent)] bg-[var(--tag-solid-background)] text-[var(--tag-solid-foreground)] shadow-[inset_0_1px_0_rgb(255_255_255_/_0.035),0_1px_1px_rgb(0_0_0_/_0.025)]"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
compoundVariants: [
|
|
45
|
+
{
|
|
46
|
+
borderStyle: "dotted",
|
|
47
|
+
className: "border-dotted",
|
|
48
|
+
variant: ["solid", "soft", "outline"]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
borderStyle: "solid",
|
|
53
|
+
tone: "neutral",
|
|
54
|
+
variant: "solid"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
function Tag({
|
|
59
|
+
borderStyle,
|
|
60
|
+
className,
|
|
61
|
+
tone,
|
|
62
|
+
variant,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: cn(tagVariants({ borderStyle, tone, variant }), className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
Tag,
|
|
75
|
+
tagVariants
|
|
76
|
+
};
|
|
@@ -6,7 +6,7 @@ import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
8
8
|
variant?: "body" | "label" | "overline" | "headline" | null | undefined;
|
|
9
|
-
weight?: "
|
|
9
|
+
weight?: "bold" | "medium" | "default" | "semibold" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TextProps<T extends ElementType = "p"> = {
|
|
12
12
|
as?: T;
|
|
@@ -6,7 +6,7 @@ import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
8
8
|
variant?: "body" | "label" | "overline" | "headline" | null | undefined;
|
|
9
|
-
weight?: "
|
|
9
|
+
weight?: "bold" | "medium" | "default" | "semibold" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TextProps<T extends ElementType = "p"> = {
|
|
12
12
|
as?: T;
|
|
@@ -94,12 +94,12 @@ var kernelDefaultsRegistry = {
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
category: "ui",
|
|
97
|
-
name: "
|
|
97
|
+
name: "Tag",
|
|
98
98
|
status: "available",
|
|
99
99
|
description: "Small status and metadata label component.",
|
|
100
|
-
kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
101
|
-
tenantPath: "publish.os/components/ui/
|
|
102
|
-
contract: "
|
|
100
|
+
kernelImport: "@publish.os/nextjs/kernel/components/ui/tag",
|
|
101
|
+
tenantPath: "publish.os/components/ui/tag.tsx",
|
|
102
|
+
contract: "TagProps"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
category: "ui",
|
|
@@ -78,12 +78,12 @@ declare const kernelDefaultsRegistry: {
|
|
|
78
78
|
readonly contract: "CardProps";
|
|
79
79
|
}, {
|
|
80
80
|
readonly category: "ui";
|
|
81
|
-
readonly name: "
|
|
81
|
+
readonly name: "Tag";
|
|
82
82
|
readonly status: "available";
|
|
83
83
|
readonly description: "Small status and metadata label component.";
|
|
84
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
85
|
-
readonly tenantPath: "publish.os/components/ui/
|
|
86
|
-
readonly contract: "
|
|
84
|
+
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tag";
|
|
85
|
+
readonly tenantPath: "publish.os/components/ui/tag.tsx";
|
|
86
|
+
readonly contract: "TagProps";
|
|
87
87
|
}, {
|
|
88
88
|
readonly category: "ui";
|
|
89
89
|
readonly name: "Kbd";
|
|
@@ -78,12 +78,12 @@ declare const kernelDefaultsRegistry: {
|
|
|
78
78
|
readonly contract: "CardProps";
|
|
79
79
|
}, {
|
|
80
80
|
readonly category: "ui";
|
|
81
|
-
readonly name: "
|
|
81
|
+
readonly name: "Tag";
|
|
82
82
|
readonly status: "available";
|
|
83
83
|
readonly description: "Small status and metadata label component.";
|
|
84
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
85
|
-
readonly tenantPath: "publish.os/components/ui/
|
|
86
|
-
readonly contract: "
|
|
84
|
+
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tag";
|
|
85
|
+
readonly tenantPath: "publish.os/components/ui/tag.tsx";
|
|
86
|
+
readonly contract: "TagProps";
|
|
87
87
|
}, {
|
|
88
88
|
readonly category: "ui";
|
|
89
89
|
readonly name: "Kbd";
|
|
@@ -70,12 +70,12 @@ var kernelDefaultsRegistry = {
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
category: "ui",
|
|
73
|
-
name: "
|
|
73
|
+
name: "Tag",
|
|
74
74
|
status: "available",
|
|
75
75
|
description: "Small status and metadata label component.",
|
|
76
|
-
kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
77
|
-
tenantPath: "publish.os/components/ui/
|
|
78
|
-
contract: "
|
|
76
|
+
kernelImport: "@publish.os/nextjs/kernel/components/ui/tag",
|
|
77
|
+
tenantPath: "publish.os/components/ui/tag.tsx",
|
|
78
|
+
contract: "TagProps"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
category: "ui",
|
|
@@ -65,22 +65,17 @@ function cachedTextHeaders(contentType, options = {}) {
|
|
|
65
65
|
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
66
66
|
headers.set("content-type", contentType);
|
|
67
67
|
headers.set("x-content-type-options", "nosniff");
|
|
68
|
-
if (options.etag) headers.set("etag", options.etag);
|
|
69
68
|
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
70
69
|
return headers;
|
|
71
70
|
}
|
|
72
71
|
function createCachedTextResponse(options) {
|
|
73
72
|
const status = options.status ?? 200;
|
|
74
|
-
const method = options.method ??
|
|
73
|
+
const method = options.method ?? "GET";
|
|
75
74
|
const headers = cachedTextHeaders(options.contentType, options);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
headers,
|
|
81
|
-
status: isNotModified ? 304 : status
|
|
82
|
-
}
|
|
83
|
-
);
|
|
75
|
+
return new Response(method === "HEAD" ? null : options.body, {
|
|
76
|
+
headers,
|
|
77
|
+
status
|
|
78
|
+
});
|
|
84
79
|
}
|
|
85
80
|
|
|
86
81
|
// src/kernel/routes/agent/markdown.ts
|
|
@@ -181,7 +176,6 @@ async function markdownResponse(artifacts, discoveryLinks, method, context) {
|
|
|
181
176
|
return createCachedTextResponse({
|
|
182
177
|
body: artifact.body,
|
|
183
178
|
contentType,
|
|
184
|
-
etag: artifact.etag,
|
|
185
179
|
headers,
|
|
186
180
|
method,
|
|
187
181
|
status: 200
|
|
@@ -38,22 +38,17 @@ function cachedTextHeaders(contentType, options = {}) {
|
|
|
38
38
|
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
39
39
|
headers.set("content-type", contentType);
|
|
40
40
|
headers.set("x-content-type-options", "nosniff");
|
|
41
|
-
if (options.etag) headers.set("etag", options.etag);
|
|
42
41
|
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
43
42
|
return headers;
|
|
44
43
|
}
|
|
45
44
|
function createCachedTextResponse(options) {
|
|
46
45
|
const status = options.status ?? 200;
|
|
47
|
-
const method = options.method ??
|
|
46
|
+
const method = options.method ?? "GET";
|
|
48
47
|
const headers = cachedTextHeaders(options.contentType, options);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
headers,
|
|
54
|
-
status: isNotModified ? 304 : status
|
|
55
|
-
}
|
|
56
|
-
);
|
|
48
|
+
return new Response(method === "HEAD" ? null : options.body, {
|
|
49
|
+
headers,
|
|
50
|
+
status
|
|
51
|
+
});
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
// src/kernel/routes/agent/markdown.ts
|
|
@@ -154,7 +149,6 @@ async function markdownResponse(artifacts, discoveryLinks, method, context) {
|
|
|
154
149
|
return createCachedTextResponse({
|
|
155
150
|
body: artifact.body,
|
|
156
151
|
contentType,
|
|
157
|
-
etag: artifact.etag,
|
|
158
152
|
headers,
|
|
159
153
|
method,
|
|
160
154
|
status: 200
|
|
@@ -102,22 +102,28 @@ function cachedTextHeaders(contentType, options = {}) {
|
|
|
102
102
|
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
103
103
|
headers.set("content-type", contentType);
|
|
104
104
|
headers.set("x-content-type-options", "nosniff");
|
|
105
|
-
if (options.etag) headers.set("etag", options.etag);
|
|
106
105
|
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
107
106
|
return headers;
|
|
108
107
|
}
|
|
109
108
|
function createCachedTextResponse(options) {
|
|
110
109
|
const status = options.status ?? 200;
|
|
111
|
-
const method = options.method ??
|
|
110
|
+
const method = options.method ?? "GET";
|
|
112
111
|
const headers = cachedTextHeaders(options.contentType, options);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
112
|
+
return new Response(method === "HEAD" ? null : options.body, {
|
|
113
|
+
headers,
|
|
114
|
+
status
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// src/kernel/routes/metadata/canonical-url.ts
|
|
119
|
+
function canonicalUrl(manifest, path) {
|
|
120
|
+
const origin = manifest.site.url?.replace(/\/+$/, "");
|
|
121
|
+
if (!origin) return path;
|
|
122
|
+
try {
|
|
123
|
+
return new URL(path, `${origin}/`).toString();
|
|
124
|
+
} catch {
|
|
125
|
+
return path;
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
// src/kernel/routes/metadata/feed.ts
|
|
@@ -130,15 +136,6 @@ function pageTimestamp(page) {
|
|
|
130
136
|
const timestamp = Date.parse(value);
|
|
131
137
|
return Number.isNaN(timestamp) ? -Infinity : timestamp;
|
|
132
138
|
}
|
|
133
|
-
function canonicalUrl(manifest, path) {
|
|
134
|
-
const origin = manifest.site.url?.replace(/\/+$/, "");
|
|
135
|
-
if (!origin) return path;
|
|
136
|
-
try {
|
|
137
|
-
return new URL(path, `${origin}/`).toString();
|
|
138
|
-
} catch {
|
|
139
|
-
return path;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
139
|
function pageInScope(page, options) {
|
|
143
140
|
if (options.scope === "site" || !options.group) return true;
|
|
144
141
|
if (options.scope === "self") return page.group === options.group;
|
|
@@ -283,8 +280,7 @@ function createPrecomputedFeedRoute(output) {
|
|
|
283
280
|
return function GET() {
|
|
284
281
|
return createCachedTextResponse({
|
|
285
282
|
body: output.body,
|
|
286
|
-
contentType: output.contentType
|
|
287
|
-
etag: output.etag
|
|
283
|
+
contentType: output.contentType
|
|
288
284
|
});
|
|
289
285
|
};
|
|
290
286
|
}
|