@turnipxenon/pineapple 3.1.0-alpha.2 → 3.1.0-alpha.4
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/README.md +17 -9
- package/dist/components/RandomizedBackground.svelte +4 -0
- package/dist/components/RandomizedBackground.svelte.d.ts +1 -0
- package/dist/components/dialog_manager/DialogManager.d.ts +1 -1
- package/dist/components/dialog_manager/DialogManager.js +1 -1
- package/dist/components/dialog_manager/DialogMangerInit.d.ts +1 -1
- package/dist/components/dialog_manager/index.d.ts +1 -0
- package/dist/components/dialog_manager/index.js +1 -0
- package/dist/scripts/pineapple_fiber/PineappleWeaver.js +2 -3
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,12 @@ You can preview the production build with `yarn preview`.
|
|
|
27
27
|
|
|
28
28
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
## Installation as a package
|
|
32
|
+
|
|
33
|
+
TODO: If you're curious how to install this on a fresh package or a package not using Skeleton, you can ask me to document the steps but I haven't explored that since I'm focused in migrating my projects. It should just be installing Skeleton v3 and then seeing the steps below.
|
|
34
|
+
|
|
35
|
+
## Migration from v2 to v3
|
|
31
36
|
|
|
32
37
|
```bash
|
|
33
38
|
yarn add @turnipxenon2/pineapple
|
|
@@ -37,20 +42,23 @@ yarn add @turnipxenon2/pineapple
|
|
|
37
42
|
|
|
38
43
|
We still have to do some manual set up to our project to make it work.
|
|
39
44
|
|
|
40
|
-
1.
|
|
45
|
+
1. Follow these steps here: https://www.skeleton.dev/docs/get-started/migrate-from-v2
|
|
46
|
+
|
|
47
|
+
2. **Configure Tailwind.** Open your global stylesheet in `/src/styles/app.css` and add the following imports:
|
|
41
48
|
|
|
42
49
|
```css
|
|
43
50
|
@import 'tailwindcss';
|
|
44
|
-
@import
|
|
45
|
-
@import
|
|
46
|
-
@import
|
|
47
|
-
@import '
|
|
51
|
+
@import "@skeletonlabs/skeleton";
|
|
52
|
+
@import "@skeletonlabs/skeleton/optional/presets";
|
|
53
|
+
@import "@skeletonlabs/skeleton/themes/legacy";
|
|
54
|
+
@import '../../../node_modules/@turnipxenon/pineapple/dist/styles/app.css';
|
|
55
|
+
@import '../../../node_modules/@turnipxenon/pineapple/dist/styles/turnip-theme.css';
|
|
56
|
+
|
|
57
|
+
@source "../../../node_modules/@skeletonlabs/skeleton-svelte/dist";
|
|
58
|
+
@source '../../../node_modules/@turnipxenon/pineapple/dist/';
|
|
48
59
|
|
|
49
60
|
@plugin '@tailwindcss/forms';
|
|
50
61
|
@plugin '@tailwindcss/typography';
|
|
51
|
-
|
|
52
|
-
@source '../node_modules/@skeletonlabs/skeleton-svelte/dist';
|
|
53
|
-
@source '../node_modules/@turnipxenon/pineapple/dist/styles'
|
|
54
62
|
```
|
|
55
63
|
|
|
56
64
|
2. **Set Active Theme.** Open /src/app.html, then set the data-theme attribute on the HTML tag to define the active theme.
|
|
@@ -15,7 +15,7 @@ export declare class DialogManager implements IDialogManager {
|
|
|
15
15
|
currentIndex: number;
|
|
16
16
|
previousTimestamp: number;
|
|
17
17
|
isDoneTransition: boolean;
|
|
18
|
-
currentPortrait: import("svelte/store").Writable<
|
|
18
|
+
currentPortrait: import("svelte/store").Writable<string>;
|
|
19
19
|
portraitMap: Map<string, any>;
|
|
20
20
|
currentState: DialogState;
|
|
21
21
|
currentReadableState: import("svelte/store").Writable<DialogState>;
|
|
@@ -28,7 +28,7 @@ export class DialogManager {
|
|
|
28
28
|
currentIndex = 0;
|
|
29
29
|
previousTimestamp = 0;
|
|
30
30
|
isDoneTransition = false;
|
|
31
|
-
currentPortrait = writable();
|
|
31
|
+
currentPortrait = writable("");
|
|
32
32
|
portraitMap = new Map();
|
|
33
33
|
currentState = DialogState.Visible;
|
|
34
34
|
currentReadableState = writable(this.currentState);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IDialogManager } from "./IDialogManager";
|
|
2
|
-
export declare const getDialogManager: () => Promise<IDialogManager
|
|
2
|
+
export declare const getDialogManager: () => Promise<IDialogManager>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DialogMangerInit";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DialogMangerInit";
|
|
@@ -44,8 +44,7 @@ const pineappleWeaverRun = () => {
|
|
|
44
44
|
const template = `// this file was generated by PineappleWeaver.ts
|
|
45
45
|
// do not edit!
|
|
46
46
|
|
|
47
|
-
import type
|
|
48
|
-
import { dialogManager, PortraitType } from "@turnipxenon/pineapple";
|
|
47
|
+
import { type DialogDetail, getDialogManager, PortraitType } from "@turnipxenon/pineapple";
|
|
49
48
|
|
|
50
49
|
class _${fileName}Yarn {
|
|
51
50
|
dialogList: DialogDetail[] = [
|
|
@@ -54,7 +53,7 @@ ${dialogDetailListToString(dialogDetailList)}
|
|
|
54
53
|
|
|
55
54
|
/* Remember to call DialogManager.subscribeToSetDialogChoice before calling this in Svelte */
|
|
56
55
|
setDialogTree = () => {
|
|
57
|
-
|
|
56
|
+
getDialogManager().then((dm) => dm?.setDialogTree(this.dialogList));
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import BgTiledTurnip from '../../../assets/bg_tiled/bg_tiled_turnip.png';
|
|
10
10
|
import RandomizedImage from './RandomizedImage.svelte';
|
|
11
11
|
import { generatedDailySeed, mulberry32Generator } from '../../../util/util';
|
|
12
|
-
import { appState } from "../../templates/
|
|
12
|
+
import { appState } from "../../templates/PinyaPageLayout/runes.svelte";
|
|
13
13
|
|
|
14
14
|
let { enabled }: {
|
|
15
15
|
enabled: boolean
|
package/package.json
CHANGED