@turnipxenon/pineapple 3.0.0-alpha.2 → 3.0.0-alpha.20
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/DialogManager.d.ts +2 -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 +2 -0
- package/dist/components/dialog_manager/DialogMangerInit.js +21 -0
- 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/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 +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/styles/turnip-theme.css +64 -64
- package/dist/template/seaweed/SeaweedTemplate.svelte +1 -1
- package/dist/template/seaweed/entries/ThisWebpage.svelte +1 -1
- package/dist/template/seaweed/entries/WorkExperience.svelte +1 -1
- 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/{components/ElementVisbilityDetector.svelte → ui/elements/ElementVisibilityDetector.svelte} +6 -3
- package/dist/ui/elements/ElementVisibilityDetector.svelte.d.ts +8 -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 +2 -1
- package/dist/ui/elements/index.js +2 -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 +5 -3
- 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/ui/templates/confirmation-modal/component.svelte +1 -1
- package/dist/ui/templates/index.d.ts +1 -1
- package/dist/ui/templates/index.js +1 -1
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +5 -5
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +92 -11
- 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 +20 -16
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +0 -7
- 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/elements/{pinya-button/props.js → PinyaButton/PinyaButtonProps.js} +0 -0
|
@@ -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 { default as Card } from "../Card.svelte";
|
|
7
9
|
|
|
8
10
|
// grab page meta from the adjacent meta.json
|
|
9
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;
|
|
@@ -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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* strictly must be declared last! or you might receive a weird error that looks like:
|
|
3
|
+
*
|
|
4
|
+
* 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
|
|
5
|
+
* |- TypeError: Cannot read properties of undefined (reading '0')
|
|
6
|
+
* at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
|
|
7
|
+
* at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
|
|
8
|
+
* at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
|
|
9
|
+
* at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
|
|
10
|
+
*
|
|
11
|
+
* what this means is that one member of dialogManager cannot be initialized. in our case, it was the
|
|
12
|
+
* defaultDialogMessage not yet being initialized
|
|
13
|
+
*/
|
|
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
|
-
import { dialogManager } from "../../../DialogManagerStore";
|
|
4
3
|
import { btreeUtils } from "../../core/BTreeUtils";
|
|
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)}`);
|
|
@@ -1,38 +1,47 @@
|
|
|
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 { 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
|
|
|
@@ -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 { getDialogManager } from "../dialog_manager/DialogMangerInit";
|
|
23
24
|
|
|
24
25
|
interface Props {
|
|
25
26
|
showDialogByDefault?: boolean;
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
|
|
77
78
|
<!--todo: turn off hidden when it's time-->
|
|
78
79
|
<button class="fab" onclick={()=>{
|
|
79
|
-
|
|
80
|
+
getDialogManager().then(dm => dm.toggleDialogOverlay());
|
|
80
81
|
}}>
|
|
81
82
|
{#if (enableDialogueOverlayValue)}
|
|
82
83
|
<img class="turnip-icon" src={CloseIcon} alt="interactive floating action button represented as a turnip">
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export * from "./types/pineapple_fiber/DialogDetail";
|
|
|
11
11
|
export * from "./util/util";
|
|
12
12
|
export * from "./api/index";
|
|
13
13
|
export * from "./template/seaweed/index";
|
|
14
|
+
export type { IDialogManager } from "./components/dialog_manager/IDialogManager";
|
|
15
|
+
export { getDialogManager } from "./components/dialog_manager/DialogMangerInit";
|
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 {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { parseQueryTerms } from "./ParseQueryTerms";
|
|
18
18
|
import UrlShortenerForm from "./CreateUrlForm.svelte";
|
|
19
19
|
import PineappleSlideToggle from "../../components/PineappleSlideToggle.svelte";
|
|
20
|
-
import { Chip } from "../../
|
|
20
|
+
import { default as Chip } from "../../components/chip/Chip.svelte";
|
|
21
21
|
import ChumBucket from "../../ui/modules/seaweed/ChumBucket.svelte";
|
|
22
22
|
|
|
23
23
|
export let seaweedTemplateData: SeaweedTemplateData;
|
|
@@ -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 {
|
|
@@ -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;
|