aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-03-12 15:30:37 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-03-12 15:30:37 +0100
commitd6362582e1476b7d684bb017cccac060b7dcc0cd (patch)
tree4f9d6a9e22e6e3fce8af30f2669f2da5bd372654
parentc282cd56a26d18dccee31bbc5508e929bd81e390 (diff)
downloadmem-estrogen-zone-d6362582e1476b7d684bb017cccac060b7dcc0cd.tar.gz
mem-estrogen-zone-d6362582e1476b7d684bb017cccac060b7dcc0cd.tar.bz2
mem-estrogen-zone-d6362582e1476b7d684bb017cccac060b7dcc0cd.tar.lz
mem-estrogen-zone-d6362582e1476b7d684bb017cccac060b7dcc0cd.zip

fix: skip anim classes shouldnt be needed

-rw-r--r--src/routes/anim-gen.ts55
-rw-r--r--src/routes/shared.ts49
2 files changed, 52 insertions, 52 deletions
diff --git a/src/routes/anim-gen.ts b/src/routes/anim-gen.ts
index b91e088..67b1d6f 100644
--- a/src/routes/anim-gen.ts
+++ b/src/routes/anim-gen.ts
@@ -461,43 +461,36 @@ ${hiddenStageStyles}
margin-right: 100vw;
}
${ttyLines
- .flatMap((v) =>
- v.kind === 'text'
- ? [
- ...v.value.map((v) => ({
- kind: 'text' as const,
- ...v,
- })),
- ]
- : [],
- )
- .flatMap((v) => [
- ...(v.kind === 'text'
- ? [
- v.colour
- ? `.ttytext-block.text-\\[\\${v.colour}\\]{color:${v.colour};}`
- : '',
- v.bg ? `.ttytext-block.bg-\\[\\${v.bg}\\]{background:${v.bg};}` : '',
- ]
- : []),
- ])
- .filter((v, i, a) => v.length !== 0 && a.indexOf(v) === i)
- .join('\n')}
+ .flatMap((v) =>
+ v.kind === 'text'
+ ? [
+ ...v.value.map((v) => ({
+ kind: 'text' as const,
+ ...v,
+ })),
+ ]
+ : [],
+ )
+ .flatMap((v) => [
+ ...(v.kind === 'text'
+ ? [
+ v.colour
+ ? `.ttytext-block.text-\\[\\${v.colour}\\]{color:${v.colour};}`
+ : '',
+ v.bg ? `.ttytext-block.bg-\\[\\${v.bg}\\]{background:${v.bg};}` : '',
+ ]
+ : []),
+ ])
+ .filter((v, i, a) => v.length !== 0 && a.indexOf(v) === i)
+ .join('\n')}
`,
)
.join('')}
-${[...anim.exportToObject().values()]
- .map((v) => `#app.skip-animation ${v.selector}`)
- .join(',\n')} {
- animation-name: none;
- animation-duration: 0.01ms;
-}
`;
fs.writeFileSync(
'src/routes/anim.css',
`${comment}
-${
- esbuild.buildSync({
+${esbuild.buildSync({
stdin: {
contents: `${exported}
${tail}`,
@@ -506,7 +499,7 @@ ${tail}`,
write: false,
minify: false,
}).outputFiles![0].text
-}`,
+ }`,
);
fs.writeFileSync(
'src/routes/no-anim.css',
diff --git a/src/routes/shared.ts b/src/routes/shared.ts
index dd7f959..0d198bf 100644
--- a/src/routes/shared.ts
+++ b/src/routes/shared.ts
@@ -37,37 +37,37 @@ export type RenderBlock = {
italic?: boolean;
underlined?: boolean;
url?:
- | `newtab:${string}`
- | `currenttab:${string}`
- | ((textObj: TTYText & { kind: 'text' }) => void);
+ | `newtab:${string}`
+ | `currenttab:${string}`
+ | ((textObj: TTYText & { kind: 'text' }) => void);
bg?: string;
raw?: boolean;
dl?: string;
};
export type TTYText =
| {
- kind: 'text';
- renderrestriction?: 'everywhere' | 'js-only' | 'noscript';
- value: RenderBlock[];
- id: string;
- classes: string[];
- }
+ kind: 'text';
+ renderrestriction?: 'everywhere' | 'js-only' | 'noscript';
+ value: RenderBlock[];
+ id: string;
+ classes: string[];
+ }
| {
- kind: 'removeNode';
- removedId: string;
- removedItemClassList: string[];
- }
+ kind: 'removeNode';
+ removedId: string;
+ removedItemClassList: string[];
+ }
| {
- kind: 'time';
- delay: number;
- }
+ kind: 'time';
+ delay: number;
+ }
| {
- kind: 'cursorVisibility';
- visible: boolean;
- }
+ kind: 'cursorVisibility';
+ visible: boolean;
+ }
| {
- kind: 'clear';
- };
+ kind: 'clear';
+ };
export type Only<Obj, Keys extends keyof Obj> = {
[k in Keys]: Obj[k];
};
@@ -580,6 +580,13 @@ export const ttyLines: TTYText[] = (() => {
},
],
]);
+ wait(100);
+ text([
+ '\nDid you know: this is all pure css animation hell.',
+ {
+ colour: '#7a7a7a',
+ },
+ ]);
wait(5000);
text([
`<button style="padding: 12px 12px;background: #fff2;margin-top: 0.4rem;border-radius: 0.7rem;opacity:0.1;margin-top:3rem;" data-el="le funny button">have a button :3</button>`,