@upstart.gg/sdk 0.0.86 → 0.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/cli/api.js +1 -1
- package/dist/node/cli/commands/login/cmd-login.js +1 -1
- package/dist/node/cli/commands/publish/cmd-publish.js +1 -1
- package/dist/node/cli/commands/publish/uploader.js +1 -1
- package/dist/node/cli/is-logged-in.js +1 -1
- package/dist/node/cli/program.js +1 -1
- package/dist/node/shared/config.js +1 -1
- package/dist/node/shared/logger.js +1 -1
- package/dist/shared/ajv.d.ts.map +1 -1
- package/dist/shared/ajv.js +1 -1
- package/dist/shared/attributes.d.ts +2 -2
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +1 -1
- package/dist/shared/bricks/manifests/all-manifests.js +1 -1
- package/dist/shared/bricks/manifests/button.manifest.js +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +1 -1
- package/dist/shared/bricks/manifests/container.manifest.js +1 -1
- package/dist/shared/bricks/manifests/header.manifest.js +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +1 -1
- package/dist/shared/bricks/props/_docs-common-styles.js +1 -1
- package/dist/shared/bricks.js +1 -1
- package/dist/shared/{chunk-GDLXGNMG.js → chunk-4FLI7C3B.js} +1 -1
- package/dist/shared/{chunk-JJJSV2ZY.js → chunk-64II435T.js} +1 -1
- package/dist/shared/{chunk-TQ23UATQ.js → chunk-6MEWEGNA.js} +1 -1
- package/dist/shared/{chunk-HW5TY2QW.js → chunk-BXEKJXEP.js} +1 -1
- package/dist/shared/{chunk-EFJQECVB.js → chunk-ERSFH7XA.js} +1 -1
- package/dist/shared/{chunk-XEQ2XZLQ.js → chunk-IKAMZM4I.js} +1 -1
- package/dist/shared/{chunk-KVYOKIBM.js → chunk-KK7J6SRT.js} +1 -1
- package/dist/shared/{chunk-NFU5BF6G.js → chunk-QCQH5WLN.js} +1 -1
- package/dist/shared/chunk-S64XUCWM.js +3 -0
- package/dist/shared/chunk-TGGTFM2R.js +3 -0
- package/dist/shared/{chunk-6I4PY5WS.js → chunk-U5WW6K7W.js} +1 -1
- package/dist/shared/{chunk-QRBMK5UX.js → chunk-V2NS45PF.js} +1 -1
- package/dist/shared/chunk-ZRWRIZBR.js +3 -0
- package/dist/shared/chunk-ZWQHIQEQ.js +3 -0
- package/dist/shared/datasources/internal/blog/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/changelog/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/cv/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/faq/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/job-board/schema.d.ts.map +1 -1
- package/dist/shared/datasources/internal/recipes/schema.d.ts.map +1 -1
- package/dist/shared/datasources/schemas.js +1 -1
- package/dist/shared/datasources.js +1 -1
- package/dist/shared/page.d.ts +6 -31
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +1 -1
- package/dist/shared/template.d.ts +3 -3
- package/dist/shared/template.d.ts.map +1 -1
- package/dist/shared/template.js +1 -1
- package/package.json +3 -3
- package/dist/shared/chunk-CXPTVEDX.js +0 -3
- package/dist/shared/chunk-UIDTQ6Y7.js +0 -3
- package/dist/shared/chunk-YLAVY3GS.js +0 -3
- package/dist/shared/chunk-ZWVJMSTT.js +0 -3
package/dist/node/cli/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{createLogger as T}from"vite";var g="0.0.
|
|
3
|
+
import{createLogger as T}from"vite";var g="0.0.88";import i from"chalk";function h(e,t,o=!1){let s=T(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return o&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${g}
|
|
4
4
|
`)),{...s,success:(r,n)=>s.info(i.green(r),n),error:(r,n)=>s.error(i.red(r),n),warn:(r,n)=>s.warn(i.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(i.yellow(r),n),debug:(r,n)=>{e==="debug"&&s.info(i.gray(r),n)}}}var p=h();var m="upstart-cli";var w=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",b=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";import E from"conf";import c from"node:path";import _ from"node:crypto";import a from"node:fs";import{fileURLToPath as L}from"node:url";import W from"chalk";var R=L(new URL(".",import.meta.url)),x=S(),d=new E({projectName:m,encryptionKey:x,clearInvalidConfig:!0});function O(){let e=R;for(;e!==c.parse(e).root;){let t=c.join(e,"node_modules");if(a.existsSync(t))return t;e=c.dirname(e)}return null}function S(){let e=O();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=c.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let o=c.join(t,".enpage-key");if(!a.existsSync(o)){let r=_.randomBytes(32).toString("hex");return a.writeFileSync(o,r,{mode:384,flush:!0}),r}return a.readFileSync(o,"utf8")}async function J(e,t,o={}){d.get("access_token")&&(o.Authorization=`Bearer ${d.get("access_token")}`);let s=await fetch(l(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...o},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{p.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(s)}async function K(e,t={}){d.get("access_token")&&(t.Authorization=`Bearer ${d.get("access_token")}`);let o=await fetch(l(e),{headers:t,method:"GET"}).catch(s=>{p.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(o)}function l(e){let t=new URL(u.endsWith("/")?u:`${u}/`);return new URL(e,t)}async function y(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}export{K as get,J as post};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import U from"chalk";import{confirm as b}from"@inquirer/prompts";import N from"open";var f="upstart-cli";var g=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",j=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";var _="oauth/devicecode",T="oauth/token";import{createLogger as L}from"vite";var h="0.0.
|
|
3
|
+
import U from"chalk";import{confirm as b}from"@inquirer/prompts";import N from"open";var f="upstart-cli";var g=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",j=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";var _="oauth/devicecode",T="oauth/token";import{createLogger as L}from"vite";var h="0.0.88";import i from"chalk";function x(t,e,n=!1){let s=L(t==="debug"?"info":t,{prefix:"[upstart]",allowClearScreen:e});return n&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${h}
|
|
4
4
|
`)),{...s,success:(r,o)=>s.info(i.green(r),o),error:(r,o)=>s.error(i.red(r),o),warn:(r,o)=>s.warn(i.yellow(r),o),warnOnce:(r,o)=>s.warnOnce(i.yellow(r),o),debug:(r,o)=>{t==="debug"&&s.info(i.gray(r),o)}}}var m=x();import R from"conf";import c from"node:path";import O from"node:crypto";import a from"node:fs";import{fileURLToPath as v}from"node:url";import Q from"chalk";var k=v(new URL(".",import.meta.url)),w=P(),p=new R({projectName:f,encryptionKey:w,clearInvalidConfig:!0});function S(){let t=k;for(;t!==c.parse(t).root;){let e=c.join(t,"node_modules");if(a.existsSync(e))return e;t=c.dirname(t)}return null}function P(){let t=S();if(!t)throw new Error("Could not find nearest node_modules directory.");let e=c.join(t,".enpage-tmp");a.existsSync(e)||a.mkdirSync(e,{recursive:!0,mode:448});let n=c.join(e,".enpage-key");if(!a.existsSync(n)){let r=O.randomBytes(32).toString("hex");return a.writeFileSync(n,r,{mode:384,flush:!0}),r}return a.readFileSync(n,"utf8")}async function l(t,e,n={}){p.get("access_token")&&(n.Authorization=`Bearer ${p.get("access_token")}`);let s=await fetch(C(t),{method:"POST",headers:{"Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e instanceof URLSearchParams?e:JSON.stringify(e)}).catch(r=>{m.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),m.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return I(s)}function C(t){let e=new URL(u.endsWith("/")?u:`${u}/`);return new URL(t,e)}async function I(t){let e=t.headers.get("content-type")?.startsWith("application/json")?await t.json():await t.text();return t.ok?{isSuccess:!0,isError:!1,status:t.status,statusText:t.statusText,data:e}:{isSuccess:!1,isError:!0,status:t.status,statusText:t.statusText,data:e}}async function A(t,e){for(;;){let n=new URLSearchParams({grant_type:"device_code",device_code:t,client_id:g}),s=await l(T,n),{data:r,isSuccess:o}=s;if(o)return r;if(r.error==="authorization_pending")await new Promise(y=>setTimeout(y,5e3));else return e.error(`Error while polling for login: ${r.error_description??r.error}`),!1}}async function de({options:t,logger:e}){e.info(`Logging in to Enpage...
|
|
5
5
|
`);let{isError:n,data:s}=await l(_,{client_id:g,scope:"profile,templates:publish"});n&&(e.error("Failed to get device code. Please try again."),e.error(`Error: ${s.error_description??s.error}`),process.exit(1));let{verification_uri:r,device_code:o}=s;await b({message:"Would you like to open the login page in your browser?",default:!0}).catch(D=>{process.exit(0)})?N(r):e.info(`
|
|
6
6
|
Please visit the following URL to login:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
var ye=Object.defineProperty;var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})};function F(){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}function J(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var q=b(()=>{"use strict"});var X,ft,x,yt,Y,K,V,R=b(()=>{"use strict";X="upstart-cli",ft=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",x=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",yt=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Y=10,K="oauth/userinfo",V="v1/templates"});import Se from"conf";import v from"node:path";import Te from"node:crypto";import A from"node:fs";import{fileURLToPath as Ee}from"node:url";import Pe from"chalk";function Q(){let e=y.get("access_token");if(!e){let t=F();throw new Error(`Access token not found. Please run ${Pe.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function _e(){let e=xe;for(;e!==v.parse(e).root;){let t=v.join(e,"node_modules");if(A.existsSync(t))return t;e=v.dirname(e)}return null}function be(){let e=_e();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=v.join(e,".enpage-tmp");A.existsSync(t)||A.mkdirSync(t,{recursive:!0,mode:448});let r=v.join(t,".enpage-key");if(!A.existsSync(r)){let s=Te.randomBytes(32).toString("hex");return A.writeFileSync(r,s,{mode:384,flush:!0}),s}return A.readFileSync(r,"utf8")}var xe,we,y,G=b(()=>{"use strict";R();q();xe=Ee(new URL(".",import.meta.url)),we=be(),y=new Se({projectName:X,encryptionKey:we,clearInvalidConfig:!0})});var ee,Z=b(()=>{ee="0.0.
|
|
3
|
+
var ye=Object.defineProperty;var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var he=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})};function F(){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}function J(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var q=b(()=>{"use strict"});var X,ft,x,yt,Y,K,V,R=b(()=>{"use strict";X="upstart-cli",ft=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",x=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",yt=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Y=10,K="oauth/userinfo",V="v1/templates"});import Se from"conf";import v from"node:path";import Te from"node:crypto";import A from"node:fs";import{fileURLToPath as Ee}from"node:url";import Pe from"chalk";function Q(){let e=y.get("access_token");if(!e){let t=F();throw new Error(`Access token not found. Please run ${Pe.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function _e(){let e=xe;for(;e!==v.parse(e).root;){let t=v.join(e,"node_modules");if(A.existsSync(t))return t;e=v.dirname(e)}return null}function be(){let e=_e();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=v.join(e,".enpage-tmp");A.existsSync(t)||A.mkdirSync(t,{recursive:!0,mode:448});let r=v.join(t,".enpage-key");if(!A.existsSync(r)){let s=Te.randomBytes(32).toString("hex");return A.writeFileSync(r,s,{mode:384,flush:!0}),s}return A.readFileSync(r,"utf8")}var xe,we,y,G=b(()=>{"use strict";R();q();xe=Ee(new URL(".",import.meta.url)),we=be(),y=new Se({projectName:X,encryptionKey:we,clearInvalidConfig:!0})});var ee,Z=b(()=>{ee="0.0.88"});import{createLogger as Ae}from"vite";import O from"chalk";function Oe(e,t,r=!1){let o=Ae(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return r&&o.info(O.hex("#7270c6").bold(`\u{1F680} Upstart v${ee}
|
|
4
4
|
`)),{...o,success:(s,n)=>o.info(O.green(s),n),error:(s,n)=>o.error(O.red(s),n),warn:(s,n)=>o.warn(O.yellow(s),n),warnOnce:(s,n)=>o.warnOnce(O.yellow(s),n),debug:(s,n)=>{e==="debug"&&o.info(O.gray(s),n)}}}var g,M=b(()=>{"use strict";Z();g=Oe()});var ne={};he(ne,{get:()=>Ge,post:()=>I});async function I(e,t,r={}){y.get("access_token")&&(r.Authorization=`Bearer ${y.get("access_token")}`);let o=await fetch(oe(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...r},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(s=>{g.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return se(o)}async function Ge(e,t={}){y.get("access_token")&&(t.Authorization=`Bearer ${y.get("access_token")}`);let r=await fetch(oe(e),{headers:t,method:"GET"}).catch(o=>{g.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return se(r)}function oe(e){let t=new URL(x.endsWith("/")?x:`${x}/`);return new URL(e,t)}async function se(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var W=b(()=>{"use strict";M();R();G()});q();G();import{resolve as h}from"node:path";import{existsSync as D,readFileSync as ct,writeFileSync as lt}from"node:fs";import E from"chalk";R();M();import N from"node:path";import j from"node:fs";import Me from"node:crypto";import Be from"fast-glob";import ae from"node:http";import ze from"node:https";import{pipeline as We}from"node:stream";import ie from"chalk";import qe from"form-data";import*as B from"node:fs";var ke=/[<>"|?*\n\r\t\f\x00-\x1F]/,$e=/(?:^|\/)[*]{2}($|\/)/,Le=248,Ce=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ue=e=>typeof e=="string"&&e.length<=Le&&!ke.test(e),ve=e=>e.split(/\r\n?|\n/);var Ie=e=>Ce(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var z=(e,t={})=>{let r=t.path;if(Ie(e))return e;Ue(e)&&B.existsSync(e)&&(r=e,e=B.readFileSync(e,"utf8"));let o=ve(e),s=new Map,n={sections:[],patterns:[]},p={name:"default",patterns:[]},i=null;for(let a of o){let c=a.trim();if(c.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(c)||[];if(i){s.delete(i.name),i.comment=i.comment?`${i.comment}
|
|
5
5
|
${c}`:c,i.name=u?`${i.name.trim()}
|
|
6
6
|
${u.trim()}`:i.name.trim(),s.set(i.name.toLowerCase().trim(),i);continue}p={name:u?.trim()||"",comment:c,patterns:[]},s.set(p.name.toLowerCase(),p),n.sections.push(p),i=p;continue}c!==""&&(p.patterns.push(c),n.patterns.push(c)),i=null}return(t.dedupe===!0||t.unique===!0)&&(n=te(n,{...t,format:!1})),n.path=r,n.input=Buffer.from(e),n.format=a=>Fe(n,{...t,...a}),n.dedupe=a=>te(n,{...t,...a}),n.globs=a=>je(n,{path:r,...t,...a}),n};var te=(e,t)=>{let r=z(e,{...t,dedupe:!1}),o=new Map,s={sections:[],patterns:[]},n;for(let p of r.sections){let{name:i="",comment:a,patterns:c}=p,u=i.trim().toLowerCase();for(let f of c)s.patterns.includes(f)||s.patterns.push(f);i&&o.has(u)?(n=o.get(u),n.patterns=[...n.patterns,...c]):(n={name:i,comment:a,patterns:c},s.sections.push(n),o.set(u,n))}for(let p of s.sections)p.patterns=[...new Set(p.patterns)];return s},Ne=e=>{if($e.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},je=(e,t={})=>{let r=z(e,t),o=[],s=0,n=r.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(i=>i.startsWith("!")?i:`!${i}`)),p=(i,a)=>{let c=o[o.length-1],u=i?"unignore":"ignore";c&&c.type===u?c.patterns.includes(a)||c.patterns.push(a):(o.push({type:u,path:t.path||null,patterns:[a],index:s}),s++)};for(let i of n){let a="";i.startsWith("!")&&(i=i.slice(1),a="!"),p(a,i.startsWith("/")?i.slice(1):i),p(a,Ne(i))}return o},De=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import b from"node:path";import L from"node:fs";import ge from"node:crypto";import me from"fast-glob";var I="upstart-cli";var Oe=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ae=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",N=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.
|
|
3
|
+
import b from"node:path";import L from"node:fs";import ge from"node:crypto";import me from"fast-glob";var I="upstart-cli";var Oe=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ae=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",N=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.88";import _ from"chalk";function H(e,t,n=!1){let i=q(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return n&&i.info(_.hex("#7270c6").bold(`\u{1F680} Upstart v${D}
|
|
4
4
|
`)),{...i,success:(r,s)=>i.info(_.green(r),s),error:(r,s)=>i.error(_.red(r),s),warn:(r,s)=>i.warn(_.yellow(r),s),warnOnce:(r,s)=>i.warnOnce(_.yellow(r),s),debug:(r,s)=>{e==="debug"&&i.info(_.gray(r),s)}}}var g=H();import z from"chalk";import he from"form-data";import*as C from"node:fs";var X=/[<>"|?*\n\r\t\f\x00-\x1F]/,J=/(?:^|\/)[*]{2}($|\/)/,V=248,K=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Y=e=>typeof e=="string"&&e.length<=V&&!X.test(e),Q=e=>e.split(/\r\n?|\n/);var Z=e=>K(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var k=(e,t={})=>{let n=t.path;if(Z(e))return e;Y(e)&&C.existsSync(e)&&(n=e,e=C.readFileSync(e,"utf8"));let i=Q(e),r=new Map,s={sections:[],patterns:[]},c={name:"default",patterns:[]},o=null;for(let a of i){let p=a.trim();if(p.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(p)||[];if(o){r.delete(o.name),o.comment=o.comment?`${o.comment}
|
|
5
5
|
${p}`:p,o.name=u?`${o.name.trim()}
|
|
6
6
|
${u.trim()}`:o.name.trim(),r.set(o.name.toLowerCase().trim(),o);continue}c={name:u?.trim()||"",comment:p,patterns:[]},r.set(c.name.toLowerCase(),c),s.sections.push(c),o=c;continue}p!==""&&(c.patterns.push(p),s.patterns.push(p)),o=null}return(t.dedupe===!0||t.unique===!0)&&(s=G(s,{...t,format:!1})),s.path=n,s.input=Buffer.from(e),s.format=a=>se(s,{...t,...a}),s.dedupe=a=>G(s,{...t,...a}),s.globs=a=>te(s,{path:n,...t,...a}),s};var G=(e,t)=>{let n=k(e,{...t,dedupe:!1}),i=new Map,r={sections:[],patterns:[]},s;for(let c of n.sections){let{name:o="",comment:a,patterns:p}=c,u=o.trim().toLowerCase();for(let h of p)r.patterns.includes(h)||r.patterns.push(h);o&&i.has(u)?(s=i.get(u),s.patterns=[...s.patterns,...p]):(s={name:o,comment:a,patterns:p},r.sections.push(s),i.set(u,s))}for(let c of r.sections)c.patterns=[...new Set(c.patterns)];return r},ee=e=>{if(J.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},te=(e,t={})=>{let n=k(e,t),i=[],r=0,s=n.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(o=>o.startsWith("!")?o:`!${o}`)),c=(o,a)=>{let p=i[i.length-1],u=o?"unignore":"ignore";p&&p.type===u?p.patterns.includes(a)||p.patterns.push(a):(i.push({type:u,path:t.path||null,patterns:[a],index:r}),r++)};for(let o of s){let a="";o.startsWith("!")&&(o=o.slice(1),a="!"),c(a,o.startsWith("/")?o.slice(1):o),c(a,ee(o))}return i},re=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
var O=Object.defineProperty;var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var s in t)O(e,s,{get:t[s],enumerable:!0})};var y,M,g,$,f,m=p(()=>{"use strict";y="upstart-cli",M=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",g=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",$=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",f="oauth/userinfo"});import k from"conf";import u from"node:path";import P from"node:crypto";import a from"node:fs";import{fileURLToPath as I}from"node:url";import X from"chalk";function w(){let e=U;for(;e!==u.parse(e).root;){let t=u.join(e,"node_modules");if(a.existsSync(t))return t;e=u.dirname(e)}return null}function b(){let e=w();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=u.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let s=u.join(t,".enpage-key");if(!a.existsSync(s)){let r=P.randomBytes(32).toString("hex");return a.writeFileSync(s,r,{mode:384,flush:!0}),r}return a.readFileSync(s,"utf8")}var U,v,i,l=p(()=>{"use strict";m();U=I(new URL(".",import.meta.url)),v=b(),i=new k({projectName:y,encryptionKey:v,clearInvalidConfig:!0})});var h,T=p(()=>{h="0.0.
|
|
3
|
+
var O=Object.defineProperty;var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var s in t)O(e,s,{get:t[s],enumerable:!0})};var y,M,g,$,f,m=p(()=>{"use strict";y="upstart-cli",M=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",g=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",$=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",f="oauth/userinfo"});import k from"conf";import u from"node:path";import P from"node:crypto";import a from"node:fs";import{fileURLToPath as I}from"node:url";import X from"chalk";function w(){let e=U;for(;e!==u.parse(e).root;){let t=u.join(e,"node_modules");if(a.existsSync(t))return t;e=u.dirname(e)}return null}function b(){let e=w();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=u.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let s=u.join(t,".enpage-key");if(!a.existsSync(s)){let r=P.randomBytes(32).toString("hex");return a.writeFileSync(s,r,{mode:384,flush:!0}),r}return a.readFileSync(s,"utf8")}var U,v,i,l=p(()=>{"use strict";m();U=I(new URL(".",import.meta.url)),v=b(),i=new k({projectName:y,encryptionKey:v,clearInvalidConfig:!0})});var h,T=p(()=>{h="0.0.88"});import{createLogger as A}from"vite";import c from"chalk";function C(e,t,s=!1){let o=A(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return s&&o.info(c.hex("#7270c6").bold(`\u{1F680} Upstart v${h}
|
|
4
4
|
`)),{...o,success:(r,n)=>o.info(c.green(r),n),error:(r,n)=>o.error(c.red(r),n),warn:(r,n)=>o.warn(c.yellow(r),n),warnOnce:(r,n)=>o.warnOnce(c.yellow(r),n),debug:(r,n)=>{e==="debug"&&o.info(c.gray(r),n)}}}var d,_=p(()=>{"use strict";T();d=C()});var x={};S(x,{get:()=>j,post:()=>D});async function D(e,t,s={}){i.get("access_token")&&(s.Authorization=`Bearer ${i.get("access_token")}`);let o=await fetch(E(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...s},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{d.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(o)}async function j(e,t={}){i.get("access_token")&&(t.Authorization=`Bearer ${i.get("access_token")}`);let s=await fetch(E(e),{headers:t,method:"GET"}).catch(o=>{d.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(s)}function E(e){let t=new URL(g.endsWith("/")?g:`${g}/`);return new URL(e,t)}async function L(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var R=p(()=>{"use strict";_();m();l()});m();l();async function ce(e=!1){let t=i.get("access_token"),s=i.get("expires_at");if(!t)return!1;if(s&&s<Date.now())return console.log("Seems like your token expired..."),!1;if(!e)return!0;let{get:o}=await Promise.resolve().then(()=>(R(),x)),{isSuccess:r}=await o(f);return r}export{ce as isLoggedIn};
|
package/dist/node/cli/program.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
3
3
|
|
|
4
|
-
var Ur=Object.create;var ze=Object.defineProperty;var $r=Object.getOwnPropertyDescriptor;var Wr=Object.getOwnPropertyNames;var Br=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty;var pt=(i,t)=>()=>(i&&(t=i(i=0)),t);var _s=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Gr=(i,t)=>{for(var e in t)ze(i,e,{get:t[e],enumerable:!0})},Hr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wr(t))!zr.call(i,r)&&r!==e&&ze(i,r,{get:()=>t[r],enumerable:!(s=$r(t,r))||s.enumerable});return i};var qr=(i,t,e)=>(e=i!=null?Ur(Br(i)):{},Hr(t||!i||!i.__esModule?ze(e,"default",{value:i,enumerable:!0}):e,i));function ae(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function ks(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var Ge=pt(()=>{"use strict"});var Ns,He,lt,Ec,Ds,Ps,Ls,Ms,Fs,ft=pt(()=>{"use strict";Ns="upstart-cli",He=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",lt=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ec=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Ds=10,Ps="oauth/devicecode",Ls="oauth/token",Ms="oauth/userinfo",Fs="v1/templates"});import Vr from"conf";import It from"node:path";import Kr from"node:crypto";import mt from"node:fs";import{fileURLToPath as Yr}from"node:url";import Jr from"chalk";function Is(){let i=F.get("access_token");if(!i){let t=ae();throw new Error(`Access token not found. Please run ${Jr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Qr(){let i=Xr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(mt.existsSync(t))return t;i=It.dirname(i)}return null}function tn(){let i=Qr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");mt.existsSync(t)||mt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!mt.existsSync(e)){let r=Kr.randomBytes(32).toString("hex");return mt.writeFileSync(e,r,{mode:384,flush:!0}),r}return mt.readFileSync(e,"utf8")}var Xr,Zr,F,gt=pt(()=>{"use strict";ft();Ge();Xr=Yr(new URL(".",import.meta.url)),Zr=tn(),F=new Vr({projectName:Ns,encryptionKey:Zr,clearInvalidConfig:!0})});var Us,js=pt(()=>{Us="0.0.
|
|
4
|
+
var Ur=Object.create;var ze=Object.defineProperty;var $r=Object.getOwnPropertyDescriptor;var Wr=Object.getOwnPropertyNames;var Br=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty;var pt=(i,t)=>()=>(i&&(t=i(i=0)),t);var _s=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Gr=(i,t)=>{for(var e in t)ze(i,e,{get:t[e],enumerable:!0})},Hr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wr(t))!zr.call(i,r)&&r!==e&&ze(i,r,{get:()=>t[r],enumerable:!(s=$r(t,r))||s.enumerable});return i};var qr=(i,t,e)=>(e=i!=null?Ur(Br(i)):{},Hr(t||!i||!i.__esModule?ze(e,"default",{value:i,enumerable:!0}):e,i));function ae(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function ks(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var Ge=pt(()=>{"use strict"});var Ns,He,lt,Ec,Ds,Ps,Ls,Ms,Fs,ft=pt(()=>{"use strict";Ns="upstart-cli",He=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",lt=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ec=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Ds=10,Ps="oauth/devicecode",Ls="oauth/token",Ms="oauth/userinfo",Fs="v1/templates"});import Vr from"conf";import It from"node:path";import Kr from"node:crypto";import mt from"node:fs";import{fileURLToPath as Yr}from"node:url";import Jr from"chalk";function Is(){let i=F.get("access_token");if(!i){let t=ae();throw new Error(`Access token not found. Please run ${Jr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Qr(){let i=Xr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(mt.existsSync(t))return t;i=It.dirname(i)}return null}function tn(){let i=Qr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");mt.existsSync(t)||mt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!mt.existsSync(e)){let r=Kr.randomBytes(32).toString("hex");return mt.writeFileSync(e,r,{mode:384,flush:!0}),r}return mt.readFileSync(e,"utf8")}var Xr,Zr,F,gt=pt(()=>{"use strict";ft();Ge();Xr=Yr(new URL(".",import.meta.url)),Zr=tn(),F=new Vr({projectName:Ns,encryptionKey:Zr,clearInvalidConfig:!0})});var Us,js=pt(()=>{Us="0.0.88"});import{createLogger as sn}from"vite";import wt from"chalk";function qe(i,t,e=!1){let s=sn(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:t});return e&&s.info(wt.hex("#7270c6").bold(`\u{1F680} Upstart v${Us}
|
|
5
5
|
`)),{...s,success:(r,n)=>s.info(wt.green(r),n),error:(r,n)=>s.error(wt.red(r),n),warn:(r,n)=>s.warn(wt.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(wt.yellow(r),n),debug:(r,n)=>{i==="debug"&&s.info(wt.gray(r),n)}}}var k,jt=pt(()=>{"use strict";js();k=qe()});var Gs={};Gr(Gs,{get:()=>mn,post:()=>it});async function it(i,t,e={}){F.get("access_token")&&(e.Authorization=`Bearer ${F.get("access_token")}`);let s=await fetch(Bs(i),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...e},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{k.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),k.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return zs(s)}async function mn(i,t={}){F.get("access_token")&&(t.Authorization=`Bearer ${F.get("access_token")}`);let e=await fetch(Bs(i),{headers:t,method:"GET"}).catch(s=>{k.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),k.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return zs(e)}function Bs(i){let t=new URL(lt.endsWith("/")?lt:`${lt}/`);return new URL(i,t)}async function zs(i){let t=i.headers.get("content-type")?.startsWith("application/json")?await i.json():await i.text();return i.ok?{isSuccess:!0,isError:!1,status:i.status,statusText:i.statusText,data:t}:{isSuccess:!1,isError:!0,status:i.status,statusText:i.statusText,data:t}}var Ut=pt(()=>{"use strict";jt();ft();gt()});var oi=_s((Ih,ni)=>{"use strict";ni.exports=ii;function ii(i,t,e){i instanceof RegExp&&(i=si(i,e)),t instanceof RegExp&&(t=si(t,e));var s=ri(i,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+i.length,s[1]),post:e.slice(s[1]+t.length)}}function si(i,t){var e=t.match(i);return e?e[0]:null}ii.range=ri;function ri(i,t,e){var s,r,n,o,a,c=e.indexOf(i),h=e.indexOf(t,c+1),l=c;if(c>=0&&h>0){if(i===t)return[c,h];for(s=[],n=e.length;l>=0&&!a;)l==c?(s.push(l),c=e.indexOf(i,l+1)):s.length==1?a=[s.pop(),h]:(r=s.pop(),r<n&&(n=r,o=h),h=e.indexOf(t,l+1)),l=c<h&&c>=0?c:h;s.length&&(a=[n,o])}return a}});var pi=_s((jh,di)=>{"use strict";var ai=oi();di.exports=Kn;var ci="\0SLASH"+Math.random()+"\0",hi="\0OPEN"+Math.random()+"\0",Ke="\0CLOSE"+Math.random()+"\0",li="\0COMMA"+Math.random()+"\0",fi="\0PERIOD"+Math.random()+"\0";function Ve(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function qn(i){return i.split("\\\\").join(ci).split("\\{").join(hi).split("\\}").join(Ke).split("\\,").join(li).split("\\.").join(fi)}function Vn(i){return i.split(ci).join("\\").split(hi).join("{").split(Ke).join("}").split(li).join(",").split(fi).join(".")}function ui(i){if(!i)return[""];var t=[],e=ai("{","}",i);if(!e)return i.split(",");var s=e.pre,r=e.body,n=e.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var a=ui(n);return n.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function Kn(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),zt(qn(i),!0).map(Vn)):[]}function Yn(i){return"{"+i+"}"}function Jn(i){return/^-?0\d/.test(i)}function Xn(i,t){return i<=t}function Zn(i,t){return i>=t}function zt(i,t){var e=[],s=ai("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?zt(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var a=r+"{"+s.body+"}"+n[o];e.push(a)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=c||h,f=s.body.indexOf(",")>=0;if(!l&&!f)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+Ke+s.post,zt(i)):[i];var u;if(l)u=s.body.split(/\.\./);else if(u=ui(s.body),u.length===1&&(u=zt(u[0],!1).map(Yn),u.length===1))return n.map(function(oe){return s.pre+u[0]+oe});var d;if(l){var g=Ve(u[0]),p=Ve(u[1]),y=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(Ve(u[2])):1,b=Xn,w=p<g;w&&(m*=-1,b=Zn);var S=u.some(Jn);d=[];for(var E=g;b(E,p);E+=m){var v;if(h)v=String.fromCharCode(E),v==="\\"&&(v="");else if(v=String(E),S){var C=y-v.length;if(C>0){var K=new Array(C+1).join("0");E<0?v="-"+K+v.slice(1):v=K+v}}d.push(v)}}else{d=[];for(var B=0;B<u.length;B++)d.push.apply(d,zt(u[B],!1))}for(var B=0;B<d.length;B++)for(var o=0;o<n.length;o++){var a=r+d[B]+n[o];(!t||l||a)&&e.push(a)}}return e}});import{program as Ft}from"commander";Ge();gt();import{resolve as X}from"node:path";import{existsSync as Bt,readFileSync as jn,writeFileSync as Un}from"node:fs";import rt from"chalk";ft();jt();import $t from"node:path";import Wt from"node:fs";import gn from"node:crypto";import wn from"fast-glob";import qs from"node:http";import yn from"node:https";import{pipeline as Sn}from"node:stream";import Hs from"chalk";import bn from"form-data";import*as ce from"node:fs";var rn=/[<>"|?*\n\r\t\f\x00-\x1F]/,nn=/(?:^|\/)[*]{2}($|\/)/,on=248,an=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),cn=i=>typeof i=="string"&&i.length<=on&&!rn.test(i),hn=i=>i.split(/\r\n?|\n/);var ln=i=>an(i)&&Array.isArray(i.patterns)&&Array.isArray(i.sections);var he=(i,t={})=>{let e=t.path;if(ln(i))return i;cn(i)&&ce.existsSync(i)&&(e=i,i=ce.readFileSync(i,"utf8"));let s=hn(i),r=new Map,n={sections:[],patterns:[]},o={name:"default",patterns:[]},a=null;for(let c of s){let h=c.trim();if(h.startsWith("#")){let[,l]=/^#+\s*(.*)\s*$/.exec(h)||[];if(a){r.delete(a.name),a.comment=a.comment?`${a.comment}
|
|
6
6
|
${h}`:h,a.name=l?`${a.name.trim()}
|
|
7
7
|
${l.trim()}`:a.name.trim(),r.set(a.name.toLowerCase().trim(),a);continue}o={name:l?.trim()||"",comment:h,patterns:[]},r.set(o.name.toLowerCase(),o),n.sections.push(o),a=o;continue}h!==""&&(o.patterns.push(h),n.patterns.push(h)),a=null}return(t.dedupe===!0||t.unique===!0)&&(n=$s(n,{...t,format:!1})),n.path=e,n.input=Buffer.from(i),n.format=c=>pn(n,{...t,...c}),n.dedupe=c=>$s(n,{...t,...c}),n.globs=c=>un(n,{path:e,...t,...c}),n};var $s=(i,t)=>{let e=he(i,{...t,dedupe:!1}),s=new Map,r={sections:[],patterns:[]},n;for(let o of e.sections){let{name:a="",comment:c,patterns:h}=o,l=a.trim().toLowerCase();for(let f of h)r.patterns.includes(f)||r.patterns.push(f);a&&s.has(l)?(n=s.get(l),n.patterns=[...n.patterns,...h]):(n={name:a,comment:c,patterns:h},r.sections.push(n),s.set(l,n))}for(let o of r.sections)o.patterns=[...new Set(o.patterns)];return r},fn=i=>{if(nn.test(i))return i;let t=!1;return i.startsWith("/")?(i=i.slice(1),t=!0):i.slice(1,i.length-1).includes("/")&&(t=!0),i+=i.endsWith("/")?"**/":"/**",t?i:`**/${i}`},un=(i,t={})=>{let e=he(i,t),s=[],r=0,n=e.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(a=>a.startsWith("!")?a:`!${a}`)),o=(a,c)=>{let h=s[s.length-1],l=a?"unignore":"ignore";h&&h.type===l?h.patterns.includes(c)||h.patterns.push(c):(s.push({type:l,path:t.path||null,patterns:[c],index:r}),r++)};for(let a of n){let c="";a.startsWith("!")&&(a=a.slice(1),c="!"),o(c,a.startsWith("/")?a.slice(1):a),o(c,fn(a))}return s},dn=(i={name:"",patterns:[]})=>{let t=[i.comment||""];return i.patterns?.length&&(t.push(i.patterns.join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
2
|
|
|
3
|
-
import{Type as e}from"@sinclair/typebox";var m=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.
|
|
3
|
+
import{Type as e}from"@sinclair/typebox";var m=e.Object({id:e.Optional(e.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:e.String({title:"Template Name"}),description:e.Optional(e.String({title:"Show template description"})),readme:e.Optional(e.Record(e.RegExp(/^[a-z]{2}$/),e.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:e.Optional(e.Array(e.String(),{title:"Tags"})),author:e.Optional(e.String({title:"Author name"})),thumbnail:e.Optional(e.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:e.Optional(e.String({title:"Homepage",description:"A URL to the homepage of the template."}))});import d from"node:fs";import{readFile as x}from"node:fs/promises";import L from"fast-glob";import{createLogger as b}from"vite";var g="0.0.88";import n from"chalk";function v(r,i,a=!1){let t=b(r==="debug"?"info":r,{prefix:"[upstart]",allowClearScreen:i});return a&&t.info(n.hex("#7270c6").bold(`\u{1F680} Upstart v${g}
|
|
4
4
|
`)),{...t,success:(s,o)=>t.info(n.green(s),o),error:(s,o)=>t.error(n.red(s),o),warn:(s,o)=>t.warn(n.yellow(s),o),warnOnce:(s,o)=>t.warnOnce(n.yellow(s),o),debug:(s,o)=>{r==="debug"&&t.info(n.gray(s),o)}}}var u=v();import{fromError as O}from"zod-validation-error";import{basename as f,dirname as w,extname as S}from"node:path";async function U(r,i=u){d.existsSync(r)||(i.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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
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 i="0.0.
|
|
3
|
+
import{createLogger as d}from"vite";var i="0.0.88";import r from"chalk";function c(o,a,n=!1){let s=d(o==="debug"?"info":o,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${i}
|
|
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)=>{o==="debug"&&s.info(r.gray(e),t)}}}var y=c();export{c as createLogger,y as logger};
|
package/dist/shared/ajv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AAEH,eAAO,MAAM,2BAA2B,+KAe9B,CAAC;
|
|
1
|
+
{"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../../src/shared/ajv.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEnF,eAAO,MAAM,GAAG,KAGd,CAAC;AAEH,eAAO,MAAM,2BAA2B,+KAe9B,CAAC;AAqBX,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAcnF"}
|
package/dist/shared/ajv.js
CHANGED
|
@@ -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}from"./chunk-
|
|
3
|
+
import{a,b,c}from"./chunk-ZWQHIQEQ.js";export{a as ajv,b as jsonStringsSupportedFormats,c as serializeAjvErrors};
|
|
@@ -25,9 +25,8 @@ export declare function defineAttributes(attrs: TProperties): TObject<TPropertie
|
|
|
25
25
|
/**
|
|
26
26
|
* Retuns the custom attributes schema merged with the default attributes schema
|
|
27
27
|
*/
|
|
28
|
-
export declare function processAttributesSchema(customAttributes: TObject):
|
|
28
|
+
export declare function processAttributesSchema(customAttributes: TObject): AttributesSchema;
|
|
29
29
|
export type { JSONSchemaType };
|
|
30
|
-
export type AttributesSchema = JSONSchemaType<Attributes>;
|
|
31
30
|
export declare const attr: {
|
|
32
31
|
/**
|
|
33
32
|
* Define a text
|
|
@@ -103,6 +102,7 @@ export declare const defaultAttributesSchema: TObject<{
|
|
|
103
102
|
$siteHeadTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
104
103
|
$siteBodyTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
105
104
|
}>;
|
|
105
|
+
export type AttributesSchema = typeof defaultAttributesSchema & Record<string, unknown>;
|
|
106
106
|
export type Attributes<T extends Record<string, unknown> = Record<string, unknown>> = Static<typeof defaultAttributesSchema> & T;
|
|
107
107
|
export declare function resolveAttributes(customAttrsSchema: TObject, initialData?: Record<string, unknown>): Attributes<Static<typeof customAttrsSchema>>;
|
|
108
108
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/shared/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B,GAAG,CAAC,CAAC;AAEN,KAAK,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,wBAUlD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,gBAAgB,EAAE,OAAO,GACO,
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/shared/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B,GAAG,CAAC,CAAC;AAEN,KAAK,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,wBAUlD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,gBAAgB,EAAE,OAAO,GACO,gBAAgB,CACvF;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,IAAI;IACf;;OAEG;iBACU,MAAM,gCAA4B,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAGzG;;OAEG;iBACU,MAAM,gCAA2B,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAGxG;;OAEG;kBAEK,MAAM,iCAEL,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAOnE;;OAEG;eAEK,MAAM,gBACE,MAAM,QACd,gBAAgB,CACpB,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,GAAG;QACzC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;QACjC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;KAChE,CACF;IAsBH;;OAEG;eAEK,MAAM,gCAEN,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAIlE;;OAEG;cAEK,MAAM,gCAEN,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAIlE;;OAEG;gBAEK,MAAM,iBACE,YAAY,SACnB,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IASnE;;OAEG;eAEK,MAAM,8BAEN,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAIlE;;OAEG;mBAEK,MAAM,8BAEN,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAIlE;;OAEG;sBAEK,MAAM,gBACE,QAAQ,SAChB,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;;;;;CAWnE,CAAC;AAmJF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;EAAiE,CAAC;AAEtG,MAAM,MAAM,gBAAgB,GAAG,OAAO,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAC1F,OAAO,uBAAuB,CAC/B,GACC,CAAC,CAAC;AAEJ,wBAAgB,iBAAiB,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAStF,UAAU,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAC5D"}
|
|
@@ -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}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e}from"./chunk-64II435T.js";import"./chunk-ZWQHIQEQ.js";import"./chunk-P5FVZ5PL.js";import"./chunk-BMDB2V7J.js";import"./chunk-PSSJMWGU.js";export{c as attr,d as defaultAttributesSchema,a as defineAttributes,b as processAttributesSchema,e as resolveAttributes};
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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{
|
|
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};
|
package/dist/shared/bricks.js
CHANGED
|
@@ -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-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-KK7J6SRT.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{
|
|
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};
|
|
@@ -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 l}from"./chunk-
|
|
3
|
+
import{a as l}from"./chunk-ZWQHIQEQ.js";import{a as u}from"./chunk-P5FVZ5PL.js";import{Type as i}from"@sinclair/typebox";import{Value as c}from"@sinclair/typebox/value";function y(t){for(let e in t)if(e.startsWith("$"))throw new Error(`Attribute names starting with '$' (like "${e}") are reserved for internal use. Please rename it.`);return i.Object(t)}function S(t){return i.Composite([t,p])}var o={string(t,e="",r){return i.String({title:t,default:e,...r})},number(t,e=0,r){return i.Number({title:t,default:e,...r})},boolean(t,e=!1,r){let n={"ui:field":"switch"};return i.Boolean({title:t,default:e,...n,...r})},enum(t,e,r){let n={"ui:field":"enum","ui:display":r.displayAs||"select"},{options:s,displayAs:g,...d}=r;return i.Union(s.map(a=>i.Literal(typeof a=="string"?a:a.value,{title:typeof a=="string"?a:a.title,"ui:icon":typeof a=="string"?void 0:a.icon})),{title:t,default:e,...n,...d})},file(t,e="",r={}){return i.String({title:t,default:e,...r,format:"data-url"})},url(t,e="",r={}){return i.String({title:t,default:e,...r,format:"uri"})},color(t,e="",r){let n={"ui:field":"color"};return i.String({title:t,default:e,...n,...r})},date(t,e=new Date,r={}){return i.String({title:t,default:e.toISOString(),...r,format:"date"})},datetime(t,e=new Date,r={}){return i.String({title:t,default:e.toISOString(),...r,format:"date-time"})},geolocation(t,e,r={}){return i.Object({lat:i.Number({minimum:-90,maximum:90}),lng:i.Number({minimum:-180,maximum:180}),name:i.Optional(i.String({title:"Name"}))},{title:t,default:e,...r})}},m={$pageLanguage:o.enum("Language","en",{options:[{value:"ar",title:"Arabic"},{value:"zh",title:"Chinese"},{value:"cs",title:"Czech"},{value:"nl",title:"Dutch"},{value:"en",title:"English"},{value:"fr",title:"French"},{value:"de",title:"German"},{value:"he",title:"Hebrew"},{value:"hi",title:"Hindi"},{value:"it",title:"Italian"},{value:"ja",title:"Japanese"},{value:"ko",title:"Korean"},{value:"fa",title:"Persian"},{value:"pl",title:"Polish"},{value:"pt",title:"Portuguese"},{value:"ru",title:"Russian"},{value:"es",title:"Spanish"},{value:"tr",title:"Turkish"},{value:"vi",title:"Vietnamese"}],"ui:group":"meta","ui:group:title":"Meta tags"}),$pageOgImage:o.string("Social share image","",{description:"Image shown when page is shared on social media","ui:group":"meta"}),$robotsIndexing:o.boolean("Allow search engines to index this site",!0,{description:"Disabling this will prevent search engines from indexing this site","ui:group":"seo","ui:group:title":"SEO","ui:scope":"site"}),$siteOgImage:o.string("Social share image","",{description:"Image shown when this site is shared on social media","ui:field":"image","ui:group":"meta","ui:group:title":"Meta tags","ui:scope":"site"}),$pagePath:o.string("Page path","/",{description:"The URL path of the page","ui:group":"location","ui:group:title":"Location"}),$pageTitle:o.string("Title","Untitled",{"ui:group":"meta","ui:group:title":"Meta tags",description:"The title of the page. Appears in the browser tab and search results"}),$pageDescription:o.string("Description","",{"ui:widget":"textarea","ui:group":"meta","ui:group:title":"Meta tags",description:"A short description of the page. Used by search engines"}),$pageKeywords:o.string("Keywords","",{"ui:group":"meta","ui:group:title":"Meta tags",description:"Keywords related to the page. Used by search engines"}),$pageLastUpdated:o.datetime("Last updated",void 0,{"ui:hidden":!0}),$bodyBackground:i.Composite([u()],{default:{color:"#ffffff"},title:"Body Background",description:"Applies to the body element of the page (while $pageBackground applies to the page container)","ui:field":"background","ui:show-img-search":!0,"ui:group":"layout","ui:group:title":"Page Layout","ui:group:order":3}),$pageBackground:i.Composite([u(),i.Object({},{title:"Page Background"})],{default:{color:"#ffffff"},title:"Page Background","ui:field":"background","ui:show-img-search":!0,"ui:group":"background","ui:group:title":"Page Background","ui:group:order":4}),$textColor:o.color("Text color","#222222",{"ui:field":"color","ui:group":"layout","ui:group:title":"Page Layout","ui:color-type":"text"}),$siteHeadTags:i.Optional(i.String({title:"Head tags",description:"Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.","ui:multiline":!0,"ui:scope":"site","ui:group":"external-scripts","ui:group:title":"External scripts"})),$siteBodyTags:i.Optional(i.String({title:"Body tags",description:"Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.","ui:multiline":!0,"ui:scope":"site","ui:group":"external-scripts","ui:group:title":"External scripts"}))},p=i.Object(m,{additionalProperties:!0});function A(t,e={}){let r=l.compile(t);if(!r(e))throw console.log("invalid custom attributes values",e,r.errors),new Error(`Invalid custom attributes values: ${r.errors}`);return{...c.Create(p),...e}}export{y as a,S as b,o as c,p as d,A as e};
|
|
@@ -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
|
|
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{
|
|
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
|
|
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
|
|
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{a as s}from"./chunk-WJ5CDDXW.js";import{
|
|
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 b}from"nanoid";import{merge as a}from"lodash-es";var d=b("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}),y=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(y,["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 f(){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:f(),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")}:f()}}export{d as a,u as b,T as c,y as d,D as e,I as f,N as g,f 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{
|
|
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};
|
|
@@ -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};
|
|
@@ -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 b}from"./chunk-WXKRIUTA.js";import{b as c}from"./chunk-H6L4KRCJ.js";import{b as m,d as S}from"./chunk-KK7J6SRT.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};
|
|
@@ -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{
|
|
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{
|
|
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 l}from"@sinclair/typebox";var b=l.Object({data:l.Array(l.Object({from:l.Object({name:l.String(),id:l.String()}),id:l.String(),permalink_url:l.String(),is_hidden:l.Boolean(),message:l.Optional(l.String()),object_id:l.String(),link:l.String(),is_published:l.Boolean(),status_type:l.String(),type:l.String(),actions:l.Array(l.Object({name:l.String(),link:l.String()}))})),paging:l.Object({previous:l.Optional(l.String()),next:l.Optional(l.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 O=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 j=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())}),h=t.Object({shortcode:t.String(),url:t.String(),static_url:t.String(),visible_in_picker:t.Boolean(),category:t.Optional(t.String())}),x=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())}),_=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(h)}),f=t.Object({id:t.String(),uri:t.String(),created_at:t.String(),account:O,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(j),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(h),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(_),card:t.Optional(x),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(f);import{Type as p}from"@sinclair/typebox";var k=p.Object({title:p.String({title:"Title",description:"The title of the RSS feed"}),link:p.String({title:"Link",description:"The link to the RSS feed"}),description:p.Optional(p.String({title:"Description",description:"The description of the RSS feed"})),updated:p.Optional(p.String({title:"Updated",description:"The last updated date of the RSS feed"})),items:p.Array(p.Object({title:p.Optional(p.String({title:"Title",description:"The title of the RSS feed item"})),link:p.Optional(p.String({title:"Link",description:"The link to the RSS feed item"})),creator:p.Optional(p.String({title:"Creator",description:"The creator of the RSS feed item"})),content:p.Optional(p.String({title:"Content",description:"The content of the RSS feed item"})),pubDate:p.Optional(p.String({title:"Pub Date",description:"The publication date of the RSS feed item"}))}))});import{Type as a}from"@sinclair/typebox";var v=a.Object({data:a.Array(a.Object({id:a.String(),media_product_type:a.Literal("THREADS"),media_type:a.Union([a.Literal("TEXT_POST"),a.Literal("IMAGE"),a.Literal("VIDEO"),a.Literal("CAROUSEL_ALBUM"),a.Literal("AUDIO"),a.Literal("REPOST_FACADE")]),media_url:a.String(),permalink:a.String(),owner:a.Object({id:a.String()}),username:a.String(),text:a.String(),timestamp:a.String(),thumbnail_url:a.String(),shortcode:a.String(),is_quote_post:a.Boolean()})),paging:a.Object({cursors:a.Object({before:a.String(),after:a.String()})})});import{Type as s}from"@sinclair/typebox";var T=s.Object({data:s.Object({has_more:s.Boolean(),cursor:s.Number(),videos:s.Array(s.Object({title:s.String(),video_description:s.String(),cover_image_url:s.String(),duration:s.Number(),embed_link:s.String(),id:s.String()}))}),error:s.Optional(s.Object({code:s.String(),message:s.String(),log_id:s.String()}))});import{Type as n}from"@sinclair/typebox";var N=n.Object({etag:n.String(),nextPageToken:n.String(),regionCode:n.String(),pageInfo:n.Object({totalResults:n.Number(),resultsPerPage:n.Number()}),items:n.Array(n.Object({etag:n.String(),id:n.Object({videoId:n.String(),channelId:n.String(),playlistId:n.String()}),snippet:n.Object({publishedAt:n.String(),channelId:n.String(),title:n.String(),description:n.String(),thumbnails:n.Object({default:n.Object({url:n.String(),width:n.Number(),height:n.Number()}),standard:n.Object({url:n.String(),width:n.Number(),height:n.Number()})}),channelTitle:n.String(),liveBroadcastContent:n.String()})}))});import{Type as o}from"@sinclair/typebox";var D=o.Array(o.Object({title:o.String({description:"Blog post title"}),content:o.String({description:"Blog post content",format:"markdown"}),author:o.Object({name:o.String({description:"Author's name"})}),publishedAt:o.String({description:"Publication date in ISO format"}),updatedAt:o.Optional(o.String({description:"Last update date in ISO format"})),slug:o.String({description:"URL-friendly version of the title"}),status:o.Union([o.Literal("draft"),o.Literal("published"),o.Literal("archived")],{description:"Publication status of the blog post"}),categories:o.Optional(o.Array(o.String({description:"Blog post categories"}))),tags:o.Optional(o.Array(o.String({description:"Blog post tags"}))),metadata:o.Optional(o.Object({description:o.Optional(o.String()),featuredImage:o.Optional(o.String())},{description:"Additional metadata for the blog post"}))}));import{Type as S}from"@sinclair/typebox";var B=S.Array(S.Object({title:S.String({description:"Title of the release"}),version:S.Optional(S.String({description:"Version number"})),date:S.String({format:"date",description:"Release date in ISO format"}),changes:S.Array(S.Object({type:S.Union([S.Literal("added"),S.Literal("changed"),S.Literal("fixed"),S.Literal("improved"),S.Literal("deprecated"),S.Literal("removed")],{description:"Type of change"}),description:S.String({description:"Description of the change",format:"markdown"})}))}));import{Type as m}from"@sinclair/typebox";import{Type as u}from"@sinclair/typebox";var y=u.Array(u.Object({url:u.String({format:"uri",description:"URL"}),title:u.String({description:"Title"}),description:u.Optional(u.String({description:"Description",format:"markdown"})),icon:u.Optional(u.String({description:"Icon"}))}),{description:"Schema representing a collection of links"});var I=m.Object({email:m.String({format:"email"}),phone:m.Optional(m.String()),companyName:m.Optional(m.String()),firstName:m.Optional(m.String()),lastName:m.Optional(m.String()),url:m.Optional(m.String({format:"uri"})),address:m.Optional(m.String()),socialLinks:y},{description:"A generic schema representing a person or company contact information"});import{Type as i}from"@sinclair/typebox";var P=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 C=d.Array(d.Object({question:d.String({description:"Question",format:"markdown"}),answer:d.String({description:"Answer",format:"markdown"}),category:d.Optional(d.String({description:"Category"})),tags:d.Optional(d.Array(d.String(),{description:"Tags"})),order:d.Optional(d.Number({description:"Order number in the list"}))}),{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({description:"Title of the recipe"}),description:g.String({description:"Description of the recipe",format:"markdown"}),time:g.String({description:"Time to prepare the recipe"}),ingredients:g.Array(g.Object({name:g.String({description:"Name of the ingredient"}),quantity:g.String({description:"Quantity of the ingredient"})})),steps:g.Array(g.Object({title:g.String({description:"Step title"}),description:g.String({description:"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"});export{b as a,A as b,O as c,f as d,L as e,k as f,v as g,T as h,N as i,D as j,B as k,y as l,I as m,P as n,C as o,R as p,w as q};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
import p from"ajv";import d from"ajv-formats";var t=new p({useDefaults:!0,strictSchema:!1}),l=["date-time","time","date","email","hostname","ipv4","ipv6","uri","uri-reference","uuid","uri-template","json-pointer","relative-json-pointer","regex"];d(t,[...l]);t.addFormat("date-object",{validate:e=>e instanceof Date&&!Number.isNaN(e.getTime()),async:!1});t.addFormat("richtext",{validate:e=>typeof e=="string",async:!1});t.addFormat("markdown",{validate:e=>typeof e=="string",async:!1});function j(e){return!e||e.length===0?"Unknown validation error":e.map(a=>{let{instancePath:r,message:n,params:o}=a,i=r||"root",s=Object.entries(o||{}).map(([m,c])=>`${m}: ${c}`).join(", ");return`${i} ${n} (${s})`}).join("; ")}export{t as a,l as b,j as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/blog/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/blog/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;GAsDtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/changelog/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,eAAe;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/changelog/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,eAAe;;;;;;;;GAoC3B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/cv/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/cv/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqNpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/faq/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,SAAS;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/faq/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,SAAS;;;;;;GAqBrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/job-board/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/job-board/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8N1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/recipes/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/shared/datasources/internal/recipes/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;;;;;GAoCzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -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,j,k,l,m,n,o,p,q}from"../chunk-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunk-ZRWRIZBR.js";export{j as blogSchema,k as changelogSchema,m as contactInfoSchema,n as cvSchema,a as facebookPostSchema,o as faqSchema,b as instagramFeedSchema,l as linksSchema,c as mastodonAccountSchema,e as mastodonStatusArraySchema,d as mastodonStatusSchema,p as recipesSchema,q as restaurantSchema,f as rssSchema,g as threadsMediaSchema,h as tiktokVideoListSchema,i as youtubeListSchema};
|
|
@@ -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,b as s,d as c,e as n,f as o,g as u,h as i,i as m,j as h,k as d,l as S,m as l,n as f,o as p,p as g,q as k}from"./chunk-
|
|
3
|
+
import{a as t,b as s,d as c,e as n,f as o,g as u,h as i,i as m,j as h,k as d,l as S,m as l,n as f,o as p,p as g,q as k}from"./chunk-ZRWRIZBR.js";function D(e){let r={};for(let[v,a]of Object.entries(e))r[v]={...a,schema:"schema"in a?a.schema:b(a.provider)};return r}function b(e){switch(e){case"facebook-posts":return t;case"instagram-feed":return s;case"mastodon-status":return c;case"mastodon-status-list":return n;case"rss":return o;case"threads-media":return u;case"tiktok-video":return i;case"youtube-list":return m;case"internal-blog":return h;case"internal-changelog":return d;case"internal-contact-info":return l;case"internal-faq":return p;case"internal-links":return S;case"internal-recipes":return g;case"internal-restaurant":return k;case"internal-cv":return f}throw new Error(`No schema for provider: ${e}`)}export{D as defineDataSources};
|
package/dist/shared/page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Attributes,
|
|
1
|
+
import { type Attributes, type AttributesSchema } from "./attributes";
|
|
2
2
|
import { type Section, type Brick } from "./bricks";
|
|
3
3
|
import { type Static, type TObject } from "@sinclair/typebox";
|
|
4
4
|
import { type DatasourcesMap, type DatasourcesResolved } from "./datasources/types";
|
|
@@ -33,7 +33,7 @@ export type PageConfig<D extends DatasourcesMap> = PageInfo & {
|
|
|
33
33
|
/**
|
|
34
34
|
* Page attributes. (can override site attributes)
|
|
35
35
|
*/
|
|
36
|
-
attributes?:
|
|
36
|
+
attributes?: AttributesSchema;
|
|
37
37
|
/**
|
|
38
38
|
* Resolved attributes for the page.
|
|
39
39
|
*/
|
|
@@ -252,7 +252,7 @@ export declare const siteSchema: TObject<{
|
|
|
252
252
|
* Site config has always attributes and attr.
|
|
253
253
|
*/
|
|
254
254
|
export type Site = Omit<Static<typeof siteSchema>, "attributes"> & {
|
|
255
|
-
attributes:
|
|
255
|
+
attributes: AttributesSchema;
|
|
256
256
|
};
|
|
257
257
|
/**
|
|
258
258
|
* Page context has attr but not attributes declaration, as they are not needed to render the page.
|
|
@@ -276,32 +276,7 @@ export declare function getNewSiteConfig(templateConfig: TemplateConfig, hostnam
|
|
|
276
276
|
id: `${string}-${string}-${string}-${string}-${string}`;
|
|
277
277
|
label: string;
|
|
278
278
|
hostname: string;
|
|
279
|
-
attributes:
|
|
280
|
-
$pageLanguage: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>;
|
|
281
|
-
$pageOgImage: import("@sinclair/typebox").TString;
|
|
282
|
-
$robotsIndexing: import("@sinclair/typebox").TBoolean;
|
|
283
|
-
$siteOgImage: import("@sinclair/typebox").TString;
|
|
284
|
-
$pagePath: import("@sinclair/typebox").TString;
|
|
285
|
-
$pageTitle: import("@sinclair/typebox").TString;
|
|
286
|
-
$pageDescription: import("@sinclair/typebox").TString;
|
|
287
|
-
$pageKeywords: import("@sinclair/typebox").TString;
|
|
288
|
-
$pageLastUpdated: import("@sinclair/typebox").TString;
|
|
289
|
-
$bodyBackground: TObject<{
|
|
290
|
-
color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
291
|
-
image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
292
|
-
repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
|
|
293
|
-
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
|
|
294
|
-
}>;
|
|
295
|
-
$pageBackground: TObject<{
|
|
296
|
-
color: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
297
|
-
image: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
298
|
-
repeat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"no-repeat">, import("@sinclair/typebox").TLiteral<"repeat">, import("@sinclair/typebox").TLiteral<"repeat-x">, import("@sinclair/typebox").TLiteral<"repeat-y">, import("@sinclair/typebox").TLiteral<"space">, import("@sinclair/typebox").TLiteral<"round">]>>;
|
|
299
|
-
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"contain">]>>;
|
|
300
|
-
}>;
|
|
301
|
-
$textColor: import("@sinclair/typebox").TString;
|
|
302
|
-
$siteHeadTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
303
|
-
$siteBodyTags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
304
|
-
}>;
|
|
279
|
+
attributes: AttributesSchema;
|
|
305
280
|
attr: {
|
|
306
281
|
[x: string]: any;
|
|
307
282
|
$siteHeadTags?: string | undefined;
|
|
@@ -857,10 +832,10 @@ declare const partialSiteAndPagesSchema: TObject<{
|
|
|
857
832
|
type PartialSiteAndPagesSchema = Static<typeof partialSiteAndPagesSchema>;
|
|
858
833
|
export type SiteAndPagesConfig = {
|
|
859
834
|
site: PartialSiteAndPagesSchema["site"] & {
|
|
860
|
-
attributes:
|
|
835
|
+
attributes: AttributesSchema;
|
|
861
836
|
};
|
|
862
837
|
pages: Array<Omit<PartialSiteAndPagesSchema["pages"][number], "attributes"> & {
|
|
863
|
-
attributes?:
|
|
838
|
+
attributes?: AttributesSchema;
|
|
864
839
|
}>;
|
|
865
840
|
};
|
|
866
841
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/shared/page.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/shared/page.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,OAAO,EAAiB,KAAK,KAAK,EAAwB,MAAM,UAAU,CAAC;AAGtG,OAAO,EAAQ,KAAK,MAAM,EAAE,KAAK,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,QAAA,MAAM,cAAc;;;;;;GAQnB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,QAAA,MAAM,cAAc;;;;EAIlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AACrD;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,cAAc,IAAI,QAAQ,GAAG;IAC5D;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,SAAS,cAAc,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAErE;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAE3D,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,cAAc,EAC9B,IAAI,SAAM,EACV,UAAU,GAAE,KAAK,GAAG,MAAc,GACjC,iBAAiB,CAkBnB;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,EAAE,YAAY,CAAC,GAAG;IACjE,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,YAAY,CAAC,GAAG;IAChF,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACrB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAA0B,EAElD,WAAW,UAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BpB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE7D,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEH,KAAK,yBAAyB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,GAAG;QACxC,UAAU,EAAE,gBAAgB,CAAC;KAC9B,CAAC;IACF,KAAK,EAAE,KAAK,CACV,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,GAAG;QAC/D,UAAU,CAAC,EAAE,gBAAgB,CAAC;KAC/B,CACF,CAAC;CACH,CAAC"}
|
package/dist/shared/page.js
CHANGED
|
@@ -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}from"./chunk-
|
|
3
|
+
import{a,b,c,d}from"./chunk-TGGTFM2R.js";import"./chunk-WXKRIUTA.js";import"./chunk-H6L4KRCJ.js";import"./chunk-KK7J6SRT.js";import"./chunk-WJ5CDDXW.js";import"./chunk-7XRTVY2Z.js";import"./chunk-2ZPY4LCA.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{a as getNewPageConfig,c as getNewSiteConfig,b as siteSchema,d as templatePageSchema};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TObject, type Static } from "@sinclair/typebox";
|
|
2
|
-
import {
|
|
2
|
+
import { type AttributesSchema } from "./attributes";
|
|
3
3
|
export * from "@sinclair/typebox";
|
|
4
4
|
type TemplateDefinedConfig = Omit<TemplateConfig, "attributes"> & {
|
|
5
5
|
attributes: TObject;
|
|
@@ -257,9 +257,9 @@ export declare const templateSchema: TObject<{
|
|
|
257
257
|
}>;
|
|
258
258
|
export type StaticTemplate = Static<typeof templateSchema>;
|
|
259
259
|
export type TemplateConfig = Omit<StaticTemplate, "attributes" | "pages"> & {
|
|
260
|
-
attributes:
|
|
260
|
+
attributes: AttributesSchema;
|
|
261
261
|
pages: Array<Omit<StaticTemplate["pages"][number], "attributes"> & {
|
|
262
|
-
attributes?:
|
|
262
|
+
attributes?: AttributesSchema;
|
|
263
263
|
}>;
|
|
264
264
|
};
|
|
265
265
|
//# sourceMappingURL=template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/shared/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/shared/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAoD,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMvG,cAAc,mBAAmB,CAAC;AAElC,KAAK,qBAAqB,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG;IAChE,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,cAAc,CAS1E;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG;IAC1E,UAAU,EAAE,gBAAgB,CAAC;IAC7B,KAAK,EAAE,KAAK,CACV,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,GAAG;QACpD,UAAU,CAAC,EAAE,gBAAgB,CAAC;KAC/B,CACF,CAAC;CACH,CAAC"}
|
package/dist/shared/template.js
CHANGED
|
@@ -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 o}from"./chunk-
|
|
3
|
+
import{d as o}from"./chunk-TGGTFM2R.js";import"./chunk-WXKRIUTA.js";import{b as p}from"./chunk-H6L4KRCJ.js";import"./chunk-KK7J6SRT.js";import"./chunk-WJ5CDDXW.js";import{b as m}from"./chunk-7XRTVY2Z.js";import"./chunk-2ZPY4LCA.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{b as i,d as r}from"./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";import{Type as a}from"@sinclair/typebox";import{Type as t}from"@sinclair/typebox";var s=t.Object({id:t.Optional(t.String({title:"Template ID",description:"A unique identifier for the template. Can be any string, but should be unique."})),name:t.String({title:"Template Name"}),description:t.Optional(t.String({title:"Show template description"})),readme:t.Optional(t.Record(t.RegExp(/^[a-z]{2}$/),t.String(),{title:"Readme texts.",description:"A dictionary of readme files for different languages (iso 2 letters code). Currently on supported for 'en' and 'fr'."})),tags:t.Optional(t.Array(t.String(),{title:"Tags"})),author:t.Optional(t.String({title:"Author name"})),thumbnail:t.Optional(t.String({title:"Thumbnail",description:"A URL to the thumbnail image for the template."})),homepage:t.Optional(t.String({title:"Homepage",description:"A URL to the homepage of the template."}))});export*from"@sinclair/typebox";function g(e){return{attributes:i(e.attributes),attr:e.attr,manifest:e.manifest,pages:e.pages,themes:e.themes,...e.datasources?{datasources:e.datasources}:{}}}var b=a.Object({manifest:s,themes:a.Array(p),datasources:a.Optional(m),attributes:r,attr:a.Record(a.String(),a.Any()),pages:a.Array(o)},{title:"Template schema",description:"The template configuration schema"});export{g as defineConfig,b as templateSchema};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upstart.gg/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"zod-validation-error": "3.3.1",
|
|
75
75
|
"zundo": "2.3.0",
|
|
76
76
|
"zustand": "4.5.5",
|
|
77
|
-
"@upstart.gg/style-system": "0.0.
|
|
77
|
+
"@upstart.gg/style-system": "0.0.88"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": "18.3.0-canary-3d9b20132-20240124",
|
|
81
81
|
"react-dom": "18.3.0-canary-3d9b20132-20240124",
|
|
82
|
-
"@upstart.gg/style-system": "0.0.
|
|
82
|
+
"@upstart.gg/style-system": "0.0.88"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@cloudflare/workers-types": "4.20240806.0",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{Type as l}from"@sinclair/typebox";var b=l.Object({data:l.Array(l.Object({from:l.Object({name:l.String(),id:l.String()}),id:l.String(),permalink_url:l.String(),is_hidden:l.Boolean(),message:l.Optional(l.String()),object_id:l.String(),link:l.String(),is_published:l.Boolean(),status_type:l.String(),type:l.String(),actions:l.Array(l.Object({name:l.String(),link:l.String()}))})),paging:l.Object({previous:l.Optional(l.String()),next:l.Optional(l.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 O=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 j=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())}),h=t.Object({shortcode:t.String(),url:t.String(),static_url:t.String(),visible_in_picker:t.Boolean(),category:t.Optional(t.String())}),x=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())}),_=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(h)}),f=t.Object({id:t.String(),uri:t.String(),created_at:t.String(),account:O,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(j),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(h),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(_),card:t.Optional(x),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(f);import{Type as p}from"@sinclair/typebox";var v=p.Object({title:p.String({title:"Title",description:"The title of the RSS feed"}),link:p.String({title:"Link",description:"The link to the RSS feed"}),description:p.Optional(p.String({title:"Description",description:"The description of the RSS feed"})),updated:p.Optional(p.String({title:"Updated",description:"The last updated date of the RSS feed"})),items:p.Array(p.Object({title:p.Optional(p.String({title:"Title",description:"The title of the RSS feed item"})),link:p.Optional(p.String({title:"Link",description:"The link to the RSS feed item"})),creator:p.Optional(p.String({title:"Creator",description:"The creator of the RSS feed item"})),content:p.Optional(p.String({title:"Content",description:"The content of the RSS feed item"})),pubDate:p.Optional(p.String({title:"Pub Date",description:"The publication date of the RSS feed item"}))}))});import{Type as a}from"@sinclair/typebox";var T=a.Object({data:a.Array(a.Object({id:a.String(),media_product_type:a.Literal("THREADS"),media_type:a.Union([a.Literal("TEXT_POST"),a.Literal("IMAGE"),a.Literal("VIDEO"),a.Literal("CAROUSEL_ALBUM"),a.Literal("AUDIO"),a.Literal("REPOST_FACADE")]),media_url:a.String(),permalink:a.String(),owner:a.Object({id:a.String()}),username:a.String(),text:a.String(),timestamp:a.String(),thumbnail_url:a.String(),shortcode:a.String(),is_quote_post:a.Boolean()})),paging:a.Object({cursors:a.Object({before:a.String(),after:a.String()})})});import{Type as s}from"@sinclair/typebox";var N=s.Object({data:s.Object({has_more:s.Boolean(),cursor:s.Number(),videos:s.Array(s.Object({title:s.String(),video_description:s.String(),cover_image_url:s.String(),duration:s.Number(),embed_link:s.String(),id:s.String()}))}),error:s.Optional(s.Object({code:s.String(),message:s.String(),log_id:s.String()}))});import{Type as n}from"@sinclair/typebox";var k=n.Object({etag:n.String(),nextPageToken:n.String(),regionCode:n.String(),pageInfo:n.Object({totalResults:n.Number(),resultsPerPage:n.Number()}),items:n.Array(n.Object({etag:n.String(),id:n.Object({videoId:n.String(),channelId:n.String(),playlistId:n.String()}),snippet:n.Object({publishedAt:n.String(),channelId:n.String(),title:n.String(),description:n.String(),thumbnails:n.Object({default:n.Object({url:n.String(),width:n.Number(),height:n.Number()}),standard:n.Object({url:n.String(),width:n.Number(),height:n.Number()})}),channelTitle:n.String(),liveBroadcastContent:n.String()})}))});import{Type as o}from"@sinclair/typebox";var D=o.Array(o.Object({title:o.String({description:"Blog post title"}),content:o.String({description:"Blog post content"}),author:o.Object({name:o.String({description:"Author's name"})}),publishedAt:o.String({description:"Publication date in ISO format"}),updatedAt:o.Optional(o.String({description:"Last update date in ISO format"})),slug:o.String({description:"URL-friendly version of the title"}),status:o.Union([o.Literal("draft"),o.Literal("published"),o.Literal("archived")],{description:"Publication status of the blog post"}),categories:o.Optional(o.Array(o.String({description:"Blog post categories"}))),tags:o.Optional(o.Array(o.String({description:"Blog post tags"}))),metadata:o.Optional(o.Object({description:o.Optional(o.String()),featuredImage:o.Optional(o.String())},{description:"Additional metadata for the blog post"}))}));import{Type as S}from"@sinclair/typebox";var B=S.Array(S.Object({title:S.String({description:"Title of the release"}),version:S.Optional(S.String({description:"Version number"})),date:S.String({format:"date",description:"Release date in ISO format"}),changes:S.Array(S.Object({type:S.Union([S.Literal("added"),S.Literal("changed"),S.Literal("fixed"),S.Literal("improved"),S.Literal("deprecated"),S.Literal("removed")],{description:"Type of change"}),description:S.String({description:"Description of the change"})}))}));import{Type as g}from"@sinclair/typebox";import{Type as u}from"@sinclair/typebox";var y=u.Array(u.Object({url:u.String({format:"uri",description:"URL"}),title:u.String({description:"Title"}),description:u.Optional(u.String({description:"Description"})),icon:u.Optional(u.String({description:"Icon"}))}),{description:"Schema representing a collection of links"});var I=g.Object({email:g.String({format:"email"}),phone:g.Optional(g.String()),companyName:g.Optional(g.String()),firstName:g.Optional(g.String()),lastName:g.Optional(g.String()),url:g.Optional(g.String({format:"uri"})),address:g.Optional(g.String()),socialLinks:y},{description:"A generic schema representing a person or company contact information"});import{Type as i}from"@sinclair/typebox";var P=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"}),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 C=d.Array(d.Object({question:d.String({description:"Question"}),answer:d.String({description:"Answer"}),category:d.Optional(d.String({description:"Category"})),tags:d.Optional(d.Array(d.String(),{description:"Tags"})),order:d.Optional(d.Number({description:"Order number in the list"}))}),{description:"Schema representing a collection of frequently asked questions (FAQ)"});import{Type as m}from"@sinclair/typebox";var R=m.Array(m.Object({title:m.String({description:"Title of the recipe"}),description:m.String({description:"Description of the recipe"}),time:m.String({description:"Time to prepare the recipe"}),ingredients:m.Array(m.Object({name:m.String({description:"Name of the ingredient"}),quantity:m.String({description:"Quantity of the ingredient"})})),steps:m.Array(m.Object({title:m.String({description:"Step title"}),description:m.String({description:"Step description"})}))}),{description:"Schema representing a collection of recipes"});import{Type as e}from"@sinclair/typebox";var E=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"});export{b as a,A as b,O as c,f as d,L as e,v as f,T as g,N as h,k as i,D as j,B as k,y as l,I as m,P as n,C as o,R as p,E as q};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as S}from"./chunk-WXKRIUTA.js";import{b as c}from"./chunk-H6L4KRCJ.js";import{b as m,d as f}from"./chunk-KVYOKIBM.js";import{b}from"./chunk-7XRTVY2Z.js";import{b as l}from"./chunk-2ZPY4LCA.js";import{d as s,e as n}from"./chunk-JJJSV2ZY.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 S(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 P=t.Object({id:t.String(),label:t.String(),hostname:t.String(),attributes:s,attr:s,datasources:t.Optional(b),datarecords:t.Optional(l),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,h)=>y(a,i.path,e?`60000000-0000-0000-0000-00000000000${h}`:!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 A=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(f,{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(P,["attributes"]),pages:t.Array(t.Composite([t.Omit(A,["attributes"]),d]))});export{y as a,P as b,G as c,A as d};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import{a as i}from"./chunk-TQ23UATQ.js";import{b as r}from"./chunk-GDLXGNMG.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-6I4PY5WS.js";import{a}from"./chunk-3CY6AZG7.js";import{b as f}from"./chunk-HW5TY2QW.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-QRBMK5UX.js";import{a as e}from"./chunk-XEQ2XZLQ.js";import{a as d}from"./chunk-F2ZVIFHO.js";import{a as c}from"./chunk-NFU5BF6G.js";import{a as m}from"./chunk-EFJQECVB.js";import{a as n}from"./chunk-PD7P5KSV.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 +0,0 @@
|
|
|
1
|
-
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
-
|
|
3
|
-
import p from"ajv";import u from"ajv-formats";var t=new p({useDefaults:!0,strictSchema:!1}),j=["date-time","time","date","email","hostname","ipv4","ipv6","uri","uri-reference","uuid","uri-template","json-pointer","relative-json-pointer","regex"];u(t,[...j]);t.addFormat("date-object",{validate:e=>e instanceof Date&&!Number.isNaN(e.getTime()),async:!1});function f(e){return!e||e.length===0?"Unknown validation error":e.map(r=>{let{instancePath:a,message:n,params:o}=r,i=a||"root",s=Object.entries(o||{}).map(([m,c])=>`${m}: ${c}`).join(", ");return`${i} ${n} (${s})`}).join("; ")}export{t as a,j as b,f as c};
|