@turnipxenon/pineapple 3.0.0-alpha.1 → 3.0.0-alpha.11
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/assets/icons/icon-check-dark-contrast.svg +1 -0
- package/dist/assets/icons/icon-check-light-contrast.svg +1 -0
- package/dist/assets/icons/icon-copy-dark-contrast.svg +1 -0
- package/dist/assets/icons/icon-copy-light-contrast.svg +1 -0
- package/dist/components/PineappleSlideToggle.svelte +12 -6
- package/dist/components/PineappleSlideToggle.svelte.d.ts +3 -2
- 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/app.css +92 -1
- package/dist/styles/turnip-theme.css +65 -61
- package/dist/template/seaweed/CreateUrlForm.svelte +17 -11
- package/dist/template/seaweed/CreateUrlForm.svelte.d.ts +4 -1
- package/dist/template/seaweed/ToastSettings.d.ts +15 -0
- package/dist/template/seaweed/ToastSettings.js +1 -0
- package/dist/template/seaweed/entries/ThisWebpage.svelte +1 -1
- package/dist/template/seaweed/entries/WorkExperience.svelte +1 -1
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +34 -1
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +0 -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/ui/elements/CodeBlock/CodeBlock.svelte +65 -0
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte.d.ts +5 -0
- package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +11 -0
- package/dist/ui/elements/CodeBlock/CodeBlockProps.js +1 -0
- package/dist/ui/elements/CodeBlock/index.d.ts +2 -0
- package/dist/ui/elements/CodeBlock/index.js +2 -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/PineappleSwitch.svelte +29 -0
- package/dist/ui/elements/PineappleSwitch.svelte.d.ts +10 -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 +11 -8
- package/dist/ui/elements/index.js +11 -8
- package/dist/ui/elements/pinya-button/component.svelte +2 -1
- package/dist/ui/elements/pinya-button/props.d.ts +1 -0
- package/dist/ui/elements/pinya-card/component.svelte +10 -8
- package/dist/ui/elements/pinya-card/component.svelte.d.ts +3 -3
- package/dist/ui/elements/pinya-card/props.d.ts +3 -0
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +35 -0
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte.d.ts +18 -0
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.d.ts +18 -0
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.js +1 -0
- package/dist/ui/elements/text-chip/TextChip.svelte +15 -0
- package/dist/ui/elements/text-chip/TextChip.svelte.d.ts +4 -0
- package/dist/ui/elements/text-chip/TextChipProps.d.ts +4 -0
- package/dist/ui/elements/text-chip/TextChipProps.js +1 -0
- package/dist/ui/elements/text-chip/index.d.ts +2 -0
- package/dist/ui/elements/text-chip/index.js +2 -0
- package/dist/ui/modules/index.d.ts +2 -1
- package/dist/ui/modules/index.js +2 -1
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +10 -20
- package/dist/ui/modules/projects/Hepcat.svelte +71 -0
- package/dist/ui/modules/projects/Hepcat.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/Pengi.svelte +60 -0
- package/dist/ui/modules/projects/Pengi.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/Soulwork.svelte +55 -0
- package/dist/ui/modules/projects/Soulwork.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/ThisWebpage.svelte +62 -0
- package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/index.d.ts +4 -0
- package/dist/ui/modules/projects/index.js +4 -0
- package/dist/ui/modules/seaweed/ChumBucket.svelte +38 -38
- package/dist/ui/templates/PinyaBase.svelte +9 -6
- package/dist/ui/templates/PinyaBase.svelte.d.ts +1 -1
- package/dist/ui/templates/index.d.ts +3 -2
- package/dist/ui/templates/index.js +3 -2
- package/dist/ui/templates/pinya-page-layout/component.svelte +17 -10
- package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +2 -1
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +89 -0
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte +45 -0
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte.d.ts +9 -0
- package/dist/ui/templates/seaweed-layout/ProjectComponentProps.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/ProjectComponentProps.js +1 -0
- package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte +316 -0
- package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte.d.ts +14 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.md +4 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +277 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/index.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/index.js +4 -0
- package/dist/ui/templates/seaweed-layout/props.d.ts +27 -0
- package/dist/ui/templates/seaweed-layout/props.js +1 -0
- package/dist/util/util.d.ts +1 -0
- package/dist/util/util.js +9 -0
- package/package.json +20 -15
- package/src/lib/styles/app.css +92 -1
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFDF6"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#4C473B"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFDF6"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#4C473B"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/></svg>
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
3
|
import { Switch } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
4
6
|
interface Props {
|
|
5
7
|
checked?: boolean;
|
|
6
8
|
name: string;
|
|
7
|
-
onChange?:
|
|
8
|
-
children?:
|
|
9
|
+
onChange?: (() => void);
|
|
10
|
+
children?: Snippet;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
let {
|
|
12
14
|
checked = $bindable(false),
|
|
13
15
|
name,
|
|
14
16
|
onChange = undefined,
|
|
15
|
-
children
|
|
17
|
+
children = undefined,
|
|
16
18
|
}: Props = $props();
|
|
17
19
|
</script>
|
|
18
20
|
|
|
19
21
|
<Switch name={name}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
controlBase="bg-red-500"
|
|
23
|
+
checked={checked}
|
|
24
|
+
onCheckedChange={(e) => {
|
|
25
|
+
checked = e.checked;
|
|
26
|
+
onChange?.();
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
23
29
|
{@render children?.()}
|
|
24
30
|
</Switch>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
1
2
|
interface Props {
|
|
2
3
|
checked?: boolean;
|
|
3
4
|
name: string;
|
|
4
|
-
onChange?:
|
|
5
|
-
children?:
|
|
5
|
+
onChange?: (() => void);
|
|
6
|
+
children?: Snippet;
|
|
6
7
|
}
|
|
7
8
|
declare const PineappleSlideToggle: import("svelte").Component<Props, {}, "checked">;
|
|
8
9
|
type PineappleSlideToggle = ReturnType<typeof PineappleSlideToggle>;
|
|
@@ -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
package/dist/styles/app.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@import "@skeletonlabs/skeleton/themes/crimson";
|
|
5
5
|
@import "./turnip-theme.css";
|
|
6
6
|
|
|
7
|
-
@source "
|
|
7
|
+
@source "../../../node_modules/@skeletonlabs/skeleton-svelte/dist";
|
|
8
8
|
|
|
9
9
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
10
10
|
|
|
@@ -51,3 +51,94 @@ a.external-link {
|
|
|
51
51
|
--tw-ring-color: rgb(var(--color-text-400));
|
|
52
52
|
/*background-color: red;*/
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
@layer base {
|
|
56
|
+
.game-link-section {
|
|
57
|
+
@apply mt-6 flex gap-2 justify-center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.game-video-cover {
|
|
61
|
+
@apply rounded-t-lg max-h-64 object-cover w-full;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.text-chip-container {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
gap: 0.5rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.text-chip {
|
|
71
|
+
background-color: var(--color-secondary-50-950) /* light-dark(var(--color-secondary-50), var(--color-secondary-950)) */;
|
|
72
|
+
color: var(--color-secondary-950-50) /* light-dark(var(--color-secondary-950), var(--color-secondary-50)) */;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*https://shiki.style/guide/dual-themes*/
|
|
77
|
+
html.dark .shiki,
|
|
78
|
+
html.dark .shiki span {
|
|
79
|
+
color: var(--shiki-dark) !important;
|
|
80
|
+
background-color: var(--shiki-dark-bg) !important;
|
|
81
|
+
/* Optional, if you also want font styles */
|
|
82
|
+
font-style: var(--shiki-dark-font-style) !important;
|
|
83
|
+
font-weight: var(--shiki-dark-font-weight) !important;
|
|
84
|
+
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.shiki {
|
|
88
|
+
span {
|
|
89
|
+
white-space: pre-wrap;
|
|
90
|
+
word-wrap: break-word;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* region shiki copy button */
|
|
95
|
+
pre:has(code) {
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pre button.copy {
|
|
100
|
+
position: absolute;
|
|
101
|
+
right: 16px;
|
|
102
|
+
top: 16px;
|
|
103
|
+
height: 28px;
|
|
104
|
+
width: 28px;
|
|
105
|
+
padding: 0;
|
|
106
|
+
display: flex;
|
|
107
|
+
|
|
108
|
+
& span {
|
|
109
|
+
width: 100%;
|
|
110
|
+
aspect-ratio: 1 / 1;
|
|
111
|
+
background-repeat: no-repeat;
|
|
112
|
+
background-position: center;
|
|
113
|
+
background-size: cover;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
& .ready {
|
|
117
|
+
background-image: url("$pkg/assets/icons/icon-copy-light-contrast.svg");
|
|
118
|
+
|
|
119
|
+
@variant dark {
|
|
120
|
+
background-image: url("$pkg/assets/icons/icon-copy-dark-contrast.svg");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
& .success {
|
|
125
|
+
display: none;
|
|
126
|
+
background-image: url("$pkg/assets/icons/icon-check-light-contrast.svg");
|
|
127
|
+
|
|
128
|
+
@variant dark {
|
|
129
|
+
background-image: url("$pkg/assets/icons/icon-check-dark-contrast.svg");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.copied {
|
|
134
|
+
& .success {
|
|
135
|
+
display: block;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
& .ready {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* endregion shiki copy button */
|
|
@@ -237,85 +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
|
-
|
|
291
|
-
}
|
|
288
|
+
h6 {
|
|
289
|
+
text-decoration: underline;
|
|
290
|
+
}
|
|
292
291
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
a {
|
|
293
|
+
text-decoration: underline;
|
|
294
|
+
color: var(--color-secondary-500);
|
|
296
295
|
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
@variant dark {
|
|
297
|
+
color: var(--color-secondary-300);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
301
|
+
a:hover, a:focus {
|
|
302
|
+
filter: brightness(150%);
|
|
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
|
-
|
|
317
|
+
ol {
|
|
318
|
+
list-style: decimal inside;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
p{
|
|
322
|
+
@apply mb-3;
|
|
319
323
|
}
|
|
320
324
|
|
|
321
325
|
@theme {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { type CreateUrlRequest, CreateUrlResult, jsonToCreateUrlResponse } from "../../types/api/CreateUrl";
|
|
3
|
-
import {
|
|
3
|
+
import type { ToastContext } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import { getContext } from "svelte";
|
|
5
|
+
import type { ToastSettings } from "./ToastSettings";
|
|
6
|
+
import { PinyaButton } from "../../ui/elements/index";
|
|
7
|
+
|
|
8
|
+
export const toast: ToastContext = getContext("toast");
|
|
9
|
+
|
|
4
10
|
|
|
5
11
|
interface Props {
|
|
6
12
|
queryParams?: string;
|
|
@@ -8,8 +14,6 @@
|
|
|
8
14
|
|
|
9
15
|
let { queryParams = "" }: Props = $props();
|
|
10
16
|
|
|
11
|
-
const toastStore = getToastStore();
|
|
12
|
-
|
|
13
17
|
let request: CreateUrlRequest = $state({
|
|
14
18
|
queryParams: "",
|
|
15
19
|
shortUrl: "",
|
|
@@ -22,14 +26,15 @@
|
|
|
22
26
|
|
|
23
27
|
|
|
24
28
|
const failToast: ToastSettings = {
|
|
25
|
-
|
|
29
|
+
title: "Adding new url failed",
|
|
30
|
+
type: "error"
|
|
26
31
|
};
|
|
27
32
|
const toastMap = new Map<CreateUrlResult, ToastSettings>([
|
|
28
33
|
[CreateUrlResult.Success, {
|
|
29
|
-
|
|
34
|
+
title: "Successfully added new url"
|
|
30
35
|
}],
|
|
31
36
|
[CreateUrlResult.Duplicate, {
|
|
32
|
-
|
|
37
|
+
title: "Short url already used; try again with another url"
|
|
33
38
|
}],
|
|
34
39
|
[CreateUrlResult.Fail, failToast]
|
|
35
40
|
]);
|
|
@@ -44,7 +49,7 @@
|
|
|
44
49
|
resp.json()
|
|
45
50
|
).then(json => {
|
|
46
51
|
const properResp = jsonToCreateUrlResponse(json);
|
|
47
|
-
|
|
52
|
+
toast.create(toastMap.get(properResp.result) ?? failToast);
|
|
48
53
|
});
|
|
49
54
|
};
|
|
50
55
|
</script>
|
|
@@ -53,23 +58,24 @@
|
|
|
53
58
|
<label for="short-url">Short URL for url shortener</label>
|
|
54
59
|
<input bind:value={request.shortUrl}
|
|
55
60
|
name="short-url"
|
|
56
|
-
class="input"
|
|
61
|
+
class="input border-[2px] border-primary-500"
|
|
57
62
|
type="text"
|
|
58
63
|
placeholder="short-url" />
|
|
59
64
|
<label for="password">Password</label>
|
|
60
65
|
<input bind:value={request.password}
|
|
61
66
|
name="password"
|
|
62
|
-
class="input"
|
|
67
|
+
class="input border-[2px] border-primary-500"
|
|
63
68
|
type="password"
|
|
64
69
|
placeholder="ILoveTurnips" />
|
|
65
|
-
<
|
|
70
|
+
<PinyaButton onclick={post}>Send link</PinyaButton>
|
|
66
71
|
</div>
|
|
67
72
|
|
|
68
73
|
<style>
|
|
69
74
|
.local-list {
|
|
70
75
|
display: flex;
|
|
71
76
|
flex-direction: column;
|
|
72
|
-
gap: 0.
|
|
77
|
+
gap: 0.5lh;
|
|
78
|
+
margin-top: 1lh;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
.send-link {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { ToastContext } from "@skeletonlabs/skeleton-svelte";
|
|
1
2
|
interface Props {
|
|
2
3
|
queryParams?: string;
|
|
3
4
|
}
|
|
4
|
-
declare const CreateUrlForm: import("svelte").Component<Props, {
|
|
5
|
+
declare const CreateUrlForm: import("svelte").Component<Props, {
|
|
6
|
+
toast: ToastContext;
|
|
7
|
+
}, "">;
|
|
5
8
|
type CreateUrlForm = ReturnType<typeof CreateUrlForm>;
|
|
6
9
|
export default CreateUrlForm;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ToastSettings {
|
|
2
|
+
/** The unique toast ID. */
|
|
3
|
+
id?: string;
|
|
4
|
+
/** The unique toast title text. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** The unique toast description text. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Define the toast type.
|
|
10
|
+
* @default info
|
|
11
|
+
*/
|
|
12
|
+
type?: "info" | "error" | "success";
|
|
13
|
+
/** The duration of the toast. Default varies by type. */
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|