@turnipxenon/pineapple 3.0.0-alpha-3 → 3.0.0-alpha.10
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/components/blog_template/BlogTemplate.svelte +3 -1
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/dist/components/dialog_manager/DialogManagerStore.d.ts +0 -15
- package/dist/components/dialog_manager/DialogManagerStore.js +0 -15
- package/dist/components/dialog_manager/DialogMangerInit.d.ts +15 -0
- package/dist/components/dialog_manager/DialogMangerInit.js +15 -0
- package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +1 -1
- package/dist/components/dialog_overlay/DialogOverlay.svelte +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -2
- package/dist/components/navigation_component/NavigationComponent.svelte +2 -1
- package/dist/components/navigation_component/NavigationControl.svelte +1 -1
- package/dist/components/pineapple/PineappleBaseLayout.svelte +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styles/turnip-theme.css +64 -64
- package/dist/template/seaweed/entries/ThisWebpage.svelte +1 -1
- package/dist/template/seaweed/entries/WorkExperience.svelte +1 -1
- package/dist/ui/components/SocialSection.svelte +4 -1
- package/dist/ui/components/accordion/PinyaAccordion.svelte +21 -0
- package/dist/ui/components/accordion/PinyaAccordion.svelte.d.ts +8 -0
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte +29 -0
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte.d.ts +9 -0
- package/dist/ui/components/accordion/index.d.ts +2 -0
- package/dist/ui/components/accordion/index.js +2 -0
- package/dist/ui/components/index.d.ts +1 -0
- package/dist/ui/components/index.js +1 -0
- package/dist/{components/ElementVisbilityDetector.svelte → ui/elements/ElementVisibilityDetector.svelte} +6 -3
- package/dist/ui/elements/ElementVisibilityDetector.svelte.d.ts +8 -0
- package/dist/ui/elements/Placeholder.svelte +17 -0
- package/dist/ui/elements/Placeholder.svelte.d.ts +7 -0
- package/dist/ui/elements/index.d.ts +1 -0
- package/dist/ui/elements/index.js +1 -0
- package/dist/ui/elements/pinya-button/component.svelte +2 -1
- package/dist/ui/elements/pinya-button/props.d.ts +1 -0
- package/dist/ui/modules/seaweed/ChumBucket.svelte +5 -4
- package/dist/ui/templates/pinya-page-layout/component.svelte +1 -1
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +5 -5
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +90 -9
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte.d.ts +1 -1
- package/dist/ui/templates/seaweed-layout/props.d.ts +2 -0
- package/package.json +16 -10
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +0 -7
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Card, enableDialogueOverlay, type SimplePageMeta } from "../..";
|
|
3
2
|
import "./blog-template.css";
|
|
4
3
|
import { enableBackground } from "../../store";
|
|
5
4
|
import { onDestroy, onMount } from "svelte";
|
|
6
5
|
import BlogTemplateInner from "./BlogTemplateInner.svelte";
|
|
6
|
+
import type { SimplePageMeta } from "../navigation_component/index";
|
|
7
|
+
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
8
|
+
import { Card } from "../index";
|
|
7
9
|
|
|
8
10
|
// grab page meta from the adjacent meta.json
|
|
9
11
|
interface Props {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { DialogMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
6
6
|
import type { DialogDetail } from "../../types/pineapple_fiber/DialogDetail";
|
|
7
|
-
import { DialogManager } from "./DialogManager";
|
|
8
7
|
/**
|
|
9
8
|
* Enables the dialogue overlay
|
|
10
9
|
*
|
|
@@ -24,17 +23,3 @@ export declare const enableDialogueOverlay: import("svelte/store").Writable<bool
|
|
|
24
23
|
export declare const dialogVariableStore: DialogMapStore;
|
|
25
24
|
export declare const updateRate: number;
|
|
26
25
|
export declare const defaultDialogMessage: DialogDetail[];
|
|
27
|
-
/**
|
|
28
|
-
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
29
|
-
*
|
|
30
|
-
* 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
|
|
31
|
-
* |- TypeError: Cannot read properties of undefined (reading '0')
|
|
32
|
-
* at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
|
|
33
|
-
* at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
|
|
34
|
-
* at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
|
|
35
|
-
* at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
|
|
36
|
-
*
|
|
37
|
-
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
38
|
-
* defaultDialogMessage not yet being initialized
|
|
39
|
-
*/
|
|
40
|
-
export declare const dialogManager: DialogManager;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { createNewMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
6
6
|
import { writable } from "svelte/store";
|
|
7
|
-
import { DialogManager } from "./DialogManager";
|
|
8
7
|
/**
|
|
9
8
|
* Enables the dialogue overlay
|
|
10
9
|
*
|
|
@@ -29,17 +28,3 @@ export const defaultDialogMessage = [
|
|
|
29
28
|
textContent: `<p>I don't really have anything to say. Have you drank water? Or perhaps, you've checked out <a target="_blank" class="external-link" href="http://crouton.net">one of the best webpages</a> out there?`
|
|
30
29
|
}
|
|
31
30
|
];
|
|
32
|
-
/**
|
|
33
|
-
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
34
|
-
*
|
|
35
|
-
* 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
|
|
36
|
-
* |- TypeError: Cannot read properties of undefined (reading '0')
|
|
37
|
-
* at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
|
|
38
|
-
* at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
|
|
39
|
-
* at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
|
|
40
|
-
* at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
|
|
41
|
-
*
|
|
42
|
-
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
43
|
-
* defaultDialogMessage not yet being initialized
|
|
44
|
-
*/
|
|
45
|
-
export const dialogManager = new DialogManager();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DialogManager } from "./DialogManager";
|
|
2
|
+
/**
|
|
3
|
+
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
4
|
+
*
|
|
5
|
+
* 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
|
|
6
|
+
* |- TypeError: Cannot read properties of undefined (reading '0')
|
|
7
|
+
* at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
|
|
8
|
+
* at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
|
|
9
|
+
* at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
|
|
10
|
+
* at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
|
|
11
|
+
*
|
|
12
|
+
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
13
|
+
* defaultDialogMessage not yet being initialized
|
|
14
|
+
*/
|
|
15
|
+
export declare const dialogManager: DialogManager;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DialogManager } from "./DialogManager";
|
|
2
|
+
/**
|
|
3
|
+
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
4
|
+
*
|
|
5
|
+
* 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
|
|
6
|
+
* |- TypeError: Cannot read properties of undefined (reading '0')
|
|
7
|
+
* at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
|
|
8
|
+
* at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
|
|
9
|
+
* at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
|
|
10
|
+
* at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
|
|
11
|
+
*
|
|
12
|
+
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
13
|
+
* defaultDialogMessage not yet being initialized
|
|
14
|
+
*/
|
|
15
|
+
export const dialogManager = new DialogManager();
|
package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BehaviorStatus } from "../../core/BehaviorStatus";
|
|
2
2
|
import { SetVariableNode } from "../SetVariableNode";
|
|
3
|
-
import { dialogManager } from "../../../DialogManagerStore";
|
|
4
3
|
import { btreeUtils } from "../../core/BTreeUtils";
|
|
4
|
+
import { dialogManager } from "../../../DialogMangerInit";
|
|
5
5
|
export class JumpCommand {
|
|
6
6
|
setVariableNode = new SetVariableNode();
|
|
7
7
|
process(nodeArgs) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import AresHappy from "../../assets/characters/ares/ares_happy.webp";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
|
-
import { dialogManager } from "../dialog_manager/DialogManagerStore";
|
|
5
4
|
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
5
|
+
import { dialogManager } from "../dialog_manager/DialogMangerInit";
|
|
6
6
|
|
|
7
7
|
let currentMessage = $state("");
|
|
8
8
|
dialogManager.currentMessage.subscribe((value) => {
|
|
@@ -3,6 +3,6 @@ export { default as Card } from "./Card.svelte";
|
|
|
3
3
|
export { default as Chip } from "./chip/Chip.svelte";
|
|
4
4
|
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
5
5
|
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
7
7
|
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
8
8
|
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
package/dist/components/index.js
CHANGED
|
@@ -4,6 +4,6 @@ export { default as Card } from "./Card.svelte";
|
|
|
4
4
|
export { default as Chip } from "./chip/Chip.svelte";
|
|
5
5
|
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
6
6
|
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
8
8
|
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
9
9
|
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import NavigationControl from "./NavigationControl.svelte";
|
|
3
|
-
import { Card, createGoToFunction } from "../..";
|
|
4
3
|
import { parsePageMeta, type ParsePageMetaCompareFn } from "./PageMeta";
|
|
4
|
+
import { Card } from "../index";
|
|
5
|
+
import { createGoToFunction } from "../../util/util";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
import AresLogo from "../../assets/characters/ares/ares_logo.webp";
|
|
17
17
|
import FABIcon from "../../assets/bg_tiled/bg_tiled_turnip.png";
|
|
18
18
|
import CloseIcon from "../../assets/icons/close.svg";
|
|
19
|
-
import {
|
|
19
|
+
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
20
20
|
import Toast from "./toast/Toast.svelte";
|
|
21
21
|
import DialogOverlay from "../dialog_overlay/DialogOverlay.svelte";
|
|
22
22
|
import { fade } from "svelte/transition";
|
|
23
|
+
import { dialogManager } from "../dialog_manager/DialogMangerInit";
|
|
23
24
|
|
|
24
25
|
interface Props {
|
|
25
26
|
showDialogByDefault?: boolean;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -237,89 +237,89 @@ html.dark {
|
|
|
237
237
|
@variant dark {
|
|
238
238
|
color: var(--color-surface-950);
|
|
239
239
|
}
|
|
240
|
+
/* endregion components */
|
|
241
|
+
}
|
|
242
|
+
}
|
|
240
243
|
|
|
241
|
-
blockquote {
|
|
242
|
-
@apply mb-4;
|
|
243
|
-
font-style: italic;
|
|
244
|
-
border: 0;
|
|
245
|
-
text-align: center;
|
|
246
|
-
filter: brightness(140%);
|
|
247
|
-
}
|
|
248
244
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
245
|
+
blockquote {
|
|
246
|
+
@apply mb-4;
|
|
247
|
+
font-style: italic;
|
|
248
|
+
border: 0;
|
|
249
|
+
text-align: center;
|
|
250
|
+
filter: brightness(140%);
|
|
251
|
+
}
|
|
254
252
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
253
|
+
h1, h2, h3, h4, h5, h6, .fake-h2, .fake-h3, .fake-h4 {
|
|
254
|
+
text-align: center;
|
|
255
|
+
margin-top: 0;
|
|
256
|
+
font-weight: bolder;
|
|
257
|
+
color: var(--color-primary-900);
|
|
259
258
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
@variant dark {
|
|
260
|
+
color: var(--color-primary-100);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p, .fake-h2 + p, .fake-h3 + p, .fake-h4 + p {
|
|
265
|
+
margin-top: 0.5lh;
|
|
266
|
+
}
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
h1 {
|
|
269
|
+
@apply text-4xl;
|
|
270
|
+
}
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
h2, .fake-h2 {
|
|
273
|
+
@apply text-3xl;
|
|
274
|
+
}
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
h3, .fake-h3 {
|
|
277
|
+
@apply text-2xl;
|
|
278
|
+
}
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
h4, .fake-h4 {
|
|
281
|
+
@apply text-xl;
|
|
282
|
+
}
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
h5 {
|
|
285
|
+
@apply text-lg;
|
|
286
|
+
}
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
h6 {
|
|
289
|
+
text-decoration: underline;
|
|
290
|
+
}
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
292
|
+
a {
|
|
293
|
+
text-decoration: underline;
|
|
294
|
+
color: var(--color-secondary-500);
|
|
296
295
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
@variant dark {
|
|
297
|
+
color: var(--color-secondary-300);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
a:hover, a:focus {
|
|
302
|
+
filter: brightness(150%);
|
|
303
|
+
}
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
}
|
|
305
|
+
a:visited {
|
|
306
|
+
color: var(--color-secondary-950);
|
|
308
307
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
@variant dark {
|
|
309
|
+
color: var(--color-secondary-200);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
312
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
ul {
|
|
314
|
+
list-style: inside;
|
|
315
|
+
}
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
ol {
|
|
318
|
+
list-style: decimal inside;
|
|
319
|
+
}
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
p{
|
|
322
|
+
@apply mb-3;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
@theme {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import Card from "../../../components/Card.svelte";
|
|
4
4
|
import GithubIcon from "../../../assets/icons/github-mark.svg";
|
|
5
5
|
import ThisWebsiteFootage from "../../../assets/others/seaweed-showcase.mp4";
|
|
6
|
-
import { Chip } from "
|
|
6
|
+
import { Chip } from "../../../components/index";
|
|
7
7
|
|
|
8
8
|
// noinspection JSUnusedGlobalSymbols
|
|
9
9
|
interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import SocialSection from "../../../ui/components/SocialSection.svelte";
|
|
3
3
|
import Card from "../../../components/Card.svelte";
|
|
4
|
-
import ElementVisibilityDetector from "../../../
|
|
4
|
+
import ElementVisibilityDetector from "../../../ui/elements/ElementVisibilityDetector.svelte";
|
|
5
5
|
import type { EntryProps } from "./EntryProps";
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -63,7 +63,9 @@
|
|
|
63
63
|
<PinyaButton
|
|
64
64
|
buttonVariant={ButtonVariant.SmallIcon}
|
|
65
65
|
title="https://turnipxenon.itch.io/"
|
|
66
|
-
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
66
|
+
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
67
|
+
classes="h-full"
|
|
68
|
+
>
|
|
67
69
|
<ImageIcon src={ItchLogoHotLink} alt="itch icon" />
|
|
68
70
|
{#if (!isSmallVersion)}
|
|
69
71
|
<span>TurnipXenon</span>
|
|
@@ -83,5 +85,6 @@
|
|
|
83
85
|
flex-wrap: wrap;
|
|
84
86
|
justify-content: var(--preferred-justify-content);
|
|
85
87
|
gap: 0.7rem;
|
|
88
|
+
align-items: stretch;
|
|
86
89
|
}
|
|
87
90
|
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
children,
|
|
8
|
+
}: {
|
|
9
|
+
value: string[],
|
|
10
|
+
children: Snippet,
|
|
11
|
+
} = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Accordion
|
|
15
|
+
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
+
{value}
|
|
17
|
+
onValueChange={(e) => (value = e.value)}
|
|
18
|
+
collapsible
|
|
19
|
+
>
|
|
20
|
+
{@render children()}
|
|
21
|
+
</Accordion>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
value: string[];
|
|
4
|
+
children: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const PinyaAccordion: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
7
|
+
type PinyaAccordion = ReturnType<typeof PinyaAccordion>;
|
|
8
|
+
export default PinyaAccordion;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// noinspection ES6UnusedImports
|
|
3
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
value,
|
|
8
|
+
control: controlSnippet,
|
|
9
|
+
panel: panelSnippet,
|
|
10
|
+
}: {
|
|
11
|
+
value: string,
|
|
12
|
+
control: Snippet;
|
|
13
|
+
panel: Snippet;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Accordion.Item
|
|
18
|
+
{value}
|
|
19
|
+
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
+
>
|
|
21
|
+
<!-- Control -->
|
|
22
|
+
{#snippet control()}
|
|
23
|
+
{@render controlSnippet()}
|
|
24
|
+
{/snippet}
|
|
25
|
+
<!-- Panel -->
|
|
26
|
+
{#snippet panel()}
|
|
27
|
+
{@render panelSnippet()}
|
|
28
|
+
{/snippet}
|
|
29
|
+
</Accordion.Item>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
control: Snippet;
|
|
5
|
+
panel: Snippet;
|
|
6
|
+
};
|
|
7
|
+
declare const PinyaAccordionItem: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type PinyaAccordionItem = ReturnType<typeof PinyaAccordionItem>;
|
|
9
|
+
export default PinyaAccordionItem;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import { onMount, type Snippet } from "svelte";
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
isVisible?: boolean;
|
|
6
|
-
children?:
|
|
6
|
+
children?: Snippet;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
let {
|
|
9
|
+
let {
|
|
10
|
+
isVisible = $bindable(true),
|
|
11
|
+
children
|
|
12
|
+
}: Props = $props();
|
|
10
13
|
|
|
11
14
|
let stickyElem: HTMLElement = $state();
|
|
12
15
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
isVisible?: boolean;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const ElementVisibilityDetector: import("svelte").Component<Props, {}, "isVisible">;
|
|
7
|
+
type ElementVisibilityDetector = ReturnType<typeof ElementVisibilityDetector>;
|
|
8
|
+
export default ElementVisibilityDetector;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
isCircle = false,
|
|
4
|
+
classes = '',
|
|
5
|
+
}: {
|
|
6
|
+
isCircle?: boolean;
|
|
7
|
+
classes?: string;
|
|
8
|
+
} = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="
|
|
13
|
+
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
+
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
+
{classes}
|
|
16
|
+
"
|
|
17
|
+
></div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
2
|
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
|
|
3
4
|
export * from "./ColorScheme";
|
|
4
5
|
export * from "./GeneralUIProps";
|
|
5
6
|
export * from "./OnBackground";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
2
|
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
|
|
3
4
|
export * from "./ColorScheme";
|
|
4
5
|
export * from "./GeneralUIProps";
|
|
5
6
|
export * from "./OnBackground";
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
paddingClass = '',
|
|
9
9
|
buttonVariant = ButtonVariant.Default,
|
|
10
10
|
colorClass = '',
|
|
11
|
+
classes = '',
|
|
11
12
|
...props
|
|
12
13
|
}: PinyaButtonProps = $props();
|
|
13
14
|
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
<button
|
|
42
43
|
{...props}
|
|
43
44
|
class:small-icon-button={buttonVariant === ButtonVariant.SmallIcon}
|
|
44
|
-
class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass}`}
|
|
45
|
+
class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass} ${classes}`}
|
|
45
46
|
>
|
|
46
47
|
{@render children()}
|
|
47
48
|
</button>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { type PageMeta } from "
|
|
2
|
+
import { type PageMeta } from "../../../components/navigation_component/index";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
|
+
import Placeholder from "../../elements/Placeholder.svelte";
|
|
4
5
|
|
|
5
6
|
let hasTriedGettingChumBucket = $state(false);
|
|
6
7
|
let pageMetaList: PageMeta[] = $state([]);
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
|
|
28
29
|
<div class="chum-bucket-grid">
|
|
29
30
|
{#if hasTriedGettingChumBucket}
|
|
30
|
-
{#each pageMetaList as pageMeta}
|
|
31
|
+
{#each pageMetaList as pageMeta (pageMeta.title)}
|
|
31
32
|
<div class="chum-bucket-item">
|
|
32
33
|
{#if pageMeta.imageUrl}
|
|
33
34
|
<img src={`https://turnipxenon.com${pageMeta.imageUrl}`}
|
|
@@ -48,8 +49,8 @@
|
|
|
48
49
|
</div>
|
|
49
50
|
{/each}
|
|
50
51
|
{:else}
|
|
51
|
-
{#each { length: 10 } as _}
|
|
52
|
-
<
|
|
52
|
+
{#each { length: 10 } as _, idx (idx)}
|
|
53
|
+
<Placeholder classes="mb-2" />
|
|
53
54
|
{/each}
|
|
54
55
|
{/if}
|
|
55
56
|
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { modals } from "svelte-modals";
|
|
9
9
|
import GeneralSettingsModal from "../../modules/modals/general-settings/GeneralSettingsModal.svelte";
|
|
10
10
|
import { localizeHref } from "../../../paraglide/runtime";
|
|
11
|
-
import { appState } from "
|
|
11
|
+
import { appState } from "./runes.svelte";
|
|
12
12
|
|
|
13
13
|
let {
|
|
14
14
|
children,
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
entryList
|
|
8
8
|
}: ProjectGroup = $props();
|
|
9
9
|
|
|
10
|
-
const isSpecial = entryList.length % 3 === 1;
|
|
10
|
+
const isSpecial = $derived(entryList.length % 3 === 1);
|
|
11
11
|
|
|
12
|
-
let normalUiList: SnippetMeta[] = isSpecial
|
|
12
|
+
let normalUiList: SnippetMeta[] = $derived(isSpecial
|
|
13
13
|
? [...entryList.slice(0, -4)]
|
|
14
|
-
: [...entryList];
|
|
15
|
-
let overflowUiList: SnippetMeta[] = isSpecial
|
|
14
|
+
: [...entryList]);
|
|
15
|
+
let overflowUiList: SnippetMeta[] = $derived(isSpecial
|
|
16
16
|
? [...entryList.slice(-4)]
|
|
17
|
-
: [];
|
|
17
|
+
: []);
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// <!--todo: implement in seaweedlayout #migration-->
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import { fly } from "svelte/transition";
|
|
3
|
+
import type { ProjectGroup, SeaweedLayoutProps } from "./props";
|
|
3
4
|
import ChumBucket from "../../modules/seaweed/ChumBucket.svelte";
|
|
4
5
|
import { PinyaPageLayout } from "../index";
|
|
5
6
|
import { SocialSection } from "../../components/index";
|
|
@@ -9,17 +10,22 @@
|
|
|
9
10
|
import { SvelteMap } from "svelte/reactivity";
|
|
10
11
|
import EntryOrderConfig2 from "./EntryOrderConfig2.svelte";
|
|
11
12
|
import CreateUrlForm from "../../../template/seaweed/CreateUrlForm.svelte";
|
|
13
|
+
import { onMount } from "svelte";
|
|
14
|
+
import { page } from "$app/state";
|
|
12
15
|
|
|
13
16
|
let {
|
|
14
17
|
children,
|
|
15
18
|
sideSection,
|
|
16
19
|
entryList, // todo
|
|
17
|
-
layout
|
|
20
|
+
layout, // todo
|
|
18
21
|
domain = "http://localhost:5173/seaweed2",
|
|
19
|
-
queryTerms
|
|
22
|
+
queryTerms,
|
|
23
|
+
showMiniSocial = false,
|
|
24
|
+
serverParams = ""
|
|
20
25
|
}: SeaweedLayoutProps = $props();
|
|
21
26
|
|
|
22
|
-
let
|
|
27
|
+
let actualLayout = $state(layout);
|
|
28
|
+
let isAdvanceSettingOn = $state(false);
|
|
23
29
|
let orderUrl = $state("");
|
|
24
30
|
|
|
25
31
|
let queryStates = new SvelteMap<string, boolean>(queryTerms.map(term => [term, true]));
|
|
@@ -47,8 +53,8 @@
|
|
|
47
53
|
const chipList: string[] = [];
|
|
48
54
|
const termList: string[] = [];
|
|
49
55
|
queryStates.entries()
|
|
50
|
-
.filter(([
|
|
51
|
-
.forEach(([term
|
|
56
|
+
.filter(([, state]) => state)
|
|
57
|
+
.forEach(([term]) => {
|
|
52
58
|
const qtTerm = `.qt-${term}`;
|
|
53
59
|
termList.push(qtTerm);
|
|
54
60
|
chipList.push(`.text-chip${qtTerm}`);
|
|
@@ -78,6 +84,74 @@
|
|
|
78
84
|
});
|
|
79
85
|
|
|
80
86
|
let advancedUrl = $derived.by(() => `${domain}/?${advancedQuery}`);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/** qt values and what they mean:
|
|
90
|
+
* undefined: set all qt terms to font-weight: bold
|
|
91
|
+
* todo: implement clear
|
|
92
|
+
* clear: unset all terms to font-weight: normal
|
|
93
|
+
* <term>: only set qt-<term> to bold
|
|
94
|
+
* <term1>,<term2>: only set qt-<term1> and qt-<term2> to bold,
|
|
95
|
+
*
|
|
96
|
+
* ONLY CALL INSIDE onMount()
|
|
97
|
+
**/
|
|
98
|
+
const filterSearchParams = (searchParams: URLSearchParams) => {
|
|
99
|
+
// region Order
|
|
100
|
+
const orderParam = searchParams.get("order")?.trim();
|
|
101
|
+
console.log(searchParams);
|
|
102
|
+
console.log(orderParam);
|
|
103
|
+
if (orderParam) {
|
|
104
|
+
actualLayout = [];
|
|
105
|
+
|
|
106
|
+
orderParam.split(",").forEach((groupDefinition, idx) => {
|
|
107
|
+
const pair = groupDefinition.split(":");
|
|
108
|
+
if (pair.length >= 2) {
|
|
109
|
+
const group: ProjectGroup = {
|
|
110
|
+
title: pair[0],
|
|
111
|
+
entryList: [],
|
|
112
|
+
key: `${pair[0]}-${idx}`
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
pair[1].split("|").forEach(key => {
|
|
116
|
+
const component = entryList.find(e => e.key === key);
|
|
117
|
+
if (component) {
|
|
118
|
+
group.entryList.push(component);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
actualLayout.push(group);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
actualLayout = [...actualLayout];
|
|
127
|
+
console.log(actualLayout);
|
|
128
|
+
}
|
|
129
|
+
// endregion
|
|
130
|
+
|
|
131
|
+
// region Bold terms
|
|
132
|
+
const qtValue = searchParams.get("qt")?.trim();
|
|
133
|
+
if (qtValue !== undefined) {
|
|
134
|
+
queryStates.keys()
|
|
135
|
+
.forEach(key => queryStates.set(key, false));
|
|
136
|
+
|
|
137
|
+
if (qtValue !== "clear") {
|
|
138
|
+
qtValue.split(",").forEach((term) => {
|
|
139
|
+
if (queryStates.has(term)) {
|
|
140
|
+
queryStates.set(term, true);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// endregion Bold terms
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
onMount(() => {
|
|
149
|
+
if (serverParams) {
|
|
150
|
+
filterSearchParams(new URLSearchParams(serverParams));
|
|
151
|
+
} else if (page.url.searchParams.size) {
|
|
152
|
+
filterSearchParams(page.url.searchParams);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
81
155
|
</script>
|
|
82
156
|
|
|
83
157
|
<svelte:head>
|
|
@@ -90,7 +164,14 @@
|
|
|
90
164
|
{/snippet}
|
|
91
165
|
<PinyaPageLayout>
|
|
92
166
|
{#snippet appBarLead()}
|
|
93
|
-
|
|
167
|
+
{#if showMiniSocial}
|
|
168
|
+
<div
|
|
169
|
+
class="flex flex-row"
|
|
170
|
+
transition:fly={{x:-10}}
|
|
171
|
+
>
|
|
172
|
+
<SocialSection isSmallVersion={true} />
|
|
173
|
+
</div>
|
|
174
|
+
{/if}
|
|
94
175
|
{/snippet}
|
|
95
176
|
|
|
96
177
|
<div id="upper-section">
|
|
@@ -105,7 +186,7 @@
|
|
|
105
186
|
</div>
|
|
106
187
|
|
|
107
188
|
<!--todo: render list #migration-->
|
|
108
|
-
{#each
|
|
189
|
+
{#each actualLayout as group (group.title)}
|
|
109
190
|
<EntryGroup {...group}></EntryGroup>
|
|
110
191
|
{/each}
|
|
111
192
|
|
|
@@ -143,7 +224,7 @@
|
|
|
143
224
|
</div>
|
|
144
225
|
|
|
145
226
|
<EntryOrderConfig2
|
|
146
|
-
{
|
|
227
|
+
bind:layout={actualLayout}
|
|
147
228
|
bind:orderUrl={orderUrl}
|
|
148
229
|
allEntries={entryList}
|
|
149
230
|
></EntryOrderConfig2>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SeaweedLayoutProps } from "./props";
|
|
2
|
-
declare const SeaweedLayout: import("svelte").Component<SeaweedLayoutProps, {}, "
|
|
2
|
+
declare const SeaweedLayout: import("svelte").Component<SeaweedLayoutProps, {}, "">;
|
|
3
3
|
type SeaweedLayout = ReturnType<typeof SeaweedLayout>;
|
|
4
4
|
export default SeaweedLayout;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turnipxenon/pineapple",
|
|
3
3
|
"description": "personal package for base styling for other personal projects",
|
|
4
|
-
"version": "3.0.0-alpha
|
|
4
|
+
"version": "3.0.0-alpha.10",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build": "vite build && yarn package",
|
|
@@ -18,21 +18,25 @@
|
|
|
18
18
|
"to-dev": "git checkout main && git pull origin main && git branch -d turnip/dev && git checkout -b turnip/dev"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@
|
|
21
|
+
"@eslint/compat": "^1.2.5",
|
|
22
|
+
"@eslint/js": "^9.18.0",
|
|
23
|
+
"@sveltejs/adapter-auto": "^4.0.0",
|
|
22
24
|
"@sveltejs/kit": "^2.5.27",
|
|
23
25
|
"@sveltejs/package": "^2.3.7",
|
|
24
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"eslint": "^
|
|
27
|
-
"eslint-
|
|
28
|
-
"
|
|
29
|
-
"prettier": "^3.2
|
|
30
|
-
"prettier-plugin-svelte": "^3.
|
|
26
|
+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
27
|
+
"eslint": "^9.18.0",
|
|
28
|
+
"eslint-config-prettier": "^10.0.1",
|
|
29
|
+
"eslint-plugin-svelte": "^3.0.0",
|
|
30
|
+
"globals": "^16.0.0",
|
|
31
|
+
"prettier": "^3.4.2",
|
|
32
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
33
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
31
34
|
"prisma": "^5.12.1",
|
|
32
35
|
"svelte-check": "^4.0.0",
|
|
33
36
|
"svelte2tsx": "^0.6.20",
|
|
34
37
|
"tslib": "^2.4.1",
|
|
35
38
|
"typescript": "^5.5.0",
|
|
39
|
+
"typescript-eslint": "^8.20.0",
|
|
36
40
|
"vite": "^5.4.4"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
@@ -40,7 +44,6 @@
|
|
|
40
44
|
"@prisma/client": "^5.12.1",
|
|
41
45
|
"@skeletonlabs/skeleton": "^3.1.0",
|
|
42
46
|
"@skeletonlabs/skeleton-svelte": "^1.0.0",
|
|
43
|
-
"@sveltejs/kit": "^2.5.27",
|
|
44
47
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
45
48
|
"@tailwindcss/vite": "^4.0.14",
|
|
46
49
|
"@types/htmlparser2": "^3.10.7",
|
|
@@ -87,6 +90,9 @@
|
|
|
87
90
|
"src/lib/styles/app.css",
|
|
88
91
|
"src/lib/theme.css"
|
|
89
92
|
],
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=22"
|
|
95
|
+
},
|
|
90
96
|
"repository": "https://github.com/TurnipXenon/pineapple",
|
|
91
97
|
"author": "turnipxenon <turnipxenon@gmail.com>",
|
|
92
98
|
"license": "MIT",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
isVisible?: boolean;
|
|
3
|
-
children?: import('svelte').Snippet;
|
|
4
|
-
}
|
|
5
|
-
declare const ElementVisbilityDetector: import("svelte").Component<Props, {}, "isVisible">;
|
|
6
|
-
type ElementVisbilityDetector = ReturnType<typeof ElementVisbilityDetector>;
|
|
7
|
-
export default ElementVisbilityDetector;
|