@indietabletop/appkit 3.1.0 → 3.2.0-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/dist/{external-link.d.ts → ExternalLink.d.ts} +1 -2
- package/dist/FormSubmitButton.d.ts +7 -0
- package/dist/FormSubmitButton.js +16 -0
- package/dist/FullscreenDismissBlocker.d.ts +5 -0
- package/dist/FullscreenDismissBlocker.js +19 -0
- package/dist/IndieTabletopClubLogo.d.ts +7 -0
- package/dist/IndieTabletopClubLogo.js +6 -0
- package/dist/IndieTabletopClubSymbol.d.ts +7 -0
- package/dist/IndieTabletopClubSymbol.js +5 -0
- package/dist/Letterhead.d.ts +6 -0
- package/dist/Letterhead.js +14 -0
- package/dist/LetterheadFooter.d.ts +1 -0
- package/dist/LetterheadFooter.js +17 -0
- package/dist/LoadingIndicator.d.ts +3 -0
- package/dist/LoadingIndicator.js +17 -0
- package/dist/ServiceWorkerHandler.d.ts +11 -0
- package/dist/ServiceWorkerHandler.js +42 -0
- package/dist/animations.css.d.ts +3 -0
- package/dist/animations.css.js +14 -0
- package/dist/common.css.d.ts +5 -0
- package/dist/common.css.js +38 -0
- package/dist/globals.css.d.ts +1 -0
- package/dist/globals.css.js +35 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.js +18 -7
- package/dist/internal.css.d.ts +4 -0
- package/dist/internal.css.js +21 -0
- package/dist/media.d.ts +39 -0
- package/dist/media.js +49 -0
- package/dist/use-form.d.ts +29 -0
- package/dist/use-form.js +33 -0
- package/package.json +8 -3
- package/dist/defineNetlifyConfig.d.ts +0 -34
- package/dist/defineNetlifyConfig.js +0 -35
- /package/dist/{external-link.js → ExternalLink.js} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes } from "react";
|
|
2
|
-
type ExternalLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "rel" | "target">;
|
|
2
|
+
export type ExternalLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "rel" | "target">;
|
|
3
3
|
export declare function ExternalLink(props: ExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormSubmitProps } from "@ariakit/react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type FormSubmitButtonProps = FormSubmitProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
loading: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function FormSubmitButton(props: FormSubmitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormSubmit, useFormContext, useStoreState, } from "@ariakit/react";
|
|
3
|
+
import { fadeIn } from "./animations.css.js";
|
|
4
|
+
export function FormSubmitButton(props) {
|
|
5
|
+
const { children, className, style, loading, ...submitProps } = props;
|
|
6
|
+
const form = useFormContext();
|
|
7
|
+
const isSubmitting = useStoreState(form, (s) => s?.submitting);
|
|
8
|
+
return (_jsxs(FormSubmit, { ...submitProps, className: className, style: { position: "relative", ...style }, children: [_jsx("span", { style: { opacity: isSubmitting ? 0 : 1, transition: "200ms opacity" }, children: children }), isSubmitting && (_jsx("div", { style: {
|
|
9
|
+
display: "flex",
|
|
10
|
+
position: "absolute",
|
|
11
|
+
inset: "0",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
animation: `${fadeIn} 200ms 200ms both`,
|
|
15
|
+
}, children: loading }))] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
function preventDefaultEscHandling(event) {
|
|
3
|
+
if (event.key === "Escape") {
|
|
4
|
+
event.preventDefault();
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This component prevents the default MacOS behaviour where a fullscreen window
|
|
9
|
+
* gets minimized by pressing Escape.
|
|
10
|
+
*/
|
|
11
|
+
export function FullscreenDismissBlocker() {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
window.addEventListener("keydown", preventDefaultEscHandling);
|
|
14
|
+
return () => {
|
|
15
|
+
window.removeEventListener("keydown", preventDefaultEscHandling);
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SVGAttributes } from "react";
|
|
2
|
+
type IndieTabletopClubLogoProps = Omit<SVGAttributes<SVGElement>, "width" | "height" | "viewBox"> & {
|
|
3
|
+
textColor?: string;
|
|
4
|
+
symbolColor?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function IndieTabletopClubLogo(props: IndieTabletopClubLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function IndieTabletopClubLogo(props) {
|
|
3
|
+
const { textColor = "#161615", symbolColor = "#FF5937", ...svgProps } = props;
|
|
4
|
+
// prettier-ignore
|
|
5
|
+
return (_jsx("svg", { ...svgProps, width: "200px", height: "13px", viewBox: "0 0 200 13", children: _jsx("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: _jsx("g", { transform: "translate(-720, -746)", fillRule: "nonzero", children: _jsxs("g", { transform: "translate(720, 746)", children: [_jsx("path", { fill: textColor, d: "M162.319043,13 C160.39468,13 158.856429,12.433618 157.706354,11.3007467 C156.560409,10.1678541 155.987436,8.6527232 155.987436,6.75532194 C155.987436,5.27087812 156.347738,3.76969784 157.068341,2.25177041 L162.384083,0 C164.685265,0 166.250358,0.625027117 167.07833,1.87508242 L164.464335,4.2356719 C163.658044,3.15862455 162.711348,2.42755671 161.625281,2.04250049 L160.101483,2.04250049 C159.838226,3.28697663 159.70608,4.32217213 159.70608,5.14810843 C159.70608,6.76090433 160.056058,8.03885336 160.754982,8.98197696 C161.453905,9.91951817 162.380986,10.3882888 163.537255,10.3882888 C163.854197,10.3882888 164.179397,10.3408545 164.512857,10.2459861 C164.846317,10.1511176 165.387286,9.95858417 166.134731,9.66839641 L166.61066,10.4217724 L164.053446,13 L162.319043,13 Z" }), _jsx("polygon", { fill: textColor, points: "171.687921 10.7314717 176.244861 10.7314717 175.584135 12.7572036 168.147879 12.7572036 168.147879 0.242755671 171.687921 0.159047705" }), _jsx("path", { fill: textColor, d: "M184.113686,0.242755671 L187.646502,0.159047705 L187.646502,12.7572036 L184.113686,12.840993 L184.113686,11.8699146 L181.435684,13 C179.893303,13 178.79588,12.6512347 178.145478,11.9535969 C177.500239,11.2560662 177.177103,10.078568 177.177103,8.42113445 L177.177103,0.242755671 L180.709918,0.159047705 L180.709918,7.96073207 C180.709918,8.59133836 180.742955,9.07964196 180.806962,9.42564289 C180.877164,9.77163309 181.021698,10.0701998 181.242628,10.3213215 C181.462526,10.572454 181.763982,10.7426151 182.145964,10.8319761 C182.533107,10.9156584 183.057558,10.9575531 183.718283,10.9575531 C183.982573,9.7465177 184.113686,8.7113222 184.113686,7.85190228 L184.113686,0.242755671 Z" }), _jsx("path", { fill: textColor, d: "M197.176432,5.36574657 C198.069443,5.42155974 198.763205,5.69221449 199.257716,6.17772155 C199.752228,6.65765693 200,7.29664216 200,8.09466652 C200,8.95407573 199.690285,9.76047903 199.071887,10.513855 L193.757178,12.7572036 L189.788697,12.7572036 L189.788697,0.242755671 L195.273749,0.242755671 C198.015759,0.242755671 199.386764,1.15239351 199.386764,2.97167348 C199.386764,3.48508176 199.160672,4.06546799 198.709521,4.71282144 L197.176432,5.36574657 Z M194.595474,2.26851757 L193.329772,2.26851757 L193.329772,5.34901012 L195.44306,5.34901012 C195.59895,4.80210751 195.674314,4.40310069 195.66812,4.15196822 C195.66812,3.29813069 195.310915,2.67032095 194.595474,2.26851757 Z M196.031519,10.7314717 C196.197732,10.1846012 196.281355,9.69908348 196.281355,9.27496126 C196.281355,8.40438728 195.907633,7.77098444 195.160187,7.37476345 L193.329772,7.37476345 L193.329772,10.7314717 L196.031519,10.7314717 Z" }), _jsx("polygon", { fill: textColor, points: "0 0.242755671 3.54075462 0.159047705 3.54075462 12.7572036 0 12.840993" }), _jsx("polygon", { fill: textColor, points: "13.6033016 0.242755671 15.5551254 0.159047705 15.5551254 12.7572036 13.2403156 13 7.6267315 5.50804925 7.6267315 12.7572036 5.67487669 12.840993 5.67487669 0.242755671 7.98967617 0 13.6033016 7.55892869" }), _jsx("path", { fill: textColor, d: "M23.8028354,0.242755671 C25.6203462,0.242755671 27.0425574,0.77291326 28.0695723,1.83323058 C29.1019556,2.88795909 29.6181472,4.30543568 29.6181472,6.08564964 C29.6181472,7.48079668 29.2605297,8.95687228 28.5453978,10.513855 L23.2221198,12.7572036 L17.7053733,12.7572036 L17.7053733,0.242755671 L23.8028354,0.242755671 Z M25.5047193,10.7314717 C25.7681835,9.41447811 25.8999156,8.39880489 25.8999156,7.68449492 C25.8999156,5.03370698 24.9588982,3.22837762 23.0769668,2.26851757 L21.2461382,2.26851757 L21.2461382,10.7314717 L25.5047193,10.7314717 Z" }), _jsx("polygon", { fill: textColor, points: "31.090842 0.242755671 34.6316069 0.159047705 34.6316069 12.7572036 31.090842 12.840993" }), _jsx("polygon", { fill: textColor, points: "40.3065146 7.34127984 40.3065146 10.7314717 45.19423 10.7314717 44.532782 12.7572036 36.7657497 12.7572036 36.7657497 0.242755671 45.19423 0.242755671 44.532782 2.26851757 40.3065146 2.26851757 40.3065146 5.31552651 44.3634712 5.31552651 43.7020232 7.34127984" }), _jsx("polygon", { fill: textColor, points: "60.8105757 0.242755671 60.1572836 2.26851757 57.2134427 2.26851757 57.2134427 12.7572036 53.6807303 12.840993 53.6807303 2.26851757 50.0593362 2.26851757 50.720681 0.242755671" }), _jsx("path", { fill: textColor, d: "M67.1548807,13 L65.9773443,9.65164925 L62.2107972,9.65164925 L61.1219425,12.7572036 L59.0087572,13 L63.5012763,0.242755671 L66.3080167,0 L70.6553827,12.3136127 L67.1548807,13 Z M62.9205607,7.63426414 L65.2675808,7.63426414 L64.0980971,4.31938629 L62.9205607,7.63426414 Z" }), _jsx("path", { fill: textColor, d: "M79.1127698,5.36574657 C80.0053684,5.42155974 80.6990267,5.69221449 81.1937448,6.17772155 C81.6883596,6.65765693 81.9357187,7.29664216 81.9357187,8.09466652 C81.9357187,8.95407573 81.6265199,9.76047903 81.0082255,10.513855 L75.6930002,12.7572036 L71.7248286,12.7572036 L71.7248286,0.242755671 L77.2093647,0.242755671 C79.9515812,0.242755671 81.3227927,1.15239351 81.3227927,2.97167348 C81.3227927,3.48508176 81.0969072,4.06546799 80.6452396,4.71282144 L79.1127698,5.36574657 Z M76.5318116,2.26851757 L75.2655935,2.26851757 L75.2655935,5.34901012 L77.3787788,5.34901012 C77.5346687,4.80210751 77.6099295,4.40310069 77.6045611,4.15196822 C77.6045611,3.29813069 77.2470467,2.67032095 76.5318116,2.26851757 Z M77.967547,10.7314717 C78.1341737,10.1846012 78.2175903,9.69908348 78.2175903,9.27496126 C78.2175903,8.40438728 77.8438675,7.77098444 77.096422,7.37476345 L75.2655935,7.37476345 L75.2655935,10.7314717 L77.967547,10.7314717 Z" }), _jsx("polygon", { fill: textColor, points: "86.8282863 10.7314717 91.3853293 10.7314717 90.7238813 12.7572036 83.2875213 12.7572036 83.2875213 0.242755671 86.8282863 0.159047705" }), _jsx("polygon", { fill: textColor, points: "96.0035927 7.34127984 96.0035927 10.7314717 100.891308 10.7314717 100.22986 12.7572036 92.4628277 12.7572036 92.4628277 0.242755671 100.891308 0.242755671 100.22986 2.26851757 96.0035927 2.26851757 96.0035927 5.31552651 100.060549 5.31552651 99.3992045 7.34127984" }), _jsx("polygon", { fill: textColor, points: "111.848921 0.242755671 111.195422 2.26851757 108.252098 2.26851757 108.252098 12.7572036 104.719282 12.840993 104.719282 2.26851757 101.097785 2.26851757 101.759129 0.242755671" }), _jsx("path", { fill: textColor, d: "M117.951339,0 C119.876733,0 121.411887,0.566431327 122.5568,1.69929612 C123.701713,2.83215663 124.274686,4.34728752 124.274686,6.24468878 C124.274686,7.7291326 123.917482,9.23031287 123.20204,10.7481867 L117.887331,13 C115.961936,13 114.423685,12.433618 113.27361,11.3007467 C112.127665,10.1678541 111.555724,8.6527232 111.555724,6.75532194 C111.555724,5.27087812 111.916026,3.76969784 112.636629,2.25177041 L117.951339,0 Z M120.161671,10.9575531 C120.424929,9.71303409 120.559139,8.67783859 120.564301,7.85190228 C120.564301,5.02812459 119.46791,3.09165733 117.274095,2.04250049 L115.668739,2.04250049 C115.405481,3.28697663 115.273336,4.32217213 115.273336,5.14810843 C115.273336,7.97188613 116.37076,9.9083641 118.564574,10.9575531 L120.161671,10.9575531 Z" }), _jsx("path", { fill: textColor, d: "M131.070865,0.242755671 C131.796631,0.242755671 132.44187,0.312514094 133.006584,0.452028798 C133.57646,0.585963257 134.033805,0.764542892 134.377589,0.987766633 C134.727567,1.21099252 135.01457,1.47886143 135.240661,1.79137874 C135.466753,2.09830295 135.622643,2.40523787 135.708331,2.71217279 C135.800213,3.01910771 135.845638,3.34557563 135.845638,3.69156584 C135.845638,4.61795299 135.535923,5.4522468 134.917525,6.19446871 L129.602816,8.4378709 L129.287939,8.4378709 L129.287939,12.7572036 L125.747897,12.840993 L125.747897,0.242755671 L131.070865,0.242755671 Z M131.877157,6.41211757 C132.044403,5.86521495 132.126993,5.35179596 132.126993,4.87187129 C132.126993,3.66087877 131.713008,2.79309063 130.885036,2.26851757 L129.287939,2.26851757 L129.287939,6.41211757 L131.877157,6.41211757 Z" }), _jsx("polygon", { fill: symbolColor, points: "150.825519 4.65625824 149.752873 9.89656716 144.843891 11.5521149 141.007554 7.96730021 142.080201 2.7269913 146.990216 1.07147567" })] }) }) }) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SVGAttributes } from "react";
|
|
2
|
+
type IndieTabletopClubSymbolProps = Omit<SVGAttributes<SVGElement>, "width" | "height" | "viewBox"> & {
|
|
3
|
+
backgroundColor?: string;
|
|
4
|
+
symbolColor?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function IndieTabletopClubSymbol(props: IndieTabletopClubSymbolProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function IndieTabletopClubSymbol(props) {
|
|
3
|
+
const { symbolColor = "#FF5937", backgroundColor = "#F0F0F0", ...svgProps } = props;
|
|
4
|
+
return (_jsx("svg", { ...svgProps, width: "65px", height: "65px", viewBox: "0 0 65 65", children: _jsxs("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: [_jsx("rect", { fill: backgroundColor, x: "0", y: "0", width: "65", height: "65", rx: "11" }), _jsx("polygon", { fill: symbolColor, fillRule: "nonzero", points: "52.2105164 26.1156583 47.8803714 46.1156174 28.0633944 52.4341166 12.5765623 38.7524522 16.9067073 18.7524931 36.7278519 12.4341166" })] }) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IndieTabletopClubSymbol } from "./IndieTabletopClubSymbol.js";
|
|
3
|
+
import { letterhead } from "./internal.css.js";
|
|
4
|
+
import { LetterheadFooter } from "./LetterheadFooter.js";
|
|
5
|
+
export function Letterhead(props) {
|
|
6
|
+
const { children, headerIcon = true } = props;
|
|
7
|
+
return (_jsxs("div", { className: letterhead, children: [headerIcon && (_jsx(IndieTabletopClubSymbol, { style: {
|
|
8
|
+
marginBlock: "-1rem 1rem",
|
|
9
|
+
marginInline: "auto",
|
|
10
|
+
display: "block",
|
|
11
|
+
inlineSize: "2.5rem",
|
|
12
|
+
blockSize: "2.5rem",
|
|
13
|
+
} })), children, _jsx(LetterheadFooter, {})] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LetterheadFooter(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { interactiveText } from "./common.css.js";
|
|
3
|
+
import { ExternalLink } from "./ExternalLink.js";
|
|
4
|
+
import { IndieTabletopClubLogo } from "./IndieTabletopClubLogo.js";
|
|
5
|
+
export function LetterheadFooter() {
|
|
6
|
+
return (_jsxs("div", { style: {
|
|
7
|
+
textAlign: "center",
|
|
8
|
+
paddingBlockStart: "2rem",
|
|
9
|
+
borderBlockStart: "1px solid #ececec",
|
|
10
|
+
marginBlockStart: "3rem",
|
|
11
|
+
}, children: [_jsx(IndieTabletopClubLogo, { style: { margin: "0 auto 1.125rem" } }), _jsxs("p", { style: {
|
|
12
|
+
margin: "0 auto",
|
|
13
|
+
maxInlineSize: "25rem",
|
|
14
|
+
fontSize: "0.875rem",
|
|
15
|
+
lineHeight: "1.25rem",
|
|
16
|
+
}, children: ["Indie Tabletop Club supports independent game creators with high\u2011quality digital tools.", " ", _jsx(ExternalLink, { href: "https://indietabletop.club", className: interactiveText, children: "Learn more" }), "."] })] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
3
|
+
import { animationDelay, dot } from "./internal.css.js";
|
|
4
|
+
export function LoadingIndicator(props) {
|
|
5
|
+
const diameter = 10;
|
|
6
|
+
const radius = diameter / 2;
|
|
7
|
+
const gap = diameter;
|
|
8
|
+
const cy = diameter;
|
|
9
|
+
const height = cy * 2;
|
|
10
|
+
const width = diameter * 3 + gap;
|
|
11
|
+
const initialDelay = 300;
|
|
12
|
+
const interBounceDelay = 150;
|
|
13
|
+
return (_jsx("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, className: props.className, children: _jsx("g", { stroke: "none", fill: "inherit", children: Array.from({ length: 3 }, (_, index) => {
|
|
14
|
+
const delay = `${initialDelay + interBounceDelay * index}ms`;
|
|
15
|
+
return (_jsx("circle", { cx: radius * (index + 1) + gap * index, cy: cy, r: radius, className: dot, style: assignInlineVars({ [animationDelay]: delay }) }, index));
|
|
16
|
+
}) }) }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This component handles the installation of a service worker.
|
|
4
|
+
*
|
|
5
|
+
* Currently it doesn't do much, but, eventually, it should provide context
|
|
6
|
+
* to nested components communicating the status of the service worker installation.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ServiceWorkerHandler(props: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
path: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* This component handles the installation of a service worker.
|
|
5
|
+
*
|
|
6
|
+
* Currently it doesn't do much, but, eventually, it should provide context
|
|
7
|
+
* to nested components communicating the status of the service worker installation.
|
|
8
|
+
*/
|
|
9
|
+
export function ServiceWorkerHandler(props) {
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
async function registerWorker() {
|
|
12
|
+
// Although modern browsers all support service workers, native app's
|
|
13
|
+
// web views (eg. the Facebook app's embedded browsers) do not.
|
|
14
|
+
if ("serviceWorker" in navigator) {
|
|
15
|
+
try {
|
|
16
|
+
const registration = await navigator.serviceWorker.register(props.path);
|
|
17
|
+
console.info("Service worker registration obtained.");
|
|
18
|
+
registration.addEventListener("updatefound", () => {
|
|
19
|
+
const worker = registration.installing;
|
|
20
|
+
console.info("Installing new service worker.");
|
|
21
|
+
worker?.addEventListener("statechange", ({ target }) => {
|
|
22
|
+
if (target instanceof ServiceWorker) {
|
|
23
|
+
console.info(`Service worker state changed: '${target.state}'.`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
// In rare cases, service worker installation can fail, e.g. due to network
|
|
30
|
+
// connectivity. There is no need to report the error as there is nothing
|
|
31
|
+
// that can be done to prevent this from occassionally happening.
|
|
32
|
+
console.error(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
void registerWorker();
|
|
37
|
+
// Note that it is not necessary to 'cleanup' the registration in
|
|
38
|
+
// the useEffect hook. Calling register() multiple times is a no-op.
|
|
39
|
+
// See https://web.dev/articles/service-workers-registration#subsequent_visits
|
|
40
|
+
}, [props.path]);
|
|
41
|
+
return _jsx(_Fragment, { children: props.children });
|
|
42
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { keyframes } from "@vanilla-extract/css";
|
|
2
|
+
export const fadeIn = keyframes({
|
|
3
|
+
from: { opacity: 0 },
|
|
4
|
+
to: { opacity: 1 },
|
|
5
|
+
});
|
|
6
|
+
export const slideUp = keyframes({
|
|
7
|
+
from: { transform: `translateY(100%)` },
|
|
8
|
+
to: { transform: `translateY(0)` },
|
|
9
|
+
});
|
|
10
|
+
export const bounce = keyframes({
|
|
11
|
+
"0%": { transform: "translateY(0)" },
|
|
12
|
+
"20%": { transform: "translateY(-20%)" },
|
|
13
|
+
"50%": { transform: "translateY(0)" },
|
|
14
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { Hover, MinWidth } from "./media.js";
|
|
3
|
+
export const itcSymbol = style({
|
|
4
|
+
inlineSize: "2.5rem",
|
|
5
|
+
blockSize: "2.5rem",
|
|
6
|
+
margin: "0rem auto 0.75rem",
|
|
7
|
+
"@media": {
|
|
8
|
+
[MinWidth.MEDIUM]: {
|
|
9
|
+
marginBlock: "-1rem 1.5rem",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export const manofa = style({
|
|
14
|
+
fontFamily: `"manofa", sans-serif`,
|
|
15
|
+
});
|
|
16
|
+
export const minion = style({
|
|
17
|
+
fontFamily: `"minion-pro", serif`,
|
|
18
|
+
});
|
|
19
|
+
export const itcCard = style([
|
|
20
|
+
minion,
|
|
21
|
+
{
|
|
22
|
+
backgroundColor: "white",
|
|
23
|
+
},
|
|
24
|
+
]);
|
|
25
|
+
export const interactiveText = style({
|
|
26
|
+
display: "inline",
|
|
27
|
+
textDecoration: "underline",
|
|
28
|
+
textDecorationColor: "hsl(from currentcolor h s l / 0.3)",
|
|
29
|
+
textUnderlineOffset: "0.15em",
|
|
30
|
+
"@media": {
|
|
31
|
+
[Hover.HOVER]: {
|
|
32
|
+
transition: "text-decoration-color 200ms",
|
|
33
|
+
":hover": {
|
|
34
|
+
textDecorationColor: "hsl(from currentcolor h s l / 1)",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { globalStyle } from "@vanilla-extract/css";
|
|
2
|
+
globalStyle(":root", {
|
|
3
|
+
fontSynthesis: "none",
|
|
4
|
+
textRendering: "optimizeLegibility",
|
|
5
|
+
WebkitFontSmoothing: "antialiased",
|
|
6
|
+
MozOsxFontSmoothing: "grayscale",
|
|
7
|
+
});
|
|
8
|
+
globalStyle("*", {
|
|
9
|
+
boxSizing: "border-box",
|
|
10
|
+
});
|
|
11
|
+
globalStyle("img, picture, svg", {
|
|
12
|
+
display: "block",
|
|
13
|
+
});
|
|
14
|
+
globalStyle("a", {
|
|
15
|
+
display: "block",
|
|
16
|
+
color: "inherit",
|
|
17
|
+
textDecoration: "none",
|
|
18
|
+
});
|
|
19
|
+
globalStyle("input, textarea", {
|
|
20
|
+
fontFamily: "inherit",
|
|
21
|
+
});
|
|
22
|
+
globalStyle("button", {
|
|
23
|
+
display: "block",
|
|
24
|
+
fontSize: "inherit",
|
|
25
|
+
fontFamily: "inherit",
|
|
26
|
+
backgroundColor: "transparent",
|
|
27
|
+
border: "none",
|
|
28
|
+
color: "inherit",
|
|
29
|
+
cursor: "pointer",
|
|
30
|
+
padding: 0,
|
|
31
|
+
});
|
|
32
|
+
globalStyle("body, h1, h2, h3, h4, h5, h6, p, ul, li, ol", {
|
|
33
|
+
margin: 0,
|
|
34
|
+
padding: 0,
|
|
35
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
+
export * from "./ExternalLink.tsx";
|
|
2
|
+
export * from "./FormSubmitButton.tsx";
|
|
3
|
+
export * from "./FullscreenDismissBlocker.tsx";
|
|
4
|
+
export * from "./IndieTabletopClubSymbol.tsx";
|
|
5
|
+
export * from "./LetterheadFooter.tsx";
|
|
6
|
+
export * from "./LoadingIndicator.tsx";
|
|
7
|
+
export * from "./ServiceWorkerHandler.tsx";
|
|
8
|
+
export * from "./use-async-op.ts";
|
|
9
|
+
export * from "./use-document-background-color.ts";
|
|
10
|
+
export * from "./use-form.ts";
|
|
11
|
+
export * from "./use-is-installed.ts";
|
|
12
|
+
export * from "./use-media-query.ts";
|
|
13
|
+
export * from "./use-reverting-state.ts";
|
|
14
|
+
export * from "./use-scroll-restoration.ts";
|
|
1
15
|
export * from "./append-copy-to-text.ts";
|
|
2
16
|
export * from "./async-op.ts";
|
|
3
17
|
export * from "./caught-value.ts";
|
|
4
18
|
export * from "./class-names.ts";
|
|
5
19
|
export * from "./client.ts";
|
|
6
|
-
export * from "./
|
|
20
|
+
export * from "./media.ts";
|
|
7
21
|
export * from "./structs.ts";
|
|
8
22
|
export * from "./types.ts";
|
|
9
|
-
export * from "./use-async-op.ts";
|
|
10
|
-
export * from "./use-document-background-color.ts";
|
|
11
|
-
export * from "./use-is-installed.ts";
|
|
12
|
-
export * from "./use-media-query.ts";
|
|
13
|
-
export * from "./use-reverting-state.ts";
|
|
14
|
-
export * from "./use-scroll-restoration.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
// Components
|
|
2
|
+
export * from "./ExternalLink.js";
|
|
3
|
+
export * from "./FormSubmitButton.js";
|
|
4
|
+
export * from "./FullscreenDismissBlocker.js";
|
|
5
|
+
export * from "./IndieTabletopClubSymbol.js";
|
|
6
|
+
export * from "./LetterheadFooter.js";
|
|
7
|
+
export * from "./LoadingIndicator.js";
|
|
8
|
+
export * from "./ServiceWorkerHandler.js";
|
|
9
|
+
// Hooks
|
|
10
|
+
export * from "./use-async-op.js";
|
|
11
|
+
export * from "./use-document-background-color.js";
|
|
12
|
+
export * from "./use-form.js";
|
|
13
|
+
export * from "./use-is-installed.js";
|
|
14
|
+
export * from "./use-media-query.js";
|
|
15
|
+
export * from "./use-reverting-state.js";
|
|
16
|
+
export * from "./use-scroll-restoration.js";
|
|
17
|
+
// Utils
|
|
1
18
|
export * from "./append-copy-to-text.js";
|
|
2
19
|
export * from "./async-op.js";
|
|
3
20
|
export * from "./caught-value.js";
|
|
4
21
|
export * from "./class-names.js";
|
|
5
22
|
export * from "./client.js";
|
|
6
|
-
export * from "./
|
|
23
|
+
export * from "./media.js";
|
|
7
24
|
export * from "./structs.js";
|
|
8
25
|
export * from "./types.js";
|
|
9
|
-
export * from "./use-async-op.js";
|
|
10
|
-
export * from "./use-document-background-color.js";
|
|
11
|
-
export * from "./use-is-installed.js";
|
|
12
|
-
export * from "./use-media-query.js";
|
|
13
|
-
export * from "./use-reverting-state.js";
|
|
14
|
-
export * from "./use-scroll-restoration.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createVar, style } from "@vanilla-extract/css";
|
|
2
|
+
import { bounce } from "./animations.css.js";
|
|
3
|
+
import { minion } from "./common.css.js";
|
|
4
|
+
export const animationDelay = createVar();
|
|
5
|
+
export const dot = style({
|
|
6
|
+
fill: "currentcolor",
|
|
7
|
+
opacity: 0.8,
|
|
8
|
+
animation: `${bounce} 2s ${animationDelay} infinite`,
|
|
9
|
+
});
|
|
10
|
+
export const padding = createVar();
|
|
11
|
+
export const letterhead = style([
|
|
12
|
+
minion,
|
|
13
|
+
{
|
|
14
|
+
vars: { [padding]: "clamp(1rem, 8vw, 4rem)" },
|
|
15
|
+
backgroundColor: "white",
|
|
16
|
+
padding: `max(1rem, calc(${padding} - .5rem)) ${padding} ${padding}`,
|
|
17
|
+
borderRadius: "1rem",
|
|
18
|
+
marginInline: "auto",
|
|
19
|
+
maxInlineSize: "36rem",
|
|
20
|
+
},
|
|
21
|
+
]);
|
package/dist/media.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
|
|
3
|
+
*/
|
|
4
|
+
export declare enum PrefersColorScheme {
|
|
5
|
+
LIGHT = "(prefers-color-scheme: light)",
|
|
6
|
+
DARK = "(prefers-color-scheme: dark)"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
|
|
10
|
+
*/
|
|
11
|
+
export declare enum PrefersReducedMotion {
|
|
12
|
+
NO_PREFERENCE = "(prefers-reduced-motion: no-preference)",
|
|
13
|
+
REDUCE = "(prefers-reduced-motion: reduce)"
|
|
14
|
+
}
|
|
15
|
+
export declare enum Hover {
|
|
16
|
+
NONE = "(hover: none)",
|
|
17
|
+
HOVER = "(hover: hover) and (pointer: fine)"
|
|
18
|
+
}
|
|
19
|
+
export declare enum MediaType {
|
|
20
|
+
PRINT = "print",
|
|
21
|
+
SCREEN = "screen"
|
|
22
|
+
}
|
|
23
|
+
export declare enum MinHeight {
|
|
24
|
+
TALL = "(min-height: 40em)"
|
|
25
|
+
}
|
|
26
|
+
export declare enum MinWidth {
|
|
27
|
+
SMALL = "(min-width: 28em)",
|
|
28
|
+
MEDIUM = "(min-width: 50em)",
|
|
29
|
+
WIDE = "(min-width: 66em)",
|
|
30
|
+
X_WIDE = "(min-width: 80em)",
|
|
31
|
+
XX_WIDE = "(min-width: 140em)"
|
|
32
|
+
}
|
|
33
|
+
export declare enum DisplayMode {
|
|
34
|
+
STANDALONE = "(display-mode: standalone)"
|
|
35
|
+
}
|
|
36
|
+
export declare enum Pointer {
|
|
37
|
+
COARSE = "(pointer: coarse)",
|
|
38
|
+
FINE = "(pointer: fine)"
|
|
39
|
+
}
|
package/dist/media.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
|
|
3
|
+
*/
|
|
4
|
+
export var PrefersColorScheme;
|
|
5
|
+
(function (PrefersColorScheme) {
|
|
6
|
+
PrefersColorScheme["LIGHT"] = "(prefers-color-scheme: light)";
|
|
7
|
+
PrefersColorScheme["DARK"] = "(prefers-color-scheme: dark)";
|
|
8
|
+
})(PrefersColorScheme || (PrefersColorScheme = {}));
|
|
9
|
+
/**
|
|
10
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
|
|
11
|
+
*/
|
|
12
|
+
export var PrefersReducedMotion;
|
|
13
|
+
(function (PrefersReducedMotion) {
|
|
14
|
+
PrefersReducedMotion["NO_PREFERENCE"] = "(prefers-reduced-motion: no-preference)";
|
|
15
|
+
PrefersReducedMotion["REDUCE"] = "(prefers-reduced-motion: reduce)";
|
|
16
|
+
})(PrefersReducedMotion || (PrefersReducedMotion = {}));
|
|
17
|
+
export var Hover;
|
|
18
|
+
(function (Hover) {
|
|
19
|
+
Hover["NONE"] = "(hover: none)";
|
|
20
|
+
// Some Samsung phones incorrectly report that they have "hover" even though they
|
|
21
|
+
// do not. Adding the pointer query correctly filters these phones out.
|
|
22
|
+
Hover["HOVER"] = "(hover: hover) and (pointer: fine)";
|
|
23
|
+
})(Hover || (Hover = {}));
|
|
24
|
+
export var MediaType;
|
|
25
|
+
(function (MediaType) {
|
|
26
|
+
MediaType["PRINT"] = "print";
|
|
27
|
+
MediaType["SCREEN"] = "screen";
|
|
28
|
+
})(MediaType || (MediaType = {}));
|
|
29
|
+
export var MinHeight;
|
|
30
|
+
(function (MinHeight) {
|
|
31
|
+
MinHeight["TALL"] = "(min-height: 40em)";
|
|
32
|
+
})(MinHeight || (MinHeight = {}));
|
|
33
|
+
export var MinWidth;
|
|
34
|
+
(function (MinWidth) {
|
|
35
|
+
MinWidth["SMALL"] = "(min-width: 28em)";
|
|
36
|
+
MinWidth["MEDIUM"] = "(min-width: 50em)";
|
|
37
|
+
MinWidth["WIDE"] = "(min-width: 66em)";
|
|
38
|
+
MinWidth["X_WIDE"] = "(min-width: 80em)";
|
|
39
|
+
MinWidth["XX_WIDE"] = "(min-width: 140em)";
|
|
40
|
+
})(MinWidth || (MinWidth = {}));
|
|
41
|
+
export var DisplayMode;
|
|
42
|
+
(function (DisplayMode) {
|
|
43
|
+
DisplayMode["STANDALONE"] = "(display-mode: standalone)";
|
|
44
|
+
})(DisplayMode || (DisplayMode = {}));
|
|
45
|
+
export var Pointer;
|
|
46
|
+
(function (Pointer) {
|
|
47
|
+
Pointer["COARSE"] = "(pointer: coarse)";
|
|
48
|
+
Pointer["FINE"] = "(pointer: fine)";
|
|
49
|
+
})(Pointer || (Pointer = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type FormStoreState } from "@ariakit/react";
|
|
2
|
+
import { Failure, Success } from "@indietabletop/appkit/async-op";
|
|
3
|
+
type Validator<T> = (value: T) => string | null;
|
|
4
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
5
|
+
export declare function useForm<T extends object, R>(props: {
|
|
6
|
+
defaultValues: T;
|
|
7
|
+
validate?: {
|
|
8
|
+
[K in keyof T]?: Validator<T[K]>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Handles form submission login.
|
|
12
|
+
*
|
|
13
|
+
* This function should return a Success or Failure. Failures should always contain a string
|
|
14
|
+
* which will be used as the form error message.
|
|
15
|
+
*/
|
|
16
|
+
onSubmit: (state: FormStoreState<T>) => MaybePromise<Success<R> | Failure<string>>;
|
|
17
|
+
/**
|
|
18
|
+
* If submission was successful (i.e. onSubmit returned a Success), will be run to perform any
|
|
19
|
+
* side-effect necessary.
|
|
20
|
+
*
|
|
21
|
+
* Typically this is used for navigation on mutating some local state.
|
|
22
|
+
*/
|
|
23
|
+
onSuccess?: (value: R, state: FormStoreState<T>) => MaybePromise<void>;
|
|
24
|
+
}): {
|
|
25
|
+
form: import("@ariakit/react").FormStore<T>;
|
|
26
|
+
submitName: string;
|
|
27
|
+
op: Success<R> | Failure<string> | null;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
package/dist/use-form.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useFormStore } from "@ariakit/react";
|
|
2
|
+
import { Failure, Success } from "@indietabletop/appkit/async-op";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
export function useForm(props) {
|
|
5
|
+
const submitName = "submit";
|
|
6
|
+
const [op, setOp] = useState(null);
|
|
7
|
+
const form = useFormStore({
|
|
8
|
+
defaultValues: props.defaultValues,
|
|
9
|
+
});
|
|
10
|
+
form.useSubmit(async (state) => {
|
|
11
|
+
const submitOp = await props.onSubmit(state);
|
|
12
|
+
if (submitOp.isFailure) {
|
|
13
|
+
form.setError(submitName, submitOp.failure);
|
|
14
|
+
}
|
|
15
|
+
if (submitOp.isSuccess) {
|
|
16
|
+
await props.onSuccess?.(submitOp.value, state);
|
|
17
|
+
}
|
|
18
|
+
setOp(submitOp);
|
|
19
|
+
});
|
|
20
|
+
form.useValidate((state) => {
|
|
21
|
+
if (props.validate) {
|
|
22
|
+
const entries = Object.entries(props.validate);
|
|
23
|
+
for (const [key, validate] of entries) {
|
|
24
|
+
const value = state.values[key];
|
|
25
|
+
const message = validate(value);
|
|
26
|
+
if (message) {
|
|
27
|
+
form.setError(key, message);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return { form, submitName, op };
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indietabletop/appkit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-1",
|
|
4
4
|
"description": "A collection of modules used in apps built by Indie Tabletop Club",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"release": "
|
|
8
|
+
"release": "np",
|
|
9
9
|
"build": "tsc",
|
|
10
|
-
"
|
|
10
|
+
"dev": "tsc --watch",
|
|
11
|
+
"test": "vitest",
|
|
12
|
+
"prepare": "npm run build"
|
|
11
13
|
},
|
|
12
14
|
"exports": {
|
|
13
15
|
".": "./dist/index.js",
|
|
@@ -29,6 +31,9 @@
|
|
|
29
31
|
"vitest": "^3.0.5"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
34
|
+
"@ariakit/react": "^0.4.17",
|
|
35
|
+
"@vanilla-extract/css": "^1.17.2",
|
|
36
|
+
"@vanilla-extract/dynamic": "^2.1.3",
|
|
32
37
|
"superstruct": "^2.0.2"
|
|
33
38
|
}
|
|
34
39
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { ConfigEnv, PluginOption, UserConfig } from "vite";
|
|
2
|
-
export declare function defineNetlifyConfig(props: {
|
|
3
|
-
/**
|
|
4
|
-
* The server port number.
|
|
5
|
-
*
|
|
6
|
-
* Game apps start from 8000, automation apps from 9000. So far, we got:
|
|
7
|
-
*
|
|
8
|
-
* - API: 8000
|
|
9
|
-
* - Hobgoblin: 8001
|
|
10
|
-
* - Eternol: 8002
|
|
11
|
-
* - Gregbot: 9000
|
|
12
|
-
*/
|
|
13
|
-
port: number;
|
|
14
|
-
/**
|
|
15
|
-
* By default, react and vanilla extract are always configured.
|
|
16
|
-
*/
|
|
17
|
-
additionalPlugins?: PluginOption[];
|
|
18
|
-
/**
|
|
19
|
-
* Can be used to import from `@` at the path specified here. Has to match
|
|
20
|
-
* tsconfig > compilerOptions > paths.
|
|
21
|
-
*
|
|
22
|
-
* Do not use this, just use relative imports.
|
|
23
|
-
*
|
|
24
|
-
* @deprecated
|
|
25
|
-
*/
|
|
26
|
-
resolveAlias?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Determines whether input is "/index.html", or "index.html" or
|
|
29
|
-
* "/src/main.tsx" depnending on command.
|
|
30
|
-
*
|
|
31
|
-
* This is useful when using pre-rendered HTML as input.
|
|
32
|
-
*/
|
|
33
|
-
conditionalInput?: boolean;
|
|
34
|
-
}): ({ command }: ConfigEnv) => UserConfig;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { vanillaExtractPlugin as vanilla } from "@vanilla-extract/vite-plugin";
|
|
2
|
-
import react from "@vitejs/plugin-react";
|
|
3
|
-
export function defineNetlifyConfig(props) {
|
|
4
|
-
const { additionalPlugins = [], conditionalInput = false, resolveAlias, } = props;
|
|
5
|
-
return function configureVite({ command }) {
|
|
6
|
-
return {
|
|
7
|
-
define: {
|
|
8
|
-
// These vars are supplied by Netlify
|
|
9
|
-
BRANCH: JSON.stringify(process.env.BRANCH),
|
|
10
|
-
COMMIT_SHORTCODE: JSON.stringify(process.env.COMMIT_REF?.slice(0, 7)),
|
|
11
|
-
},
|
|
12
|
-
plugins: [react(), vanilla(), ...additionalPlugins],
|
|
13
|
-
esbuild: {
|
|
14
|
-
target: "es2022",
|
|
15
|
-
},
|
|
16
|
-
server: {
|
|
17
|
-
port: props.port,
|
|
18
|
-
},
|
|
19
|
-
resolve: {
|
|
20
|
-
alias: resolveAlias ? { "@": resolveAlias } : undefined,
|
|
21
|
-
},
|
|
22
|
-
build: {
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
manifest: true,
|
|
25
|
-
rollupOptions: {
|
|
26
|
-
// During `build`, we want to only deal with JS files. Production HTML
|
|
27
|
-
// entrypoint is generated via the `build:entrypoint` package script.
|
|
28
|
-
input: conditionalInput && command === "build"
|
|
29
|
-
? "/src/main.tsx"
|
|
30
|
-
: "/index.html",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
}
|
|
File without changes
|