@turnipxenon/pineapple 5.3.3 → 5.3.5
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/dialog_manager/DialogManager.d.ts +5 -3
- package/dist/components/dialog_manager/DialogManager.d.ts.map +1 -1
- package/dist/components/dialog_manager/DialogManager.js +18 -10
- package/dist/components/reveal-info/RevealInfo.svelte +2 -1
- package/dist/components/reveal-info/RevealInfo.svelte.d.ts.map +1 -1
- package/dist/modules/overrideable_meta/OverridableMeta.svelte +27 -21
- package/dist/modules/overrideable_meta/OverridableMeta.svelte.d.ts.map +1 -1
- package/dist/modules/parsnip/ParsnipBlockChildren.svelte +16 -3
- package/dist/modules/parsnip/ParsnipBlockChildren.svelte.d.ts.map +1 -1
- package/dist/modules/parsnip/ParsnipPhrasingChildren.svelte +3 -0
- package/dist/modules/parsnip/ParsnipPhrasingChildren.svelte.d.ts.map +1 -1
- package/dist/modules/parsnip/external-images/ParsnipImage.svelte +5 -4
- package/dist/modules/parsnip/external-images/ParsnipImage.svelte.d.ts.map +1 -1
- package/dist/modules/parsnip/external-images/ParsnipImageCollection.svelte +2 -1
- package/dist/modules/parsnip/external-images/ParsnipImageCollection.svelte.d.ts.map +1 -1
- package/dist/modules/parsnip/route-util/slugPageServerLoad.d.ts.map +1 -1
- package/dist/modules/parsnip/route-util/slugPageServerLoad.js +15 -2
- package/dist/ui/components/MeltToaster/MeltToaster.svelte +1 -1
- package/dist/ui/components/NestedNavigation.svelte +1 -1
- package/dist/ui/components/SocialSection.svelte +2 -2
- package/dist/ui/components/randomized-background/RandomizedImage.svelte +7 -5
- package/dist/ui/components/randomized-background/RandomizedImage.svelte.d.ts.map +1 -1
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte +1 -1
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte.d.ts.map +1 -1
- package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +3 -1
- package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts.map +1 -1
- package/dist/ui/elements/index.d.ts +1 -0
- package/dist/ui/elements/index.d.ts.map +1 -1
- package/dist/ui/elements/index.js +1 -0
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +3 -4
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte.d.ts.map +1 -1
- package/dist/ui/elements/pinya-combobox/index.d.ts +3 -0
- package/dist/ui/elements/pinya-combobox/index.d.ts.map +1 -0
- package/dist/ui/elements/pinya-combobox/index.js +2 -0
- package/dist/ui/modules/NavigationMenu/LdSchema.d.ts +26 -0
- package/dist/ui/modules/NavigationMenu/LdSchema.d.ts.map +1 -0
- package/dist/ui/modules/NavigationMenu/LdSchema.js +18 -0
- package/dist/ui/modules/NavigationMenu/NavigationControl.svelte.d.ts +1 -1
- package/dist/ui/modules/NavigationMenu/NavigationMenu.svelte +33 -29
- package/dist/ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts +1 -1
- package/dist/ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts.map +1 -1
- package/dist/ui/modules/NavigationMenu/PageMeta.d.ts +1 -9
- package/dist/ui/modules/NavigationMenu/PageMeta.d.ts.map +1 -1
- package/dist/ui/modules/NavigationMenu/PageMeta.js +1 -1
- package/dist/ui/modules/NavigationMenu/index.d.ts +1 -0
- package/dist/ui/modules/NavigationMenu/index.d.ts.map +1 -1
- package/dist/ui/modules/NavigationMenu/index.js +1 -0
- package/dist/ui/modules/universal-overlay/DialogPanel.svelte +58 -39
- package/dist/ui/modules/universal-overlay/DialogPanel.svelte.d.ts.map +1 -1
- package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +2 -2
- package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +3 -2
- package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte.d.ts.map +1 -1
- package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +5 -9
- package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte.d.ts.map +1 -1
- package/dist/ui/templates/blog_template/BlogTemplate.svelte +8 -6
- package/dist/ui/templates/blog_template/BlogTemplate.svelte.d.ts +1 -1
- package/dist/ui/templates/blog_template/BlogTemplate.svelte.d.ts.map +1 -1
- package/dist/ui/templates/blog_template/BlogTemplateInner.svelte +8 -5
- package/dist/ui/templates/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/dist/ui/templates/blog_template/BlogTemplateInner.svelte.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DialogManager is the object we want to interact with in Svelte
|
|
3
3
|
*/
|
|
4
|
-
import { type DialogMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
5
|
-
import type { DialogDetail } from "../../types/pineapple_fiber/DialogDetail";
|
|
6
|
-
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
7
4
|
import { DialogProcessor } from "./DialogProcessor";
|
|
8
5
|
import type { IDialogManager } from "./IDialogManager";
|
|
6
|
+
import type { DialogDetail } from "../../types/pineapple_fiber/DialogDetail";
|
|
7
|
+
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
8
|
+
import { type DialogMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
9
9
|
export type OnSetDialogChoiceCallback = (newMessage: DialogDetail) => void;
|
|
10
10
|
export declare class DialogManager implements IDialogManager {
|
|
11
11
|
dialogMessageMap: Map<string, DialogDetail>;
|
|
@@ -16,6 +16,7 @@ export declare class DialogManager implements IDialogManager {
|
|
|
16
16
|
currentIndex: number;
|
|
17
17
|
previousTimestamp: number;
|
|
18
18
|
isDoneTransition: boolean;
|
|
19
|
+
isDoneTransitionWritable: import("svelte/store").Writable<boolean>;
|
|
19
20
|
currentPortrait: import("svelte/store").Writable<string>;
|
|
20
21
|
portraitMap: Map<string, string>;
|
|
21
22
|
currentState: DialogState;
|
|
@@ -30,6 +31,7 @@ export declare class DialogManager implements IDialogManager {
|
|
|
30
31
|
enableDialogueOverlayCache: boolean;
|
|
31
32
|
updateRate: number;
|
|
32
33
|
dialogVariableStore: DialogMapStore;
|
|
34
|
+
_choiceListenerController: AbortController | null;
|
|
33
35
|
constructor();
|
|
34
36
|
/**
|
|
35
37
|
* when users interact with the dialog, they can skip the transition like in a game
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogManager.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dialog_manager/DialogManager.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"DialogManager.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dialog_manager/DialogManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAQxG,MAAM,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,YAAY,KAAK,IAAI,CAAC;AAE3E,qBAAa,aAAc,YAAW,cAAc;IACnD,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAa;IACxD,iBAAiB,EAAE,YAAY,EAAE,CAAwB;IACzD,kBAAkB,EAAE,MAAM,CAAuC;IACjE,kBAAkB,EAAE,YAAY,CAA2B;IAC3D,cAAc,0CAAgB;IAC9B,YAAY,SAAK;IACjB,iBAAiB,SAAK;IACtB,gBAAgB,UAAS;IACzB,wBAAwB,2CAAmB;IAC3C,eAAe,0CAAgB;IAC/B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAa;IAC7C,YAAY,cAAuB;IACnC,oBAAoB,+CAA+B;IACnD,WAAW,0CAGR;IACH,iBAAiB,0CAGd;IACH,kBAAkB,SAAK;IACvB,eAAe,EAAE,eAAe,CAAC;IAEjC,qBAAqB,EAAE,YAAY,EAAE,CAAM;IAC3C,qBAAqB,UAAS;IAC9B,oBAAoB,EAAE,yBAAyB,EAAE,CAAM;IACvD,0BAA0B,UAAS;IACnC,UAAU,SAAa;IACvB,mBAAmB,EAAE,cAAc,CAAC;IACpC,yBAAyB,EAAE,eAAe,GAAG,IAAI,CAAQ;;IAgCzD;;;OAGG;IACH,aAAa,aASX;IAEF;;;OAGG;IACH,YAAY,GAAI,cAAc,OAAO,UAEnC;IAEF;;;;;OAKG;IACH,aAAa,GAAI,eAAe,YAAY,EAAE,EAAE,qBAAiB,UAsC/D;IAEF;;;;OAIG;IACH,0BAA0B,GAAI,UAAU,yBAAyB,UAE/D;IAEF;;;;OAIG;IACH,4BAA4B,GAAI,UAAU,yBAAyB,UAOjE;IAEF;;;;;;OAMG;IACH,eAAe,GAAI,YAAY,YAAY,GAAG,SAAS,UAWrD;IAEF,mBAAmB,GAAI,UAAU,MAAM,UAOrC;IAEF,gBAAgB,aA8Cd;IAEF,kBAAkB,aAEhB;IAEF;;;;;;;;OAQG;IACH,MAAM,GAAI,WAAW,MAAM,UA2DzB;IAEF,mBAAmB,CAAC,MAAM,EAAE,OAAO;IAInC,mBAAmB;IAIb,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAQrF,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,SAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAiBnF,aAAa,CAAC,OAAO,EAAE,MAAM;CAG7B;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
|
|
@@ -10,24 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
-
import { createNewMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
14
|
-
import { writable } from "svelte/store";
|
|
15
|
-
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
16
|
-
import { tweened } from "svelte/motion";
|
|
17
|
-
import { backOut, linear } from "svelte/easing";
|
|
18
|
-
import { PortraitType } from "../../types/pineapple_fiber/PortraitType";
|
|
19
|
-
import AresHappy from "../../assets/characters/ares/ares_happy.webp";
|
|
20
13
|
import AresBlushing from "../../assets/characters/ares/ares_blushing.webp";
|
|
21
14
|
import AresDisappointed from "../../assets/characters/ares/ares_disappointed.webp";
|
|
15
|
+
import AresHappy from "../../assets/characters/ares/ares_happy.webp";
|
|
22
16
|
import AresLetsGo from "../../assets/characters/ares/ares_lets_go.webp";
|
|
23
17
|
import AresMad from "../../assets/characters/ares/ares_mad.webp";
|
|
24
18
|
import AresNeutral from "../../assets/characters/ares/ares_neutral.webp";
|
|
25
19
|
import AresSlightlyMad from "../../assets/characters/ares/ares_slightly_mad.webp";
|
|
26
20
|
import AresSurprised from "../../assets/characters/ares/ares_surprised.webp";
|
|
27
21
|
import AresYay from "../../assets/characters/ares/ares_yay.webp";
|
|
28
|
-
import { defaultDialogMessage, enableUniversalOverlaySvelte4
|
|
22
|
+
import { defaultDialogMessage, enableUniversalOverlaySvelte4 } from "./DialogManagerStore";
|
|
29
23
|
import { DialogProcessor } from "./DialogProcessor";
|
|
30
24
|
import { parseYarn } from "../../scripts/pineapple_fiber/PineappleFiberParser";
|
|
25
|
+
import { DialogState } from "../../types/pineapple_fiber/DialogState";
|
|
26
|
+
import { createNewMapStore } from "../../types/pineapple_fiber/DialogVariableStore";
|
|
27
|
+
import { PortraitType } from "../../types/pineapple_fiber/PortraitType";
|
|
28
|
+
import { backOut, linear } from "svelte/easing";
|
|
29
|
+
import { tweened } from "svelte/motion";
|
|
30
|
+
import { writable } from "svelte/store";
|
|
31
31
|
const shouldDebugYarn = false;
|
|
32
32
|
export class DialogManager {
|
|
33
33
|
constructor() {
|
|
@@ -39,6 +39,7 @@ export class DialogManager {
|
|
|
39
39
|
this.currentIndex = 0;
|
|
40
40
|
this.previousTimestamp = 0;
|
|
41
41
|
this.isDoneTransition = false;
|
|
42
|
+
this.isDoneTransitionWritable = writable(false);
|
|
42
43
|
this.currentPortrait = writable("");
|
|
43
44
|
this.portraitMap = new Map();
|
|
44
45
|
this.currentState = DialogState.Visible;
|
|
@@ -58,6 +59,7 @@ export class DialogManager {
|
|
|
58
59
|
this.onSetDialogListeners = [];
|
|
59
60
|
this.enableDialogueOverlayCache = false;
|
|
60
61
|
this.updateRate = 40 / 1000;
|
|
62
|
+
this._choiceListenerController = null;
|
|
61
63
|
/**
|
|
62
64
|
* when users interact with the dialog, they can skip the transition like in a game
|
|
63
65
|
* note that there is a cool down to this, check out skipNextActiveTime
|
|
@@ -183,7 +185,7 @@ export class DialogManager {
|
|
|
183
185
|
// set the portrait
|
|
184
186
|
let portraitValue = AresHappy;
|
|
185
187
|
if (this.currentMessageMeta.portraitType) {
|
|
186
|
-
portraitValue = (_b = this.portraitMap.get((_a = this.currentMessageMeta.portraitType) !== null && _a !== void 0 ? _a : AresHappy)) !== null && _b !== void 0 ? _b :
|
|
188
|
+
portraitValue = (_b = this.portraitMap.get((_a = this.currentMessageMeta.portraitType) !== null && _a !== void 0 ? _a : AresHappy)) !== null && _b !== void 0 ? _b : "";
|
|
187
189
|
}
|
|
188
190
|
if (portraitValue) {
|
|
189
191
|
this.currentPortrait.update(() => portraitValue);
|
|
@@ -194,6 +196,7 @@ export class DialogManager {
|
|
|
194
196
|
this.currentIndex = 0;
|
|
195
197
|
this.skipNextActiveTime = this.previousTimestamp + 1000; // guard
|
|
196
198
|
this.isDoneTransition = false; // must be after the guard
|
|
199
|
+
this.isDoneTransitionWritable.set(false);
|
|
197
200
|
if (shouldDebugYarn) {
|
|
198
201
|
console.info(`Currently processing node: ${this.currentMessageMeta.dialogId}`);
|
|
199
202
|
}
|
|
@@ -224,6 +227,7 @@ export class DialogManager {
|
|
|
224
227
|
* ISSUE #81 https://github.com/TurnipXenon/pineapple/issues/81
|
|
225
228
|
*/
|
|
226
229
|
this.update = (timestamp) => {
|
|
230
|
+
var _a;
|
|
227
231
|
if (this.currentState == DialogState.Invisible || this.currentState == DialogState.Busy) {
|
|
228
232
|
window.requestAnimationFrame(this.update);
|
|
229
233
|
return;
|
|
@@ -231,15 +235,19 @@ export class DialogManager {
|
|
|
231
235
|
// if visible
|
|
232
236
|
// text transition loop
|
|
233
237
|
if (!this.isDoneTransition && this.currentIndex > this.fullCurrentMessage.length) {
|
|
238
|
+
(_a = this._choiceListenerController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
239
|
+
this._choiceListenerController = new AbortController();
|
|
240
|
+
const { signal } = this._choiceListenerController;
|
|
234
241
|
const elementList = document.getElementsByClassName("dialog-choice");
|
|
235
242
|
for (const el of elementList) {
|
|
236
243
|
el.addEventListener("click", () => {
|
|
237
244
|
// todo: make more robust; for now we're assuming first class is our choice
|
|
238
245
|
const choice = el.classList[0].split("-")[1];
|
|
239
246
|
this.setDialogChoice(this.dialogMessageMap.get(choice));
|
|
240
|
-
});
|
|
247
|
+
}, { signal });
|
|
241
248
|
}
|
|
242
249
|
this.isDoneTransition = true;
|
|
250
|
+
this.isDoneTransitionWritable.set(true);
|
|
243
251
|
}
|
|
244
252
|
// guard: skip if done or if not yet time to update
|
|
245
253
|
if (this.currentIndex > this.fullCurrentMessage.length ||
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import VisibilityIcon from "../../assets/icons/icon-visibility.svg";
|
|
4
4
|
import { ButtonVariant, PinyaButton, type PinyaButtonProps } from "../../ui/elements/index";
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
import ImageIcon from "../../ui/elements/ImageIcon.svelte";
|
|
7
8
|
import { type RevealInfoRecord } from "./RevealInfoCollection";
|
|
8
9
|
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
|
|
22
23
|
type State = "ready" | "loading" | "error" | "done";
|
|
23
24
|
|
|
24
|
-
let revealValue = $state(infoRecord.placeholder);
|
|
25
|
+
let revealValue = $state(untrack(() => infoRecord.placeholder));
|
|
25
26
|
let _state = $state<State>("ready");
|
|
26
27
|
let uid = $props.id();
|
|
27
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RevealInfo.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/reveal-info/RevealInfo.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"RevealInfo.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/reveal-info/RevealInfo.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,KAAK,gBAAgB,GAAI;IACxB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACxD,YAAY,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;CAChC,GAAG,IAAI,CAAC,gBAAgB,EAAI,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;AA4EhE,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -37,25 +37,31 @@ export const load = async (): Promise<OverridableMetaProps> => {
|
|
|
37
37
|
ogImage = []
|
|
38
38
|
}: Props = $props();
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
const updatePageMeta = () => {
|
|
41
|
+
if (rootUrl) {
|
|
42
|
+
pinyaHead.rootUrl = rootUrl;
|
|
43
|
+
}
|
|
44
|
+
if (title) {
|
|
45
|
+
pinyaHead.title = title;
|
|
46
|
+
}
|
|
47
|
+
if (ogTitle) {
|
|
48
|
+
pinyaHead.ogTitle = ogTitle;
|
|
49
|
+
}
|
|
50
|
+
if (ogDescription) {
|
|
51
|
+
pinyaHead.ogDescription = ogDescription;
|
|
52
|
+
}
|
|
53
|
+
if (ogImage) {
|
|
54
|
+
pinyaHead.ogImage = ogImage.map(img => {
|
|
55
|
+
if (img.startsWith("/")) {
|
|
56
|
+
return `${pinyaHead.rootUrl}${img}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return img;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
updatePageMeta();
|
|
65
|
+
|
|
66
|
+
$effect(updatePageMeta);
|
|
61
67
|
</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverridableMeta.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/overrideable_meta/OverridableMeta.svelte.ts"],"names":[],"mappings":"AAMC,UAAU,KAAK;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"OverridableMeta.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/overrideable_meta/OverridableMeta.svelte.ts"],"names":[],"mappings":"AAMC,UAAU,KAAK;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AA8CF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -4,12 +4,27 @@
|
|
|
4
4
|
import ParsnipList from "./ParsnipList.svelte";
|
|
5
5
|
import ParsnipParagraph from "./ParsnipParagraph.svelte";
|
|
6
6
|
import ParsnipPhrasingChildren from "./ParsnipPhrasingChildren.svelte";
|
|
7
|
+
import type { CodeBlockLang } from "../../ui/elements/CodeBlock/CodeBlockProps";
|
|
7
8
|
import { CodeBlock } from "../../ui/elements/index";
|
|
8
9
|
import type { Content } from "mdast";
|
|
9
10
|
import Self from "./ParsnipBlockChildren.svelte";
|
|
10
11
|
|
|
11
12
|
const { blockChildren, shouldUnwrapParagraph = false }
|
|
12
13
|
: { blockChildren: Content[], shouldUnwrapParagraph?: boolean } = $props();
|
|
14
|
+
|
|
15
|
+
const KNOWN_BLOCK_TYPES = new Set(['paragraph', 'heading', 'thematicBreak', 'blockquote', 'yaml', 'code', 'list', 'imageCollection']);
|
|
16
|
+
|
|
17
|
+
$effect(() => {
|
|
18
|
+
for (const child of blockChildren) {
|
|
19
|
+
if (!KNOWN_BLOCK_TYPES.has(child.type)) {
|
|
20
|
+
console.warn('[Parsnip] Unknown block child type:', child.type, child);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function parseLang(lang: string | null | undefined): CodeBlockLang {
|
|
26
|
+
return (lang ?? 'markdown') as CodeBlockLang;
|
|
27
|
+
}
|
|
13
28
|
</script>
|
|
14
29
|
|
|
15
30
|
{#each blockChildren as child (child)}
|
|
@@ -31,12 +46,10 @@
|
|
|
31
46
|
{:else if child.type === 'yaml'}
|
|
32
47
|
<!-- do nothing -->
|
|
33
48
|
{:else if child.type === 'code'}
|
|
34
|
-
<CodeBlock code={child.value} lang={child.lang
|
|
49
|
+
<CodeBlock code={child.value} lang={parseLang(child.lang)} />
|
|
35
50
|
{:else if child.type === 'list'}
|
|
36
51
|
<ParsnipList list={child} />
|
|
37
52
|
{:else if child.type === 'imageCollection'}
|
|
38
53
|
<ParsnipImageCollection url="" imageList={child.children} />
|
|
39
|
-
{:else}
|
|
40
|
-
<p>{JSON.stringify(child, undefined, 2)}</p>
|
|
41
54
|
{/if}
|
|
42
55
|
{/each}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParsnipBlockChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipBlockChildren.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParsnipBlockChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipBlockChildren.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGpC,KAAK,gBAAgB,GAAI;IAAE,aAAa,EAAE,OAAO,EAAE,CAAC;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA2DxF,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
<Self phrasingChildren={child.children} />
|
|
31
31
|
</a>
|
|
32
32
|
{/if}
|
|
33
|
+
{:else if child.type === 'html'}
|
|
34
|
+
<!-- todo: special logic here -->
|
|
35
|
+
<!-- for now, let's leave it empty -->
|
|
33
36
|
{:else if child.type === 'image'}
|
|
34
37
|
<ParsnipImage {...child} />
|
|
35
38
|
{:else if child.type === 'embedWikilink'}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParsnipPhrasingChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipPhrasingChildren.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,gBAAgB,GAAI;IAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ParsnipPhrasingChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipPhrasingChildren.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,gBAAgB,GAAI;IAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AAiDlE,QAAA,MAAM,uBAAuB,sDAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
|
|
3
|
+
import { untrack } from "svelte";
|
|
3
4
|
import { getPhotoDetails } from "./externalImages.remote";
|
|
4
5
|
|
|
5
6
|
const { url, alt = "", withDescription = false }: { url: string, alt: string, withDescription?: boolean } = $props();
|
|
6
|
-
let _alt = $state(alt);
|
|
7
|
+
let _alt = $state(untrack(() => alt));
|
|
7
8
|
|
|
8
|
-
const showDescription = withDescription || url.includes("with-description=true");
|
|
9
|
+
const showDescription = untrack(() => withDescription || url.includes("with-description=true"));
|
|
9
10
|
|
|
10
|
-
const galleryBase = url
|
|
11
|
+
const galleryBase = untrack(() => url
|
|
11
12
|
.replace(/[?#].*$/, "")
|
|
12
13
|
.replace(/^(https?:\/\/)(rabiole|photos)\./, "$1photo-gallery.")
|
|
13
|
-
.replace(/\/(api\/)?photos\/.*$/, "");
|
|
14
|
+
.replace(/\/(api\/)?photos\/.*$/, ""));
|
|
14
15
|
|
|
15
16
|
let details = $state<{ altText: string, description: string, tags: string[], createdAt: string } | null>(null);
|
|
16
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParsnipImage.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/ParsnipImage.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParsnipImage.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/ParsnipImage.svelte.ts"],"names":[],"mappings":"AAOC,KAAK,gBAAgB,GAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA4DlF,QAAA,MAAM,YAAY,sDAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
import { getPhotoCollectionMeta } from "./externalImages.remote";
|
|
4
4
|
import ParsnipImage from "./ParsnipImage.svelte";
|
|
5
5
|
import type { Image } from "mdast";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
const { url, imageList }: { url?: string, imageList?: Image[] } = $props();
|
|
8
9
|
|
|
9
|
-
const withDescription = url?.includes('with-description=true') ?? false;
|
|
10
|
+
const withDescription = untrack(() => url?.includes('with-description=true') ?? false);
|
|
10
11
|
|
|
11
12
|
let data = $state<{
|
|
12
13
|
photos: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParsnipImageCollection.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/ParsnipImageCollection.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ParsnipImageCollection.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/ParsnipImageCollection.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAGlC,KAAK,gBAAgB,GAAI;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAA;CAAE,CAAC;AAoDhE,QAAA,MAAM,sBAAsB,sDAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugPageServerLoad.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/route-util/slugPageServerLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAKvF,eAAO,MAAM,kBAAkB,GAAU,YAAY;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;;;
|
|
1
|
+
{"version":3,"file":"slugPageServerLoad.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/route-util/slugPageServerLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAKvF,eAAO,MAAM,kBAAkB,GAAU,YAAY;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;;;EA2GhF,CAAC"}
|
|
@@ -30,6 +30,19 @@ export const slugPageServerLoad = (_a) => __awaiter(void 0, [_a], void 0, functi
|
|
|
30
30
|
let imageCollection = [];
|
|
31
31
|
parsnipEntry.ast.ast.children.forEach(child => {
|
|
32
32
|
if (child.type === "paragraph"
|
|
33
|
+
&& child.children.length === 3
|
|
34
|
+
&& child.children[0].type === "html"
|
|
35
|
+
&& child.children[0].value.includes("data-obsidian-type")) {
|
|
36
|
+
// multiple rating special logic
|
|
37
|
+
// if we see a span with data-obsidian-type....
|
|
38
|
+
// todo: maybe in the future...
|
|
39
|
+
// const obsidianType = child.children[0].value.split("\"")[0];
|
|
40
|
+
// if (obsidianType === 'rating') {
|
|
41
|
+
//
|
|
42
|
+
// }
|
|
43
|
+
newChildren.push(child);
|
|
44
|
+
}
|
|
45
|
+
else if (child.type === "paragraph"
|
|
33
46
|
&& child.children.length === 1
|
|
34
47
|
&& (child.children[0].type === "image"
|
|
35
48
|
|| (child.children[0].type === "link" &&
|
|
@@ -67,10 +80,10 @@ export const slugPageServerLoad = (_a) => __awaiter(void 0, [_a], void 0, functi
|
|
|
67
80
|
ogImage: imageUrl ? [imageUrl] : undefined
|
|
68
81
|
};
|
|
69
82
|
// process review metadata
|
|
70
|
-
if ((_b = parsnipEntry.tags) === null || _b === void 0 ? void 0 : _b.includes(
|
|
83
|
+
if ((_b = parsnipEntry.tags) === null || _b === void 0 ? void 0 : _b.includes("food-review")) {
|
|
71
84
|
// parsnipEntry.foodReviewJson =
|
|
72
85
|
try {
|
|
73
|
-
const foodReviewResp = yield fetch(`${baseUrl}/${entryMeta.path.replace(
|
|
86
|
+
const foodReviewResp = yield fetch(`${baseUrl}/${entryMeta.path.replace(".ast.", ".ld.")}`);
|
|
74
87
|
parsnipEntry.foodReviewJson = yield foodReviewResp.json();
|
|
75
88
|
parsnipEntry.datePublished = parsnipEntry.foodReviewJson.datePublished;
|
|
76
89
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
if (mutation.type === "childList") {
|
|
25
25
|
setTimeout(() => {
|
|
26
26
|
// get all toasterRoot children
|
|
27
|
-
const children = Array.from(toasterRoot.children);
|
|
27
|
+
const children = Array.from(toasterRoot.children) as HTMLElement[];
|
|
28
28
|
children.forEach((child, index) => {
|
|
29
29
|
const revNum = Math.min(Math.abs(children.length - 1 - index), 5);
|
|
30
30
|
child.style.setProperty("--toast-index", index.toString());
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
{#each layout as site (site.relativeLink)}
|
|
77
77
|
<!-- todo: add highlighted class when relativeLink === page.url -->
|
|
78
78
|
<PinyaAccordionItem
|
|
79
|
-
class=
|
|
79
|
+
class={currentPath === site.relativeLink ? 'highlighted' : ''}
|
|
80
80
|
hasNoChild={site.nestedPages.length === 0}
|
|
81
81
|
pinyaValue={site.relativeLink}>
|
|
82
82
|
{#snippet control()}
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
} as const;
|
|
48
48
|
|
|
49
49
|
let shouldShowExtra = $state(false);
|
|
50
|
-
const style = `
|
|
50
|
+
const style = $derived(`
|
|
51
51
|
--preferred-justify-content: ${isSlot ? "flex-start" : "center"};
|
|
52
52
|
--preferred-overall-margin-bottom: ${isSlot ? "0" : "0.75lh"};
|
|
53
|
-
|
|
53
|
+
`);
|
|
54
54
|
|
|
55
55
|
onMount(() => {
|
|
56
56
|
shouldShowExtra = window.screen.availWidth >= 440;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- TODO: Documentation: consider documentation showcase -->
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
+
import { untrack } from "svelte";
|
|
5
|
+
|
|
4
6
|
let {
|
|
5
7
|
src,
|
|
6
8
|
rng
|
|
@@ -8,11 +10,11 @@
|
|
|
8
10
|
src: string,
|
|
9
11
|
rng: () => number
|
|
10
12
|
} = $props();
|
|
11
|
-
let rotateRandom = rng() * 90 - 45;
|
|
13
|
+
let rotateRandom = untrack(() => rng() * 90 - 45);
|
|
12
14
|
|
|
13
|
-
const paddingLeft = 1 + rng() * 5;
|
|
14
|
-
const paddingRight = 1 + rng() * 5;
|
|
15
|
-
const paddingTop = 1 + rng() * 7;
|
|
15
|
+
const paddingLeft = untrack(() => 1 + rng() * 5);
|
|
16
|
+
const paddingRight = untrack(() => 1 + rng() * 5);
|
|
17
|
+
const paddingTop = untrack(() => 1 + rng() * 7);
|
|
16
18
|
</script>
|
|
17
19
|
|
|
18
20
|
<div
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
img {
|
|
36
|
-
|
|
38
|
+
--randomized-image-size: min(10vw, 10vh);
|
|
37
39
|
width: var(--randomized-image-size);
|
|
38
40
|
height: var(--randomized-image-size);
|
|
39
41
|
transform: rotate(var(--rotateRandom));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RandomizedImage.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/components/randomized-background/RandomizedImage.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RandomizedImage.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/components/randomized-background/RandomizedImage.svelte.ts"],"names":[],"mappings":"AAKC,KAAK,gBAAgB,GAAI;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,MAAM,CAAA;CACjB,CAAC;AA2BH,QAAA,MAAM,eAAe,sDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<script lang="ts">
|
|
35
|
-
import { onMount } from "svelte";
|
|
36
35
|
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
37
36
|
|
|
38
37
|
let {
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
class="pinya-code-block {base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
68
67
|
>
|
|
69
68
|
<!-- Output Shiki's Generated HTML -->
|
|
69
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
70
70
|
{@html generatedHtml}
|
|
71
71
|
</div>
|
|
72
72
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/CodeBlock/CodeBlock.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeBlock.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/CodeBlock/CodeBlock.svelte.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+CvD,kHAAkH;AAClH,QAAA,MAAM,SAAS,oDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** Highlighting language keys supported by CodeBlock (must match langs loaded in CodeBlock.svelte). */
|
|
2
|
+
export type CodeBlockLang = 'console' | 'html' | 'css' | 'js' | 'ts' | 'markdown' | 'xml' | 'svelte' | 'json';
|
|
1
3
|
export interface CodeBlockProps {
|
|
2
4
|
/** Code string to render inside the block. */
|
|
3
5
|
code?: string;
|
|
4
6
|
/** Highlighting language key. */
|
|
5
|
-
lang?:
|
|
7
|
+
lang?: CodeBlockLang;
|
|
6
8
|
/** Base wrapper classes. */
|
|
7
9
|
base?: string;
|
|
8
10
|
/** Wrapper rounding classes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/CodeBlock/CodeBlockProps.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CodeBlockProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/CodeBlock/CodeBlockProps.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9G,MAAM,WAAW,cAAc;IAC9B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;IAErB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -2,6 +2,7 @@ export * from "./ColorScheme";
|
|
|
2
2
|
export * from "./GeneralUIProps";
|
|
3
3
|
export * from "./OnBackground";
|
|
4
4
|
export * from "./PinyaButtonCommon";
|
|
5
|
+
export * from "./pinya-combobox";
|
|
5
6
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
6
7
|
export { default as TextLink } from "./TextLink.svelte";
|
|
7
8
|
export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/elements/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/elements/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAA;AAGhC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE1F,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from "./ColorScheme";
|
|
|
3
3
|
export * from "./GeneralUIProps";
|
|
4
4
|
export * from "./OnBackground";
|
|
5
5
|
export * from "./PinyaButtonCommon";
|
|
6
|
+
export * from "./pinya-combobox";
|
|
6
7
|
// components
|
|
7
8
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
8
9
|
export { default as TextLink } from "./TextLink.svelte";
|
|
@@ -28,16 +28,15 @@
|
|
|
28
28
|
|
|
29
29
|
return undefined;
|
|
30
30
|
})(),
|
|
31
|
-
|
|
32
|
-
onValueChange: (t: T | SvelteSet<T> | undefined) => {
|
|
31
|
+
onValueChange: (t) => {
|
|
33
32
|
if (t instanceof SvelteSet) {
|
|
34
33
|
if (t.size > 0) {
|
|
35
|
-
value = [...t];
|
|
34
|
+
value = [...t] as T[];
|
|
36
35
|
} else {
|
|
37
36
|
value = [];
|
|
38
37
|
}
|
|
39
38
|
} else if (t) {
|
|
40
|
-
value = [t];
|
|
39
|
+
value = [t as T];
|
|
41
40
|
} else {
|
|
42
41
|
value = [];
|
|
43
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PinyaCombobox.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/pinya-combobox/PinyaCombobox.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAG7F,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"PinyaCombobox.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/pinya-combobox/PinyaCombobox.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAG7F,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM;WAuKL,kBAAkB,CAAC,CAAC,CAAC;;;;;EAAiF;AACnI,cAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM;IACpC,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,MAAM,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,KAAK,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,QAAQ;IACR,OAAO;CACV;AAED,UAAU,qBAAqB;IAC3B,KAAK,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3Y,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1I,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACjE;AACD;;;;GAIG;AACH,QAAA,MAAM,aAAa,EAAE,qBAAmC,CAAC;AACvC,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/pinya-combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type FoodReviewJson = LdReview | LdBrand;
|
|
2
|
+
export interface LdReview {
|
|
3
|
+
"@type": "Review";
|
|
4
|
+
datePublished: string;
|
|
5
|
+
reviewRating: {
|
|
6
|
+
ratingValue: number;
|
|
7
|
+
};
|
|
8
|
+
itemReviewed: {
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface LdBrand {
|
|
13
|
+
"@type": "Brand";
|
|
14
|
+
datePublished: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
aggregateRating: {
|
|
17
|
+
ratingValue: number;
|
|
18
|
+
reviewCount?: number;
|
|
19
|
+
};
|
|
20
|
+
review: LdReview[];
|
|
21
|
+
}
|
|
22
|
+
export declare const LdSchemaUtil: {
|
|
23
|
+
readonly getReviewRating: (review: FoodReviewJson) => number;
|
|
24
|
+
readonly getUrl: (review: FoodReviewJson) => string | undefined;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=LdSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LdSchema.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/NavigationMenu/LdSchema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,QAAQ;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,YAAY,EAAE;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;KACZ,CAAC;CACF;AAED,MAAM,WAAW,OAAO;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,EAAE;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,YAAY;uCACE,cAAc,KAAG,MAAM;8BAQhC,cAAc,KAAG,MAAM,GAAG,SAAS;CAO3C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const LdSchemaUtil = {
|
|
2
|
+
getReviewRating: (review) => {
|
|
3
|
+
if (review["@type"] === "Review") {
|
|
4
|
+
return review.reviewRating.ratingValue;
|
|
5
|
+
}
|
|
6
|
+
else { // Brand
|
|
7
|
+
return review.aggregateRating.ratingValue;
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
getUrl: (review) => {
|
|
11
|
+
if (review["@type"] === "Review") {
|
|
12
|
+
return review.itemReviewed.url;
|
|
13
|
+
}
|
|
14
|
+
else { // Brand
|
|
15
|
+
return review.url;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
selectedTags?: string[];
|
|
6
6
|
queryReady?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const NavigationControl: import("svelte").Component<Props, {}, "
|
|
8
|
+
declare const NavigationControl: import("svelte").Component<Props, {}, "selectedTags" | "currentIndex" | "pageSize" | "queryReady">;
|
|
9
9
|
type NavigationControl = ReturnType<typeof NavigationControl>;
|
|
10
10
|
export default NavigationControl;
|
|
11
11
|
//# sourceMappingURL=NavigationControl.svelte.d.ts.map
|