@upstart.gg/sdk 0.0.92 → 0.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/node/cli/api.js +2 -1
  2. package/dist/node/cli/api.js.map +1 -0
  3. package/dist/node/cli/commands/build/cmd-build.js +1 -0
  4. package/dist/node/cli/commands/build/cmd-build.js.map +1 -0
  5. package/dist/node/cli/commands/login/cmd-login.js +2 -1
  6. package/dist/node/cli/commands/login/cmd-login.js.map +1 -0
  7. package/dist/node/cli/commands/logout/cmd-logout.js +1 -0
  8. package/dist/node/cli/commands/logout/cmd-logout.js.map +1 -0
  9. package/dist/node/cli/commands/publish/cmd-publish.js +12 -11
  10. package/dist/node/cli/commands/publish/cmd-publish.js.map +1 -0
  11. package/dist/node/cli/commands/publish/parse-gitignore.js +1 -0
  12. package/dist/node/cli/commands/publish/parse-gitignore.js.map +1 -0
  13. package/dist/node/cli/commands/publish/uploader.js +2 -1
  14. package/dist/node/cli/commands/publish/uploader.js.map +1 -0
  15. package/dist/node/cli/constants.js +1 -0
  16. package/dist/node/cli/constants.js.map +1 -0
  17. package/dist/node/cli/is-logged-in.js +2 -1
  18. package/dist/node/cli/is-logged-in.js.map +1 -0
  19. package/dist/node/cli/program.js +3 -2
  20. package/dist/node/cli/program.js.map +1 -0
  21. package/dist/node/cli/store.js +1 -0
  22. package/dist/node/cli/store.js.map +1 -0
  23. package/dist/node/cli/types.js +1 -0
  24. package/dist/node/cli/types.js.map +1 -0
  25. package/dist/node/cli/utils.js +1 -0
  26. package/dist/node/cli/utils.js.map +1 -0
  27. package/dist/node/shared/config.d.ts.map +1 -1
  28. package/dist/node/shared/config.js +5 -4
  29. package/dist/node/shared/config.js.map +1 -0
  30. package/dist/node/shared/logger.js +2 -1
  31. package/dist/node/shared/logger.js.map +1 -0
  32. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  33. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  34. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  35. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  36. package/dist/shared/bricks/manifests/header.manifest.js +1 -1
  37. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  38. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  39. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  40. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  41. package/dist/shared/bricks/props/_docs-common-styles.js +1 -1
  42. package/dist/shared/bricks.js +1 -1
  43. package/dist/shared/{chunk-GDLXGNMG.js → chunk-4FLI7C3B.js} +1 -1
  44. package/dist/shared/chunk-6LDLGZUM.js +3 -0
  45. package/dist/shared/{chunk-TQ23UATQ.js → chunk-6MEWEGNA.js} +1 -1
  46. package/dist/shared/{chunk-HW5TY2QW.js → chunk-BXEKJXEP.js} +1 -1
  47. package/dist/shared/{chunk-EFJQECVB.js → chunk-ERSFH7XA.js} +1 -1
  48. package/dist/shared/{chunk-XEQ2XZLQ.js → chunk-IKAMZM4I.js} +1 -1
  49. package/dist/shared/{chunk-NFU5BF6G.js → chunk-QCQH5WLN.js} +1 -1
  50. package/dist/shared/{chunk-CP2GSNLX.js → chunk-RHRJYPU3.js} +1 -1
  51. package/dist/shared/chunk-S64XUCWM.js +3 -0
  52. package/dist/shared/{chunk-NUJO6EYU.js → chunk-SWGSHUTE.js} +1 -1
  53. package/dist/shared/{chunk-6I4PY5WS.js → chunk-U5WW6K7W.js} +1 -1
  54. package/dist/shared/{chunk-QRBMK5UX.js → chunk-V2NS45PF.js} +1 -1
  55. package/dist/shared/chunk-YY6DANZF.js +3 -0
  56. package/dist/shared/datasources/external/json/schema.d.ts +6 -0
  57. package/dist/shared/datasources/external/json/schema.d.ts.map +1 -0
  58. package/dist/shared/datasources/schemas.d.ts +640 -16
  59. package/dist/shared/datasources/schemas.d.ts.map +1 -1
  60. package/dist/shared/datasources/schemas.js +1 -1
  61. package/dist/shared/datasources/types.d.ts +1316 -40
  62. package/dist/shared/datasources/types.d.ts.map +1 -1
  63. package/dist/shared/datasources/types.js +1 -1
  64. package/dist/shared/datasources.d.ts +1 -53
  65. package/dist/shared/datasources.d.ts.map +1 -1
  66. package/dist/shared/datasources.js +1 -1
  67. package/dist/shared/page.d.ts +1914 -12
  68. package/dist/shared/page.d.ts.map +1 -1
  69. package/dist/shared/page.js +1 -1
  70. package/dist/shared/template.d.ts +637 -4
  71. package/dist/shared/template.d.ts.map +1 -1
  72. package/dist/shared/template.js +1 -1
  73. package/package.json +3 -3
  74. package/dist/shared/chunk-7XRTVY2Z.js +0 -3
  75. package/dist/shared/chunk-HC4I5B3L.js +0 -3
  76. package/dist/shared/chunk-YLAVY3GS.js +0 -3
@@ -1,3 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  var c="upstart-cli";var I=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",T=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",P=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";import p from"conf";import r from"node:path";import a from"node:crypto";import o from"node:fs";import{fileURLToPath as _}from"node:url";function i(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}import u from"chalk";var m=_(new URL(".",import.meta.url)),d=E(),f=new p({projectName:c,encryptionKey:d,clearInvalidConfig:!0});function h(){let e=f.get("access_token");if(!e){let t=i();throw new Error(`Access token not found. Please run ${u.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function g(){let e=m;for(;e!==r.parse(e).root;){let t=r.join(e,"node_modules");if(o.existsSync(t))return t;e=r.dirname(e)}return null}function E(){let e=g();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=r.join(e,".enpage-tmp");o.existsSync(t)||o.mkdirSync(t,{recursive:!0,mode:448});let n=r.join(t,".enpage-key");if(!o.existsSync(n)){let s=a.randomBytes(32).toString("hex");return o.writeFileSync(n,s,{mode:384}),s}return o.readFileSync(n,"utf8")}export{f as accessStore,h as getTokenOrThrow};
4
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/node/cli/constants.ts","../../../src/node/cli/store.ts","../../../src/node/cli/utils.ts"],"sourcesContent":["export const CLI_PROJECT_NAME = \"upstart-cli\";\nexport const CLI_LOGIN_POLL_INTERVAL = 5000; // seconds\nexport const CLI_LOGIN_CLIENT_ID =\n process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID ?? \"50000000-0000-0000-0000-000000000001\";\n\nexport const API_BASE_URL = process.env.PUBLIC_UPSTART_API_BASE_URL ?? \"https://api.upstart.gg\";\nexport const EDITOR_BASE_URL = process.env.PUBLIC_UPSTART_EDITOR_BASE_URL ?? \"https://upstart.gg\";\nexport const DEFAULT_UPLOAD_MAX_CONCURRENCY = 10;\n\nexport const OAUTH_ENDPOINT_DEVICE_CODE = \"oauth/devicecode\";\nexport const OAUTH_ENDPOINT_TOKEN = \"oauth/token\";\nexport const OAUTH_ENDPOINT_USER_INFO = \"oauth/userinfo\";\n\nexport const API_ENDPOINT_REGISTER_TEMPLATE = \"v1/templates\";\n","import type { CredentialsStore } from \"./types\";\nimport { CLI_PROJECT_NAME, OAUTH_ENDPOINT_USER_INFO } from \"./constants\";\nimport Conf from \"conf\";\nimport path from \"node:path\";\nimport crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { getPackageManager } from \"./utils\";\nimport chalk from \"chalk\";\n\nconst __dirname = fileURLToPath(new URL(\".\", import.meta.url));\nconst key = getKey();\nconst accessStore = new Conf<CredentialsStore>({\n projectName: CLI_PROJECT_NAME,\n encryptionKey: key,\n clearInvalidConfig: true,\n});\n\n/**\n * Get access token or throw error if not found\n */\nexport function getTokenOrThrow() {\n const token = accessStore.get(\"access_token\");\n if (!token) {\n const pkgCmd = getPackageManager();\n throw new Error(\n `Access token not found. Please run ${chalk.cyan(`${pkgCmd} run enpage:login`)} to authenticate.`,\n );\n }\n return token;\n}\n\nfunction findNearestNodeModules(): string | null {\n let currentDir = __dirname;\n while (currentDir !== path.parse(currentDir).root) {\n const nodeModulesPath = path.join(currentDir, \"node_modules\");\n if (fs.existsSync(nodeModulesPath)) {\n return nodeModulesPath;\n }\n currentDir = path.dirname(currentDir);\n }\n return null;\n}\n\nfunction getKey() {\n const nodeModulesPath = findNearestNodeModules();\n if (!nodeModulesPath) {\n throw new Error(\"Could not find nearest node_modules directory.\");\n }\n const tmpSecureStoreDir = path.join(nodeModulesPath, \".enpage-tmp\");\n if (!fs.existsSync(tmpSecureStoreDir)) {\n fs.mkdirSync(tmpSecureStoreDir, { recursive: true, mode: 0o700 });\n }\n const keyPath = path.join(tmpSecureStoreDir, \".enpage-key\");\n if (!fs.existsSync(keyPath)) {\n const key = crypto.randomBytes(32).toString(\"hex\");\n fs.writeFileSync(keyPath, key, { mode: 0o600 });\n return key;\n }\n const key = fs.readFileSync(keyPath, \"utf8\");\n return key;\n}\n\nexport { accessStore };\n","export function getPackageManager() {\n // Detect package manager\n let packageManager: string | undefined;\n if (process.env.npm_config_user_agent) {\n const pmPart = process.env.npm_config_user_agent.split(\" \")[0];\n packageManager = pmPart.slice(0, pmPart.lastIndexOf(\"/\"));\n }\n\n // Display message\n if (!packageManager) {\n console.log(\"Warning: could not detect package manager\");\n packageManager = \"npm\";\n }\n\n return packageManager;\n}\n\nexport function formatAPIError(error: { error: string; error_description?: string }) {\n return `[${error.error}]${error.error_description ? `: ${error.error_description}` : \"\"}`;\n}\n"],"mappings":";;AAAO,IAAMA,EAAmB,cAEzB,IAAMC,EACX,QAAQ,IAAI,gCAAkC,uCAEnCC,EAAe,QAAQ,IAAI,6BAA+B,yBAC1DC,EAAkB,QAAQ,IAAI,gCAAkC,qBCJ7E,OAAOC,MAAU,OACjB,OAAOC,MAAU,YACjB,OAAOC,MAAY,cACnB,OAAOC,MAAQ,UACf,OAAS,iBAAAC,MAAqB,WCNvB,SAASC,GAAoB,CAElC,IAAIC,EACJ,GAAI,QAAQ,IAAI,sBAAuB,CACrC,IAAMC,EAAS,QAAQ,IAAI,sBAAsB,MAAM,GAAG,EAAE,CAAC,EAC7DD,EAAiBC,EAAO,MAAM,EAAGA,EAAO,YAAY,GAAG,CAAC,CAC1D,CAGA,OAAKD,IACH,QAAQ,IAAI,2CAA2C,EACvDA,EAAiB,OAGZA,CACT,CDPA,OAAOE,MAAW,QAElB,IAAMC,EAAYC,EAAc,IAAI,IAAI,IAAK,YAAY,GAAG,CAAC,EACvDC,EAAMC,EAAO,EACbC,EAAc,IAAIC,EAAuB,CAC7C,YAAaC,EACb,cAAeJ,EACf,mBAAoB,EACtB,CAAC,EAKM,SAASK,GAAkB,CAChC,IAAMC,EAAQJ,EAAY,IAAI,cAAc,EAC5C,GAAI,CAACI,EAAO,CACV,IAAMC,EAASC,EAAkB,EACjC,MAAM,IAAI,MACR,sCAAsCX,EAAM,KAAK,GAAGU,CAAM,mBAAmB,CAAC,mBAChF,CACF,CACA,OAAOD,CACT,CAEA,SAASG,GAAwC,CAC/C,IAAIC,EAAaZ,EACjB,KAAOY,IAAeC,EAAK,MAAMD,CAAU,EAAE,MAAM,CACjD,IAAME,EAAkBD,EAAK,KAAKD,EAAY,cAAc,EAC5D,GAAIG,EAAG,WAAWD,CAAe,EAC/B,OAAOA,EAETF,EAAaC,EAAK,QAAQD,CAAU,CACtC,CACA,OAAO,IACT,CAEA,SAAST,GAAS,CAChB,IAAMW,EAAkBH,EAAuB,EAC/C,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,gDAAgD,EAElE,IAAME,EAAoBH,EAAK,KAAKC,EAAiB,aAAa,EAC7DC,EAAG,WAAWC,CAAiB,GAClCD,EAAG,UAAUC,EAAmB,CAAE,UAAW,GAAM,KAAM,GAAM,CAAC,EAElE,IAAMC,EAAUJ,EAAK,KAAKG,EAAmB,aAAa,EAC1D,GAAI,CAACD,EAAG,WAAWE,CAAO,EAAG,CAC3B,IAAMf,EAAMgB,EAAO,YAAY,EAAE,EAAE,SAAS,KAAK,EACjD,OAAAH,EAAG,cAAcE,EAASf,EAAK,CAAE,KAAM,GAAM,CAAC,EACvCA,CACT,CAEA,OADYa,EAAG,aAAaE,EAAS,MAAM,CAE7C","names":["CLI_PROJECT_NAME","CLI_LOGIN_CLIENT_ID","API_BASE_URL","EDITOR_BASE_URL","Conf","path","crypto","fs","fileURLToPath","getPackageManager","packageManager","pmPart","chalk","__dirname","fileURLToPath","key","getKey","accessStore","Conf","CLI_PROJECT_NAME","getTokenOrThrow","token","pkgCmd","getPackageManager","findNearestNodeModules","currentDir","path","nodeModulesPath","fs","tmpSecureStoreDir","keyPath","crypto"]}
@@ -1,2 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,3 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
3
  function n(){let r;if(process.env.npm_config_user_agent){let e=process.env.npm_config_user_agent.split(" ")[0];r=e.slice(0,e.lastIndexOf("/"))}return r||(console.log("Warning: could not detect package manager"),r="npm"),r}function t(r){return`[${r.error}]${r.error_description?`: ${r.error_description}`:""}`}export{t as formatAPIError,n as getPackageManager};
