corequery 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/dist/server/api/create-api-router.js +1 -0
- package/server/dist/server/api/create-api-router.js.map +1 -1
- package/server/dist/server/api/handlers/about-page/v1/index.d.ts +4 -0
- package/server/dist/server/api/handlers/about-page/v1/index.js +6 -0
- package/server/dist/server/api/handlers/about-page/v1/index.js.map +1 -0
- package/server/dist/server/api/handlers/index.d.ts +1 -0
- package/server/dist/server/api/handlers/index.js +1 -0
- package/server/dist/server/api/handlers/index.js.map +1 -1
- package/server/dist/server/corequery.d.ts +2 -1
- package/server/dist/server/corequery.js +2 -0
- package/server/dist/server/corequery.js.map +1 -1
- package/server/dist/shared/apis/about-page/v1/index.d.ts +8 -0
- package/server/dist/shared/apis/about-page/v1/index.js +11 -0
- package/server/dist/shared/apis/about-page/v1/index.js.map +1 -0
- package/server/dist/shared/apis/index.d.ts +1 -0
- package/server/dist/shared/apis/index.js +1 -0
- package/server/dist/shared/apis/index.js.map +1 -1
- package/web/dist/assets/About-DrUZ1UyX.js +2 -0
- package/web/dist/assets/Alert-CuEkLNOc.js +1 -0
- package/web/dist/assets/Debug-BJmhwf2M.js +1 -0
- package/web/dist/assets/{Divider-BnyCkMS8.js → Divider-Cu9p8FgM.js} +1 -1
- package/web/dist/assets/Home-BSQe5H12.js +1 -0
- package/web/dist/assets/{NotFound-4y6OU-Zp.js → NotFound-0odigbT6.js} +1 -1
- package/web/dist/assets/{Page-DgtsUkml.js → Page-BnztU_de.js} +1 -1
- package/web/dist/assets/{Settings-tdjq61Bb.js → Settings-CWdK-TCJ.js} +1 -1
- package/web/dist/assets/{index-CynqaRua.js → index-CqVvUNnw.js} +6 -6
- package/web/dist/assets/index-DOPC5VNW.css +1 -0
- package/web/dist/assets/{use-simple-headers-BrVs9tqw.js → use-simple-headers-DcvIZvms.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/reset.html +9 -0
- package/web/dist/sw.js +1 -1
- package/web/dist/assets/About-BDYrRGk5.js +0 -1
- package/web/dist/assets/Debug-CapjWKSX.js +0 -1
- package/web/dist/assets/Home-B-wCfJpb.js +0 -1
- package/web/dist/assets/index-g8QifMMS.css +0 -1
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ export function createApiRouter(app) {
|
|
|
31
31
|
}
|
|
32
32
|
// List all APIs here.
|
|
33
33
|
setup(apis.FOUNDATIONAL_DATA_V1, handlers.FOUNDATIONAL_DATA_V1);
|
|
34
|
+
setup(apis.ABOUT_PAGE_V1, handlers.ABOUT_PAGE_V1);
|
|
34
35
|
setup(apis.VERSION_CHECK_V1, handlers.VERSION_CHECK_V1);
|
|
35
36
|
setup(apis.VERSIONS_V1, handlers.VERSIONS_V1);
|
|
36
37
|
router.use(/(.*)/, (_req, res) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-router.js","sourceRoot":"","sources":["../../../api/create-api-router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAI3D,MAAM,UAAU,eAAe,CAAC,GAAc;IAC5C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,cAAc;IACd,sCAAsC;IAEtC,SAAS,KAAK,CACZ,GAAsB,EACtB,OAAiC;QAEjC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;YACvC,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAChD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;oBAClB,GAAG,CAAC,MAAM,CAAC,GAAG,CA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,IAAI,EAAE,GAAG,EAAE,EAAE;QAC/B,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ABOUT_PAGE_V1 } from "../../../../../shared/apis/index.js";
|
|
2
|
+
import type { ApiContext } from "../../../../../server/api/types.js";
|
|
3
|
+
import type { ArgsOf, ResultOf } from "../../../../../shared/apis/types.js";
|
|
4
|
+
export declare function handle(ctx: ApiContext, _args: ArgsOf<typeof ABOUT_PAGE_V1>): Promise<ResultOf<typeof ABOUT_PAGE_V1>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../api/handlers/about-page/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,MAAM,CACpB,GAAe,EACf,KAAmC;IAEnC,OAAO,OAAO,CAAC,OAAO,CAAC;QACrB,eAAe,EAAE,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,eAAe;KACzD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { handle as ABOUT_PAGE_V1 } from "./about-page/v1/index.js";
|
|
1
2
|
export { handle as FOUNDATIONAL_DATA_V1 } from "./foundational-data/v1/index.js";
|
|
2
3
|
export { handle as VERSION_CHECK_V1 } from "./version-check/v1/index.js";
|
|
3
4
|
export { handle as VERSIONS_V1 } from "./versions/v1/index.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { handle as ABOUT_PAGE_V1 } from "./about-page/v1/index.js";
|
|
1
2
|
export { handle as FOUNDATIONAL_DATA_V1 } from "./foundational-data/v1/index.js";
|
|
2
3
|
export { handle as VERSION_CHECK_V1 } from "./version-check/v1/index.js";
|
|
3
4
|
export { handle as VERSIONS_V1 } from "./versions/v1/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../api/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../api/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CorequeryConfig } from "../server/config/config.js";
|
|
2
2
|
import { StopCollection } from "../server/data/stop-collection.js";
|
|
3
3
|
import { LineCollection } from "../server/data/line-collection.js";
|
|
4
|
-
import type { FooterConfig, LandingPageConfig } from "../server/config/index.js";
|
|
4
|
+
import type { AboutPageConfig, FooterConfig, LandingPageConfig } from "../server/config/index.js";
|
|
5
5
|
export type CorequeryConfigBuilder = (corequery: Corequery) => CorequeryConfig;
|
|
6
6
|
export declare class Corequery {
|
|
7
7
|
private readonly _config;
|
|
@@ -13,6 +13,7 @@ export declare class Corequery {
|
|
|
13
13
|
readonly lines: LineCollection;
|
|
14
14
|
readonly landingPageConfig: LandingPageConfig;
|
|
15
15
|
readonly footerConfig: FooterConfig;
|
|
16
|
+
readonly aboutPageConfig: AboutPageConfig;
|
|
16
17
|
constructor(configBuilder: CorequeryConfigBuilder);
|
|
17
18
|
getCorequeryPackageVersion(): string;
|
|
18
19
|
getFrontendVersion(): string;
|
|
@@ -16,6 +16,7 @@ export class Corequery {
|
|
|
16
16
|
// if and when we want to add helper methods.
|
|
17
17
|
landingPageConfig;
|
|
18
18
|
footerConfig;
|
|
19
|
+
aboutPageConfig;
|
|
19
20
|
constructor(configBuilder) {
|
|
20
21
|
this._config = configBuilder(this);
|
|
21
22
|
this._webServer = new WebServer(this, this._config.port, this._config.assets, env.COREQUERY_HOT_RELOAD ? "vite-middleware" : "dist-folder", serverFolderPath);
|
|
@@ -29,6 +30,7 @@ export class Corequery {
|
|
|
29
30
|
this.lines = LineCollection.build(this._config.lines, lineTagSuccession);
|
|
30
31
|
this.landingPageConfig = this._config.landingPage;
|
|
31
32
|
this.footerConfig = this._config.footer;
|
|
33
|
+
this.aboutPageConfig = this._config.aboutPage;
|
|
32
34
|
}
|
|
33
35
|
getCorequeryPackageVersion() {
|
|
34
36
|
if (this._corequeryPackageVersion == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corequery.js","sourceRoot":"","sources":["../../corequery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"corequery.js","sourceRoot":"","sources":["../../corequery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAMl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} from "../../../../shared/apis/types.js";
|
|
3
|
+
declare const argsSchema: z.ZodObject<{}, z.z.core.$strip>;
|
|
4
|
+
declare const resultSchema: z.ZodObject<{
|
|
5
|
+
primaryMarkdown: z.ZodString;
|
|
6
|
+
}, z.z.core.$strip>;
|
|
7
|
+
export declare const api: Api<typeof argsSchema, typeof resultSchema>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../shared/apis/about-page/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEhC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,GAAG,GAAgD;IAC9D,IAAI,EAAE,gBAAgB;IACtB,UAAU;IACV,YAAY;CACb,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { api as ABOUT_PAGE_V1 } from "./about-page/v1/index.js";
|
|
1
2
|
export { api as FOUNDATIONAL_DATA_V1 } from "./foundational-data/v1/index.js";
|
|
2
3
|
export { api as VERSION_CHECK_V1 } from "./version-check/v1/index.js";
|
|
3
4
|
export { api as VERSIONS_V1 } from "./versions/v1/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// All APIs are versioned, since we can't expect everyone to necessarily always
|
|
2
2
|
// be on the latest version of the PWA, and we might need to make breaking
|
|
3
3
|
// changes sometimes.
|
|
4
|
+
export { api as ABOUT_PAGE_V1 } from "./about-page/v1/index.js";
|
|
4
5
|
export { api as FOUNDATIONAL_DATA_V1 } from "./foundational-data/v1/index.js";
|
|
5
6
|
export { api as VERSION_CHECK_V1 } from "./version-check/v1/index.js";
|
|
6
7
|
export { api as VERSIONS_V1 } from "./versions/v1/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../shared/apis/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,qBAAqB;AAErB,OAAO,EAAE,GAAG,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,GAAG,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../shared/apis/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,qBAAqB;AAErB,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,GAAG,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,GAAG,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t,k as f,c as u,T as a,b as k,C as s,d as p,e as y,f as b}from"./index-CqVvUNnw.js";import{T as i,A as v}from"./Alert-CuEkLNOc.js";import{P as h}from"./Page-BnztU_de.js";import{u as T}from"./use-simple-headers-DcvIZvms.js";import{D as C}from"./Divider-Cu9p8FgM.js";const M=/\[([^[\]]+)\]\(([^()]+)\)/,P=/\*\*(.+?)\*\*/,I=/\*([^*]+)\*/,S=/_([^_]+)_/;function x(l,n){const e=[];let r=l;for(;r.length>0;){const c=A(r);if(c==null){e.push(r);break}c.index>0&&e.push(r.slice(0,c.index));const d=x(c.innerContent,n);e.push(c.wrap(t(f,{children:d}),n)),r=r.slice(c.index+c.fullMatch.length)}return e}function A(l){const n=[_(l),B(l),m(l,I),m(l,S)];let e=null;for(const r of n)r!=null&&(e==null||r.index<e.index)&&(e=r);return e}function _(l){const n=l.match(M);if(n==null||n.index==null||n[1]==null||n[2]==null)return null;const e=n[2];return e.startsWith("https://")?{index:n.index,fullMatch:n[0],innerContent:n[1],wrap:(r,c)=>c.link(r,e)}:null}function B(l){const n=l.match(P);return n==null||n.index==null||n[1]==null?null:{index:n.index,fullMatch:n[0],innerContent:n[1],wrap:(e,r)=>r.bold(e)}}function m(l,n){const e=l.match(n);return e==null||e.index==null||e[1]==null?null:{index:e.index,fullMatch:e[0],innerContent:e[1],wrap:(r,c)=>c.italic(r)}}function D(l){return t("em",{class:u(l.class),children:l.children})}function $(l){const n=u("text-accent-text inline underline",l.class);return l.onClick!=null?t("span",{class:n,onClick:l.onClick,children:l.children}):l.href!=null?t("a",{class:n,href:l.href,children:l.children}):t("span",{class:n,children:l.children})}function L(l){return t("strong",{class:u(l.class,"text-fg-strong"),children:l.children})}const o={bold:l=>t(L,{children:l}),italic:l=>t(D,{children:l}),link:(l,n)=>t($,{href:n,children:l})},E={h1:{render:(l,n)=>t(a,{as:"h1",style:"title",children:l},n),marginTop:"mt-12"},h2:{render:(l,n)=>t(a,{as:"h2",style:"subtitle",children:l},n),marginTop:"mt-12"},h3:{render:(l,n)=>t(a,{as:"h3",style:"strong",children:l},n),marginTop:"mt-12"},p:{render:(l,n)=>t(a,{as:"p",children:l},n),marginTop:"mt-8"},bold:o.bold,italic:o.italic,link:o.link};function w(l){const n=l.style??o,e=k(()=>x(l.markdown,n),[l.markdown,n]);return t(f,{children:e})}function F(l){return l.split(`
|
|
2
|
+
`).map(n=>n.replace(/[\r\t]/g,"").trim()).filter(n=>n.length>0).map(n=>{const e=n.match(/^### (.+)$/);if(e!=null&&e[1]!=null)return{kind:"h3",content:e[1]};const r=n.match(/^## (.+)$/);if(r!=null&&r[1]!=null)return{kind:"h2",content:r[1]};const c=n.match(/^# (.+)$/);return c!=null&&c[1]!=null?{kind:"h1",content:c[1]}:{kind:"p",content:n}})}function H(l){const n=l.style??E,e=k(()=>F(l.markdown).map((r,c)=>{const d=n[r.kind],g=c===0?"":d.marginTop;return t("div",{class:g,children:d.render(t(w,{style:n,markdown:r.content}),c)},c)}),[l.markdown,n]);return t(s,{class:u(l.class),children:e})}function z(){const{foda:l}=p(),{data:n,loading:e,error:r}=y(b,{}),c=T({title:"About"});return e?t(h,{...c,children:t(s,{class:"px-4 py-8",children:[t(i,{class:"w-[30%] text-xl"}),t("div",{class:"h-8"}),t(i,{class:"w-full text-md"}),t("div",{class:"h-3"}),t(i,{class:"w-full text-md"}),t("div",{class:"h-3"}),t(i,{class:"w-[60%] text-md"}),t("div",{class:"h-12"}),t(i,{class:"w-[40%] text-lg"}),t("div",{class:"h-8"}),t(i,{class:"w-full text-md"}),t("div",{class:"h-3"}),t(i,{class:"w-full text-md"}),t("div",{class:"h-3"}),t(i,{class:"w-[20%] text-md"}),t("div",{class:"h-12"}),t(i,{class:"w-[50%] text-lg"}),t("div",{class:"h-8"}),t(i,{class:"w-full text-md"}),t("div",{class:"h-3"}),t(i,{class:"w-[80%] text-md"})]})}):r!=null||n==null?t(h,{...c,children:t(s,{class:"px-4 py-8",children:t(v,{type:"error",children:t(a,{children:"Unable to load the about page."})})})}):t(h,{...c,children:t(s,{class:"px-4 py-8 gap-12",children:[t(H,{markdown:n.primaryMarkdown}),t(s,{class:"gap-8",children:[t(C,{}),t(a,{as:"p",style:"small-weak",children:t(w,{markdown:l.footerPrimaryMarkdown})})]})]})})}export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as r,M as a,m as s,g as i,G as g}from"./index-CqVvUNnw.js";function f(l){return e("div",{class:r(l.class,"bg-placeholder animate-placeholder-pulse")})}function x(l){return e(f,{...l,class:r(l.class,"h-[1em] -my-[0.13em]")})}function h(l){return e("div",{class:r(l.class,"flex flex-col justify-center items-stretch"),style:{height:`${l.heightRem}rem`},children:l.children})}function u(l){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...l,children:e("g",{fill:"none",children:[e("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e("path",{fill:"currentColor",d:"m13.299 3.148l8.634 14.954a1.5 1.5 0 0 1-1.299 2.25H3.366a1.5 1.5 0 0 1-1.299-2.25l8.634-14.954c.577-1 2.02-1 2.598 0M12 4.898L4.232 18.352h15.536zM12 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2m0-7a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"})]})})}function d(l){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...l,children:e("g",{fill:"none",fillRule:"evenodd",children:[e("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e("path",{fill:"currentColor",d:"M21.192 5.465a1 1 0 0 1 0 1.414L9.95 18.122a1.1 1.1 0 0 1-1.556 0l-5.586-5.586a1 1 0 1 1 1.415-1.415l4.95 4.95L19.777 5.465a1 1 0 0 1 1.414 0Z"})]})})}function v(l){const o={info:s,error:a,warning:u,success:d}[l.type],t=l.icon!==void 0?l.icon:o,c={info:"bg-soft-accent",error:"bg-soft-error",warning:"bg-soft-warning",success:"bg-soft-success"}[l.type],n={info:["[--color-fg:var(--color-accent-text)]","[--color-fg-strong:var(--color-accent-text)]","[--color-fg-weak:var(--color-accent-text)]"],error:["[--color-fg:var(--color-error-text)]","[--color-fg-strong:var(--color-error-text)]","[--color-fg-weak:var(--color-error-text)]"],warning:["[--color-fg:var(--color-warning-text)]","[--color-fg-strong:var(--color-warning-text)]","[--color-fg-weak:var(--color-warning-text)]"],success:["[--color-fg:var(--color-success-text)]","[--color-fg-strong:var(--color-success-text)]","[--color-fg-weak:var(--color-success-text)]"]}[l.type];return e(g,{class:r(l.class,c,n,"px-4 py-4.5 rounded-sm gap-2 items-start",{"grid-cols-[auto_1fr]":t!=null}),children:[t!=null&&e(h,{heightRem:i("text-md"),children:e(t,{class:"text-fg text-lg"})}),l.children]})}export{v as A,x as T,h as V};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as P,x as A,a as e,T as l,c as i,G as f,g as h,h as g,i as R,U as S,B as k,L as D,j as H,C as a,u as v,e as B,l as U,d as L}from"./index-CqVvUNnw.js";import{P as T}from"./Page-BnztU_de.js";import{u as E}from"./use-simple-headers-DcvIZvms.js";import{D as d}from"./Divider-Cu9p8FgM.js";import{T as p,V as m,A as x}from"./Alert-CuEkLNOc.js";const y=P(null);function c(){const n=A(y);if(n==null)throw new Error("Foundational data unavailable outside provider.");return n}function F(n){const r={info:"bg-soft-accent",error:"bg-soft-error",warning:"bg-soft-warning",success:"bg-soft-success"}[n.type],t={info:"[--color-fg:var(--color-accent-text)]",error:"[--color-fg:var(--color-error-text)]",warning:"[--color-fg:var(--color-warning-text)]",success:"[--color-fg:var(--color-success-text)]"}[n.type];return e(f,{class:i(n.class,r,t,"px-2 py-1.5 rounded-full"),children:e(l,{style:"small",children:n.text})})}function C(n){return e(g,{class:i(n.class,"gap-x-2 gap-y-3"),wrap:!0,children:[e(l,{style:"strong",children:n.header}),n.loading&&e(p,{class:"w-[20%] text-md"}),!n.loading&&n.pillContent!=null&&e(m,{heightRem:h("text-md"),children:e(F,{type:n.pillContent.type,text:n.pillContent.text})})]})}function V(n){return e(C,{class:n.class,header:n.header,pillContent:O(n.currentValue,n.latestValue),loading:n.loading})}function O(n,r){return r==null?null:{text:n===r?"Up to date":"Outdated",type:n===r?"success":"error"}}function u(n){return n.loading?e(f,{class:n.class,children:e(p,{class:"w-[40%] text-md"})}):n.value==null?null:e(l,{class:n.class,children:[n.prefix,": ",n.value]})}function o(n){return n==null?null:n.length<32||!/^[0-9a-f]+$/.test(n)?n:n.slice(0,7)}function W(n){const{isUpdateAvailable:r,update:t}=R();return r?e(k,{theme:"accent",text:"Refresh & update",class:"self-start",icon:S,onClick:()=>{t()}}):e(g,{class:i(n.class,"gap-2"),children:[e(m,{heightRem:h("text-md"),children:e(D,{})}),e(l,{class:"min-w-0 shrink w-full",children:"Waiting for service worker to install update..."})]})}function Q(n){const{isHotReloadingEnabled:r}=H();return r?e(q,{...n}):e(G,{...n})}function q(n){const{data:r,loading:t}=c();return e(a,{class:i(n.class,"gap-6"),children:[e(C,{header:"App version",pillContent:{text:"Development",type:"info"},loading:!1}),e(l,{children:"All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)"}),e(w,{}),e(u,{prefix:"Latest version",value:r?.frontendVersion.slice(0,8)??null,loading:t})]})}function G(n){const{frontendVersion:r}=v(),{data:t,loading:s}=c(),b=!s&&t!=null&&t?.frontendVersion!==r;return e(a,{class:i(n.class,"gap-8"),children:e(a,{class:"gap-6",children:[e(V,{header:"App version",currentValue:r,latestValue:t?.frontendVersion??null,loading:s}),e(w,{}),e(u,{prefix:"Latest version",value:o(t?.frontendVersion),loading:s}),b&&e(W,{})]})})}function w(){const{frontendVersion:n,versionsOnLastUpdate:r}=v();return e(a,{class:"gap-4",children:[e(l,{children:["Current version: ",o(n)]}),e(a,{class:"gap-3",children:[e(l,{style:"small-weak",children:["Server version: ",o(r.serverVersion)]}),e(l,{style:"small-weak",children:["CoreQuery version: ",r.corequeryPackageVersion]})]})]})}function M(n){const r=B(U,{});return e(y.Provider,{value:r,children:n.children})}function $(n){const{data:r,loading:t}=c(),{foda:s}=L();return e(a,{class:i(n.class,"gap-6"),children:[e(V,{header:"Foundational data",currentValue:s.hash,latestValue:r?.foundationalDataHash??null,loading:t}),e(a,{class:"gap-4",children:[e(l,{children:["Current version: ",o(s.hash)]}),e(l,{style:"small-weak",children:["Server version: ",o(s.serverVersion)]})]}),e(u,{prefix:"Latest version",value:o(r?.foundationalDataHash),loading:t})]})}function j(n){const{data:r,loading:t}=c();return e(a,{class:i(n.class,"gap-8"),children:e(a,{class:"gap-6",children:[e(l,{style:"strong",children:"Server"}),e(I,{}),e(a,{class:"gap-4",children:[e(u,{prefix:"Server version",value:o(r?.serverVersion),loading:t}),e(u,{prefix:"CoreQuery version",value:r?.corequeryPackageVersion??null,loading:t})]})]})})}function I(){const{error:n}=c();return n==null?null:e(x,{type:"error",children:e(l,{children:"Unable to fetch the latest version info from the server."})})}function Z(){return e(T,{...E({title:"Developer info"}),children:e(M,{children:e(a,{class:"px-4 py-8 gap-8",children:[e(z,{}),e(Q,{}),e(d,{}),e($,{}),e(d,{}),e(j,{}),e(d,{})]})})})}function z(){const{error:n}=c();return n==null?null:e(x,{type:"error",children:e(l,{children:"Unable to fetch the latest version info from the server."})})}export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,c as o}from"./index-
|
|
1
|
+
import{a as s,c as o}from"./index-CqVvUNnw.js";function e(r){return s("div",{class:o(r.class,"border-b border-soft-border")})}export{e as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as t,a as e,C as s,T as o}from"./index-CqVvUNnw.js";import{P as r}from"./Page-BnztU_de.js";import{u as i}from"./use-simple-headers-DcvIZvms.js";function u(){const{appName:a}=t();return e(r,{...i({title:"Home"}),children:e(s,{class:"px-4 py-8 gap-8",children:e(o,{style:"title",children:a})})})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as g,u as p,i as f,e as m,l as h,y,a as e,C as r,T as i,B as x,p as H,L as k}from"./index-CqVvUNnw.js";import{P as l}from"./Page-BnztU_de.js";function b(){const{isHotReloadingEnabled:s}=g(),{frontendVersion:d}=p(),{unregister:t}=f(),{data:a,loading:o,error:c}=m(h,{}),n=!s&&!o&&c==null&&a!=null&&a.frontendVersion!==d;return y(()=>{async function u(){n&&(await t(),window.location.reload())}u()},[n,t]),!o&&!n?e(l,{mobileHeader:null,desktopHeader:null,children:e(r,{class:"px-4 py-8 gap-8",xAlign:"center",yAlign:"center",children:[e(i,{style:"title",align:"center",children:"Page not found"}),e(i,{align:"center",children:"This page doesn't exist, at least not anymore!"}),e(x,{href:"/",text:"Go home",icon:H})]})}):e(l,{mobileHeader:null,desktopHeader:null,children:e(r,{xAlign:"center",yAlign:"center",children:e(k,{})})})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,c as n,G as r,
|
|
1
|
+
import{a as d,c as n,G as r,q as a,P as i}from"./index-CqVvUNnw.js";function s(e){return d(r,{class:n(e.class,"fixed top-0 left-0 right-0 bg-bg-navbar border-b border-soft-border desktop:hidden"),children:e.children})}function c(e){return d(r,{class:n(e.class,"not-desktop:hidden"),children:e.children})}function h(e){const{showMobileNav:t}=a(),l=e.centered??!0;return d(r,{class:n("bg-bg min-h-svh",{"pt-12":e.mobileHeader!=null,"not-desktop:pb-18":t,"desktop:grid-rows-[auto_1fr]":e.desktopHeader!=null},"desktop:pt-12"),children:[e.mobileHeader!=null&&d(s,{class:"h-12",children:e.mobileHeader}),e.desktopHeader!=null&&d(c,{children:e.desktopHeader}),l?d(i,{children:e.children}):e.children]})}export{h as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,c as s,
|
|
1
|
+
import{a as t,c as s,h as n,T as c,n as g,o as u,t as d,C as r}from"./index-CqVvUNnw.js";import{P as v}from"./Page-BnztU_de.js";import{u as h}from"./use-simple-headers-DcvIZvms.js";import{D as m}from"./Divider-Cu9p8FgM.js";const b=["bg-transparent","group-hover:bg-soft-hover","group-active:bg-soft-active"],f=["bg-accent","group-hover:bg-accent-hover","group-active:bg-accent-active"],k=["[--color-fg:var(--color-on-accent)]","[--color-fg-strong:var(--color-on-accent)]","[--color-fg-weak:var(--color-on-accent)]"],C=s(b),w=s(f),S=s(k);function x(e){return t(n,{class:s(e.class,"overflow-hidden rounded-sm border border-accent"),children:e.options.map((a,o)=>t(y,{label:a.label,active:a.value===e.value,last:o===e.options.length-1,onClick:()=>e.onChange(a.value)},a.value))})}function y(e){return t(g,{class:s("relative group h-8",{[S]:e.active,"border-r border-accent":!e.last}),onClick:e.onClick,children:[t("div",{class:s("absolute z-0 top-0 bottom-0 left-0 right-0",{[C]:!e.active,[w]:e.active})}),t(n,{class:"relative z-1 px-6",xAlign:"center",yAlign:"center",children:t(c,{children:e.label})})]})}const B={auto:"Auto",light:"Light",dark:"Dark"},P=d.map(e=>({value:e,label:B[e]}));function T(e){const{settings:a,updateSettings:o}=u();return t(x,{class:e.class,value:a.theme,options:P,onChange:l=>{o(i=>i.with({theme:l}))}})}function z(){return t(v,{...h({title:"Settings"}),children:t(r,{class:"px-4 py-8 gap-8",children:[t(r,{class:"gap-6",children:[t(c,{style:"strong",children:"Theme"}),t(c,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),t(T,{class:"self-start"})]}),t(m,{}),t(c,{style:"small-weak",children:"(Settings are saved to your device's/browser's local storage.)"})]})})}export{z as default};
|