@vibecms/core 0.1.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/dist/engine/index.d.mts +4 -0
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +1226 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/index.mjs +1184 -0
- package/dist/engine/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +27 -0
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.js +75 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +47 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-C3P1J_of.d.ts +339 -0
- package/dist/index-CO4uwTdH.d.mts +339 -0
- package/dist/index.css +2326 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +412 -0
- package/dist/index.d.ts +412 -0
- package/dist/index.js +3715 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3587 -0
- package/dist/index.mjs.map +1 -0
- package/dist/storage/index.d.mts +32 -0
- package/dist/storage/index.d.ts +32 -0
- package/dist/storage/index.js +103 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +75 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/types-BkDsDmQJ.d.mts +83 -0
- package/dist/types-BkDsDmQJ.d.ts +83 -0
- package/dist/ui/index.d.mts +127 -0
- package/dist/ui/index.d.ts +127 -0
- package/dist/ui/index.js +1119 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +1030 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/vite-plugin.d.mts +8 -0
- package/dist/vite-plugin.d.ts +8 -0
- package/dist/vite-plugin.js +193 -0
- package/dist/vite-plugin.js.map +1 -0
- package/dist/vite-plugin.mjs +165 -0
- package/dist/vite-plugin.mjs.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { S as StorageDriver, c as StorageContext, M as MediaResult } from '../types-BkDsDmQJ.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GitStorageDriver (Default)
|
|
5
|
+
* Pushes media into the local git repository using isomorphic-git.
|
|
6
|
+
* Warning: This will cause repository bloat for large sites.
|
|
7
|
+
*/
|
|
8
|
+
declare class GitStorageDriver implements StorageDriver {
|
|
9
|
+
upload(file: File, context: StorageContext): Promise<string | MediaResult>;
|
|
10
|
+
list(context: StorageContext): Promise<string[]>;
|
|
11
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
12
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface VercelBlobDriverConfig {
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* VercelBlobDriver
|
|
20
|
+
* Uploads media to Vercel Blob via a backend API route.
|
|
21
|
+
* Keeps media out of the git repository to prevent bloat.
|
|
22
|
+
*/
|
|
23
|
+
declare class VercelBlobDriver implements StorageDriver {
|
|
24
|
+
private endpoint;
|
|
25
|
+
constructor(config?: VercelBlobDriverConfig);
|
|
26
|
+
upload(file: File, context: StorageContext): Promise<any>;
|
|
27
|
+
list(context: StorageContext): Promise<string[]>;
|
|
28
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
29
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { GitStorageDriver, StorageContext, StorageDriver, VercelBlobDriver, type VercelBlobDriverConfig };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { S as StorageDriver, c as StorageContext, M as MediaResult } from '../types-BkDsDmQJ.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GitStorageDriver (Default)
|
|
5
|
+
* Pushes media into the local git repository using isomorphic-git.
|
|
6
|
+
* Warning: This will cause repository bloat for large sites.
|
|
7
|
+
*/
|
|
8
|
+
declare class GitStorageDriver implements StorageDriver {
|
|
9
|
+
upload(file: File, context: StorageContext): Promise<string | MediaResult>;
|
|
10
|
+
list(context: StorageContext): Promise<string[]>;
|
|
11
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
12
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface VercelBlobDriverConfig {
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* VercelBlobDriver
|
|
20
|
+
* Uploads media to Vercel Blob via a backend API route.
|
|
21
|
+
* Keeps media out of the git repository to prevent bloat.
|
|
22
|
+
*/
|
|
23
|
+
declare class VercelBlobDriver implements StorageDriver {
|
|
24
|
+
private endpoint;
|
|
25
|
+
constructor(config?: VercelBlobDriverConfig);
|
|
26
|
+
upload(file: File, context: StorageContext): Promise<any>;
|
|
27
|
+
list(context: StorageContext): Promise<string[]>;
|
|
28
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
29
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { GitStorageDriver, StorageContext, StorageDriver, VercelBlobDriver, type VercelBlobDriverConfig };
|
|
@@ -0,0 +1,103 @@
|
|
|
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/storage/index.ts
|
|
21
|
+
var storage_exports = {};
|
|
22
|
+
__export(storage_exports, {
|
|
23
|
+
GitStorageDriver: () => GitStorageDriver,
|
|
24
|
+
VercelBlobDriver: () => VercelBlobDriver
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(storage_exports);
|
|
27
|
+
|
|
28
|
+
// src/storage/drivers/git.ts
|
|
29
|
+
var GitStorageDriver = class {
|
|
30
|
+
async upload(file, context) {
|
|
31
|
+
return context.engine.writeMedia(file, context.author);
|
|
32
|
+
}
|
|
33
|
+
async list(context) {
|
|
34
|
+
return context.engine.listMedia();
|
|
35
|
+
}
|
|
36
|
+
async delete(fileName, context) {
|
|
37
|
+
return context.engine.deleteMedia(fileName);
|
|
38
|
+
}
|
|
39
|
+
async rename(oldFileName, newFileName, context) {
|
|
40
|
+
return context.engine.renameMedia(oldFileName, newFileName);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/storage/drivers/vercel-blob.ts
|
|
45
|
+
var VercelBlobDriver = class {
|
|
46
|
+
endpoint;
|
|
47
|
+
constructor(config) {
|
|
48
|
+
this.endpoint = config?.endpoint || "/api/upload";
|
|
49
|
+
}
|
|
50
|
+
async upload(file, context) {
|
|
51
|
+
const formData = new FormData();
|
|
52
|
+
formData.append("file", file);
|
|
53
|
+
const response = await fetch(this.endpoint, {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body: formData
|
|
56
|
+
});
|
|
57
|
+
if (!response.ok) {
|
|
58
|
+
const errData = await response.json().catch(() => null);
|
|
59
|
+
throw new Error(errData?.error || "Failed to upload to Vercel Blob");
|
|
60
|
+
}
|
|
61
|
+
const data = await response.json();
|
|
62
|
+
if (typeof window !== "undefined") {
|
|
63
|
+
try {
|
|
64
|
+
const tempUrl = URL.createObjectURL(file);
|
|
65
|
+
const img = new Image();
|
|
66
|
+
img.src = tempUrl;
|
|
67
|
+
await new Promise((resolve) => {
|
|
68
|
+
img.onload = resolve;
|
|
69
|
+
img.onerror = resolve;
|
|
70
|
+
});
|
|
71
|
+
URL.revokeObjectURL(tempUrl);
|
|
72
|
+
return {
|
|
73
|
+
url: data.url,
|
|
74
|
+
width: img.naturalWidth,
|
|
75
|
+
height: img.naturalHeight,
|
|
76
|
+
alt: file.name
|
|
77
|
+
};
|
|
78
|
+
} catch (e) {
|
|
79
|
+
return data.url;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async list(context) {
|
|
84
|
+
const response = await fetch(`${this.endpoint}?action=list`);
|
|
85
|
+
if (!response.ok) throw new Error("Failed to list Vercel blobs");
|
|
86
|
+
const data = await response.json();
|
|
87
|
+
return data.files || [];
|
|
88
|
+
}
|
|
89
|
+
async delete(fileName, context) {
|
|
90
|
+
const response = await fetch(`${this.endpoint}?action=delete&file=${encodeURIComponent(fileName)}`, { method: "DELETE" });
|
|
91
|
+
if (!response.ok) throw new Error(`Failed to delete blob: ${fileName}`);
|
|
92
|
+
}
|
|
93
|
+
async rename(oldFileName, newFileName, context) {
|
|
94
|
+
const response = await fetch(`${this.endpoint}?action=rename&oldFile=${encodeURIComponent(oldFileName)}&newFile=${encodeURIComponent(newFileName)}`, { method: "POST" });
|
|
95
|
+
if (!response.ok) throw new Error(`Failed to rename blob: ${oldFileName}`);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
GitStorageDriver,
|
|
101
|
+
VercelBlobDriver
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/storage/index.ts","../../src/storage/drivers/git.ts","../../src/storage/drivers/vercel-blob.ts"],"sourcesContent":["export * from './types';\nexport * from './drivers/git';\nexport * from './drivers/vercel-blob';\n","import { StorageDriver, StorageContext } from '../types';\n\n/**\n * GitStorageDriver (Default)\n * Pushes media into the local git repository using isomorphic-git.\n * Warning: This will cause repository bloat for large sites.\n */\nexport class GitStorageDriver implements StorageDriver {\n async upload(file: File, context: StorageContext) {\n // Defer back to the engine's built-in isomorphic git writeMedia method\n return context.engine.writeMedia(file, context.author);\n }\n\n async list(context: StorageContext): Promise<string[]> {\n return context.engine.listMedia();\n }\n\n async delete(fileName: string, context: StorageContext): Promise<void> {\n return context.engine.deleteMedia(fileName);\n }\n\n async rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void> {\n return context.engine.renameMedia(oldFileName, newFileName);\n }\n}\n","import { StorageDriver, StorageContext } from '../types';\n\nexport interface VercelBlobDriverConfig {\n endpoint?: string;\n}\n\n/**\n * VercelBlobDriver\n * Uploads media to Vercel Blob via a backend API route.\n * Keeps media out of the git repository to prevent bloat.\n */\nexport class VercelBlobDriver implements StorageDriver {\n private endpoint: string;\n\n constructor(config?: VercelBlobDriverConfig) {\n this.endpoint = config?.endpoint || '/api/upload';\n }\n\n async upload(file: File, context: StorageContext) {\n const formData = new FormData();\n formData.append('file', file);\n\n const response = await fetch(this.endpoint, {\n method: 'POST',\n body: formData,\n });\n\n if (!response.ok) {\n const errData = await response.json().catch(() => null);\n throw new Error(errData?.error || 'Failed to upload to Vercel Blob');\n }\n\n const data = await response.json();\n \n // We can extract intrinsic dimensions efficiently by creating a local temporary URL\n if (typeof window !== 'undefined') {\n try {\n const tempUrl = URL.createObjectURL(file);\n const img = new Image();\n img.src = tempUrl;\n await new Promise(resolve => { img.onload = resolve; img.onerror = resolve; });\n URL.revokeObjectURL(tempUrl);\n \n return {\n url: data.url,\n width: img.naturalWidth,\n height: img.naturalHeight,\n alt: file.name\n };\n } catch (e) {\n return data.url;\n }\n }\n \n }\n\n async list(context: StorageContext): Promise<string[]> {\n const response = await fetch(`${this.endpoint}?action=list`);\n if (!response.ok) throw new Error('Failed to list Vercel blobs');\n const data = await response.json();\n return data.files || [];\n }\n\n async delete(fileName: string, context: StorageContext): Promise<void> {\n const response = await fetch(`${this.endpoint}?action=delete&file=${encodeURIComponent(fileName)}`, { method: 'DELETE' });\n if (!response.ok) throw new Error(`Failed to delete blob: ${fileName}`);\n }\n\n async rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void> {\n const response = await fetch(`${this.endpoint}?action=rename&oldFile=${encodeURIComponent(oldFileName)}&newFile=${encodeURIComponent(newFileName)}`, { method: 'POST' });\n if (!response.ok) throw new Error(`Failed to rename blob: ${oldFileName}`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,IAAM,mBAAN,MAAgD;AAAA,EACrD,MAAM,OAAO,MAAY,SAAyB;AAEhD,WAAO,QAAQ,OAAO,WAAW,MAAM,QAAQ,MAAM;AAAA,EACvD;AAAA,EAEA,MAAM,KAAK,SAA4C;AACrD,WAAO,QAAQ,OAAO,UAAU;AAAA,EAClC;AAAA,EAEA,MAAM,OAAO,UAAkB,SAAwC;AACrE,WAAO,QAAQ,OAAO,YAAY,QAAQ;AAAA,EAC5C;AAAA,EAEA,MAAM,OAAO,aAAqB,aAAqB,SAAwC;AAC7F,WAAO,QAAQ,OAAO,YAAY,aAAa,WAAW;AAAA,EAC5D;AACF;;;ACbO,IAAM,mBAAN,MAAgD;AAAA,EAC7C;AAAA,EAER,YAAY,QAAiC;AAC3C,SAAK,WAAW,QAAQ,YAAY;AAAA,EACtC;AAAA,EAEA,MAAM,OAAO,MAAY,SAAyB;AAChD,UAAM,WAAW,IAAI,SAAS;AAC9B,aAAS,OAAO,QAAQ,IAAI;AAE5B,UAAM,WAAW,MAAM,MAAM,KAAK,UAAU;AAAA,MAC1C,QAAQ;AAAA,MACR,MAAM;AAAA,IACR,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,UAAU,MAAM,SAAS,KAAK,EAAE,MAAM,MAAM,IAAI;AACtD,YAAM,IAAI,MAAM,SAAS,SAAS,iCAAiC;AAAA,IACrE;AAEA,UAAM,OAAO,MAAM,SAAS,KAAK;AAGjC,QAAI,OAAO,WAAW,aAAa;AAChC,UAAI;AACF,cAAM,UAAU,IAAI,gBAAgB,IAAI;AACxC,cAAM,MAAM,IAAI,MAAM;AACtB,YAAI,MAAM;AACV,cAAM,IAAI,QAAQ,aAAW;AAAE,cAAI,SAAS;AAAS,cAAI,UAAU;AAAA,QAAS,CAAC;AAC7E,YAAI,gBAAgB,OAAO;AAE3B,eAAO;AAAA,UACL,KAAK,KAAK;AAAA,UACV,OAAO,IAAI;AAAA,UACX,QAAQ,IAAI;AAAA,UACZ,KAAK,KAAK;AAAA,QACZ;AAAA,MACF,SAAS,GAAG;AACV,eAAO,KAAK;AAAA,MACd;AAAA,IACH;AAAA,EAEF;AAAA,EAEA,MAAM,KAAK,SAA4C;AACrD,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,cAAc;AAC3D,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,6BAA6B;AAC/D,UAAM,OAAO,MAAM,SAAS,KAAK;AACjC,WAAO,KAAK,SAAS,CAAC;AAAA,EACxB;AAAA,EAEA,MAAM,OAAO,UAAkB,SAAwC;AACrE,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,uBAAuB,mBAAmB,QAAQ,CAAC,IAAI,EAAE,QAAQ,SAAS,CAAC;AACxH,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,0BAA0B,QAAQ,EAAE;AAAA,EACxE;AAAA,EAEA,MAAM,OAAO,aAAqB,aAAqB,SAAwC;AAC7F,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,0BAA0B,mBAAmB,WAAW,CAAC,YAAY,mBAAmB,WAAW,CAAC,IAAI,EAAE,QAAQ,OAAO,CAAC;AACvK,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,0BAA0B,WAAW,EAAE;AAAA,EAC3E;AACF;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// src/storage/drivers/git.ts
|
|
2
|
+
var GitStorageDriver = class {
|
|
3
|
+
async upload(file, context) {
|
|
4
|
+
return context.engine.writeMedia(file, context.author);
|
|
5
|
+
}
|
|
6
|
+
async list(context) {
|
|
7
|
+
return context.engine.listMedia();
|
|
8
|
+
}
|
|
9
|
+
async delete(fileName, context) {
|
|
10
|
+
return context.engine.deleteMedia(fileName);
|
|
11
|
+
}
|
|
12
|
+
async rename(oldFileName, newFileName, context) {
|
|
13
|
+
return context.engine.renameMedia(oldFileName, newFileName);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// src/storage/drivers/vercel-blob.ts
|
|
18
|
+
var VercelBlobDriver = class {
|
|
19
|
+
endpoint;
|
|
20
|
+
constructor(config) {
|
|
21
|
+
this.endpoint = config?.endpoint || "/api/upload";
|
|
22
|
+
}
|
|
23
|
+
async upload(file, context) {
|
|
24
|
+
const formData = new FormData();
|
|
25
|
+
formData.append("file", file);
|
|
26
|
+
const response = await fetch(this.endpoint, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
body: formData
|
|
29
|
+
});
|
|
30
|
+
if (!response.ok) {
|
|
31
|
+
const errData = await response.json().catch(() => null);
|
|
32
|
+
throw new Error(errData?.error || "Failed to upload to Vercel Blob");
|
|
33
|
+
}
|
|
34
|
+
const data = await response.json();
|
|
35
|
+
if (typeof window !== "undefined") {
|
|
36
|
+
try {
|
|
37
|
+
const tempUrl = URL.createObjectURL(file);
|
|
38
|
+
const img = new Image();
|
|
39
|
+
img.src = tempUrl;
|
|
40
|
+
await new Promise((resolve) => {
|
|
41
|
+
img.onload = resolve;
|
|
42
|
+
img.onerror = resolve;
|
|
43
|
+
});
|
|
44
|
+
URL.revokeObjectURL(tempUrl);
|
|
45
|
+
return {
|
|
46
|
+
url: data.url,
|
|
47
|
+
width: img.naturalWidth,
|
|
48
|
+
height: img.naturalHeight,
|
|
49
|
+
alt: file.name
|
|
50
|
+
};
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return data.url;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async list(context) {
|
|
57
|
+
const response = await fetch(`${this.endpoint}?action=list`);
|
|
58
|
+
if (!response.ok) throw new Error("Failed to list Vercel blobs");
|
|
59
|
+
const data = await response.json();
|
|
60
|
+
return data.files || [];
|
|
61
|
+
}
|
|
62
|
+
async delete(fileName, context) {
|
|
63
|
+
const response = await fetch(`${this.endpoint}?action=delete&file=${encodeURIComponent(fileName)}`, { method: "DELETE" });
|
|
64
|
+
if (!response.ok) throw new Error(`Failed to delete blob: ${fileName}`);
|
|
65
|
+
}
|
|
66
|
+
async rename(oldFileName, newFileName, context) {
|
|
67
|
+
const response = await fetch(`${this.endpoint}?action=rename&oldFile=${encodeURIComponent(oldFileName)}&newFile=${encodeURIComponent(newFileName)}`, { method: "POST" });
|
|
68
|
+
if (!response.ok) throw new Error(`Failed to rename blob: ${oldFileName}`);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
GitStorageDriver,
|
|
73
|
+
VercelBlobDriver
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/storage/drivers/git.ts","../../src/storage/drivers/vercel-blob.ts"],"sourcesContent":["import { StorageDriver, StorageContext } from '../types';\n\n/**\n * GitStorageDriver (Default)\n * Pushes media into the local git repository using isomorphic-git.\n * Warning: This will cause repository bloat for large sites.\n */\nexport class GitStorageDriver implements StorageDriver {\n async upload(file: File, context: StorageContext) {\n // Defer back to the engine's built-in isomorphic git writeMedia method\n return context.engine.writeMedia(file, context.author);\n }\n\n async list(context: StorageContext): Promise<string[]> {\n return context.engine.listMedia();\n }\n\n async delete(fileName: string, context: StorageContext): Promise<void> {\n return context.engine.deleteMedia(fileName);\n }\n\n async rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void> {\n return context.engine.renameMedia(oldFileName, newFileName);\n }\n}\n","import { StorageDriver, StorageContext } from '../types';\n\nexport interface VercelBlobDriverConfig {\n endpoint?: string;\n}\n\n/**\n * VercelBlobDriver\n * Uploads media to Vercel Blob via a backend API route.\n * Keeps media out of the git repository to prevent bloat.\n */\nexport class VercelBlobDriver implements StorageDriver {\n private endpoint: string;\n\n constructor(config?: VercelBlobDriverConfig) {\n this.endpoint = config?.endpoint || '/api/upload';\n }\n\n async upload(file: File, context: StorageContext) {\n const formData = new FormData();\n formData.append('file', file);\n\n const response = await fetch(this.endpoint, {\n method: 'POST',\n body: formData,\n });\n\n if (!response.ok) {\n const errData = await response.json().catch(() => null);\n throw new Error(errData?.error || 'Failed to upload to Vercel Blob');\n }\n\n const data = await response.json();\n \n // We can extract intrinsic dimensions efficiently by creating a local temporary URL\n if (typeof window !== 'undefined') {\n try {\n const tempUrl = URL.createObjectURL(file);\n const img = new Image();\n img.src = tempUrl;\n await new Promise(resolve => { img.onload = resolve; img.onerror = resolve; });\n URL.revokeObjectURL(tempUrl);\n \n return {\n url: data.url,\n width: img.naturalWidth,\n height: img.naturalHeight,\n alt: file.name\n };\n } catch (e) {\n return data.url;\n }\n }\n \n }\n\n async list(context: StorageContext): Promise<string[]> {\n const response = await fetch(`${this.endpoint}?action=list`);\n if (!response.ok) throw new Error('Failed to list Vercel blobs');\n const data = await response.json();\n return data.files || [];\n }\n\n async delete(fileName: string, context: StorageContext): Promise<void> {\n const response = await fetch(`${this.endpoint}?action=delete&file=${encodeURIComponent(fileName)}`, { method: 'DELETE' });\n if (!response.ok) throw new Error(`Failed to delete blob: ${fileName}`);\n }\n\n async rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void> {\n const response = await fetch(`${this.endpoint}?action=rename&oldFile=${encodeURIComponent(oldFileName)}&newFile=${encodeURIComponent(newFileName)}`, { method: 'POST' });\n if (!response.ok) throw new Error(`Failed to rename blob: ${oldFileName}`);\n }\n}\n"],"mappings":";AAOO,IAAM,mBAAN,MAAgD;AAAA,EACrD,MAAM,OAAO,MAAY,SAAyB;AAEhD,WAAO,QAAQ,OAAO,WAAW,MAAM,QAAQ,MAAM;AAAA,EACvD;AAAA,EAEA,MAAM,KAAK,SAA4C;AACrD,WAAO,QAAQ,OAAO,UAAU;AAAA,EAClC;AAAA,EAEA,MAAM,OAAO,UAAkB,SAAwC;AACrE,WAAO,QAAQ,OAAO,YAAY,QAAQ;AAAA,EAC5C;AAAA,EAEA,MAAM,OAAO,aAAqB,aAAqB,SAAwC;AAC7F,WAAO,QAAQ,OAAO,YAAY,aAAa,WAAW;AAAA,EAC5D;AACF;;;ACbO,IAAM,mBAAN,MAAgD;AAAA,EAC7C;AAAA,EAER,YAAY,QAAiC;AAC3C,SAAK,WAAW,QAAQ,YAAY;AAAA,EACtC;AAAA,EAEA,MAAM,OAAO,MAAY,SAAyB;AAChD,UAAM,WAAW,IAAI,SAAS;AAC9B,aAAS,OAAO,QAAQ,IAAI;AAE5B,UAAM,WAAW,MAAM,MAAM,KAAK,UAAU;AAAA,MAC1C,QAAQ;AAAA,MACR,MAAM;AAAA,IACR,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,UAAU,MAAM,SAAS,KAAK,EAAE,MAAM,MAAM,IAAI;AACtD,YAAM,IAAI,MAAM,SAAS,SAAS,iCAAiC;AAAA,IACrE;AAEA,UAAM,OAAO,MAAM,SAAS,KAAK;AAGjC,QAAI,OAAO,WAAW,aAAa;AAChC,UAAI;AACF,cAAM,UAAU,IAAI,gBAAgB,IAAI;AACxC,cAAM,MAAM,IAAI,MAAM;AACtB,YAAI,MAAM;AACV,cAAM,IAAI,QAAQ,aAAW;AAAE,cAAI,SAAS;AAAS,cAAI,UAAU;AAAA,QAAS,CAAC;AAC7E,YAAI,gBAAgB,OAAO;AAE3B,eAAO;AAAA,UACL,KAAK,KAAK;AAAA,UACV,OAAO,IAAI;AAAA,UACX,QAAQ,IAAI;AAAA,UACZ,KAAK,KAAK;AAAA,QACZ;AAAA,MACF,SAAS,GAAG;AACV,eAAO,KAAK;AAAA,MACd;AAAA,IACH;AAAA,EAEF;AAAA,EAEA,MAAM,KAAK,SAA4C;AACrD,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,cAAc;AAC3D,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,6BAA6B;AAC/D,UAAM,OAAO,MAAM,SAAS,KAAK;AACjC,WAAO,KAAK,SAAS,CAAC;AAAA,EACxB;AAAA,EAEA,MAAM,OAAO,UAAkB,SAAwC;AACrE,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,uBAAuB,mBAAmB,QAAQ,CAAC,IAAI,EAAE,QAAQ,SAAS,CAAC;AACxH,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,0BAA0B,QAAQ,EAAE;AAAA,EACxE;AAAA,EAEA,MAAM,OAAO,aAAqB,aAAqB,SAAwC;AAC7F,UAAM,WAAW,MAAM,MAAM,GAAG,KAAK,QAAQ,0BAA0B,mBAAmB,WAAW,CAAC,YAAY,mBAAmB,WAAW,CAAC,IAAI,EAAE,QAAQ,OAAO,CAAC;AACvK,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,0BAA0B,WAAW,EAAE;AAAA,EAC3E;AACF;","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
interface StorageContext {
|
|
2
|
+
engine: SyncEngine;
|
|
3
|
+
author?: CommitAuthor;
|
|
4
|
+
}
|
|
5
|
+
interface StorageDriver {
|
|
6
|
+
upload(file: File, context: StorageContext): Promise<string | {
|
|
7
|
+
url: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
alt?: string;
|
|
11
|
+
}>;
|
|
12
|
+
list(context: StorageContext): Promise<string[]>;
|
|
13
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
14
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ListOptions {
|
|
18
|
+
withMeta?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ListItemMeta {
|
|
21
|
+
slug: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
interface VibeEngineConfig {
|
|
27
|
+
contentDir?: string;
|
|
28
|
+
publicDir?: string;
|
|
29
|
+
repoUrl?: string;
|
|
30
|
+
corsProxy?: string;
|
|
31
|
+
devMode?: boolean;
|
|
32
|
+
media?: {
|
|
33
|
+
driver: StorageDriver;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface CommitAuthor {
|
|
37
|
+
name: string;
|
|
38
|
+
email: string;
|
|
39
|
+
}
|
|
40
|
+
interface MediaResult {
|
|
41
|
+
url: string;
|
|
42
|
+
width?: number;
|
|
43
|
+
height?: number;
|
|
44
|
+
alt?: string;
|
|
45
|
+
}
|
|
46
|
+
interface ReadOptions {
|
|
47
|
+
locale?: string;
|
|
48
|
+
}
|
|
49
|
+
interface WriteOptions {
|
|
50
|
+
locale?: string;
|
|
51
|
+
}
|
|
52
|
+
interface SyncEngine {
|
|
53
|
+
init(config?: VibeEngineConfig): Promise<void>;
|
|
54
|
+
read<T = any>(collection: string, slug: string, options?: ReadOptions): Promise<T | null>;
|
|
55
|
+
write<T = any>(collection: string, slug: string, data: T, options?: WriteOptions): Promise<void>;
|
|
56
|
+
delete(collection: string, slug: string, options?: WriteOptions): Promise<void>;
|
|
57
|
+
isDirty(collection: string, slug: string): Promise<boolean>;
|
|
58
|
+
revert(collection: string, slug: string): Promise<void>;
|
|
59
|
+
commit(message: string, author?: CommitAuthor): Promise<void>;
|
|
60
|
+
push(oauthToken: string): Promise<void>;
|
|
61
|
+
pull(): Promise<void>;
|
|
62
|
+
pruneMedia(): Promise<{
|
|
63
|
+
deletedCount: number;
|
|
64
|
+
bytesFreed: number;
|
|
65
|
+
}>;
|
|
66
|
+
writeMedia(file: File, author?: CommitAuthor): Promise<string | MediaResult>;
|
|
67
|
+
listMedia(): Promise<string[]>;
|
|
68
|
+
deleteMedia(filename: string): Promise<void>;
|
|
69
|
+
renameMedia(oldFilename: string, newFilename: string): Promise<void>;
|
|
70
|
+
getMediaUrl(relativePath: string): Promise<string>;
|
|
71
|
+
list(collection: string, options?: ListOptions): Promise<any[]>;
|
|
72
|
+
getHistory(collection: string, slug: string): Promise<HistoryEntry[]>;
|
|
73
|
+
getVersionContent<T = any>(commitOid: string, collection: string, slug: string): Promise<T | null>;
|
|
74
|
+
}
|
|
75
|
+
interface HistoryEntry {
|
|
76
|
+
oid: string;
|
|
77
|
+
message: string;
|
|
78
|
+
author: string;
|
|
79
|
+
email?: string;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type { CommitAuthor as C, HistoryEntry as H, ListOptions as L, MediaResult as M, ReadOptions as R, StorageDriver as S, VibeEngineConfig as V, WriteOptions as W, SyncEngine as a, ListItemMeta as b, StorageContext as c };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
interface StorageContext {
|
|
2
|
+
engine: SyncEngine;
|
|
3
|
+
author?: CommitAuthor;
|
|
4
|
+
}
|
|
5
|
+
interface StorageDriver {
|
|
6
|
+
upload(file: File, context: StorageContext): Promise<string | {
|
|
7
|
+
url: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
alt?: string;
|
|
11
|
+
}>;
|
|
12
|
+
list(context: StorageContext): Promise<string[]>;
|
|
13
|
+
delete(fileName: string, context: StorageContext): Promise<void>;
|
|
14
|
+
rename(oldFileName: string, newFileName: string, context: StorageContext): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ListOptions {
|
|
18
|
+
withMeta?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ListItemMeta {
|
|
21
|
+
slug: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
interface VibeEngineConfig {
|
|
27
|
+
contentDir?: string;
|
|
28
|
+
publicDir?: string;
|
|
29
|
+
repoUrl?: string;
|
|
30
|
+
corsProxy?: string;
|
|
31
|
+
devMode?: boolean;
|
|
32
|
+
media?: {
|
|
33
|
+
driver: StorageDriver;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface CommitAuthor {
|
|
37
|
+
name: string;
|
|
38
|
+
email: string;
|
|
39
|
+
}
|
|
40
|
+
interface MediaResult {
|
|
41
|
+
url: string;
|
|
42
|
+
width?: number;
|
|
43
|
+
height?: number;
|
|
44
|
+
alt?: string;
|
|
45
|
+
}
|
|
46
|
+
interface ReadOptions {
|
|
47
|
+
locale?: string;
|
|
48
|
+
}
|
|
49
|
+
interface WriteOptions {
|
|
50
|
+
locale?: string;
|
|
51
|
+
}
|
|
52
|
+
interface SyncEngine {
|
|
53
|
+
init(config?: VibeEngineConfig): Promise<void>;
|
|
54
|
+
read<T = any>(collection: string, slug: string, options?: ReadOptions): Promise<T | null>;
|
|
55
|
+
write<T = any>(collection: string, slug: string, data: T, options?: WriteOptions): Promise<void>;
|
|
56
|
+
delete(collection: string, slug: string, options?: WriteOptions): Promise<void>;
|
|
57
|
+
isDirty(collection: string, slug: string): Promise<boolean>;
|
|
58
|
+
revert(collection: string, slug: string): Promise<void>;
|
|
59
|
+
commit(message: string, author?: CommitAuthor): Promise<void>;
|
|
60
|
+
push(oauthToken: string): Promise<void>;
|
|
61
|
+
pull(): Promise<void>;
|
|
62
|
+
pruneMedia(): Promise<{
|
|
63
|
+
deletedCount: number;
|
|
64
|
+
bytesFreed: number;
|
|
65
|
+
}>;
|
|
66
|
+
writeMedia(file: File, author?: CommitAuthor): Promise<string | MediaResult>;
|
|
67
|
+
listMedia(): Promise<string[]>;
|
|
68
|
+
deleteMedia(filename: string): Promise<void>;
|
|
69
|
+
renameMedia(oldFilename: string, newFilename: string): Promise<void>;
|
|
70
|
+
getMediaUrl(relativePath: string): Promise<string>;
|
|
71
|
+
list(collection: string, options?: ListOptions): Promise<any[]>;
|
|
72
|
+
getHistory(collection: string, slug: string): Promise<HistoryEntry[]>;
|
|
73
|
+
getVersionContent<T = any>(commitOid: string, collection: string, slug: string): Promise<T | null>;
|
|
74
|
+
}
|
|
75
|
+
interface HistoryEntry {
|
|
76
|
+
oid: string;
|
|
77
|
+
message: string;
|
|
78
|
+
author: string;
|
|
79
|
+
email?: string;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type { CommitAuthor as C, HistoryEntry as H, ListOptions as L, MediaResult as M, ReadOptions as R, StorageDriver as S, VibeEngineConfig as V, WriteOptions as W, SyncEngine as a, ListItemMeta as b, StorageContext as c };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { Command as Command$1 } from 'cmdk';
|
|
7
|
+
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
8
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
9
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
13
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<_base_ui_react.ButtonProps & VariantProps<(props?: ({
|
|
16
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
17
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
18
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
|
|
20
|
+
declare function Dialog({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<Dialog$1.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement | HTMLElement>>;
|
|
22
|
+
declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
26
|
+
showCloseButton?: boolean;
|
|
27
|
+
}): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
30
|
+
showCloseButton?: boolean;
|
|
31
|
+
}): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
37
|
+
title?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
showCloseButton?: boolean;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
45
|
+
declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
46
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function CommandItem({ className, children, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
49
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
declare const InputGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const InputGroupAddon: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
53
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
54
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
56
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
57
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
58
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
59
|
+
type?: "button" | "submit" | "reset";
|
|
60
|
+
}): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
62
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
63
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
64
|
+
|
|
65
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
66
|
+
|
|
67
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
68
|
+
|
|
69
|
+
declare function Popover({ ...props }: Popover$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
70
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<Popover$1.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement | HTMLElement>>;
|
|
71
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<_base_ui_react.PopoverPopupProps & Pick<_base_ui_react.PopoverPositionerProps, "align" | "alignOffset" | "side" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
declare const PopoverHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const PopoverTitle: React.ForwardRefExoticComponent<Omit<_base_ui_react.PopoverTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
74
|
+
declare const PopoverDescription: React.ForwardRefExoticComponent<Omit<_base_ui_react.PopoverDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
75
|
+
|
|
76
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<_base_ui_react.ScrollAreaRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<_base_ui_react.ScrollAreaScrollbarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
|
|
79
|
+
declare function Sheet({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<Omit<Dialog$1.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement | HTMLElement>>;
|
|
81
|
+
declare const SheetClose: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
83
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
84
|
+
showCloseButton?: boolean;
|
|
85
|
+
}): react_jsx_runtime.JSX.Element;
|
|
86
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
87
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
88
|
+
declare function SheetTitle({ className, ...props }: Dialog$1.Title.Props): react_jsx_runtime.JSX.Element;
|
|
89
|
+
declare function SheetDescription({ className, ...props }: Dialog$1.Description.Props): react_jsx_runtime.JSX.Element;
|
|
90
|
+
|
|
91
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<_base_ui_react.SwitchRootProps & {
|
|
92
|
+
size?: "sm" | "default";
|
|
93
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
94
|
+
|
|
95
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
96
|
+
|
|
97
|
+
declare function TooltipProvider({ ...props }: Tooltip$1.Provider.Props): react_jsx_runtime.JSX.Element;
|
|
98
|
+
declare function Tooltip({ ...props }: Tooltip$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
99
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<Tooltip$1.Trigger.Props<unknown>, "ref"> & React.RefAttributes<HTMLButtonElement | HTMLElement>>;
|
|
100
|
+
declare function TooltipContent({ className, sideOffset, side, align, alignOffset, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, "side" | "sideOffset" | "align" | "alignOffset">): react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
interface SeoData {
|
|
103
|
+
seoTitle?: string;
|
|
104
|
+
seoDescription?: string;
|
|
105
|
+
ogImage?: string;
|
|
106
|
+
keywords?: string;
|
|
107
|
+
}
|
|
108
|
+
declare function SeoHead({ data, fallbackSiteName }: {
|
|
109
|
+
data?: SeoData;
|
|
110
|
+
fallbackSiteName?: string;
|
|
111
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
112
|
+
|
|
113
|
+
interface TeamMemberData {
|
|
114
|
+
name: string;
|
|
115
|
+
role: string;
|
|
116
|
+
bio?: string;
|
|
117
|
+
headshot?: string;
|
|
118
|
+
socialLinks?: Array<{
|
|
119
|
+
platform: string;
|
|
120
|
+
url: string;
|
|
121
|
+
}>;
|
|
122
|
+
}
|
|
123
|
+
declare function AuthorCard({ author }: {
|
|
124
|
+
author?: TeamMemberData;
|
|
125
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
126
|
+
|
|
127
|
+
export { AuthorCard, Button, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, type SeoData, SeoHead, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Switch, type TeamMemberData, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants };
|