4
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/node/cli/utils.ts"],"sourcesContent":["export function getPackageManager() {\n // Detect package manager\n let packageManager: string | undefined;\n if (process.env.npm_config_user_agent) {\n const pmPart = process.env.npm_config_user_agent.split(\" \")[0];\n packageManager = pmPart.slice(0, pmPart.lastIndexOf(\"/\"));\n }\n\n // Display message\n if (!packageManager) {\n console.log(\"Warning: could not detect package manager\");\n packageManager = \"npm\";\n }\n\n return packageManager;\n}\n\nexport function formatAPIError(error: { error: string; error_description?: string }) {\n return `[${error.error}]${error.error_description ? `: ${error.error_description}` : \"\"}`;\n}\n"],"mappings":";;AAAO,SAASA,GAAoB,CAElC,IAAIC,EACJ,GAAI,QAAQ,IAAI,sBAAuB,CACrC,IAAMC,EAAS,QAAQ,IAAI,sBAAsB,MAAM,GAAG,EAAE,CAAC,EAC7DD,EAAiBC,EAAO,MAAM,EAAGA,EAAO,YAAY,GAAG,CAAC,CAC1D,CAGA,OAAKD,IACH,QAAQ,IAAI,2CAA2C,EACvDA,EAAiB,OAGZA,CACT,CAEO,SAASE,EAAeC,EAAsD,CACnF,MAAO,IAAIA,EAAM,KAAK,IAAIA,EAAM,kBAAoB,KAAKA,EAAM,iBAAiB,GAAK,EAAE,EACzF","names":["getPackageManager","packageManager","pmPart","formatAPIError","error"]}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CAgCzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAoB5E"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAA2B,MAAM,UAAU,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM;;;;;;;;;;CAAgB,GACrB,OAAO,CAAC,cAAc,CAAC,CAgCzB;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAM/F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAwB5E"}
@@ -1,10 +1,11 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import p from"node:fs";import{readFile as b}from"node:fs/promises";import v from"fast-glob";import{createLogger as y}from"vite";var c="0.0.92";import a from"chalk";function h(e,i,s=!1){let o=y(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:i});return s&&o.info(a.hex("#7270c6").bold(`\u{1F680} Upstart v${c}
4
- `)),{...o,success:(t,r)=>o.info(a.green(t),r),error:(t,r)=>o.error(a.red(t),r),warn:(t,r)=>o.warn(a.yellow(t),r),warnOnce:(t,r)=>o.warnOnce(a.yellow(t),r),debug:(t,r)=>{e==="debug"&&o.info(a.gray(t),r)}}}var m=h();import{basename as l,dirname as L,extname as x}from"node:path";async function T(e,i=m){p.existsSync(e)||(i.error(`\u{1F534} No enpage.config.js found!
3
+ import p from"node:fs";import{readFile as b}from"node:fs/promises";import v from"fast-glob";import{createLogger as y}from"vite";var c="0.0.93";import i from"chalk";function h(e,a,t=!1){let o=y(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:a});return t&&o.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${c}
4
+ `)),{...o,success:(s,r)=>o.info(i.green(s),r),error:(s,r)=>o.error(i.red(s),r),warn:(s,r)=>o.warn(i.yellow(s),r),warnOnce:(s,r)=>o.warnOnce(i.yellow(s),r),debug:(s,r)=>{e==="debug"&&o.info(i.gray(s),r)}}}var m=h();import{basename as l,dirname as L,extname as x}from"node:path";async function T(e,a=m){p.existsSync(e)||(a.error(`\u{1F534} No enpage.config.js found!
5
5
  Your project must have an enpage.config.js file in the root directory.
6
6
 
7
- `),process.exit(1));let s=await import(e),o=L(e),t={},r=await v(["README.enpage.md","README.enpage.*.md"],{cwd:o,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let n of r){let u=l(n,".md"),d=x(u),g=(d===".enpage"?"en":d.substring(1)).toLowerCase();i.debug(`Found template readme file (${g}): ${l(n)}`),t[g]=await b(n,"utf-8")}return s.manifest&&(s.manifest.readme=t),s}function $(e,i){return p.existsSync(e)||(i.error(`\u{1F534} No enpage.manifest.json found!
7
+ `),process.exit(1));let t=await import(e),o=L(e),s={},r=await v(["README.enpage.md","README.enpage.*.md"],{cwd:o,onlyFiles:!0,absolute:!0,caseSensitiveMatch:!1});for(let n of r){let u=l(n,".md"),d=x(u),g=(d===".enpage"?"en":d.substring(1)).toLowerCase();a.debug(`Found template readme file (${g}): ${l(n)}`),s[g]=await b(n,"utf-8")}return t.manifest&&(t.manifest.readme=s),t}function $(e,a){return p.existsSync(e)||(a.error(`\u{1F534} No enpage.manifest.json found!
8
8
  You may want to 'build' your template.
9
9
 
10
- `),process.exit(1)),JSON.parse(p.readFileSync(e,"utf-8"))}function z(e,i){for(let s in e.datasources)if(e.datasources[s].provider==="json"&&!e.datasources[s].sampleData)throw i.error(`\u{1F534} Error: Datasource "${s}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${s} datasource.`),new Error(`Missing sample data for datasource "${s}"`);return e}export{T as loadConfigFromJsFile,$ as loadConfigFromManifestFile,z as validateTemplateConfig};
10
+ `),process.exit(1)),JSON.parse(p.readFileSync(e,"utf-8"))}function z(e,a){for(let t in e.datasources)if((e.datasources[t].provider==="json-object"||e.datasources[t].provider==="json-array")&&!e.datasources[t].sampleData)throw a.error(`\u{1F534} Error: Datasource "${t}" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a "sampleData" key to your ${t} datasource.`),new Error(`Missing sample data for datasource "${t}"`);return e}export{T as loadConfigFromJsFile,$ as loadConfigFromManifestFile,z as validateTemplateConfig};
11
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/node/shared/config.ts","../../../src/node/shared/logger.ts","../../../package.json"],"sourcesContent":["import { manifestSchema } from \"~/shared/manifest\";\nimport fs from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport fg from \"fast-glob\";\nimport { type Logger, logger as defaultLogger } from \"./logger\";\nimport { basename, dirname, extname } from \"node:path\";\nimport type { TemplateConfig } from \"~/shared/template\";\n\nexport async function loadConfigFromJsFile(\n configPath: string,\n logger = defaultLogger,\n): Promise<TemplateConfig> {\n if (!fs.existsSync(configPath)) {\n logger.error(\n \"🔴 No enpage.config.js found!\\nYour project must have an enpage.config.js file in the root directory.\\n\\n\",\n );\n process.exit(1);\n }\n const config = (await import(configPath)) as TemplateConfig;\n\n // Parse the readme files fro the same directory as the config file\n const readmePath = dirname(configPath);\n const readme: Record<string, string> = {};\n const readmeFiles = await fg([\"README.enpage.md\", \"README.enpage.*.md\"], {\n cwd: readmePath,\n onlyFiles: true,\n absolute: true,\n caseSensitiveMatch: false,\n });\n\n for (const file of readmeFiles) {\n const base = basename(file, \".md\");\n const ext = extname(base);\n const language = (ext === \".enpage\" ? \"en\" : ext.substring(1)).toLowerCase();\n logger.debug(`Found template readme file (${language}): ${basename(file)}`);\n readme[language] = await readFile(file, \"utf-8\");\n }\n\n if (config.manifest) {\n config.manifest.readme = readme;\n }\n\n return config;\n}\n\nexport function loadConfigFromManifestFile(manifestPath: string, logger: Logger): TemplateConfig {\n if (!fs.existsSync(manifestPath)) {\n logger.error(\"🔴 No enpage.manifest.json found!\\nYou may want to 'build' your template.\\n\\n\");\n process.exit(1);\n }\n return JSON.parse(fs.readFileSync(manifestPath, \"utf-8\"));\n}\n\nexport function validateTemplateConfig(config: TemplateConfig, logger: Logger) {\n for (const key in config.datasources) {\n if (\n (config.datasources[key].provider === \"json-object\" ||\n config.datasources[key].provider === \"json-array\") &&\n !config.datasources[key].sampleData\n ) {\n logger.error(\n `🔴 Error: Datasource \"${key}\" is missing sample data - nothing will be rendered during development! Please check your enpage.config.js file and add a \"sampleData\" key to your ${key} datasource.`,\n );\n throw new Error(`Missing sample data for datasource \"${key}\"`);\n }\n }\n\n // Todo: replace validation from zod to ajv\n // const validated = manifestSchema.safeParse(config.manifest);\n // if (!validated.success) {\n // logger.error(`🔴 Error: template manifest is invalid. Check your call to defineManifest().\\n`);\n // const err = fromError(validated.error);\n // logger.error(`Hint: ${err.toString()}\\n\\n`);\n // process.exit(1);\n // }\n\n return config;\n}\n","import {\n createLogger as createLoggerBase,\n type LogLevel,\n type LogOptions,\n type Logger as BaseLogger,\n} from \"vite\";\nimport { version } from \"../../../package.json\";\nimport chalk from \"chalk\";\n\ntype UpstartLoggerLevel = LogLevel | \"debug\";\n\nexport function createLogger(level?: UpstartLoggerLevel, allowClearScreen?: boolean, showVersion = false) {\n // vite logger does not support \"debug\" level\n const logger = createLoggerBase(level === \"debug\" ? \"info\" : level, {\n prefix: \"[upstart]\",\n allowClearScreen,\n });\n\n if (showVersion) {\n logger.info(chalk.hex(\"#7270c6\").bold(`🚀 Upstart v${version}\\n`));\n }\n\n return {\n ...logger,\n success: (message: string, options?: LogOptions) => logger.info(chalk.green(message), options),\n error: (message: string, options?: LogOptions) => logger.error(chalk.red(message), options),\n warn: (message: string, options?: LogOptions) => logger.warn(chalk.yellow(message), options),\n warnOnce: (message: string, options?: LogOptions) => logger.warnOnce(chalk.yellow(message), options),\n debug: (message: string, options?: LogOptions) => {\n if (level === \"debug\") {\n logger.info(chalk.gray(message), options);\n }\n },\n };\n}\n\nexport const logger = createLogger();\n\nexport type Logger = BaseLogger & {\n success: (message: string, options?: LogOptions) => void;\n debug: (message: string, options?: LogOptions) => void;\n};\n","{\n \"name\": \"@upstart.gg/sdk\",\n \"version\": \"0.0.93\",\n \"type\": \"module\",\n \"files\": [\n \"dist\",\n \"env.d.ts\"\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"import\": \"./dist/shared/index.js\",\n \"types\": \"./dist/shared/index.d.ts\"\n },\n \"./shared/*\": {\n \"types\": \"./dist/shared/*.d.ts\",\n \"import\": \"./dist/shared/*.js\"\n },\n \"./builder/*\": {\n \"import\": \"./dist/node/builder/*.js\"\n },\n \"./cli/*\": {\n \"import\": \"./dist/node/cli/*.js\"\n },\n \"./env.d.ts\": {\n \"types\": \"./env.d.ts\",\n \"require\": \"./env.d.ts\",\n \"import\": \"./env.d.ts\"\n },\n \"./*\": {\n \"types\": \"./dist/shared/*.d.ts\",\n \"import\": \"./dist/shared/*.js\"\n }\n },\n \"bin\": {\n \"enpage\": \"dist/node/cli/program.js\"\n },\n \"dependencies\": {\n \"@date-fns/utc\": \"1.2.0\",\n \"@headlessui/react\": \"2.1.2\",\n \"@inquirer/prompts\": \"5.3.8\",\n \"@radix-ui/react-context-menu\": \"2.2.2\",\n \"@radix-ui/react-toggle-group\": \"1.1.0\",\n \"@radix-ui/themes\": \"3.1.4\",\n \"@sinclair/typebox\": \"0.33.7\",\n \"@upstart.gg/style-system\": \"workspace:*\",\n \"ajv\": \"8.17.1\",\n \"ajv-formats\": \"3.0.1\",\n \"chalk\": \"5.3.0\",\n \"chroma-js\": \"3.1.2\",\n \"commander\": \"12.1.0\",\n \"conf\": \"13.0.1\",\n \"date-fns\": \"3.6.0\",\n \"debug\": \"4.3.6\",\n \"fast-glob\": \"3.3.2\",\n \"form-data\": \"4.0.0\",\n \"get-port\": \"7.1.0\",\n \"htmlparser2\": \"9.1.0\",\n \"http-errors-enhanced\": \"2.0.8\",\n \"immer\": \"10.1.1\",\n \"import-meta-resolve\": \"4.1.0\",\n \"lodash-es\": \"4.17.21\",\n \"nanoid\": \"5.0.7\",\n \"open\": \"10.1.0\",\n \"ora\": \"8.1.0\",\n \"p-queue\": \"8.0.1\",\n \"react-hotkeys-hook\": \"4.5.1\",\n \"react-icons\": \"5.3.0\",\n \"react-selecto\": \"1.26.3\",\n \"rollup-plugin-strip-banner\": \"3.1.0\",\n \"usehooks-ts\": \"3.1.0\",\n \"zundo\": \"2.3.0\",\n \"zustand\": \"4.5.5\"\n },\n \"peerDependencies\": {\n \"@upstart.gg/style-system\": \"workspace:*\",\n \"react\": \"18.3.0-canary-3d9b20132-20240124\",\n \"react-dom\": \"18.3.0-canary-3d9b20132-20240124\"\n },\n \"devDependencies\": {\n \"@cloudflare/workers-types\": \"4.20240806.0\",\n \"@types/chroma-js\": \"2.4.4\",\n \"@types/cli-progress\": \"3.11.6\",\n \"@types/debug\": \"4.1.12\",\n \"@types/express\": \"^4.17.21\",\n \"@types/lodash-es\": \"4.17.12\",\n \"@types/node\": \"^20.14.10\",\n \"@types/react\": \"18.3.3\",\n \"@types/react-dom\": \"^18.3.0\",\n \"@types/sortablejs\": \"1.15.8\",\n \"@vitejs/plugin-react\": \"^4.3.4\",\n \"concurrently\": \"8.2.2\",\n \"express\": \"^4.21.2\",\n \"rimraf\": \"6.0.1\",\n \"tsup\": \"8.2.4\",\n \"vite\": \"5.4.6\",\n \"vite-plugin-dts\": \"4.2.1\",\n \"vite-plugin-image-optimizer\": \"1.1.8\",\n \"vite-plugin-inspect\": \"0.8.7\",\n \"vite-plugin-virtual\": \"0.3.0\",\n \"vite-tsconfig-paths\": \"5.0.1\"\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:types\": \"tsc --emitDeclarationOnly --declaration --declarationMap\",\n \"dev\": \"NODE_OPTIONS='--max-old-space-size=12384' tsup --watch\",\n \"sizetest\": \"pnpm build && du -sh dist\",\n \"lint\": \"biome check --write . && tsc --noEmit\",\n \"ci:lint\": \"tsc --noEmit\",\n \"test\": \"vitest\",\n \"prepare\": \"node ./scripts/prepare.cjs\",\n \"gen-ia-docs\": \"tsx scripts/generate-ia-docs.ts\"\n },\n \"author\": \"Matthias Etienne\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"mappings":";;AACA,OAAOA,MAAQ,UACf,OAAS,YAAAC,MAAgB,mBACzB,OAAOC,MAAQ,YCHf,OACE,gBAAgBC,MAIX,OCHL,IAAAC,EAAW,SDKb,OAAOC,MAAW,QAIX,SAASC,EAAaC,EAA4BC,EAA4BC,EAAc,GAAO,CAExG,IAAMC,EAASC,EAAiBJ,IAAU,QAAU,OAASA,EAAO,CAClE,OAAQ,YACR,iBAAAC,CACF,CAAC,EAED,OAAIC,GACFC,EAAO,KAAKL,EAAM,IAAI,SAAS,EAAE,KAAK,sBAAeO,CAAO;AAAA,CAAI,CAAC,EAG5D,CACL,GAAGF,EACH,QAAS,CAACG,EAAiBC,IAAyBJ,EAAO,KAAKL,EAAM,MAAMQ,CAAO,EAAGC,CAAO,EAC7F,MAAO,CAACD,EAAiBC,IAAyBJ,EAAO,MAAML,EAAM,IAAIQ,CAAO,EAAGC,CAAO,EAC1F,KAAM,CAACD,EAAiBC,IAAyBJ,EAAO,KAAKL,EAAM,OAAOQ,CAAO,EAAGC,CAAO,EAC3F,SAAU,CAACD,EAAiBC,IAAyBJ,EAAO,SAASL,EAAM,OAAOQ,CAAO,EAAGC,CAAO,EACnG,MAAO,CAACD,EAAiBC,IAAyB,CAC5CP,IAAU,SACZG,EAAO,KAAKL,EAAM,KAAKQ,CAAO,EAAGC,CAAO,CAE5C,CACF,CACF,CAEO,IAAMJ,EAASJ,EAAa,ED/BnC,OAAS,YAAAS,EAAU,WAAAC,EAAS,WAAAC,MAAe,YAG3C,eAAsBC,EACpBC,EACAC,EAASA,EACgB,CACpBC,EAAG,WAAWF,CAAU,IAC3BC,EAAO,MACL;AAAA;AAAA;AAAA,CACF,EACA,QAAQ,KAAK,CAAC,GAEhB,IAAME,EAAU,MAAM,OAAOH,GAGvBI,EAAaP,EAAQG,CAAU,EAC/BK,EAAiC,CAAC,EAClCC,EAAc,MAAMC,EAAG,CAAC,mBAAoB,oBAAoB,EAAG,CACvE,IAAKH,EACL,UAAW,GACX,SAAU,GACV,mBAAoB,EACtB,CAAC,EAED,QAAWI,KAAQF,EAAa,CAC9B,IAAMG,EAAOb,EAASY,EAAM,KAAK,EAC3BE,EAAMZ,EAAQW,CAAI,EAClBE,GAAYD,IAAQ,UAAY,KAAOA,EAAI,UAAU,CAAC,GAAG,YAAY,EAC3ET,EAAO,MAAM,+BAA+BU,CAAQ,MAAMf,EAASY,CAAI,CAAC,EAAE,EAC1EH,EAAOM,CAAQ,EAAI,MAAMC,EAASJ,EAAM,OAAO,CACjD,CAEA,OAAIL,EAAO,WACTA,EAAO,SAAS,OAASE,GAGpBF,CACT,CAEO,SAASU,EAA2BC,EAAsBb,EAAgC,CAC/F,OAAKC,EAAG,WAAWY,CAAY,IAC7Bb,EAAO,MAAM;AAAA;AAAA;AAAA,CAA+E,EAC5F,QAAQ,KAAK,CAAC,GAET,KAAK,MAAMC,EAAG,aAAaY,EAAc,OAAO,CAAC,CAC1D,CAEO,SAASC,EAAuBZ,EAAwBF,EAAgB,CAC7E,QAAWe,KAAOb,EAAO,YACvB,IACGA,EAAO,YAAYa,CAAG,EAAE,WAAa,eACpCb,EAAO,YAAYa,CAAG,EAAE,WAAa,eACvC,CAACb,EAAO,YAAYa,CAAG,EAAE,WAEzB,MAAAf,EAAO,MACL,gCAAyBe,CAAG,sJAAsJA,CAAG,cACvL,EACM,IAAI,MAAM,uCAAuCA,CAAG,GAAG,EAajE,OAAOb,CACT","names":["fs","readFile","fg","createLoggerBase","version","chalk","createLogger","level","allowClearScreen","showVersion","logger","createLoggerBase","version","message","options","basename","dirname","extname","loadConfigFromJsFile","configPath","logger","fs","config","readmePath","readme","readmeFiles","fg","file","base","ext","language","readFile","loadConfigFromManifestFile","manifestPath","validateTemplateConfig","key"]}
@@ -1,4 +1,5 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as d}from"vite";var o="0.0.92";import r from"chalk";function g(i,a,n=!1){let s=d(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${o}
3
+ import{createLogger as d}from"vite";var o="0.0.93";import r from"chalk";function g(i,a,n=!1){let s=d(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${o}
4
4
  `)),{...s,success:(e,t)=>s.info(r.green(e),t),error:(e,t)=>s.error(r.red(e),t),warn:(e,t)=>s.warn(r.yellow(e),t),warnOnce:(e,t)=>s.warnOnce(r.yellow(e),t),debug:(e,t)=>{i==="debug"&&s.info(r.gray(e),t)}}}var y=g();export{g as createLogger,y as logger};
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/node/shared/logger.ts","../../../package.json"],"sourcesContent":["import {\n createLogger as createLoggerBase,\n type LogLevel,\n type LogOptions,\n type Logger as BaseLogger,\n} from \"vite\";\nimport { version } from \"../../../package.json\";\nimport chalk from \"chalk\";\n\ntype UpstartLoggerLevel = LogLevel | \"debug\";\n\nexport function createLogger(level?: UpstartLoggerLevel, allowClearScreen?: boolean, showVersion = false) {\n // vite logger does not support \"debug\" level\n const logger = createLoggerBase(level === \"debug\" ? \"info\" : level, {\n prefix: \"[upstart]\",\n allowClearScreen,\n });\n\n if (showVersion) {\n logger.info(chalk.hex(\"#7270c6\").bold(`🚀 Upstart v${version}\\n`));\n }\n\n return {\n ...logger,\n success: (message: string, options?: LogOptions) => logger.info(chalk.green(message), options),\n error: (message: string, options?: LogOptions) => logger.error(chalk.red(message), options),\n warn: (message: string, options?: LogOptions) => logger.warn(chalk.yellow(message), options),\n warnOnce: (message: string, options?: LogOptions) => logger.warnOnce(chalk.yellow(message), options),\n debug: (message: string, options?: LogOptions) => {\n if (level === \"debug\") {\n logger.info(chalk.gray(message), options);\n }\n },\n };\n}\n\nexport const logger = createLogger();\n\nexport type Logger = BaseLogger & {\n success: (message: string, options?: LogOptions) => void;\n debug: (message: string, options?: LogOptions) => void;\n};\n","{\n \"name\": \"@upstart.gg/sdk\",\n \"version\": \"0.0.93\",\n \"type\": \"module\",\n \"files\": [\n \"dist\",\n \"env.d.ts\"\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"import\": \"./dist/shared/index.js\",\n \"types\": \"./dist/shared/index.d.ts\"\n },\n \"./shared/*\": {\n \"types\": \"./dist/shared/*.d.ts\",\n \"import\": \"./dist/shared/*.js\"\n },\n \"./builder/*\": {\n \"import\": \"./dist/node/builder/*.js\"\n },\n \"./cli/*\": {\n \"import\": \"./dist/node/cli/*.js\"\n },\n \"./env.d.ts\": {\n \"types\": \"./env.d.ts\",\n \"require\": \"./env.d.ts\",\n \"import\": \"./env.d.ts\"\n },\n \"./*\": {\n \"types\": \"./dist/shared/*.d.ts\",\n \"import\": \"./dist/shared/*.js\"\n }\n },\n \"bin\": {\n \"enpage\": \"dist/node/cli/program.js\"\n },\n \"dependencies\": {\n \"@date-fns/utc\": \"1.2.0\",\n \"@headlessui/react\": \"2.1.2\",\n \"@inquirer/prompts\": \"5.3.8\",\n \"@radix-ui/react-context-menu\": \"2.2.2\",\n \"@radix-ui/react-toggle-group\": \"1.1.0\",\n \"@radix-ui/themes\": \"3.1.4\",\n \"@sinclair/typebox\": \"0.33.7\",\n \"@upstart.gg/style-system\": \"workspace:*\",\n \"ajv\": \"8.17.1\",\n \"ajv-formats\": \"3.0.1\",\n \"chalk\": \"5.3.0\",\n \"chroma-js\": \"3.1.2\",\n \"commander\": \"12.1.0\",\n \"conf\": \"13.0.1\",\n \"date-fns\": \"3.6.0\",\n \"debug\": \"4.3.6\",\n \"fast-glob\": \"3.3.2\",\n \"form-data\": \"4.0.0\",\n \"get-port\": \"7.1.0\",\n \"htmlparser2\": \"9.1.0\",\n \"http-errors-enhanced\": \"2.0.8\",\n \"immer\": \"10.1.1\",\n \"import-meta-resolve\": \"4.1.0\",\n \"lodash-es\": \"4.17.21\",\n \"nanoid\": \"5.0.7\",\n \"open\": \"10.1.0\",\n \"ora\": \"8.1.0\",\n \"p-queue\": \"8.0.1\",\n \"react-hotkeys-hook\": \"4.5.1\",\n \"react-icons\": \"5.3.0\",\n \"react-selecto\": \"1.26.3\",\n \"rollup-plugin-strip-banner\": \"3.1.0\",\n \"usehooks-ts\": \"3.1.0\",\n \"zundo\": \"2.3.0\",\n \"zustand\": \"4.5.5\"\n },\n \"peerDependencies\": {\n \"@upstart.gg/style-system\": \"workspace:*\",\n \"react\": \"18.3.0-canary-3d9b20132-20240124\",\n \"react-dom\": \"18.3.0-canary-3d9b20132-20240124\"\n },\n \"devDependencies\": {\n \"@cloudflare/workers-types\": \"4.20240806.0\",\n \"@types/chroma-js\": \"2.4.4\",\n \"@types/cli-progress\": \"3.11.6\",\n \"@types/debug\": \"4.1.12\",\n \"@types/express\": \"^4.17.21\",\n \"@types/lodash-es\": \"4.17.12\",\n \"@types/node\": \"^20.14.10\",\n \"@types/react\": \"18.3.3\",\n \"@types/react-dom\": \"^18.3.0\",\n \"@types/sortablejs\": \"1.15.8\",\n \"@vitejs/plugin-react\": \"^4.3.4\",\n \"concurrently\": \"8.2.2\",\n \"express\": \"^4.21.2\",\n \"rimraf\": \"6.0.1\",\n \"tsup\": \"8.2.4\",\n \"vite\": \"5.4.6\",\n \"vite-plugin-dts\": \"4.2.1\",\n \"vite-plugin-image-optimizer\": \"1.1.8\",\n \"vite-plugin-inspect\": \"0.8.7\",\n \"vite-plugin-virtual\": \"0.3.0\",\n \"vite-tsconfig-paths\": \"5.0.1\"\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:types\": \"tsc --emitDeclarationOnly --declaration --declarationMap\",\n \"dev\": \"NODE_OPTIONS='--max-old-space-size=12384' tsup --watch\",\n \"sizetest\": \"pnpm build && du -sh dist\",\n \"lint\": \"biome check --write . && tsc --noEmit\",\n \"ci:lint\": \"tsc --noEmit\",\n \"test\": \"vitest\",\n \"prepare\": \"node ./scripts/prepare.cjs\",\n \"gen-ia-docs\": \"tsx scripts/generate-ia-docs.ts\"\n },\n \"author\": \"Matthias Etienne\",\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n"],"mappings":";;AAAA,OACE,gBAAgBA,MAIX,OCHL,IAAAC,EAAW,SDKb,OAAOC,MAAW,QAIX,SAASC,EAAaC,EAA4BC,EAA4BC,EAAc,GAAO,CAExG,IAAMC,EAASC,EAAiBJ,IAAU,QAAU,OAASA,EAAO,CAClE,OAAQ,YACR,iBAAAC,CACF,CAAC,EAED,OAAIC,GACFC,EAAO,KAAKL,EAAM,IAAI,SAAS,EAAE,KAAK,sBAAeO,CAAO;AAAA,CAAI,CAAC,EAG5D,CACL,GAAGF,EACH,QAAS,CAACG,EAAiBC,IAAyBJ,EAAO,KAAKL,EAAM,MAAMQ,CAAO,EAAGC,CAAO,EAC7F,MAAO,CAACD,EAAiBC,IAAyBJ,EAAO,MAAML,EAAM,IAAIQ,CAAO,EAAGC,CAAO,EAC1F,KAAM,CAACD,EAAiBC,IAAyBJ,EAAO,KAAKL,EAAM,OAAOQ,CAAO,EAAGC,CAAO,EAC3F,SAAU,CAACD,EAAiBC,IAAyBJ,EAAO,SAASL,EAAM,OAAOQ,CAAO,EAAGC,CAAO,EACnG,MAAO,CAACD,EAAiBC,IAAyB,CAC5CP,IAAU,SACZG,EAAO,KAAKL,EAAM,KAAKQ,CAAO,EAAGC,CAAO,CAE5C,CACF,CACF,CAEO,IAAMJ,EAASJ,EAAa","names":["createLoggerBase","version","chalk","createLogger","level","allowClearScreen","showVersion","logger","createLoggerBase","version","message","options"]}
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"../../chunk-YLAVY3GS.js";import"../../chunk-TQ23UATQ.js";import"../../chunk-GDLXGNMG.js";import"../../chunk-OELIU5BZ.js";import"../../chunk-DAPQ4JPP.js";import"../../chunk-WOEBR25A.js";import"../../chunk-BK6LBWDI.js";import"../../chunk-6I4PY5WS.js";import"../../chunk-3CY6AZG7.js";import"../../chunk-HW5TY2QW.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-PJ6HA55L.js";import"../../chunk-U4R5EGBK.js";import"../../chunk-HIZPJNEM.js";import"../../chunk-KB4HY432.js";import"../../chunk-Q4MXTCE4.js";import"../../chunk-QRBMK5UX.js";import"../../chunk-JVDUEZYO.js";import"../../chunk-FGU4BGP4.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-XBX6II3M.js";import"../../chunk-XEQ2XZLQ.js";import"../../chunk-RBYYMUOZ.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-F2ZVIFHO.js";import"../../chunk-NFU5BF6G.js";import"../../chunk-EFJQECVB.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-PD7P5KSV.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{b as defaultProps,a as manifests};
3
+ import{a,b}from"../../chunk-S64XUCWM.js";import"../../chunk-3CY6AZG7.js";import"../../chunk-IKAMZM4I.js";import"../../chunk-F2ZVIFHO.js";import"../../chunk-6MEWEGNA.js";import"../../chunk-4FLI7C3B.js";import"../../chunk-OELIU5BZ.js";import"../../chunk-DAPQ4JPP.js";import"../../chunk-WOEBR25A.js";import"../../chunk-BK6LBWDI.js";import"../../chunk-U5WW6K7W.js";import"../../chunk-ERSFH7XA.js";import"../../chunk-PD7P5KSV.js";import"../../chunk-BXEKJXEP.js";import"../../chunk-PJ6HA55L.js";import"../../chunk-U4R5EGBK.js";import"../../chunk-KB4HY432.js";import"../../chunk-Q4MXTCE4.js";import"../../chunk-V2NS45PF.js";import"../../chunk-HIZPJNEM.js";import"../../chunk-JVDUEZYO.js";import"../../chunk-XBX6II3M.js";import"../../chunk-QCQH5WLN.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-FGU4BGP4.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-U44NTSIO.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-RBYYMUOZ.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{b as defaultProps,a as manifests};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../../chunk-NFU5BF6G.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
3
+ import{a}from"../../chunk-QCQH5WLN.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../../chunk-EFJQECVB.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
3
+ import{a}from"../../chunk-ERSFH7XA.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-U44NTSIO.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"../../chunk-HW5TY2QW.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
3
+ import{a,b}from"../../chunk-BXEKJXEP.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-U44NTSIO.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"../../chunk-QRBMK5UX.js";import"../../chunk-JVDUEZYO.js";import"../../chunk-FGU4BGP4.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-XBX6II3M.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
3
+ import{a,b}from"../../chunk-V2NS45PF.js";import"../../chunk-JVDUEZYO.js";import"../../chunk-XBX6II3M.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-FGU4BGP4.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../../chunk-XEQ2XZLQ.js";import"../../chunk-RBYYMUOZ.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
3
+ import{a}from"../../chunk-IKAMZM4I.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-U44NTSIO.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-RBYYMUOZ.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../../chunk-TQ23UATQ.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
3
+ import{a}from"../../chunk-6MEWEGNA.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-U44NTSIO.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-XGCBIXOO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b}from"../../chunk-GDLXGNMG.js";import"../../chunk-OELIU5BZ.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
3
+ import{a,b}from"../../chunk-4FLI7C3B.js";import"../../chunk-OELIU5BZ.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-SQVL4WSX.js";import"../../chunk-AZ63RF3K.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as datasource,b as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a}from"../../chunk-6I4PY5WS.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-U44NTSIO.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
3
+ import{a}from"../../chunk-U5WW6K7W.js";import"../../chunk-WPTVLIYS.js";import"../../chunk-U44NTSIO.js";import"../../chunk-LDOM2LJF.js";import"../../chunk-IWSVY2VC.js";import"../../chunk-SO5M7CYA.js";import"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";export{a as manifest};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{c as f}from"../../chunk-AZ63RF3K.js";import{a as i}from"../../chunk-XGCBIXOO.js";import{d as e}from"../../chunk-SO5M7CYA.js";import{a as m}from"../../chunk-IWSVY2VC.js";import{a as c}from"../../chunk-U44NTSIO.js";import{a as o,b as r}from"../../chunk-P5FVZ5PL.js";import{b as t}from"../../chunk-LDOM2LJF.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";import{Type as p}from"@sinclair/typebox";var k=p.Object({effects:e(),background:o(),backgroundColor:r(),color:t(),border:m(),image:i(),padding:c(),layout:f()});export{k as commonStyleForDocsOnly};
3
+ import{a as c}from"../../chunk-U44NTSIO.js";import{b as t}from"../../chunk-LDOM2LJF.js";import{a as m}from"../../chunk-IWSVY2VC.js";import{c as f}from"../../chunk-AZ63RF3K.js";import{d as e}from"../../chunk-SO5M7CYA.js";import{a as i}from"../../chunk-XGCBIXOO.js";import{a as o,b as r}from"../../chunk-P5FVZ5PL.js";import"../../chunk-BMDB2V7J.js";import"../../chunk-PSSJMWGU.js";import{Type as p}from"@sinclair/typebox";var k=p.Object({effects:e(),background:o(),backgroundColor:r(),color:t(),border:m(),image:i(),padding:c(),layout:f()});export{k as commonStyleForDocsOnly};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a,b,c,d,e,f,g,h,i}from"./chunk-NUJO6EYU.js";import"./chunk-WJ5CDDXW.js";import"./chunk-64II435T.js";import"./chunk-ZWQHIQEQ.js";import"./chunk-YLAVY3GS.js";import"./chunk-TQ23UATQ.js";import"./chunk-GDLXGNMG.js";import"./chunk-OELIU5BZ.js";import"./chunk-DAPQ4JPP.js";import"./chunk-WOEBR25A.js";import"./chunk-BK6LBWDI.js";import"./chunk-6I4PY5WS.js";import"./chunk-3CY6AZG7.js";import"./chunk-HW5TY2QW.js";import"./chunk-AZ63RF3K.js";import"./chunk-PJ6HA55L.js";import"./chunk-U4R5EGBK.js";import"./chunk-HIZPJNEM.js";import"./chunk-KB4HY432.js";import"./chunk-Q4MXTCE4.js";import"./chunk-QRBMK5UX.js";import"./chunk-JVDUEZYO.js";import"./chunk-FGU4BGP4.js";import"./chunk-XGCBIXOO.js";import"./chunk-SQVL4WSX.js";import"./chunk-XBX6II3M.js";import"./chunk-XEQ2XZLQ.js";import"./chunk-RBYYMUOZ.js";import"./chunk-SO5M7CYA.js";import"./chunk-IWSVY2VC.js";import"./chunk-F2ZVIFHO.js";import"./chunk-NFU5BF6G.js";import"./chunk-EFJQECVB.js";import"./chunk-U44NTSIO.js";import"./chunk-P5FVZ5PL.js";import"./chunk-LDOM2LJF.js";import"./chunk-PD7P5KSV.js";import"./chunk-WPTVLIYS.js";import"./chunk-BMDB2V7J.js";import"./chunk-PSSJMWGU.js";export{b as brickSchema,i as defineBrick,g as defineBricks,f as defineSections,c as definedBrickSchema,e as definedSectionSchema,a as generateId,h as getPositionDefaults,d as sectionSchema};
3
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-SWGSHUTE.js";import"./chunk-WJ5CDDXW.js";import"./chunk-S64XUCWM.js";import"./chunk-3CY6AZG7.js";import"./chunk-IKAMZM4I.js";import"./chunk-F2ZVIFHO.js";import"./chunk-6MEWEGNA.js";import"./chunk-4FLI7C3B.js";import"./chunk-OELIU5BZ.js";import"./chunk-DAPQ4JPP.js";import"./chunk-WOEBR25A.js";import"./chunk-BK6LBWDI.js";import"./chunk-U5WW6K7W.js";import"./chunk-ERSFH7XA.js";import"./chunk-PD7P5KSV.js";import"./chunk-BXEKJXEP.js";import"./chunk-PJ6HA55L.js";import"./chunk-U4R5EGBK.js";import"./chunk-KB4HY432.js";import"./chunk-Q4MXTCE4.js";import"./chunk-V2NS45PF.js";import"./chunk-HIZPJNEM.js";import"./chunk-JVDUEZYO.js";import"./chunk-XBX6II3M.js";import"./chunk-QCQH5WLN.js";import"./chunk-WPTVLIYS.js";import"./chunk-FGU4BGP4.js";import"./chunk-SQVL4WSX.js";import"./chunk-64II435T.js";import"./chunk-ZWQHIQEQ.js";import"./chunk-U44NTSIO.js";import"./chunk-LDOM2LJF.js";import"./chunk-IWSVY2VC.js";import"./chunk-AZ63RF3K.js";import"./chunk-SO5M7CYA.js";import"./chunk-XGCBIXOO.js";import"./chunk-RBYYMUOZ.js";import"./chunk-P5FVZ5PL.js";import"./chunk-BMDB2V7J.js";import"./chunk-PSSJMWGU.js";export{b as brickSchema,i as defineBrick,g as defineBricks,f as defineSections,c as definedBrickSchema,e as definedSectionSchema,a as generateId,h as getPositionDefaults,d as sectionSchema};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as t}from"./chunk-OELIU5BZ.js";import{c as m}from"./chunk-AZ63RF3K.js";import{a}from"./chunk-SQVL4WSX.js";import{a as o}from"./chunk-WPTVLIYS.js";import{a as r,d as i}from"./chunk-BMDB2V7J.js";import{Type as e}from"@sinclair/typebox";import{IoGridOutline as n}from"react-icons/io5";var s=e.Array(e.Object({src:e.String({format:"uri",title:"Image URL"}),alt:e.String({default:"",title:"Alt text"})}),{default:[{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"}]}),u=o({type:"images-gallery",kind:"widget",name:"Gallery",description:"An image collection",defaultInspectorTab:"content",isContainer:!0,minWidth:{mobile:10,desktop:10},minHeight:{mobile:10,desktop:10},icon:n,props:i({content:a(),styles:r({title:"Styles",children:{layout:m()}})}),datasource:s});export{s as a,u as b};
3
+ import{a as t}from"./chunk-OELIU5BZ.js";import{a as o}from"./chunk-WPTVLIYS.js";import{a}from"./chunk-SQVL4WSX.js";import{c as m}from"./chunk-AZ63RF3K.js";import{a as r,d as i}from"./chunk-BMDB2V7J.js";import{Type as e}from"@sinclair/typebox";import{IoGridOutline as n}from"react-icons/io5";var s=e.Array(e.Object({src:e.String({format:"uri",title:"Image URL"}),alt:e.String({default:"",title:"Alt text"})}),{default:[{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"},{src:t,alt:"my image"}]}),u=o({type:"images-gallery",kind:"widget",name:"Gallery",description:"An image collection",defaultInspectorTab:"content",isContainer:!0,minWidth:{mobile:10,desktop:10},minHeight:{mobile:10,desktop:10},icon:n,props:i({content:a(),styles:r({title:"Styles",children:{layout:m()}})}),datasource:s});export{s as a,u as b};
@@ -0,0 +1,3 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
+
3
+ import{a as O,b as u,c as e}from"./chunk-YY6DANZF.js";import{Type as t}from"@sinclair/typebox";import{Type as a}from"@sinclair/typebox";import{Type as c}from"@sinclair/typebox";var o=c.Object({refreshInterval:c.Optional(c.Number())});var f=a.Composite([o,a.Object({channelId:a.String(),order:a.Optional(a.String()),maxResults:a.Optional(a.Number()),regionCode:a.Optional(a.String()),relevanceLanguage:a.Optional(a.String())})]);import{Type as s}from"@sinclair/typebox";var n=s.Composite([o,s.Object({limit:s.Optional(s.Number())})]);import{Type as l}from"@sinclair/typebox";var p=l.Composite([o,l.Object({username:l.String()})]);import{Type as i}from"@sinclair/typebox";var m=i.Composite([o,i.Object({url:i.String({format:"uri"}),headers:i.Optional(i.Record(i.String(),i.String()))})]);import{Type as d}from"@sinclair/typebox";var h=d.Composite([o,d.Object({url:d.String({format:"uri"})})]);import{Type as r}from"@sinclair/typebox";var y=r.Composite([o,r.Object({maxCount:r.Optional(r.Number()),refreshInterval:r.Optional(r.Number())})]);var _=t.Union([t.Literal("facebook-posts"),t.Literal("instagram-feed"),t.Literal("mastodon-account"),t.Literal("mastodon-status"),t.Literal("mastodon-status-list"),t.Literal("rss"),t.Literal("threads-media"),t.Literal("tiktok-video"),t.Literal("youtube-list"),t.Literal("json-array"),t.Literal("json-object"),t.Literal("internal-blog"),t.Literal("internal-changelog"),t.Literal("internal-contact-info"),t.Literal("internal-faq"),t.Literal("internal-links"),t.Literal("internal-recipes"),t.Literal("internal-restaurant"),t.Literal("internal-cv")]),b=t.Union([t.Object({provider:t.Literal("youtube-list"),options:f,schema:t.Optional(e["youtube-list"])}),t.Object({provider:t.Literal("facebook-posts"),options:n,schema:t.Optional(e["facebook-posts"])}),t.Object({provider:t.Literal("instagram-feed"),options:n,schema:t.Optional(e["instagram-feed"])}),t.Object({provider:t.Literal("threads-media"),options:n,schema:t.Optional(e["threads-media"])}),t.Object({provider:t.Literal("mastodon-account"),options:p,schema:t.Optional(e["mastodon-account"])}),t.Object({provider:t.Literal("mastodon-status"),options:p,schema:t.Optional(e["mastodon-status"])}),t.Object({provider:t.Literal("mastodon-status-list"),options:p,schema:t.Optional(e["mastodon-status-list"])}),t.Object({provider:t.Literal("rss"),options:h,schema:t.Optional(e.rss)}),t.Object({provider:t.Literal("tiktok-video"),options:y,schema:t.Optional(e["tiktok-video"])}),t.Object({provider:t.Literal("internal-blog"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-blog"])}),t.Object({provider:t.Literal("internal-changelog"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-changelog"])}),t.Object({provider:t.Literal("internal-contact-info"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-contact-info"])}),t.Object({provider:t.Literal("internal-faq"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-faq"])}),t.Object({provider:t.Literal("internal-links"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-links"])}),t.Object({provider:t.Literal("internal-recipes"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-recipes"])}),t.Object({provider:t.Literal("internal-restaurant"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-restaurant"])}),t.Object({provider:t.Literal("internal-cv"),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Optional(e["internal-cv"])})]),S=t.Composite([b,t.Object({name:t.String({title:"Name of the datasource",comment:"For example, 'My data'"}),description:t.Optional(t.String({title:"Description of the datasource"})),sampleData:t.Optional(t.Any()),ttlMinutes:t.Optional(t.Number({title:"Time to live",description:"Time to live in minutes. If set to -1, it never expires and has to be manually refreshed. If set to 0, the datasource is always fetched live. If > 0, then the datasource is feteched every N minutes."})),refresh:t.Optional(t.Object({method:t.Union([t.Literal("interval"),t.Literal("manual"),t.Literal("live")]),interval:t.Optional(t.Number())},{title:"Refresh options",description:"Options to refresh the datasource"}))})]),v=t.Object({provider:t.Literal("custom",{title:"Custom",description:"Custom datasource saved locally in Upstart."}),options:t.Optional(t.Object({},{additionalProperties:!0})),schema:t.Array(t.Object({},{additionalProperties:!0})),name:t.String({title:"Name of the datasource",comment:"For example, 'My data'"}),description:t.Optional(t.String({title:"Description of the datasource"})),sampleData:t.Optional(t.Any({title:"Sample data",description:"Sample data for the datasource. Should match the declared schema."}))}),j=t.Object({provider:t.Literal("json-object",{title:"JSON Object",description:"JSON object datasource."}),options:m,schema:O,name:t.String({title:"Name of the datasource",comment:"For example, 'My data'"}),description:t.Optional(t.String({title:"Description of the datasource"})),sampleData:t.Optional(t.Any({title:"Sample data",description:"Sample data for the datasource. Should match the declared schema."}))}),L=t.Object({provider:t.Literal("json-array",{title:"JSON Array",description:"JSON array datasource."}),options:m,schema:u,name:t.String({title:"Name of the datasource",comment:"For example, 'My data'"}),description:t.Optional(t.String({title:"Description of the datasource"})),sampleData:t.Optional(t.Any({title:"Sample data",description:"Sample data for the datasource. Should match the declared schema."}))}),$=t.Record(t.String(),t.Union([v,j,L,S]),{title:"Datasources map",description:"The map of datasources available in the system"});export{_ as a,$ as b};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as p}from"./chunk-XGCBIXOO.js";import{a as t}from"./chunk-SO5M7CYA.js";import{a as i}from"./chunk-IWSVY2VC.js";import{a as m}from"./chunk-U44NTSIO.js";import{b as e}from"./chunk-P5FVZ5PL.js";import{a as r}from"./chunk-WPTVLIYS.js";import{d as o}from"./chunk-BMDB2V7J.js";import{RxImage as a}from"react-icons/rx";var l=r({type:"image",kind:"brick",name:"Image",description:"An image brick",repeatable:!0,defaultHeight:{desktop:8,mobile:8},defaultWidth:{desktop:3,mobile:3},icon:a,props:o({image:p(),backgroundColor:e(),border:i(),padding:m(),shadow:t()})});export{l as a};
3
+ import{a as r}from"./chunk-WPTVLIYS.js";import{a as m}from"./chunk-U44NTSIO.js";import{a as i}from"./chunk-IWSVY2VC.js";import{a as t}from"./chunk-SO5M7CYA.js";import{a as p}from"./chunk-XGCBIXOO.js";import{b as e}from"./chunk-P5FVZ5PL.js";import{d as o}from"./chunk-BMDB2V7J.js";import{RxImage as a}from"react-icons/rx";var l=r({type:"image",kind:"brick",name:"Image",description:"An image brick",repeatable:!0,defaultHeight:{desktop:8,mobile:8},defaultWidth:{desktop:3,mobile:3},icon:a,props:o({image:p(),backgroundColor:e(),border:i(),padding:m(),shadow:t()})});export{l as a};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{c as m,d as f}from"./chunk-AZ63RF3K.js";import{a as d}from"./chunk-SQVL4WSX.js";import{d as p}from"./chunk-SO5M7CYA.js";import{a}from"./chunk-IWSVY2VC.js";import{a as n}from"./chunk-U44NTSIO.js";import{a as e}from"./chunk-P5FVZ5PL.js";import{a as i}from"./chunk-WPTVLIYS.js";import{a as r,d as t,e as o}from"./chunk-BMDB2V7J.js";import{Type as c}from"@sinclair/typebox";import{RxGrid as s}from"react-icons/rx";var l=c.Array(c.Object({},{additionalProperties:!0})),M=i({type:"container",kind:"brick",name:"Container",description:"A container that can hold other bricks and align them horizontally or vertically",isContainer:!0,defaultHeight:{desktop:6,mobile:6},defaultWidth:{desktop:12,mobile:12},datasource:l,icon:s,props:t({layout:m(),background:o(e()),border:o(a()),padding:o(n()),effects:o(p()),datasource:r({title:"Data",children:{ds:d()}}),...f()})});export{l as a,M as b};
3
+ import{a as i}from"./chunk-WPTVLIYS.js";import{a as d}from"./chunk-SQVL4WSX.js";import{a as n}from"./chunk-U44NTSIO.js";import{a}from"./chunk-IWSVY2VC.js";import{c as m,d as f}from"./chunk-AZ63RF3K.js";import{d as p}from"./chunk-SO5M7CYA.js";import{a as e}from"./chunk-P5FVZ5PL.js";import{a as r,d as t,e as o}from"./chunk-BMDB2V7J.js";import{Type as c}from"@sinclair/typebox";import{RxGrid as s}from"react-icons/rx";var l=c.Array(c.Object({},{additionalProperties:!0})),M=i({type:"container",kind:"brick",name:"Container",description:"A container that can hold other bricks and align them horizontally or vertically",isContainer:!0,defaultHeight:{desktop:6,mobile:6},defaultWidth:{desktop:12,mobile:12},datasource:l,icon:s,props:t({layout:m(),background:o(e()),border:o(a()),padding:o(n()),effects:o(p()),datasource:r({title:"Data",children:{ds:d()}}),...f()})});export{l as a,M as b};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as o}from"./chunk-U44NTSIO.js";import{b as r}from"./chunk-P5FVZ5PL.js";import{c as e}from"./chunk-LDOM2LJF.js";import{a}from"./chunk-WPTVLIYS.js";import{a as t,d as i}from"./chunk-BMDB2V7J.js";import{BsCardText as n}from"react-icons/bs";var g=a({type:"card",name:"Card",description:"A multi-purpose card that can have a title, subtitle, image, and content",repeatable:!0,icon:n,props:i({cardTitle:t({title:"Title",children:{content:e(),padding:o(),backgroundColor:r()}}),cardImage:t({title:"Image",children:{image:e()}}),cardBody:t({title:"Body",children:{content:e(),padding:o(),backgroundColor:r()}})})});export{g as a};
3
+ import{a}from"./chunk-WPTVLIYS.js";import{a as o}from"./chunk-U44NTSIO.js";import{c as e}from"./chunk-LDOM2LJF.js";import{b as r}from"./chunk-P5FVZ5PL.js";import{a as t,d as i}from"./chunk-BMDB2V7J.js";import{BsCardText as n}from"react-icons/bs";var g=a({type:"card",name:"Card",description:"A multi-purpose card that can have a title, subtitle, image, and content",repeatable:!0,icon:n,props:i({cardTitle:t({title:"Title",children:{content:e(),padding:o(),backgroundColor:r()}}),cardImage:t({title:"Image",children:{image:e()}}),cardBody:t({title:"Body",children:{content:e(),padding:o(),backgroundColor:r()}})})});export{g as a};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as p}from"./chunk-RBYYMUOZ.js";import{d as l}from"./chunk-SO5M7CYA.js";import{a as n}from"./chunk-IWSVY2VC.js";import{a as m}from"./chunk-U44NTSIO.js";import{a as i}from"./chunk-P5FVZ5PL.js";import{b as s,c as a}from"./chunk-LDOM2LJF.js";import{a as r}from"./chunk-WPTVLIYS.js";import{d as o,e as t}from"./chunk-BMDB2V7J.js";import{Type as e}from"@sinclair/typebox";import{BsAlphabetUppercase as f}from"react-icons/bs";var A=e.Union([e.Literal("hero-size-1",{title:"M"}),e.Literal("hero-size-2",{title:"L"}),e.Literal("hero-size-3",{title:"XL"}),e.Literal("hero-size-4",{title:"2XL"}),e.Literal("hero-size-5",{title:"3XL"})],{$id:"#styles:heroSize",title:"Text size",default:"hero-size-1","ui:display":"button-group","ui:responsive":!0}),M=r({type:"hero",name:"Hero",kind:"brick",description:"A big textual element for home pages",icon:f,defaultHeight:{desktop:5,mobile:5},defaultWidth:{desktop:12,mobile:12},props:o({content:a("I'm a big text"),background:t(i()),color:s(),effects:t(l({enableTextShadow:!0})),align:p(),padding:m("p-4"),border:t(n())})});export{M as a};
3
+ import{a as r}from"./chunk-WPTVLIYS.js";import{a as m}from"./chunk-U44NTSIO.js";import{b as s,c as a}from"./chunk-LDOM2LJF.js";import{a as n}from"./chunk-IWSVY2VC.js";import{d as l}from"./chunk-SO5M7CYA.js";import{a as p}from"./chunk-RBYYMUOZ.js";import{a as i}from"./chunk-P5FVZ5PL.js";import{d as o,e as t}from"./chunk-BMDB2V7J.js";import{Type as e}from"@sinclair/typebox";import{BsAlphabetUppercase as f}from"react-icons/bs";var A=e.Union([e.Literal("hero-size-1",{title:"M"}),e.Literal("hero-size-2",{title:"L"}),e.Literal("hero-size-3",{title:"XL"}),e.Literal("hero-size-4",{title:"2XL"}),e.Literal("hero-size-5",{title:"3XL"})],{$id:"#styles:heroSize",title:"Text size",default:"hero-size-1","ui:display":"button-group","ui:responsive":!0}),M=r({type:"hero",name:"Hero",kind:"brick",description:"A big textual element for home pages",icon:f,defaultHeight:{desktop:5,mobile:5},defaultWidth:{desktop:12,mobile:12},props:o({content:a("I'm a big text"),background:t(i()),color:s(),effects:t(l({enableTextShadow:!0})),align:p(),padding:m("p-4"),border:t(n())})});export{M as a};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{c as o}from"./chunk-LDOM2LJF.js";import{a as e}from"./chunk-WPTVLIYS.js";import{d as t}from"./chunk-BMDB2V7J.js";import{RxButton as n}from"react-icons/rx";var m=e({type:"button",name:"Button",repeatable:!0,description:"A button with text and optional icon",icon:n,props:t({label:o("Click here","hero")})});export{m as a};
3
+ import{a as e}from"./chunk-WPTVLIYS.js";import{c as o}from"./chunk-LDOM2LJF.js";import{d as t}from"./chunk-BMDB2V7J.js";import{RxButton as n}from"react-icons/rx";var m=e({type:"button",name:"Button",repeatable:!0,description:"A button with text and optional icon",icon:n,props:t({label:o("Click here","hero")})});export{m as a};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as b}from"./chunk-WXKRIUTA.js";import{b as c}from"./chunk-H6L4KRCJ.js";import{b as m,d as S}from"./chunk-NUJO6EYU.js";import{b as h}from"./chunk-7XRTVY2Z.js";import{b as f}from"./chunk-2ZPY4LCA.js";import{d as s,e as n}from"./chunk-64II435T.js";import{Type as t}from"@sinclair/typebox";var u=t.Array(t.Object({id:t.String(),label:t.String(),path:t.String(),tags:t.Array(t.String(),{default:[]}),status:t.Union([t.Literal("draft"),t.Literal("published")])})),d=t.Object({id:t.String(),label:t.String(),path:t.String()});function y(a,r="/",o=!1){let e=a.pages.find(p=>p.path===r);return b(e,`createPageConfigFromTemplateConfig: No page config found for path ${r}`),{id:typeof o=="boolean"?crypto.randomUUID():o,label:e.label,tags:e.tags??[],path:r,sections:e.sections,bricks:e.bricks,...e.attributes?{attributes:e.attributes,attr:{...n(e.attributes),...e.attr??{}}}:{}}}var A=t.Object({id:t.String(),label:t.String(),hostname:t.String(),attributes:s,attr:s,datasources:t.Optional(h),datarecords:t.Optional(f),themes:t.Array(c),theme:c,pagesMap:u});function G(a,r,o={label:"New site"},e=!1){let p=e?"50000000-0000-0000-0000-000000000001":crypto.randomUUID(),g=a.pages.map((i,l)=>y(a,i.path,e?`60000000-0000-0000-0000-00000000000${l}`:!1));return{site:{id:p,label:o.label,hostname:r,attributes:a.attributes,attr:{...n(a.attributes),...a.attr??{}},datasources:a.datasources,themes:a.themes,theme:a.themes[0],pagesMap:g.map(i=>({id:i.id,label:i.label,path:i.path,tags:i.tags,status:"draft"}))},pages:g}}var P=t.Object({label:t.String({description:"The label (name) of the page"}),path:t.String({description:"The path of the page in the URL. Should be unique"}),sections:t.Array(S,{description:"The sections of the page. See the Section schema","doc:type":"Array of `Section` objects"}),bricks:t.Array(m,{description:"The bricks of the page. See the various bricks available below","doc:type":"Array of `Brick` objects"}),tags:t.Array(t.String(),{description:"The tags of the page, used for organizating and filtering pages",default:[]}),attributes:t.Optional(s),attr:t.Optional(s)}),U=t.Object({site:t.Omit(A,["attributes"]),pages:t.Array(t.Composite([t.Omit(P,["attributes"]),d]))});export{y as a,A as b,G as c,P as d};
3
+ import{a as b}from"./chunk-WXKRIUTA.js";import{b as c}from"./chunk-H6L4KRCJ.js";import{b as m,d as S}from"./chunk-SWGSHUTE.js";import{b as h}from"./chunk-6LDLGZUM.js";import{b as f}from"./chunk-2ZPY4LCA.js";import{d as s,e as n}from"./chunk-64II435T.js";import{Type as t}from"@sinclair/typebox";var u=t.Array(t.Object({id:t.String(),label:t.String(),path:t.String(),tags:t.Array(t.String(),{default:[]}),status:t.Union([t.Literal("draft"),t.Literal("published")])})),d=t.Object({id:t.String(),label:t.String(),path:t.String()});function y(a,r="/",o=!1){let e=a.pages.find(p=>p.path===r);return b(e,`createPageConfigFromTemplateConfig: No page config found for path ${r}`),{id:typeof o=="boolean"?crypto.randomUUID():o,label:e.label,tags:e.tags??[],path:r,sections:e.sections,bricks:e.bricks,...e.attributes?{attributes:e.attributes,attr:{...n(e.attributes),...e.attr??{}}}:{}}}var A=t.Object({id:t.String(),label:t.String(),hostname:t.String(),attributes:s,attr:s,datasources:t.Optional(h),datarecords:t.Optional(f),themes:t.Array(c),theme:c,pagesMap:u});function G(a,r,o={label:"New site"},e=!1){let p=e?"50000000-0000-0000-0000-000000000001":crypto.randomUUID(),g=a.pages.map((i,l)=>y(a,i.path,e?`60000000-0000-0000-0000-00000000000${l}`:!1));return{site:{id:p,label:o.label,hostname:r,attributes:a.attributes,attr:{...n(a.attributes),...a.attr??{}},datasources:a.datasources,themes:a.themes,theme:a.themes[0],pagesMap:g.map(i=>({id:i.id,label:i.label,path:i.path,tags:i.tags,status:"draft"}))},pages:g}}var P=t.Object({label:t.String({description:"The label (name) of the page"}),path:t.String({description:"The path of the page in the URL. Should be unique"}),sections:t.Array(S,{description:"The sections of the page. See the Section schema","doc:type":"Array of `Section` objects"}),bricks:t.Array(m,{description:"The bricks of the page. See the various bricks available below","doc:type":"Array of `Brick` objects"}),tags:t.Array(t.String(),{description:"The tags of the page, used for organizating and filtering pages",default:[]}),attributes:t.Optional(s),attr:t.Optional(s)}),U=t.Object({site:t.Omit(A,["attributes"]),pages:t.Array(t.Composite([t.Omit(P,["attributes"]),d]))});export{y as a,A as b,G as c,P as d};
@@ -0,0 +1,3 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
+
3
+ import{a}from"./chunk-3CY6AZG7.js";import{a as e}from"./chunk-IKAMZM4I.js";import{a as d}from"./chunk-F2ZVIFHO.js";import{a as i}from"./chunk-6MEWEGNA.js";import{b as r}from"./chunk-4FLI7C3B.js";import{a as p}from"./chunk-DAPQ4JPP.js";import{a as k}from"./chunk-WOEBR25A.js";import{a as l}from"./chunk-BK6LBWDI.js";import{a as s}from"./chunk-U5WW6K7W.js";import{a as m}from"./chunk-ERSFH7XA.js";import{a as n}from"./chunk-PD7P5KSV.js";import{b as f}from"./chunk-BXEKJXEP.js";import{a as u}from"./chunk-PJ6HA55L.js";import{a as M}from"./chunk-U4R5EGBK.js";import{a as o}from"./chunk-KB4HY432.js";import{a as g}from"./chunk-Q4MXTCE4.js";import{b as y}from"./chunk-V2NS45PF.js";import{a as c}from"./chunk-QCQH5WLN.js";import{b as t}from"./chunk-WPTVLIYS.js";var H={[s.type]:s,[e.type]:e,[i.type]:i,[a.type]:a,[m.type]:m,[p.type]:p,[o.type]:o,[k.type]:k,[r.type]:r,[n.type]:n,[y.type]:y,[M.type]:M,[c.type]:c,[d.type]:d,[l.type]:l,[u.type]:u,[g.type]:g,[f.type]:f},I={[s.type]:t(s),[e.type]:t(e),[i.type]:t(i),[a.type]:t(a),[m.type]:t(m),[k.type]:t(k),[p.type]:t(p),[o.type]:t(o),[r.type]:t(r),[n.type]:t(n),[y.type]:t(y),[M.type]:t(M),[c.type]:t(c),[d.type]:t(d),[l.type]:t(l),[u.type]:t(u),[g.type]:t(g),[f.type]:t(f)};export{H as a,I as b};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{a as s}from"./chunk-WJ5CDDXW.js";import{c as o}from"./chunk-64II435T.js";import{b as n}from"./chunk-YLAVY3GS.js";import{a as p}from"./chunk-P5FVZ5PL.js";import{Type as e}from"@sinclair/typebox";import{customAlphabet as f}from"nanoid";import{merge as a}from"lodash-es";var d=f("1234567890azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN",7),l=e.Object({x:e.Number({title:"X",description:"The column start (0-based) in grid units, not pixels."}),y:e.Number({title:"Y",description:"The row start (0-based) in grid units, not pixels."}),w:e.Number({title:"Width",description:"The width in columns in grid units, not pixels."}),h:e.Number({title:"Height",description:"The height in rows in grid units, not pixels."}),manualHeight:e.Optional(e.Number({description:"Do not use this field. It is used internally by the editor."})),hidden:e.Optional(e.Boolean({description:"Do not use this field. It is used internally by the editor."}))},{$id:"brick-position"}),c=e.Object({x:e.Union([e.Number(),e.Literal("half"),e.Literal("third"),e.Literal("twoThird"),e.Literal("quarter"),e.Literal("threeQuarter")],{title:"X",description:"The column start (0-based) in grid units, not pixels. Can use aliases like 'half' to represent half of the grid."}),y:e.Number({title:"Y",description:"The row start (0-based) in grid units, not pixels."}),w:e.Union([e.Number(),e.Literal("full"),e.Literal("half"),e.Literal("third"),e.Literal("twoThird"),e.Literal("quarter"),e.Literal("threeQuarter")],{title:"Width",description:"The width in columns in grid units, not pixels. Can use aliases like 'half' to represent half of the grid."}),h:e.Union([e.Number({title:"Height",description:"The height in rows in grid units, not pixels."})]),hidden:e.Optional(e.Boolean({description:"Do not use this field. It is used internally by the editor."}))}),u=e.Object({id:e.String({title:"ID",description:"A unique identifier for the brick."}),type:e.String({title:"Type"}),props:e.Record(e.String(),e.Unknown()),mobileProps:e.Record(e.String(),e.Unknown()),parentId:e.Optional(e.String()),sectionId:e.String(),$children:e.Optional(e.Array(e.Ref("brick"))),position:e.Object({mobile:l,desktop:l},{title:"Position",description:"The position of the brick in the layout."})},{$id:"brick"}),T=e.Composite([e.Pick(u,["type","props","sectionId","parentId","$children"]),e.Object({id:e.Optional(e.String()),mobileProps:e.Optional(u.properties.props),position:e.Object({mobile:c,desktop:c})})]),h=e.Object({background:e.Optional(p()),width:e.Optional(o.enum("Width","max-w-full",{options:[{value:"max-w-screen-lg",title:"Medium",description:"Common for text-heavy content/blog posts"},{value:"max-w-screen-xl",title:"Large",description:"Usefull or some landing pages"},{value:"max-w-screen-2xl",title:"Extra large",description:"Common width"},{value:"max-w-full",title:"Full width",description:"Takes the entire space"}],description:"The maximum width of the page. Desktop only",displayAs:"select","ui:group":"layout","ui:group:order":3,"ui:group:title":"Layout"})),$paddingHorizontal:e.Optional(o.number("Horizontal spacing",0,{min:0,description:"Horizontal spacing. Desktop only",displayAs:"button-group"})),lastTouched:e.Optional(e.Number({description:"Do not use this field. It is used internally by the editor.","ui:field":"hidden"}))},{additionalProperties:!0}),b=e.Object({id:e.String(),kind:e.Literal("section"),label:e.Optional(e.String()),position:e.Object({mobile:e.Object({h:e.Optional(e.Union([e.Number(),e.Literal("full")]))}),desktop:e.Object({h:e.Union([e.Number(),e.Literal("full")])})}),order:e.Number({description:"Determines section order in the page (lower numbers appear first)"}),props:h,mobileProps:e.Optional(e.Partial(h))},{$id:"section"}),D=e.Omit(b,["kind"]);function m(t,i,r=s){return{x:t.x==="quarter"?r[i]/4:t.x==="threeQuarter"?r[i]*.75:t.x==="half"?r[i]/2:t.x==="third"?r[i]/3:t.x==="twoThird"?r[i]*2/3:t.x,y:t.y,w:t.w==="full"?r[i]:t.w==="half"?r[i]/2:t.w==="third"?r[i]/3:t.w==="quarter"?r[i]/4:t.w==="twoThird"?r[i]*2/3:t.w==="threeQuarter"?r[i]*3/4:t.w,h:t.h,hidden:t.hidden}}function I(t){return t.map(i=>({...i,props:i.props??{},kind:"section"}))}function N(t){return t.map(x)}function y(){return{desktop:{w:0,h:0,x:0,y:0},mobile:{w:0,h:0,x:0,y:0}}}function x(t){let i=t.id??`brick-${d()}`;return{id:i,...t,props:{...a({},n[t.type].props,t.props),..."$children"in t.props?{$children:t.props.$children.map(r=>({...r,id:r.id??`brick-${d()}`,parentId:i,sectionId:t.sectionId,position:{mobile:{},desktop:{}},props:a({},n[r.type].props,r.props)}))}:{}},mobileProps:t.mobileProps??{},position:t.position?{mobile:m(t.position.mobile,"mobile"),desktop:m(t.position.desktop,"desktop")}:y()}}export{d as a,u as b,T as c,b as d,D as e,I as f,N as g,y as h,x as i};
3
+ import{a as s}from"./chunk-WJ5CDDXW.js";import{b as n}from"./chunk-S64XUCWM.js";import{c as o}from"./chunk-64II435T.js";import{a as p}from"./chunk-P5FVZ5PL.js";import{Type as e}from"@sinclair/typebox";import{customAlphabet as f}from"nanoid";import{merge as a}from"lodash-es";var d=f("1234567890azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN",7),l=e.Object({x:e.Number({title:"X",description:"The column start (0-based) in grid units, not pixels."}),y:e.Number({title:"Y",description:"The row start (0-based) in grid units, not pixels."}),w:e.Number({title:"Width",description:"The width in columns in grid units, not pixels."}),h:e.Number({title:"Height",description:"The height in rows in grid units, not pixels."}),manualHeight:e.Optional(e.Number({description:"Do not use this field. It is used internally by the editor."})),hidden:e.Optional(e.Boolean({description:"Do not use this field. It is used internally by the editor."}))},{$id:"brick-position"}),c=e.Object({x:e.Union([e.Number(),e.Literal("half"),e.Literal("third"),e.Literal("twoThird"),e.Literal("quarter"),e.Literal("threeQuarter")],{title:"X",description:"The column start (0-based) in grid units, not pixels. Can use aliases like 'half' to represent half of the grid."}),y:e.Number({title:"Y",description:"The row start (0-based) in grid units, not pixels."}),w:e.Union([e.Number(),e.Literal("full"),e.Literal("half"),e.Literal("third"),e.Literal("twoThird"),e.Literal("quarter"),e.Literal("threeQuarter")],{title:"Width",description:"The width in columns in grid units, not pixels. Can use aliases like 'half' to represent half of the grid."}),h:e.Union([e.Number({title:"Height",description:"The height in rows in grid units, not pixels."})]),hidden:e.Optional(e.Boolean({description:"Do not use this field. It is used internally by the editor."}))}),u=e.Object({id:e.String({title:"ID",description:"A unique identifier for the brick."}),type:e.String({title:"Type"}),props:e.Record(e.String(),e.Unknown()),mobileProps:e.Record(e.String(),e.Unknown()),parentId:e.Optional(e.String()),sectionId:e.String(),$children:e.Optional(e.Array(e.Ref("brick"))),position:e.Object({mobile:l,desktop:l},{title:"Position",description:"The position of the brick in the layout."})},{$id:"brick"}),T=e.Composite([e.Pick(u,["type","props","sectionId","parentId","$children"]),e.Object({id:e.Optional(e.String()),mobileProps:e.Optional(u.properties.props),position:e.Object({mobile:c,desktop:c})})]),h=e.Object({background:e.Optional(p()),width:e.Optional(o.enum("Width","max-w-full",{options:[{value:"max-w-screen-lg",title:"Medium",description:"Common for text-heavy content/blog posts"},{value:"max-w-screen-xl",title:"Large",description:"Usefull or some landing pages"},{value:"max-w-screen-2xl",title:"Extra large",description:"Common width"},{value:"max-w-full",title:"Full width",description:"Takes the entire space"}],description:"The maximum width of the page. Desktop only",displayAs:"select","ui:group":"layout","ui:group:order":3,"ui:group:title":"Layout"})),$paddingHorizontal:e.Optional(o.number("Horizontal spacing",0,{min:0,description:"Horizontal spacing. Desktop only",displayAs:"button-group"})),lastTouched:e.Optional(e.Number({description:"Do not use this field. It is used internally by the editor.","ui:field":"hidden"}))},{additionalProperties:!0}),b=e.Object({id:e.String(),kind:e.Literal("section"),label:e.Optional(e.String()),position:e.Object({mobile:e.Object({h:e.Optional(e.Union([e.Number(),e.Literal("full")]))}),desktop:e.Object({h:e.Union([e.Number(),e.Literal("full")])})}),order:e.Number({description:"Determines section order in the page (lower numbers appear first)"}),props:h,mobileProps:e.Optional(e.Partial(h))},{$id:"section"}),D=e.Omit(b,["kind"]);function m(t,i,r=s){return{x:t.x==="quarter"?r[i]/4:t.x==="threeQuarter"?r[i]*.75:t.x==="half"?r[i]/2:t.x==="third"?r[i]/3:t.x==="twoThird"?r[i]*2/3:t.x,y:t.y,w:t.w==="full"?r[i]:t.w==="half"?r[i]/2:t.w==="third"?r[i]/3:t.w==="quarter"?r[i]/4:t.w==="twoThird"?r[i]*2/3:t.w==="threeQuarter"?r[i]*3/4:t.w,h:t.h,hidden:t.hidden}}function I(t){return t.map(i=>({...i,props:i.props??{},kind:"section"}))}function N(t){return t.map(x)}function y(){return{desktop:{w:0,h:0,x:0,y:0},mobile:{w:0,h:0,x:0,y:0}}}function x(t){let i=t.id??`brick-${d()}`;return{id:i,...t,props:{...a({},n[t.type].props,t.props),..."$children"in t.props?{$children:t.props.$children.map(r=>({...r,id:r.id??`brick-${d()}`,parentId:i,sectionId:t.sectionId,position:{mobile:{},desktop:{}},props:a({},n[r.type].props,r.props)}))}:{}},mobileProps:t.mobileProps??{},position:t.position?{mobile:m(t.position.mobile,"mobile"),desktop:m(t.position.desktop,"desktop")}:y()}}export{d as a,u as b,T as c,b as d,D as e,I as f,N as g,y as h,x as i};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{d as n}from"./chunk-SO5M7CYA.js";import{a as r}from"./chunk-IWSVY2VC.js";import{a as p}from"./chunk-U44NTSIO.js";import{b as o}from"./chunk-P5FVZ5PL.js";import{b as i,c as m}from"./chunk-LDOM2LJF.js";import{a as e}from"./chunk-WPTVLIYS.js";import{d as t}from"./chunk-BMDB2V7J.js";import{RxTextAlignLeft as f}from"react-icons/rx";var g=e({type:"text",kind:"brick",name:"Text",description:"Text with formatting options",minHeight:{desktop:2,mobile:2},minWidth:{desktop:2,mobile:2},defaultHeight:{desktop:7,mobile:7},defaultWidth:{desktop:6,mobile:6},repeatable:!0,icon:f,props:t({content:m(),backgroundColor:o(),color:i(),padding:p("p-2"),border:r(),effects:n({enableTextShadow:!0})})});export{g as a};
3
+ import{a as e}from"./chunk-WPTVLIYS.js";import{a as p}from"./chunk-U44NTSIO.js";import{b as i,c as m}from"./chunk-LDOM2LJF.js";import{a as r}from"./chunk-IWSVY2VC.js";import{d as n}from"./chunk-SO5M7CYA.js";import{b as o}from"./chunk-P5FVZ5PL.js";import{d as t}from"./chunk-BMDB2V7J.js";import{RxTextAlignLeft as f}from"react-icons/rx";var g=e({type:"text",kind:"brick",name:"Text",description:"Text with formatting options",minHeight:{desktop:2,mobile:2},minWidth:{desktop:2,mobile:2},defaultHeight:{desktop:7,mobile:7},defaultWidth:{desktop:6,mobile:6},repeatable:!0,icon:f,props:t({content:m(),backgroundColor:o(),color:i(),padding:p("p-2"),border:r(),effects:n({enableTextShadow:!0})})});export{g as a};
@@ -1,3 +1,3 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{b as h}from"./chunk-JVDUEZYO.js";import{a as w}from"./chunk-FGU4BGP4.js";import{a as g}from"./chunk-XGCBIXOO.js";import{a as u}from"./chunk-SQVL4WSX.js";import{c as s}from"./chunk-XBX6II3M.js";import{a as f}from"./chunk-SO5M7CYA.js";import{a as b}from"./chunk-IWSVY2VC.js";import{b as p}from"./chunk-P5FVZ5PL.js";import{b as d,c as m}from"./chunk-LDOM2LJF.js";import{a as c}from"./chunk-WPTVLIYS.js";import{a as i,b as n,d as l,e as t}from"./chunk-BMDB2V7J.js";import{Type as r}from"@sinclair/typebox";import{VscLayoutPanelOff as v}from"react-icons/vsc";var k=r.Array(r.Object({href:s(),label:r.String()}),{default:[{href:"#",label:"Link 1"},{href:"#",label:"Link 2"},{href:"#",label:"Link 3"}]}),y=[1,2,3,4].reduce((o,e)=>{let a=`soft-bordered-${e}`;return o[a]={label:`Soft Bordered ${e}`,previewClasses:`color-auto border-b-4 bg-transparent preset-border-<variant>-${e}`,props:{container:{border:{side:["border-b"],color:`preset-border-<variant>-${e}`,radius:"rounded-none",style:"border-solid",width:"border-4"},backgroundColor:"bg-transparent",shadow:"shadow-none"},brand:{color:"color-auto"}}},o},{}),$=[1,2,3,4].reduce((o,e)=>{let a=`gradient-${e}`;return o[a]={label:`Gradient ${e}`,previewClasses:`preset-bg-gradient-<variant>-${e} color-auto`,props:{container:{backgroundColor:`preset-bg-gradient-<variant>-${e}`,shadow:"shadow-none",border:{width:"border-0"}},brand:{color:"color-auto"}}},o},{}),C=[1,2,3,4].reduce((o,e)=>{let a=`solid-${e}`;return o[a]={label:`Solid ${e}`,previewClasses:`preset-bg-solid-<variant>-${e} color-auto`,props:{container:{backgroundColor:`preset-bg-solid-<variant>-${e}`,shadow:"shadow-none",border:{width:"border-0"}},brand:{color:"color-auto"}}},o},{}),z=c({type:"header",kind:"widget",name:"Header",description:"A header with logo and navigation",datasource:k,duplicatable:!1,defaultHeight:{desktop:3,mobile:3},maxHeight:{desktop:3,mobile:3},minHeight:{desktop:3,mobile:3},icon:v,iconClassName:"rotate-180",presets:{...y,...C,...$},props:l({container:i({title:"Main element",children:{backgroundColor:p(),border:t(b()),shadow:t(f()),fixedPositioned:t(h())},metadata:{"ui:responsive":!0}}),brand:i({title:"Brand",children:{name:t(m("Brand name","Acme Inc.",{disableSizing:!0})),logo:t(g("Logo",{noObjectOptions:!0})),hideText:t(w("Hide text")),color:d()}}),navigation:i({title:"Links",children:{position:n({title:"Position",schema:r.Union([r.Literal("left",{title:"Left"}),r.Literal("center",{title:"Center"}),r.Literal("right",{title:"Right"})],{default:"right"})}),color:d(),items:u(),navItems:n({title:"Nav items",schema:r.Array(r.Object({urlOrPageId:s()}),{title:"Navigation items",default:[]})})}})})});export{k as a,z as b};
3
+ import{b as h}from"./chunk-JVDUEZYO.js";import{c as s}from"./chunk-XBX6II3M.js";import{a as c}from"./chunk-WPTVLIYS.js";import{a as w}from"./chunk-FGU4BGP4.js";import{a as u}from"./chunk-SQVL4WSX.js";import{b as d,c as m}from"./chunk-LDOM2LJF.js";import{a as b}from"./chunk-IWSVY2VC.js";import{a as f}from"./chunk-SO5M7CYA.js";import{a as g}from"./chunk-XGCBIXOO.js";import{b as p}from"./chunk-P5FVZ5PL.js";import{a as i,b as n,d as l,e as t}from"./chunk-BMDB2V7J.js";import{Type as r}from"@sinclair/typebox";import{VscLayoutPanelOff as v}from"react-icons/vsc";var k=r.Array(r.Object({href:s(),label:r.String()}),{default:[{href:"#",label:"Link 1"},{href:"#",label:"Link 2"},{href:"#",label:"Link 3"}]}),y=[1,2,3,4].reduce((o,e)=>{let a=`soft-bordered-${e}`;return o[a]={label:`Soft Bordered ${e}`,previewClasses:`color-auto border-b-4 bg-transparent preset-border-<variant>-${e}`,props:{container:{border:{side:["border-b"],color:`preset-border-<variant>-${e}`,radius:"rounded-none",style:"border-solid",width:"border-4"},backgroundColor:"bg-transparent",shadow:"shadow-none"},brand:{color:"color-auto"}}},o},{}),$=[1,2,3,4].reduce((o,e)=>{let a=`gradient-${e}`;return o[a]={label:`Gradient ${e}`,previewClasses:`preset-bg-gradient-<variant>-${e} color-auto`,props:{container:{backgroundColor:`preset-bg-gradient-<variant>-${e}`,shadow:"shadow-none",border:{width:"border-0"}},brand:{color:"color-auto"}}},o},{}),C=[1,2,3,4].reduce((o,e)=>{let a=`solid-${e}`;return o[a]={label:`Solid ${e}`,previewClasses:`preset-bg-solid-<variant>-${e} color-auto`,props:{container:{backgroundColor:`preset-bg-solid-<variant>-${e}`,shadow:"shadow-none",border:{width:"border-0"}},brand:{color:"color-auto"}}},o},{}),z=c({type:"header",kind:"widget",name:"Header",description:"A header with logo and navigation",datasource:k,duplicatable:!1,defaultHeight:{desktop:3,mobile:3},maxHeight:{desktop:3,mobile:3},minHeight:{desktop:3,mobile:3},icon:v,iconClassName:"rotate-180",presets:{...y,...C,...$},props:l({container:i({title:"Main element",children:{backgroundColor:p(),border:t(b()),shadow:t(f()),fixedPositioned:t(h())},metadata:{"ui:responsive":!0}}),brand:i({title:"Brand",children:{name:t(m("Brand name","Acme Inc.",{disableSizing:!0})),logo:t(g("Logo",{noObjectOptions:!0})),hideText:t(w("Hide text")),color:d()}}),navigation:i({title:"Links",children:{position:n({title:"Position",schema:r.Union([r.Literal("left",{title:"Left"}),r.Literal("center",{title:"Center"}),r.Literal("right",{title:"Right"})],{default:"right"})}),color:d(),items:u(),navItems:n({title:"Nav items",schema:r.Array(r.Object({urlOrPageId:s()}),{title:"Navigation items",default:[]})})}})})});export{k as a,z as b};
@@ -0,0 +1,3 @@
1
+ /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
+
3
+ import{Type as o}from"@sinclair/typebox";var b=o.Object({data:o.Array(o.Object({from:o.Object({name:o.String(),id:o.String()}),id:o.String(),permalink_url:o.String(),is_hidden:o.Boolean(),message:o.Optional(o.String()),object_id:o.String(),link:o.String(),is_published:o.Boolean(),status_type:o.String(),type:o.String(),actions:o.Array(o.Object({name:o.String(),link:o.String()}))})),paging:o.Object({previous:o.Optional(o.String()),next:o.Optional(o.String())})});import{Type as c}from"@sinclair/typebox";var A=c.Object({data:c.Array(c.Object({id:c.String(),caption:c.String(),timestamp:c.String(),media_url:c.String(),permalink:c.String(),media_type:c.Union([c.Literal("IMAGE"),c.Literal("VIDEO"),c.Literal("CAROUSEL_ALBUM")])})),paging:c.Object({cursors:c.Object({before:c.Optional(c.String()),after:c.Optional(c.String())}),next:c.Optional(c.String())})});import{Type as t}from"@sinclair/typebox";import{Type as r}from"@sinclair/typebox";var y=r.Object({id:r.String(),username:r.String(),acct:r.String(),url:r.String(),display_name:r.Optional(r.String()),note:r.String(),avatar:r.String(),avatar_static:r.String(),header:r.String(),header_static:r.String(),locked:r.Boolean(),fields:r.Array(r.Object({name:r.String(),value:r.String(),verified_at:r.Optional(r.String())})),emojis:r.Array(r.Object({shortcode:r.String(),url:r.String(),static_url:r.String(),visible_in_picker:r.Boolean(),category:r.Optional(r.String())})),bot:r.Boolean(),group:r.Boolean(),discoverable:r.Union([r.Boolean(),r.Null()]),noindex:r.Optional(r.Boolean()),moved:r.Optional(r.String()),suspended:r.Optional(r.Boolean()),limited:r.Optional(r.Boolean()),created_at:r.String(),last_status_at:r.Optional(r.String()),statuses_count:r.Number(),followers_count:r.Number(),following_count:r.Number()});var E=t.Object({id:t.String(),type:t.Union([t.Literal("audio"),t.Literal("image"),t.Literal("video"),t.Literal("gifv"),t.Literal("unknown")]),url:t.String(),preview_url:t.Optional(t.String()),remote_url:t.Optional(t.String()),meta:t.Record(t.String(),t.Any()),description:t.Optional(t.String()),blurhash:t.Optional(t.String())}),j=t.Object({shortcode:t.String(),url:t.String(),static_url:t.String(),visible_in_picker:t.Boolean(),category:t.Optional(t.String())}),U=t.Object({url:t.String(),title:t.String(),description:t.String(),type:t.Union([t.Literal("link"),t.Literal("photo"),t.Literal("video"),t.Literal("rich")]),author_name:t.String(),author_url:t.String(),provider_name:t.String(),provider_url:t.String(),html:t.String(),width:t.Number(),height:t.Number(),image:t.Optional(t.String()),embed_url:t.String(),blurhash:t.Optional(t.String())}),F=t.Object({id:t.String(),expires_at:t.String(),expired:t.Boolean(),multiple:t.Boolean(),votes_count:t.Number(),options:t.Array(t.Object({title:t.String(),votes_count:t.Number()})),voted:t.Optional(t.Boolean()),own_votes:t.Optional(t.Array(t.Number())),emojis:t.Array(j)}),h=t.Object({id:t.String(),uri:t.String(),created_at:t.String(),account:y,content:t.String(),visibility:t.Union([t.Literal("public"),t.Literal("unlisted"),t.Literal("private"),t.Literal("direct")]),sensitive:t.Boolean(),media_attachments:t.Array(E),application:t.Optional(t.Object({name:t.String(),website:t.Optional(t.String())})),mentions:t.Array(t.Object({id:t.String(),username:t.String(),acct:t.String(),url:t.String()})),tags:t.Array(t.Object({name:t.String(),url:t.String()})),emojis:t.Array(j),reblogs_count:t.Number(),favourites_count:t.Number(),replies_count:t.Number(),url:t.String(),in_reply_to_id:t.Optional(t.String()),in_reply_to_account_id:t.Optional(t.String()),reblog:t.Optional(t.Ref("mastodonStatus")),poll:t.Optional(F),card:t.Optional(U),language:t.Optional(t.String()),text:t.Optional(t.String()),edited_at:t.Optional(t.String()),favourited:t.Optional(t.Boolean()),reblogged:t.Optional(t.Boolean()),muted:t.Optional(t.Boolean()),bookmarked:t.Optional(t.Boolean()),pinned:t.Optional(t.Boolean())},{$id:"mastodonStatus"}),L=t.Array(h);import{Type as s}from"@sinclair/typebox";var _=s.Object({title:s.String({title:"Title",description:"The title of the RSS feed"}),link:s.String({title:"Link",description:"The link to the RSS feed"}),description:s.Optional(s.String({title:"Description",description:"The description of the RSS feed"})),updated:s.Optional(s.String({title:"Updated",description:"The last updated date of the RSS feed"})),items:s.Array(s.Object({title:s.Optional(s.String({title:"Title",description:"The title of the RSS feed item"})),link:s.Optional(s.String({title:"Link",description:"The link to the RSS feed item"})),creator:s.Optional(s.String({title:"Creator",description:"The creator of the RSS feed item"})),content:s.Optional(s.String({title:"Content",description:"The content of the RSS feed item"})),pubDate:s.Optional(s.String({title:"Pub Date",description:"The publication date of the RSS feed item"}))}))});import{Type as n}from"@sinclair/typebox";var T=n.Object({data:n.Array(n.Object({id:n.String(),media_product_type:n.Literal("THREADS"),media_type:n.Union([n.Literal("TEXT_POST"),n.Literal("IMAGE"),n.Literal("VIDEO"),n.Literal("CAROUSEL_ALBUM"),n.Literal("AUDIO"),n.Literal("REPOST_FACADE")]),media_url:n.String(),permalink:n.String(),owner:n.Object({id:n.String()}),username:n.String(),text:n.String(),timestamp:n.String(),thumbnail_url:n.String(),shortcode:n.String(),is_quote_post:n.Boolean()})),paging:n.Object({cursors:n.Object({before:n.String(),after:n.String()})})});import{Type as p}from"@sinclair/typebox";var k=p.Object({data:p.Object({has_more:p.Boolean(),cursor:p.Number(),videos:p.Array(p.Object({title:p.String(),video_description:p.String(),cover_image_url:p.String(),duration:p.Number(),embed_link:p.String(),id:p.String()}))}),error:p.Optional(p.Object({code:p.String(),message:p.String(),log_id:p.String()}))});import{Type as a}from"@sinclair/typebox";var v=a.Object({etag:a.String(),nextPageToken:a.String(),regionCode:a.String(),pageInfo:a.Object({totalResults:a.Number(),resultsPerPage:a.Number()}),items:a.Array(a.Object({etag:a.String(),id:a.Object({videoId:a.String(),channelId:a.String(),playlistId:a.String()}),snippet:a.Object({publishedAt:a.String(),channelId:a.String(),title:a.String(),description:a.String(),thumbnails:a.Object({default:a.Object({url:a.String(),width:a.Number(),height:a.Number()}),standard:a.Object({url:a.String(),width:a.Number(),height:a.Number()})}),channelTitle:a.String(),liveBroadcastContent:a.String()})}))});import{Type as x}from"@sinclair/typebox";var f=x.Object({},{additionalProperties:!0}),N=x.Array(f);import{Type as l}from"@sinclair/typebox";var D=l.Array(l.Object({title:l.String({title:"Title",description:"Blog post title"}),excerpt:l.String({title:"Excerpt",description:"Short summary of the blog post",format:"markdown"}),image:l.Optional(l.String({title:"Image URL",format:"uri",description:"Blog post image"})),content:l.String({title:"Content",description:"Blog post content",format:"markdown"}),author:l.Object({name:l.String({title:"Author Name",description:"Author's name"})}),publishedAt:l.String({title:"Published Date",format:"date",description:"Publication date in ISO format"}),slug:l.String({title:"Slug",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",description:"URL-friendly version of the title"}),status:l.Union([l.Literal("draft"),l.Literal("published"),l.Literal("archived")],{title:"Status",description:"Publication status of the blog post"}),categories:l.Optional(l.Array(l.String({title:"Categories",description:"Blog post categories"}))),tags:l.Optional(l.Array(l.String({title:"Tags",description:"Blog post tags"})))}));import{Type as m}from"@sinclair/typebox";var B=m.Array(m.Object({title:m.String({title:"Release Title",description:"Title of the release"}),version:m.Optional(m.String({title:"Version",description:"Version number"})),date:m.String({title:"Release Date",format:"date",description:"Release date in ISO format"}),changes:m.Array(m.Object({type:m.Union([m.Literal("added"),m.Literal("changed"),m.Literal("fixed"),m.Literal("improved"),m.Literal("deprecated"),m.Literal("removed")],{title:"Change Type"}),description:m.String({title:"Description",format:"markdown"})}))}));import{Type as S}from"@sinclair/typebox";import{Type as u}from"@sinclair/typebox";var O=u.Array(u.Object({url:u.String({format:"uri",title:"URL"}),title:u.String({title:"Title"}),description:u.Optional(u.String({title:"Description",format:"markdown"})),icon:u.Optional(u.String({title:"Icon",format:"uri"}))}),{description:"Schema representing a collection of links"});var P=S.Object({email:S.String({format:"email",title:"Email"}),phone:S.Optional(S.String({title:"Phone"})),companyName:S.Optional(S.String({title:"Company Name"})),firstName:S.Optional(S.String({title:"First Name"})),lastName:S.Optional(S.String({title:"Last Name"})),url:S.Optional(S.String({format:"uri",title:"Website URL"})),address:S.Optional(S.String({title:"Address"})),socialLinks:O},{description:"A generic schema representing a person or company contact information"});import{Type as i}from"@sinclair/typebox";var C=i.Object({firstName:i.String({title:"First name"}),lastName:i.String({title:"Last name"}),tagLine:i.String({title:"Tag line"}),email:i.String({title:"Email",pattern:"^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),phoneNumber:i.Optional(i.String({title:"Phone number",pattern:"^\\+?[1-9]\\d{1,14}$"})),address:i.Optional(i.String({title:"Address"})),socialLinks:i.Optional(i.Array(i.Object({platform:i.String({title:"Platform",enum:["LinkedIn","GitHub","Twitter","Portfolio","Other"]}),url:i.String({title:"URL",pattern:"^https?://.*"})}))),professionalSummary:i.String({title:"Professional Summary",description:"Brief overview of your professional background and goals",maxLength:2e3}),workExperience:i.Array(i.Object({company:i.String({title:"Company Name"}),position:i.String({title:"Position"}),location:i.Optional(i.String({title:"Location"})),startDate:i.String({title:"Start Date",format:"date"}),endDate:i.Optional(i.String({title:"End Date",format:"date"})),current:i.Optional(i.Boolean({title:"Current Position",default:!1})),description:i.String({title:"Description",description:"Description of responsibilities and achievements",format:"markdown"}),achievements:i.Optional(i.Array(i.String({title:"Achievement"})))})),education:i.Array(i.Object({institution:i.String({title:"Institution"}),degree:i.String({title:"Degree"}),field:i.String({title:"Field of Study"}),startDate:i.String({title:"Start Date",format:"date"}),endDate:i.Optional(i.String({title:"End Date",format:"date"})),gpa:i.Optional(i.Number({title:"GPA",minimum:0,maximum:4})),honors:i.Optional(i.Array(i.String({title:"Honor/Award"})))})),skills:i.Array(i.Object({category:i.String({title:"Skill Category",description:"E.g., Programming Languages, Tools, Soft Skills"}),items:i.Array(i.Object({name:i.String({title:"Skill Name"}),level:i.Optional(i.String({title:"Proficiency Level",enum:["Beginner","Intermediate","Advanced","Expert"]}))}))})),certifications:i.Optional(i.Array(i.Object({name:i.String({title:"Certification Name"}),issuer:i.String({title:"Issuing Organization"}),dateObtained:i.String({title:"Date Obtained",format:"date"}),expiryDate:i.Optional(i.String({title:"Expiry Date",format:"date"})),credentialId:i.Optional(i.String({title:"Credential ID"}))}))),languages:i.Optional(i.Array(i.Object({language:i.String({title:"Language"}),proficiency:i.String({title:"Proficiency Level",enum:["Basic","Intermediate","Advanced","Native/Bilingual"]})}))),projects:i.Optional(i.Array(i.Object({name:i.String({title:"Project Name"}),description:i.String({title:"Description"}),url:i.Optional(i.String({title:"Project URL",pattern:"^https?://.*"})),technologies:i.Array(i.String({title:"Technology"})),startDate:i.Optional(i.String({title:"Start Date",format:"date"})),endDate:i.Optional(i.String({title:"End Date",format:"date"}))}))),references:i.Optional(i.Array(i.Object({name:i.String({title:"Reference Name"}),position:i.String({title:"Position"}),company:i.String({title:"Company"}),email:i.Optional(i.String({title:"Email",pattern:"^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"})),phoneNumber:i.Optional(i.String({title:"Phone Number",pattern:"^\\+?[1-9]\\d{1,14}$"})),relationship:i.String({title:"Professional Relationship"})})))},{description:"Schema representing a comprehensive CV"});import{Type as d}from"@sinclair/typebox";var I=d.Array(d.Object({question:d.String({title:"Question",format:"markdown"}),answer:d.String({title:"Answer",format:"markdown"}),category:d.Optional(d.String({title:"Category"})),tags:d.Optional(d.Array(d.String(),{title:"Tags"})),order:d.Optional(d.Number({title:"Order in the list"}))}),{title:"FAQ",description:"Schema representing a collection of frequently asked questions (FAQ)"});import{Type as g}from"@sinclair/typebox";var R=g.Array(g.Object({title:g.String({title:"Title"}),description:g.String({title:"Description",format:"markdown"}),time:g.String({title:"Time to prepare the recipe"}),ingredients:g.Array(g.Object({name:g.String({title:"Name of the ingredient"}),quantity:g.String({title:"Quantity of the ingredient"})})),steps:g.Array(g.Object({title:g.String({title:"Step title"}),description:g.String({title:"Step description"})}))}),{description:"Schema representing a collection of recipes"});import{Type as e}from"@sinclair/typebox";var w=e.Object({basicInfo:e.Object({name:e.String({title:"Restaurant Name"}),legalName:e.Optional(e.String({title:"Legal Business Name"})),taxId:e.Optional(e.String({title:"Tax ID/VAT Number"})),establishedDate:e.String({title:"Establishment Date",format:"date"}),cuisine:e.Array(e.String({title:"Cuisine Type",description:"Types of cuisine served"}))}),contact:e.Object({email:e.String({title:"Email",pattern:"^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),phone:e.String({title:"Phone Number",pattern:"^\\+?[1-9]\\d{1,14}$"}),socialMedia:e.Optional(e.Object({facebook:e.Optional(e.String()),instagram:e.Optional(e.String()),twitter:e.Optional(e.String())}))}),location:e.Object({address:e.String({title:"Street Address"}),city:e.String({title:"City"}),state:e.Optional(e.String({title:"State/Province"})),postalCode:e.String({title:"Postal Code"}),country:e.String({title:"Country"}),coordinates:e.Optional(e.Object({latitude:e.Number(),longitude:e.Number()}))}),hours:e.Object({regularHours:e.Array(e.Object({day:e.String({enum:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}),open:e.String({title:"Opening Time",pattern:"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"}),close:e.String({title:"Closing Time",pattern:"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"}),closed:e.Optional(e.Boolean({title:"Closed on this day",default:!1}))})),specialHours:e.Optional(e.Array(e.Object({date:e.String({title:"Special Date",format:"date"}),description:e.String({title:"Description"}),open:e.Optional(e.String()),close:e.Optional(e.String()),closed:e.Boolean({default:!1})})))}),menu:e.Object({categories:e.Array(e.Object({name:e.String({title:"Category Name",description:"E.g., Starters, Main Course, Desserts"}),description:e.Optional(e.String()),items:e.Array(e.Object({id:e.String({title:"Item ID"}),name:e.String({title:"Item Name"}),description:e.String({title:"Item Description"}),price:e.Number({title:"Price",minimum:0}),currency:e.String({default:"USD"}),spicyLevel:e.Optional(e.Number({minimum:0,maximum:5})),allergens:e.Optional(e.Array(e.String({enum:["Gluten","Dairy","Nuts","Eggs","Soy","Shellfish","Fish","Other"]}))),dietary:e.Optional(e.Array(e.String({enum:["Vegetarian","Vegan","Halal","Kosher","Gluten-Free","Dairy-Free"]}))),available:e.Boolean({title:"Currently Available",default:!0}),image:e.Optional(e.String({title:"Image URL",pattern:"^https?://.*"})),customizations:e.Optional(e.Array(e.Object({name:e.String({title:"Customization Name"}),options:e.Array(e.Object({name:e.String(),price:e.Optional(e.Number())})),required:e.Boolean({default:!1}),multiSelect:e.Boolean({default:!1})})))}))})),specials:e.Optional(e.Array(e.Object({name:e.String(),description:e.String(),price:e.Number(),startDate:e.String({format:"date"}),endDate:e.String({format:"date"}),daysAvailable:e.Optional(e.Array(e.String({enum:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]})))})))})},{description:"Schema representing a restaurant with its menu and details"});var Ft={"facebook-posts":b,"instagram-feed":A,"mastodon-account":y,"mastodon-status":h,"mastodon-status-list":L,rss:_,"threads-media":T,"tiktok-video":k,"youtube-list":v,"internal-blog":D,"internal-changelog":B,"internal-contact-info":P,"internal-faq":I,"internal-links":O,"internal-recipes":R,"internal-restaurant":w,"internal-cv":C,"json-array":N,"json-object":f};export{f as a,N as b,Ft as c};
@@ -0,0 +1,6 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const jsonObjectSchema: import("@sinclair/typebox").TObject<{}>;
3
+ export declare const jsonArraySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
4
+ export type JSONObjectSchema = Static<typeof jsonObjectSchema>;
5
+ export type JSONArraySchema = Static<typeof jsonArraySchema>;
6
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/external/json/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,yCAAkD,CAAC;AAChF,eAAO,MAAM,eAAe,6EAA+B,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC"}