@turnipxenon/pineapple 3.0.0-alpha.8 → 3.0.0
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 +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/DialogManager.d.ts +2 -1
- package/dist/components/dialog_manager/DialogMangerInit.d.ts +2 -15
- package/dist/components/dialog_manager/DialogMangerInit.js +8 -2
- package/dist/components/dialog_manager/IDialogManager.d.ts +39 -0
- package/dist/components/dialog_manager/IDialogManager.js +4 -0
- package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts +3 -0
- package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +15 -3
- package/dist/components/dialog_overlay/DialogOverlay.svelte +31 -22
- 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 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -2
- package/dist/styles/turnip-theme.css +64 -64
- package/dist/ui/components/SocialSection.svelte +6 -2
- 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/{pinya-button/component.svelte → PinyaButton/PinyaButton.svelte} +4 -3
- package/dist/ui/elements/PinyaButton/PinyaButton.svelte.d.ts +4 -0
- package/dist/ui/elements/{pinya-button/props.d.ts → PinyaButton/PinyaButtonProps.d.ts} +1 -0
- package/dist/ui/elements/PinyaButton/index.d.ts +2 -0
- package/dist/ui/elements/PinyaButton/index.js +2 -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 -1
- package/dist/ui/elements/index.js +1 -1
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.d.ts +1 -0
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +7 -2
- package/dist/ui/modules/projects/Hepcat.svelte +6 -4
- package/dist/ui/modules/projects/Hepcat.svelte.d.ts +1 -1
- package/dist/ui/modules/projects/Pengi.svelte +6 -4
- package/dist/ui/modules/projects/Pengi.svelte.d.ts +1 -1
- package/dist/ui/modules/projects/Soulwork.svelte +7 -5
- package/dist/ui/modules/projects/ThisWebpage.svelte +9 -8
- package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +1 -1
- package/dist/ui/modules/seaweed/ChumBucket.svelte +5 -4
- package/dist/ui/templates/{pinya-page-layout/component.svelte → PinyaPageLayout/PinyaPageLayout.svelte} +1 -1
- package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte.d.ts +9 -0
- package/dist/ui/templates/PinyaPageLayout/index.d.ts +2 -0
- package/dist/ui/templates/PinyaPageLayout/index.js +2 -0
- package/dist/ui/templates/{pinya-page-layout → PinyaPageLayout}/runes.svelte.d.ts +1 -0
- package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +4 -0
- package/dist/{template/seaweed → ui/templates/SeaweedLayout}/CreateUrlForm.svelte +2 -2
- package/dist/ui/templates/SeaweedLayout/EntryOrderConfig.svelte.d.ts +9 -0
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectGroupConfig.svelte.d.ts +1 -1
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.svelte +7 -7
- package/dist/ui/templates/confirmation-modal/component.svelte +1 -1
- package/dist/ui/templates/index.d.ts +2 -2
- package/dist/ui/templates/index.js +2 -2
- package/package.json +3 -2
- package/dist/template/seaweed/ParseQueryTerms.d.ts +0 -1
- package/dist/template/seaweed/ParseQueryTerms.js +0 -23
- package/dist/template/seaweed/RunChaos.d.ts +0 -1
- package/dist/template/seaweed/RunChaos.js +0 -41
- package/dist/template/seaweed/SeaweedTemplate.svelte +0 -336
- package/dist/template/seaweed/SeaweedTemplate.svelte.d.ts +0 -32
- package/dist/template/seaweed/SeaweedTemplateData.d.ts +0 -30
- package/dist/template/seaweed/SeaweedTemplateData.js +0 -79
- package/dist/template/seaweed/entries/ChefWings.svelte +0 -45
- package/dist/template/seaweed/entries/ChefWings.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte +0 -40
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/EntryProps.d.ts +0 -16
- package/dist/template/seaweed/entries/EntryProps.js +0 -5
- package/dist/template/seaweed/entries/Hepcat.svelte +0 -64
- package/dist/template/seaweed/entries/Hepcat.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/Pengi.svelte +0 -57
- package/dist/template/seaweed/entries/Pengi.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/Soulwork.svelte +0 -54
- package/dist/template/seaweed/entries/Soulwork.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/ThisWebpage.svelte +0 -55
- package/dist/template/seaweed/entries/ThisWebpage.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/WorkExperience.svelte +0 -130
- package/dist/template/seaweed/entries/WorkExperience.svelte.d.ts +0 -8
- package/dist/template/seaweed/entries/Workset.svelte +0 -57
- package/dist/template/seaweed/entries/Workset.svelte.d.ts +0 -7
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.d.ts +0 -1
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.js +0 -8
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +0 -297
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +0 -12
- package/dist/template/seaweed/entry_order_config/entry-order-config.postcss +0 -35
- package/dist/template/seaweed/index.d.ts +0 -4
- package/dist/template/seaweed/index.js +0 -4
- package/dist/template/seaweed/seaweed.postcss +0 -125
- package/dist/ui/elements/pinya-button/component.svelte.d.ts +0 -4
- package/dist/ui/elements/pinya-button/index.d.ts +0 -2
- package/dist/ui/elements/pinya-button/index.js +0 -2
- package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +0 -9
- package/dist/ui/templates/pinya-page-layout/index.d.ts +0 -2
- package/dist/ui/templates/pinya-page-layout/index.js +0 -2
- package/dist/ui/templates/pinya-page-layout/runes.svelte.js +0 -3
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte.d.ts +0 -9
- /package/dist/ui/elements/{pinya-button/props.js → PinyaButton/PinyaButtonProps.js} +0 -0
- /package/dist/{template/seaweed → ui/templates/SeaweedLayout}/CreateUrlForm.svelte.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/EntryGroup.svelte +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/EntryGroup.svelte.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout/EntryOrderConfig2.svelte → SeaweedLayout/EntryOrderConfig.svelte} +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectComponentProps.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectComponentProps.js +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectGroupConfig.svelte +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.md +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.svelte.d.ts +0 -0
- /package/dist/{template/seaweed → ui/templates/SeaweedLayout}/ToastSettings.d.ts +0 -0
- /package/dist/{template/seaweed → ui/templates/SeaweedLayout}/ToastSettings.js +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/index.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/index.js +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/props.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/props.js +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import BlogTemplateInner from "./BlogTemplateInner.svelte";
|
|
6
6
|
import type { SimplePageMeta } from "../navigation_component/index";
|
|
7
7
|
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
8
|
-
import { Card } from "../
|
|
8
|
+
import { default as Card } from "../Card.svelte";
|
|
9
9
|
|
|
10
10
|
// grab page meta from the adjacent meta.json
|
|
11
11
|
interface Props {
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
import type { DialogDetail } from "../../types/pineapple_fiber/DialogDetail";
|
|
5
5
|
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
6
6
|
import { DialogProcessor } from "./DialogProcessor";
|
|
7
|
+
import type { IDialogManager } from "./IDialogManager";
|
|
7
8
|
export type OnSetDialogChoiceCallback = (newMessage: DialogDetail) => void;
|
|
8
|
-
export declare class DialogManager {
|
|
9
|
+
export declare class DialogManager implements IDialogManager {
|
|
9
10
|
dialogMessageMap: Map<string, DialogDetail>;
|
|
10
11
|
currentDialogTree: DialogDetail[];
|
|
11
12
|
fullCurrentMessage: string;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import {
|
|
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;
|
|
1
|
+
import type { IDialogManager } from "./IDialogManager";
|
|
2
|
+
export declare const getDialogManager: () => Promise<IDialogManager>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DialogManager } from "./DialogManager";
|
|
2
1
|
/**
|
|
3
2
|
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
4
3
|
*
|
|
@@ -12,4 +11,11 @@ import { DialogManager } from "./DialogManager";
|
|
|
12
11
|
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
13
12
|
* defaultDialogMessage not yet being initialized
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
let _dialogManager = undefined;
|
|
15
|
+
export const getDialogManager = async () => {
|
|
16
|
+
if (_dialogManager === undefined) {
|
|
17
|
+
const dm = await import('./DialogManager');
|
|
18
|
+
_dialogManager = new dm.DialogManager();
|
|
19
|
+
}
|
|
20
|
+
return _dialogManager;
|
|
21
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { DialogDetail } from "../../types/pineapple_fiber/DialogDetail";
|
|
2
|
+
import { type Writable } from "svelte/store";
|
|
3
|
+
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
4
|
+
import { type Tweened } from "svelte/motion";
|
|
5
|
+
import { DialogProcessor } from "./DialogProcessor";
|
|
6
|
+
import type { OnSetDialogChoiceCallback } from "./DialogManager";
|
|
7
|
+
export interface IDialogManager {
|
|
8
|
+
dialogMessageMap: Map<string, DialogDetail>;
|
|
9
|
+
currentDialogTree: DialogDetail[];
|
|
10
|
+
fullCurrentMessage: string;
|
|
11
|
+
currentMessageMeta: DialogDetail;
|
|
12
|
+
currentMessage: Writable<string>;
|
|
13
|
+
currentIndex: number;
|
|
14
|
+
previousTimestamp: number;
|
|
15
|
+
isDoneTransition: boolean;
|
|
16
|
+
currentPortrait: Writable<unknown>;
|
|
17
|
+
portraitMap: Map<string, any>;
|
|
18
|
+
currentState: DialogState;
|
|
19
|
+
currentReadableState: Writable<DialogState>;
|
|
20
|
+
hidePercent: Tweened<number>;
|
|
21
|
+
skipNextActiveTime: number;
|
|
22
|
+
dialogProcessor: DialogProcessor;
|
|
23
|
+
_setDialogChoiceQueue: DialogDetail[];
|
|
24
|
+
_setDialogChoiceMutex: boolean;
|
|
25
|
+
onSetDialogListeners: OnSetDialogChoiceCallback[];
|
|
26
|
+
enableDialogueOverlayCache: boolean;
|
|
27
|
+
skipAnimation: () => void;
|
|
28
|
+
enableDialog: (shouldEnable: boolean) => void;
|
|
29
|
+
setDialogTree: (newDialogTree: DialogDetail[]) => void;
|
|
30
|
+
subscribeToSetDialogChoice: (callback: OnSetDialogChoiceCallback) => void;
|
|
31
|
+
unsubscribeToSetDialogChoice: (callback: OnSetDialogChoiceCallback) => void;
|
|
32
|
+
setDialogChoice: (newMessage: (DialogDetail | undefined)) => void;
|
|
33
|
+
_setDialogChoice: () => void;
|
|
34
|
+
setDialogToDefault: () => void;
|
|
35
|
+
update: (timestamp: number) => void;
|
|
36
|
+
enableDialogOverlay(enable: boolean): void;
|
|
37
|
+
toggleDialogOverlay(): void;
|
|
38
|
+
parseAndSetDialogTree(dialogYarn: string): Promise<DialogDetail[]>;
|
|
39
|
+
}
|
package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import type { LineBehaviorNode } from "../../line_core/LineBehaviorNode";
|
|
|
2
2
|
import type { LineNodeArguments } from "../../line_core/LineNodeArguments";
|
|
3
3
|
import type { LineBehaviorResult } from "../../line_core/LineBehaviorResult";
|
|
4
4
|
import { SetVariableNode } from "../SetVariableNode";
|
|
5
|
+
import type { IDialogManager } from "../../../IDialogManager";
|
|
5
6
|
export declare class JumpCommand implements LineBehaviorNode {
|
|
6
7
|
setVariableNode: SetVariableNode;
|
|
8
|
+
dialogManager: undefined | IDialogManager;
|
|
9
|
+
constructor();
|
|
7
10
|
process(nodeArgs: LineNodeArguments): LineBehaviorResult;
|
|
8
11
|
}
|
package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { BehaviorStatus } from "../../core/BehaviorStatus";
|
|
2
2
|
import { SetVariableNode } from "../SetVariableNode";
|
|
3
3
|
import { btreeUtils } from "../../core/BTreeUtils";
|
|
4
|
-
import {
|
|
4
|
+
import { getDialogManager } from "../../../DialogMangerInit";
|
|
5
5
|
export class JumpCommand {
|
|
6
6
|
setVariableNode = new SetVariableNode();
|
|
7
|
+
dialogManager = undefined;
|
|
8
|
+
constructor() {
|
|
9
|
+
getDialogManager().then(dm => this.dialogManager = dm);
|
|
10
|
+
}
|
|
7
11
|
process(nodeArgs) {
|
|
12
|
+
if (this.dialogManager === undefined) {
|
|
13
|
+
console.warn('Dialog Manger not yet initialized');
|
|
14
|
+
return {
|
|
15
|
+
renderedLine: "",
|
|
16
|
+
nextState: nodeArgs.initState,
|
|
17
|
+
status: BehaviorStatus.Failure
|
|
18
|
+
};
|
|
19
|
+
}
|
|
8
20
|
if (!nodeArgs.line.startsWith("<<jump")) {
|
|
9
21
|
return {
|
|
10
22
|
renderedLine: "",
|
|
@@ -23,10 +35,10 @@ export class JumpCommand {
|
|
|
23
35
|
.slice("<<jump ".length, nodeArgs.line.length - ">>".length)
|
|
24
36
|
.replace(/^\{/, "") // remove possible " at the start: https://stackoverflow.com/a/2182602
|
|
25
37
|
.replace(/}$/, ""); // remove possible " at the end: https://stackoverflow.com/a/12249011;
|
|
26
|
-
const dialogChoice = dialogManager.dialogMessageMap.get(btreeUtils.simplifyToken(choiceName));
|
|
38
|
+
const dialogChoice = this.dialogManager.dialogMessageMap.get(btreeUtils.simplifyToken(choiceName));
|
|
27
39
|
if (dialogChoice !== undefined) {
|
|
28
40
|
// force choice
|
|
29
|
-
dialogManager.setDialogChoice(dialogChoice);
|
|
41
|
+
this.dialogManager.setDialogChoice(dialogChoice);
|
|
30
42
|
}
|
|
31
43
|
else {
|
|
32
44
|
console.error(`Unknown jump node at line ${nodeArgs.lineIndex + 1}: ${choiceName} or ${btreeUtils.simplifyToken(choiceName)}`);
|
|
@@ -2,37 +2,46 @@
|
|
|
2
2
|
import AresHappy from "../../assets/characters/ares/ares_happy.webp";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
4
|
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
5
|
-
import {
|
|
5
|
+
import { getDialogManager } from "../dialog_manager/DialogMangerInit";
|
|
6
|
+
import type { IDialogManager } from "../dialog_manager/IDialogManager";
|
|
6
7
|
|
|
7
8
|
let currentMessage = $state("");
|
|
8
|
-
dialogManager.currentMessage.subscribe((value) => {
|
|
9
|
-
currentMessage = value;
|
|
10
|
-
});
|
|
11
|
-
|
|
12
9
|
let currentPortrait = $state(AresHappy);
|
|
13
|
-
dialogManager.currentPortrait.subscribe((value) => {
|
|
14
|
-
if (value) {
|
|
15
|
-
currentPortrait = value;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
10
|
|
|
19
11
|
let hidePercent = $state(100);
|
|
20
12
|
let isHidden = $state(true);
|
|
13
|
+
let dialogManager: IDialogManager | undefined = $state(undefined);
|
|
21
14
|
onMount(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
getDialogManager()
|
|
16
|
+
.then(dm => {
|
|
17
|
+
dialogManager = dm;
|
|
18
|
+
|
|
19
|
+
dialogManager.currentMessage.subscribe((value) => {
|
|
20
|
+
currentMessage = value;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
dialogManager.currentPortrait.subscribe((value) => {
|
|
24
|
+
if (value) {
|
|
25
|
+
currentPortrait = value;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
dialogManager.hidePercent.subscribe((value) => {
|
|
30
|
+
hidePercent = value * 0.4;
|
|
31
|
+
isHidden = false;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
dialogManager.currentReadableState.subscribe((value) => {
|
|
35
|
+
isHidden = value === DialogState.Invisible;
|
|
36
|
+
});
|
|
26
37
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
38
|
+
dialogManager.update(0);
|
|
39
|
+
});
|
|
30
40
|
|
|
31
|
-
dialogManager.update(0);
|
|
32
41
|
});
|
|
33
42
|
|
|
34
43
|
const onDialogClick = () => {
|
|
35
|
-
dialogManager
|
|
44
|
+
dialogManager?.skipAnimation();
|
|
36
45
|
};
|
|
37
46
|
|
|
38
47
|
</script>
|
|
@@ -89,9 +98,9 @@
|
|
|
89
98
|
}
|
|
90
99
|
|
|
91
100
|
.dialog-name {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
padding-top: 2rem;
|
|
102
|
+
padding-left: 4rem;
|
|
103
|
+
padding-right: 4rem;
|
|
95
104
|
position: fixed;
|
|
96
105
|
}
|
|
97
106
|
|
|
@@ -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
|
|
|
@@ -20,7 +20,7 @@
|
|
|
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 {
|
|
23
|
+
import { getDialogManager } from "../dialog_manager/DialogMangerInit";
|
|
24
24
|
|
|
25
25
|
interface Props {
|
|
26
26
|
showDialogByDefault?: boolean;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
|
|
78
78
|
<!--todo: turn off hidden when it's time-->
|
|
79
79
|
<button class="fab" onclick={()=>{
|
|
80
|
-
|
|
80
|
+
getDialogManager().then(dm => dm.toggleDialogOverlay());
|
|
81
81
|
}}>
|
|
82
82
|
{#if (enableDialogueOverlayValue)}
|
|
83
83
|
<img class="turnip-icon" src={CloseIcon} alt="interactive floating action button represented as a turnip">
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export * from "./types/pineapple_fiber/PortraitType";
|
|
|
10
10
|
export * from "./types/pineapple_fiber/DialogDetail";
|
|
11
11
|
export * from "./util/util";
|
|
12
12
|
export * from "./api/index";
|
|
13
|
-
export
|
|
14
|
-
export {
|
|
13
|
+
export type { IDialogManager } from "./components/dialog_manager/IDialogManager";
|
|
14
|
+
export { getDialogManager } from "./components/dialog_manager/DialogMangerInit";
|
package/dist/index.js
CHANGED
|
@@ -11,5 +11,4 @@ export * from "./types/pineapple_fiber/PortraitType";
|
|
|
11
11
|
export * from "./types/pineapple_fiber/DialogDetail";
|
|
12
12
|
export * from "./util/util";
|
|
13
13
|
export * from "./api/index";
|
|
14
|
-
export
|
|
15
|
-
export { dialogManager } from "./components/dialog_manager/DialogMangerInit";
|
|
14
|
+
export { getDialogManager } from "./components/dialog_manager/DialogMangerInit";
|
|
@@ -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 {
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import MailIcon from "../../assets/icons/mail.svg";
|
|
6
6
|
import GithubIcon from "../../assets/icons/github-mark.svg";
|
|
7
7
|
import LinkedinIcon from "../../assets/icons/linkedin.svg";
|
|
8
|
-
import { ButtonVariant, ImageIcon, PinyaButton } from "../elements/index";
|
|
9
8
|
import { ItchLogoHotLink } from "../../consts";
|
|
9
|
+
import { ButtonVariant, PinyaButton } from "../elements/PinyaButton/index";
|
|
10
|
+
import ImageIcon from "../elements/ImageIcon.svelte";
|
|
10
11
|
|
|
11
12
|
/** @type {{isSmallVersion?: boolean, email?: string, linkedinSlug?: string, isSlot?: boolean, allowLinkedIn?: boolean}} */
|
|
12
13
|
let {
|
|
@@ -63,7 +64,9 @@
|
|
|
63
64
|
<PinyaButton
|
|
64
65
|
buttonVariant={ButtonVariant.SmallIcon}
|
|
65
66
|
title="https://turnipxenon.itch.io/"
|
|
66
|
-
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
67
|
+
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
68
|
+
classes="h-full"
|
|
69
|
+
>
|
|
67
70
|
<ImageIcon src={ItchLogoHotLink} alt="itch icon" />
|
|
68
71
|
{#if (!isSmallVersion)}
|
|
69
72
|
<span>TurnipXenon</span>
|
|
@@ -83,5 +86,6 @@
|
|
|
83
86
|
flex-wrap: wrap;
|
|
84
87
|
justify-content: var(--preferred-justify-content);
|
|
85
88
|
gap: 0.7rem;
|
|
89
|
+
align-items: stretch;
|
|
86
90
|
}
|
|
87
91
|
</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,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ButtonVariant, type PinyaButtonProps } from './PinyaButtonProps';
|
|
3
|
+
import { ColorScheme } from "../ColorScheme";
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
children,
|
|
@@ -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>
|
|
@@ -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>
|