@contentbit/studio 0.4.0 → 0.4.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.
- package/LICENSE +21 -0
- package/components.json +25 -0
- package/dist/client/assets/{api-C-Xwc2aB.js → api-MWiK2l_P.js} +1 -1
- package/dist/client/assets/{document-Yk8nlK-k.js → document-w62o-wDp.js} +1 -1
- package/dist/client/assets/{index-BwvfKCmy.js → index-DTXIZgkK.js} +2 -2
- package/dist/client/assets/{routes-DHIbdBYB.js → routes-Dg9spe-7.js} +1 -1
- package/dist/client/assets/{styles-BGHadX26.css → styles-DxZJz8Oi.css} +1 -1
- package/dist/server/assets/_tanstack-start-manifest_v-wPlN1Hjy.js +25 -0
- package/dist/server/assets/{router-D3JhQdql.js → router-D4DnWGjU.js} +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +13 -2
- package/dist/server/server.js +2 -2
- package/package.json +23 -18
- package/public/favicon.ico +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/components/ui/button.tsx +67 -0
- package/src/lib/api.ts +22 -0
- package/src/lib/utils.ts +6 -0
- package/src/logo.svg +12 -0
- package/src/routeTree.gen.ts +86 -0
- package/src/router.tsx +20 -0
- package/src/routes/__root.tsx +48 -0
- package/src/routes/document.tsx +268 -0
- package/src/routes/index.tsx +465 -0
- package/src/server/api.ts +58 -0
- package/src/server/index.ts +151 -0
- package/src/server/preview.ts +46 -0
- package/src/server/scan.test.ts +283 -0
- package/src/server/scan.ts +460 -0
- package/src/server/types.ts +109 -0
- package/src/styles.css +222 -0
- package/tsconfig.json +27 -0
- package/vite.config.ts +11 -0
- package/dist/server/assets/_tanstack-start-manifest_v-Djlrg1a7.js +0 -25
package/src/styles.css
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
@import 'shadcn/tailwind.css';
|
|
4
|
+
@import '@fontsource-variable/inter';
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
@theme inline {
|
|
9
|
+
--font-heading: var(--font-sans);
|
|
10
|
+
--font-sans: 'Inter Variable', sans-serif;
|
|
11
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
12
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
13
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
14
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
15
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
16
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
17
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
18
|
+
--color-sidebar: var(--sidebar);
|
|
19
|
+
--color-chart-5: var(--chart-5);
|
|
20
|
+
--color-chart-4: var(--chart-4);
|
|
21
|
+
--color-chart-3: var(--chart-3);
|
|
22
|
+
--color-chart-2: var(--chart-2);
|
|
23
|
+
--color-chart-1: var(--chart-1);
|
|
24
|
+
--color-ring: var(--ring);
|
|
25
|
+
--color-input: var(--input);
|
|
26
|
+
--color-border: var(--border);
|
|
27
|
+
--color-destructive: var(--destructive);
|
|
28
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
29
|
+
--color-accent: var(--accent);
|
|
30
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
31
|
+
--color-muted: var(--muted);
|
|
32
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
33
|
+
--color-secondary: var(--secondary);
|
|
34
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
35
|
+
--color-primary: var(--primary);
|
|
36
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
37
|
+
--color-popover: var(--popover);
|
|
38
|
+
--color-card-foreground: var(--card-foreground);
|
|
39
|
+
--color-card: var(--card);
|
|
40
|
+
--color-foreground: var(--foreground);
|
|
41
|
+
--color-background: var(--background);
|
|
42
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
43
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
44
|
+
--radius-lg: var(--radius);
|
|
45
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
46
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
47
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
48
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:root {
|
|
52
|
+
--background: oklch(1 0 0);
|
|
53
|
+
--foreground: oklch(0.145 0 0);
|
|
54
|
+
--card: oklch(1 0 0);
|
|
55
|
+
--card-foreground: oklch(0.145 0 0);
|
|
56
|
+
--popover: oklch(1 0 0);
|
|
57
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
58
|
+
--primary: oklch(0.205 0 0);
|
|
59
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
60
|
+
--secondary: oklch(0.97 0 0);
|
|
61
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
62
|
+
--muted: oklch(0.97 0 0);
|
|
63
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
64
|
+
--accent: oklch(0.97 0 0);
|
|
65
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
66
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
67
|
+
--border: oklch(0.922 0 0);
|
|
68
|
+
--input: oklch(0.922 0 0);
|
|
69
|
+
--ring: oklch(0.708 0 0);
|
|
70
|
+
--chart-1: oklch(0.87 0 0);
|
|
71
|
+
--chart-2: oklch(0.556 0 0);
|
|
72
|
+
--chart-3: oklch(0.439 0 0);
|
|
73
|
+
--chart-4: oklch(0.371 0 0);
|
|
74
|
+
--chart-5: oklch(0.269 0 0);
|
|
75
|
+
--radius: 0.625rem;
|
|
76
|
+
--sidebar: oklch(0.985 0 0);
|
|
77
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
78
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
79
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
80
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
81
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
82
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
83
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dark {
|
|
87
|
+
--background: oklch(0.145 0 0);
|
|
88
|
+
--foreground: oklch(0.985 0 0);
|
|
89
|
+
--card: oklch(0.205 0 0);
|
|
90
|
+
--card-foreground: oklch(0.985 0 0);
|
|
91
|
+
--popover: oklch(0.205 0 0);
|
|
92
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
93
|
+
--primary: oklch(0.922 0 0);
|
|
94
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
95
|
+
--secondary: oklch(0.269 0 0);
|
|
96
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
97
|
+
--muted: oklch(0.269 0 0);
|
|
98
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
99
|
+
--accent: oklch(0.269 0 0);
|
|
100
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
101
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
102
|
+
--border: oklch(1 0 0 / 10%);
|
|
103
|
+
--input: oklch(1 0 0 / 15%);
|
|
104
|
+
--ring: oklch(0.556 0 0);
|
|
105
|
+
--chart-1: oklch(0.87 0 0);
|
|
106
|
+
--chart-2: oklch(0.556 0 0);
|
|
107
|
+
--chart-3: oklch(0.439 0 0);
|
|
108
|
+
--chart-4: oklch(0.371 0 0);
|
|
109
|
+
--chart-5: oklch(0.269 0 0);
|
|
110
|
+
--sidebar: oklch(0.205 0 0);
|
|
111
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
112
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
113
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
114
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
115
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
116
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
117
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@layer base {
|
|
121
|
+
* {
|
|
122
|
+
@apply border-border outline-ring/50;
|
|
123
|
+
}
|
|
124
|
+
body {
|
|
125
|
+
@apply bg-background text-foreground;
|
|
126
|
+
text-rendering: optimizeLegibility;
|
|
127
|
+
}
|
|
128
|
+
html {
|
|
129
|
+
@apply font-sans;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@layer components {
|
|
134
|
+
.studio-preview {
|
|
135
|
+
@apply max-w-none text-sm leading-7 text-foreground;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.studio-preview :where(h1, h2, h3) {
|
|
139
|
+
@apply mb-3 mt-6 font-semibold leading-tight;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.studio-preview h1 {
|
|
143
|
+
@apply text-3xl;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.studio-preview h2 {
|
|
147
|
+
@apply text-2xl;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.studio-preview h3 {
|
|
151
|
+
@apply text-xl;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.studio-preview p {
|
|
155
|
+
@apply my-3;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.studio-preview a {
|
|
159
|
+
@apply underline underline-offset-4;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.studio-preview img {
|
|
163
|
+
@apply my-4 max-w-full border;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.studio-preview blockquote {
|
|
167
|
+
@apply my-4 border-l-2 pl-4 text-muted-foreground;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.studio-preview table {
|
|
171
|
+
@apply my-4 w-full border-collapse text-sm;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.studio-preview :where(th, td) {
|
|
175
|
+
@apply border px-3 py-2 text-left align-top;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.studio-preview :where(ul, ol) {
|
|
179
|
+
@apply my-3 pl-6;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.studio-preview ul {
|
|
183
|
+
@apply list-disc;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.studio-preview ol {
|
|
187
|
+
@apply list-decimal;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.studio-preview :where(pre, code) {
|
|
191
|
+
@apply font-mono text-xs;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.studio-preview pre {
|
|
195
|
+
@apply my-4 overflow-auto bg-muted p-3;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.studio-preview
|
|
199
|
+
:where(.cb-callout, .cb-steps, .cb-faq, .cb-comparison, .cb-invalid, .cb-custom-block) {
|
|
200
|
+
@apply my-4 border bg-muted/30 p-4;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.studio-preview .cb-invalid {
|
|
204
|
+
@apply border-destructive/40 bg-destructive/10;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.studio-preview .cb-custom-block {
|
|
208
|
+
@apply border-blue-500/30 bg-blue-500/10;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.studio-preview .cb-custom-block-label {
|
|
212
|
+
@apply mb-2 w-fit border border-blue-500/30 bg-background px-2 py-0.5 font-mono text-xs text-blue-700;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.studio-preview .cb-custom-block-body > :first-child {
|
|
216
|
+
@apply mt-0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.studio-preview .cb-custom-block-body > :last-child {
|
|
220
|
+
@apply mb-0;
|
|
221
|
+
}
|
|
222
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["**/*.ts", "**/*.tsx", "vite.config.ts"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
8
|
+
"types": ["vite/client"],
|
|
9
|
+
"paths": {
|
|
10
|
+
"@/*": ["./src/*"]
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
/* Bundler mode */
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"allowImportingTsExtensions": true,
|
|
16
|
+
"verbatimModuleSyntax": true,
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"strict": true,
|
|
22
|
+
"noUnusedLocals": true,
|
|
23
|
+
"noUnusedParameters": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true
|
|
26
|
+
}
|
|
27
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
3
|
+
import viteReact from '@vitejs/plugin-react'
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
5
|
+
|
|
6
|
+
const config = defineConfig({
|
|
7
|
+
resolve: { tsconfigPaths: true },
|
|
8
|
+
plugins: [tailwindcss(), tanstackStart(), viteReact()],
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export default config
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region \0tanstack-start-manifest:v
|
|
2
|
-
var tsrStartManifest = () => ({ routes: {
|
|
3
|
-
__root__: {
|
|
4
|
-
filePath: "/Users/agonist/dev/content-blocks/packages/studio/src/routes/__root.tsx",
|
|
5
|
-
children: ["/", "/document"],
|
|
6
|
-
preloads: ["/assets/index-BwvfKCmy.js"],
|
|
7
|
-
scripts: [{ attrs: {
|
|
8
|
-
type: "module",
|
|
9
|
-
async: !0,
|
|
10
|
-
src: "/assets/index-BwvfKCmy.js"
|
|
11
|
-
} }]
|
|
12
|
-
},
|
|
13
|
-
"/": {
|
|
14
|
-
filePath: "/Users/agonist/dev/content-blocks/packages/studio/src/routes/index.tsx",
|
|
15
|
-
children: void 0,
|
|
16
|
-
preloads: ["/assets/routes-DHIbdBYB.js", "/assets/api-C-Xwc2aB.js"]
|
|
17
|
-
},
|
|
18
|
-
"/document": {
|
|
19
|
-
filePath: "/Users/agonist/dev/content-blocks/packages/studio/src/routes/document.tsx",
|
|
20
|
-
children: void 0,
|
|
21
|
-
preloads: ["/assets/document-Yk8nlK-k.js", "/assets/api-C-Xwc2aB.js"]
|
|
22
|
-
}
|
|
23
|
-
} });
|
|
24
|
-
//#endregion
|
|
25
|
-
export { tsrStartManifest };
|