@turnipxenon/pineapple 2.4.18 → 2.4.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/.idea/workspace.xml +29 -34
- package/.svelte-kit/__package__/app.postcss +4 -0
- package/.svelte-kit/__package__/components/Card.svelte +3 -0
- package/.svelte-kit/__package__/components/RandomizedBackground.svelte +2 -2
- package/.svelte-kit/__package__/components/pineapple/PineappleBaseLayout.svelte +7 -39
- package/.svelte-kit/__package__/index.d.ts +3 -1
- package/.svelte-kit/__package__/index.js +3 -1
- package/{dist/util/stable_random.d.ts → .svelte-kit/__package__/util/util.d.ts} +1 -0
- package/{dist/util/stable_random.js → .svelte-kit/__package__/util/util.js} +5 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/app.postcss +4 -0
- package/dist/components/Card.svelte +3 -0
- package/dist/components/RandomizedBackground.svelte +2 -2
- package/dist/components/pineapple/PineappleBaseLayout.svelte +7 -39
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/{.svelte-kit/__package__/util/stable_random.d.ts → dist/util/util.d.ts} +1 -0
- package/{.svelte-kit/__package__/util/stable_random.js → dist/util/util.js} +5 -0
- package/docs/PineappleFiberSpec.md +2 -2
- package/package.json +1 -1
- package/src/lib/app.postcss +4 -0
- package/src/lib/components/Card.svelte +4 -0
- package/src/lib/components/DialogOverlay.svelte +2 -2
- package/src/lib/components/LazyAsset.svelte +2 -2
- package/src/lib/components/RandomizedBackground.svelte +8 -8
- package/src/lib/components/dialog_manager/DialogManagerStore.ts +5 -5
- package/src/lib/components/dialog_manager/DialogProcessor.ts +15 -15
- package/src/lib/components/dialog_manager/DialogUtils.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/core/BaseBehaviorResult.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/core/SelectorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionResult.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperandNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperatorNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandMap.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/AndOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorMap.ts +16 -16
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OrOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/XorOperator.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode.ts +3 -3
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult.ts +2 -2
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineSelectorNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/BehaviorState.ts +1 -1
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseIfNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/EndIfNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IfNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode.ts +6 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/LineCommentNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.ts +4 -4
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.ts +5 -5
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.ts +7 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.ts +5 -5
- package/src/lib/components/layouts/SeaweedBaseLayout.svelte +3 -3
- package/src/lib/components/pineapple/PineappleBaseLayout.svelte +11 -18
- package/src/lib/index.ts +3 -1
- package/src/lib/scripts/util/ManualCheck.ts +1 -1
- package/src/lib/scripts/util/ManualCheckRun.ts +1 -1
- package/src/lib/store.ts +1 -1
- package/src/lib/types/pineapple_fiber/DialogDetail.ts +1 -1
- package/src/lib/util/{stable_random.ts → util.ts} +22 -16
- package/src/routes/(pineapple)/+page.svelte +22 -12
- package/src/routes/(pineapple)/pineapple/+page.svelte +13 -16
- package/src/routes/+error.svelte +1 -1
- package/src/routes/+layout.svelte +3 -3
- package/src/routes/ErrorYarn.ts +3 -3
- package/.svelte-kit/__package__/util/create_go_to_function.d.ts +0 -1
- package/.svelte-kit/__package__/util/create_go_to_function.js +0 -5
- package/dist/util/create_go_to_function.d.ts +0 -1
- package/dist/util/create_go_to_function.js +0 -5
- package/src/lib/util/create_go_to_function.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BehaviorStatus } from "$
|
|
2
|
-
import type { LineBehaviorNode } from "$
|
|
3
|
-
import type { LineNodeArguments } from "$
|
|
4
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
2
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
3
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
4
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
5
5
|
|
|
6
6
|
export class LineCommentNode implements LineBehaviorNode {
|
|
7
7
|
process(nodeArgs: LineNodeArguments): LineBehaviorResult {
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
3
|
import { browser } from "$app/environment";
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import type { LineBehaviorNode } from "$
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This is a leaf node that ALWAYS returns success
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineNodeArguments } from "$
|
|
2
|
-
import type { LineBehaviorResult } from "$
|
|
3
|
-
import { BehaviorStatus } from "$
|
|
4
|
-
import { btreeUtils } from "$
|
|
5
|
-
import { dialogVariableStore } from "$
|
|
6
|
-
import type { LineBehaviorNode } from "$
|
|
7
|
-
import { expressionEvaluator } from "$
|
|
1
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
2
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
3
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
4
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
5
|
+
import { dialogVariableStore } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
6
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
7
|
+
import { expressionEvaluator } from "$lib/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This is a leaf node that returns:
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { SetVariableNode } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { SetVariableNode } from "$lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
6
6
|
|
|
7
7
|
export class DeclareCommand implements LineBehaviorNode {
|
|
8
8
|
setVariableNode = new SetVariableNode();
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { SetVariableNode } from "$
|
|
6
|
-
import { dialogManager } from "$
|
|
7
|
-
import { btreeUtils } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { SetVariableNode } from "$lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode";
|
|
6
|
+
import { dialogManager } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
7
|
+
import { btreeUtils } from "$lib/components/dialog_manager/behavior_tree/core/BTreeUtils";
|
|
8
8
|
|
|
9
9
|
export class JumpCommand implements LineBehaviorNode {
|
|
10
10
|
setVariableNode = new SetVariableNode();
|
package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { LineBehaviorNode } from "$
|
|
2
|
-
import type { LineNodeArguments } from "$
|
|
3
|
-
import type { LineBehaviorResult } from "$
|
|
4
|
-
import { BehaviorStatus } from "$
|
|
5
|
-
import { dialogVariableStore } from "$
|
|
1
|
+
import type { LineBehaviorNode } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode";
|
|
2
|
+
import type { LineNodeArguments } from "$lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments";
|
|
3
|
+
import type { LineBehaviorResult } from "$lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult";
|
|
4
|
+
import { BehaviorStatus } from "$lib/components/dialog_manager/behavior_tree/core/BehaviorStatus";
|
|
5
|
+
import { dialogVariableStore } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
6
6
|
import { browser } from "$app/environment";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// For auto dark/light mode
|
|
3
3
|
import { AppBar, AppShell, autoModeWatcher, LightSwitch } from "@skeletonlabs/skeleton";
|
|
4
|
-
import RandomizedBackground from "$
|
|
4
|
+
import RandomizedBackground from "$lib/components/RandomizedBackground.svelte";
|
|
5
5
|
|
|
6
6
|
// store
|
|
7
|
-
import { enableBackground } from "$
|
|
7
|
+
import { enableBackground } from "$lib/store";
|
|
8
8
|
// assets
|
|
9
|
-
import { enableDialogueOverlay } from "$
|
|
9
|
+
import { enableDialogueOverlay } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
10
10
|
import { writable } from "svelte/store";
|
|
11
11
|
import { fly } from "svelte/transition";
|
|
12
12
|
// todo: clean up all these imports!
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
import { enableBackground } from "$pkg/store";
|
|
12
12
|
import type { BreadcrumbData } from "$pkg/types/BreadcrumbData";
|
|
13
13
|
// assets
|
|
14
|
-
// import DialogOverlay from "$
|
|
14
|
+
// import DialogOverlay from "$lib/components/DialogOverlay.svelte";
|
|
15
15
|
import AresLogo from "$pkg/assets/characters/ares/ares_logo.webp";
|
|
16
16
|
import FABIcon from "$pkg/assets/placeholder/placeholder_circle.png";
|
|
17
17
|
import CloseIcon from "$pkg/assets/icons/close.svg";
|
|
18
18
|
import { dialogManager, enableDialogueOverlay } from "$pkg/components/dialog_manager/DialogManagerStore";
|
|
19
19
|
import Toast from "$pkg/components/pineapple/toast/Toast.svelte";
|
|
20
20
|
import DialogOverlay from "$pkg/components/DialogOverlay.svelte";
|
|
21
|
+
import { fade } from "svelte/transition";
|
|
21
22
|
// todo: clean up all these imports!
|
|
22
23
|
|
|
23
24
|
let pages: BreadcrumbData[] = [];
|
|
@@ -97,12 +98,12 @@
|
|
|
97
98
|
<ol class="breadcrumb">
|
|
98
99
|
{#each pages as crumb, i}
|
|
99
100
|
{#if i < pages.length - 1}
|
|
100
|
-
<li class="crumb">
|
|
101
|
+
<li class="crumb" transition:fade>
|
|
101
102
|
<a href={crumb.path}>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</a>
|
|
103
|
+
›
|
|
102
104
|
</li>
|
|
103
|
-
<li class="crumb-separator" aria-hidden="true">›</li>
|
|
104
105
|
{:else}
|
|
105
|
-
<li class="crumb">{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
|
|
106
|
+
<li class="crumb" transition:fade>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
|
|
106
107
|
{/if}
|
|
107
108
|
{/each}
|
|
108
109
|
</ol>
|
|
@@ -123,17 +124,7 @@
|
|
|
123
124
|
<slot />
|
|
124
125
|
<div class="footer-space" />
|
|
125
126
|
</div>
|
|
126
|
-
|
|
127
|
-
<!-- <!– Page Route Content –>-->
|
|
128
|
-
<!-- <div class="default-page-container">-->
|
|
129
|
-
<!-- <slot />-->
|
|
130
|
-
<!-- <div class="footer-space" />-->
|
|
131
|
-
<!-- </div>-->
|
|
132
|
-
<!-- <DialogOverlay />-->
|
|
133
|
-
<!--{:else}-->
|
|
134
|
-
<!-- <DialogOverlay />-->
|
|
135
|
-
<!-- <slot />-->
|
|
136
|
-
<!--{/if}-->
|
|
127
|
+
|
|
137
128
|
</AppShell>
|
|
138
129
|
|
|
139
130
|
<style lang="postcss">
|
|
@@ -177,16 +168,18 @@
|
|
|
177
168
|
it likely disappeared due to code gen shenanigans and package magic */
|
|
178
169
|
.breadcrumb,
|
|
179
170
|
.breadcrumb-nonresponsive {
|
|
180
|
-
@apply flex items-center
|
|
171
|
+
@apply flex items-center w-full overflow-x-auto;
|
|
181
172
|
/*@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;*/
|
|
182
173
|
}
|
|
183
174
|
|
|
184
175
|
.crumb {
|
|
185
|
-
@apply flex justify-center items-center
|
|
176
|
+
@apply flex justify-center items-center;
|
|
177
|
+
margin: 0.1em;
|
|
186
178
|
}
|
|
187
179
|
|
|
188
180
|
.crumb-separator {
|
|
189
|
-
@apply flex
|
|
181
|
+
@apply flex;
|
|
182
|
+
color: var(--color-text-50);
|
|
190
183
|
}
|
|
191
184
|
|
|
192
185
|
/* === Auto-Responsive === */
|
package/src/lib/index.ts
CHANGED
|
@@ -8,4 +8,6 @@ export * from "./components/dialog_manager/DialogManager";
|
|
|
8
8
|
export * from "./components/dialog_manager/DialogUtils";
|
|
9
9
|
export * from "./types/pineapple_fiber/PortraitType";
|
|
10
10
|
export * from "./types/pineapple_fiber/DialogDetail";
|
|
11
|
-
export * from "./util/
|
|
11
|
+
export * from "./util/util";
|
|
12
|
+
export { mulberry32Generator } from "$pkg/util/util";
|
|
13
|
+
export { generatedDailySeed } from "$pkg/util/util";
|
package/src/lib/store.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { writable } from "svelte/store";
|
|
|
7
7
|
* When updating to false, remember to restore the value to true, our default value, onDestroy.
|
|
8
8
|
* Avoid async to prevent weird flashes of updates!
|
|
9
9
|
* ```
|
|
10
|
-
* import {enableBackground} from "$
|
|
10
|
+
* import {enableBackground} from "$lib/store.ts";
|
|
11
11
|
* enableBackground.update(() => false);
|
|
12
12
|
*
|
|
13
13
|
* onDestroy(() => {
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
export const generatedDailySeed = (): number => {
|
|
2
|
-
const date = new Date();
|
|
3
|
-
const time = date.getTime() + 86400000;
|
|
4
|
-
return time - (time % 86400000);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// psuedo misc with seed
|
|
8
|
-
// from https://stackoverflow.com/a/47593316
|
|
9
|
-
export const mulberry32Generator = (a: number): (() => number) => {
|
|
10
|
-
return function
|
|
11
|
-
var t = (a += 0x6d2b79f5);
|
|
12
|
-
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
13
|
-
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
14
|
-
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
1
|
+
export const generatedDailySeed = (): number => {
|
|
2
|
+
const date = new Date();
|
|
3
|
+
const time = date.getTime() + 86400000;
|
|
4
|
+
return time - (time % 86400000);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// psuedo misc with seed
|
|
8
|
+
// from https://stackoverflow.com/a/47593316
|
|
9
|
+
export const mulberry32Generator = (a: number): (() => number) => {
|
|
10
|
+
return function() {
|
|
11
|
+
var t = (a += 0x6d2b79f5);
|
|
12
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
13
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
14
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const createGoToFunction = (path: string): (() => void) => {
|
|
19
|
+
return (() => {
|
|
20
|
+
location.href = path;
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { PUBLIC_CRINGE_USERNAME } from "$env/static/public";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
import
|
|
4
|
+
|
|
5
|
+
import { createGoToFunction } from "$pkg/util/util";
|
|
6
|
+
import { Card } from "$pkg";
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<svelte:head>
|
|
@@ -14,23 +15,32 @@
|
|
|
14
15
|
/>
|
|
15
16
|
</svelte:head>
|
|
16
17
|
|
|
17
|
-
<
|
|
18
|
-
<
|
|
18
|
+
<Card>
|
|
19
|
+
<div slot="content" class="content">
|
|
20
|
+
<h1 class="mb-8" style="font-weight: bolder">Directory</h1>
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
<div class="btn-group">
|
|
23
|
+
<button on:click={createGoToFunction("pineapple")}><h2>Pineapple playground</h2></button>
|
|
24
|
+
<button on:click={createGoToFunction("portfolio")}><h2>Seaweed playrground</h2></button>
|
|
25
|
+
</div>
|
|
23
26
|
</div>
|
|
24
|
-
</
|
|
27
|
+
</Card>
|
|
25
28
|
|
|
26
29
|
<style lang="postcss">
|
|
27
|
-
.btn-group
|
|
30
|
+
.btn-group {
|
|
28
31
|
padding: 2em;
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: 2em;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
|
|
29
36
|
}
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
button {
|
|
39
|
+
@apply btn variant-filled-secondary;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.content {
|
|
43
|
+
padding: 2em;
|
|
32
44
|
text-align: center;
|
|
33
|
-
padding-inline-end: 0;
|
|
34
|
-
@apply p-16;
|
|
35
45
|
}
|
|
36
46
|
</style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { showComponentInToast, showTextInToast } from "$pkg/components/pineapple/toast/Toast";
|
|
4
4
|
import TestCard from "$pkg/components/pineapple/toast/custom-toast/TestCustomToast.svelte";
|
|
5
5
|
import TestDialogYarn from "./TestDialog.yarn?raw";
|
|
6
|
-
import {
|
|
6
|
+
import { dialogManager } from "$pkg";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
let testingQueueNumber = 1;
|
|
@@ -36,30 +36,27 @@
|
|
|
36
36
|
/>
|
|
37
37
|
</svelte:head>
|
|
38
38
|
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
on:click={() => {
|
|
39
|
+
<div class="card default-card">
|
|
40
|
+
<button
|
|
41
|
+
class="btn variant-filled-secondary"
|
|
42
|
+
on:click={() => {
|
|
44
43
|
showComponentInToast({componentAndProps: {component: TestCard, props: undefined}});
|
|
45
44
|
}}><h3>Test custom toast</h3></button>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
<button
|
|
46
|
+
class="btn variant-filled-secondary"
|
|
47
|
+
on:click={() => {
|
|
49
48
|
showTextInToast(`${testingQueueNumber} ${testingRandomPhrases[testingQueueNumber]}`);
|
|
50
49
|
testingQueueNumber = (testingQueueNumber + 1) % testingRandomPhrases.length;
|
|
51
50
|
}}><h3>Handy toast</h3></button>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</Card>
|
|
51
|
+
<button
|
|
52
|
+
class="btn variant-filled-secondary"
|
|
53
|
+
on:click={onTestDialogClick}><h3>Test dialog</h3></button>
|
|
54
|
+
</div>
|
|
57
55
|
|
|
58
56
|
<style lang="postcss">
|
|
59
|
-
.card
|
|
57
|
+
.default-card {
|
|
60
58
|
display: flex;
|
|
61
59
|
flex-wrap: wrap;
|
|
62
60
|
gap: 2em;
|
|
63
|
-
padding: 2em;
|
|
64
61
|
}
|
|
65
62
|
</style>
|
package/src/routes/+error.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onDestroy } from "svelte";
|
|
3
|
-
import { dialogManager } from "$
|
|
3
|
+
import { dialogManager } from "$lib/components/dialog_manager/DialogManagerStore.ts";
|
|
4
4
|
import { ErrorYarn } from "./ErrorYarn";
|
|
5
5
|
|
|
6
6
|
ErrorYarn.setDialogTree();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// The ordering of these imports is critical to your app working properly
|
|
3
|
-
import "$
|
|
3
|
+
import "$lib/theme.postcss";
|
|
4
4
|
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
|
|
5
5
|
// import "@skeletonlabs/skeleton/styles/all.css";
|
|
6
6
|
// Most of your app wide CSS should be put in this file
|
|
7
|
-
import "$
|
|
7
|
+
import "$lib/app.postcss";
|
|
8
8
|
|
|
9
|
-
import "$
|
|
9
|
+
import "$lib/styles/global.css";
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<slot />
|
package/src/routes/ErrorYarn.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// this file was generated by PineappleWeaver.ts
|
|
2
2
|
// do not edit!
|
|
3
3
|
|
|
4
|
-
import { PortraitType } from "$
|
|
5
|
-
import { dialogManager } from "$
|
|
6
|
-
import type { DialogDetail } from "$
|
|
4
|
+
import { PortraitType } from "$lib/types/pineapple_fiber/PortraitType";
|
|
5
|
+
import { dialogManager } from "$lib/components/dialog_manager/DialogManagerStore";
|
|
6
|
+
import type { DialogDetail } from "$lib/types/pineapple_fiber/DialogDetail";
|
|
7
7
|
|
|
8
8
|
class _ErrorYarn {
|
|
9
9
|
dialogList: DialogDetail[] = [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createGoToFunction: (path: string) => (() => void);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createGoToFunction: (path: string) => (() => void);
|