@turnipxenon/pineapple 3.1.0-alpha.9 → 4.0.0-alpha.1
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 +10 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte +2 -1
- package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +1 -1
- package/dist/ui/modules/NavigationMenu/NavigationMenu.svelte +3 -6
- package/dist/{components → ui/modules}/dialog_overlay/DialogOverlay.svelte +11 -10
- package/dist/ui/modules/index.d.ts +2 -0
- package/dist/ui/modules/index.js +2 -0
- package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte +3 -2
- package/dist/{components → ui/templates}/blog_template/BlogTemplate.svelte +4 -4
- package/dist/{components → ui/templates}/blog_template/BlogTemplate.svelte.d.ts +1 -1
- package/dist/{components → ui/templates}/blog_template/BlogTemplateInner.svelte +1 -1
- package/dist/{components → ui/templates}/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/Card.svelte +0 -64
- package/dist/components/Card.svelte.d.ts +0 -12
- package/dist/components/CarouselElement.svelte +0 -28
- package/dist/components/CarouselElement.svelte.d.ts +0 -8
- package/dist/components/LazyAsset.svelte +0 -124
- package/dist/components/LazyAsset.svelte.d.ts +0 -10
- package/dist/components/LazyAssetType.d.ts +0 -10
- package/dist/components/LazyAssetType.js +0 -12
- package/dist/components/OnElementVisbilityChanged.d.ts +0 -1
- package/dist/components/OnElementVisbilityChanged.js +0 -1
- package/dist/components/PineappleSlideToggle.svelte +0 -30
- package/dist/components/PineappleSlideToggle.svelte.d.ts +0 -10
- package/dist/components/RandomizedBackground.svelte +0 -87
- package/dist/components/RandomizedBackground.svelte.d.ts +0 -7
- package/dist/components/RandomizedImage.svelte +0 -44
- package/dist/components/RandomizedImage.svelte.d.ts +0 -7
- package/dist/components/StickyElement.svelte +0 -45
- package/dist/components/StickyElement.svelte.d.ts +0 -7
- package/dist/components/ToggleableContent.svelte +0 -95
- package/dist/components/ToggleableContent.svelte.d.ts +0 -8
- package/dist/components/ToggleableContentType.d.ts +0 -4
- package/dist/components/ToggleableContentType.js +0 -5
- package/dist/components/chip/Chip.svelte +0 -71
- package/dist/components/chip/Chip.svelte.d.ts +0 -8
- package/dist/components/combo_box/ComboBox.svelte +0 -17
- package/dist/components/combo_box/ComboBox.svelte.d.ts +0 -8
- package/dist/components/combo_box/ComboBoxWithButton.svelte +0 -29
- package/dist/components/combo_box/ComboBoxWithButton.svelte.d.ts +0 -9
- package/dist/components/combo_box/combo-box.postcss +0 -22
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.js +0 -9
- package/dist/components/layouts/LayoutConstants.d.ts +0 -1
- package/dist/components/layouts/LayoutConstants.js +0 -1
- package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -115
- package/dist/components/layouts/SeaweedBaseLayout.svelte.d.ts +0 -9
- package/dist/components/pineapple/PineappleBaseLayout.svelte +0 -216
- package/dist/components/pineapple/PineappleBaseLayout.svelte.d.ts +0 -7
- package/dist/components/pineapple/toast/DefaultToastBody.d.ts +0 -8
- package/dist/components/pineapple/toast/DefaultToastBody.js +0 -1
- package/dist/components/pineapple/toast/DefaultToastBody.svelte +0 -46
- package/dist/components/pineapple/toast/DefaultToastBody.svelte.d.ts +0 -10
- package/dist/components/pineapple/toast/Toast.d.ts +0 -26
- package/dist/components/pineapple/toast/Toast.js +0 -37
- package/dist/components/pineapple/toast/Toast.svelte +0 -120
- package/dist/components/pineapple/toast/Toast.svelte.d.ts +0 -3
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.d.ts +0 -5
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.js +0 -1
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.svelte +0 -1
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.svelte.d.ts +0 -26
- /package/dist/{components → modules}/overrideable_meta/OverridableMeta.svelte +0 -0
- /package/dist/{components → modules}/overrideable_meta/OverridableMeta.svelte.d.ts +0 -0
- /package/dist/{components → modules}/overrideable_meta/OverridableMetaProps.d.ts +0 -0
- /package/dist/{components → modules}/overrideable_meta/OverridableMetaProps.js +0 -0
- /package/dist/{components → modules}/overrideable_meta/index.d.ts +0 -0
- /package/dist/{components → modules}/overrideable_meta/index.js +0 -0
- /package/dist/{components → ui/modules}/dialog_overlay/DialogOverlay.svelte.d.ts +0 -0
- /package/dist/{components → ui/templates}/blog_template/blog-template.css +0 -0
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
src: string;
|
|
4
|
-
rng: () => number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
let { src, rng }: Props = $props();
|
|
8
|
-
let rotateRandom = rng() * 90 - 45;
|
|
9
|
-
|
|
10
|
-
const paddingLeft = 1 + rng() * 5;
|
|
11
|
-
const paddingRight = 1 + rng() * 5;
|
|
12
|
-
const paddingTop = 1 + rng() * 7;
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<div
|
|
16
|
-
style="--paddingTop: {paddingTop}rem;
|
|
17
|
-
--paddingLeft: {paddingLeft}rem;
|
|
18
|
-
--paddingRight: {paddingRight}rem;">
|
|
19
|
-
<img {src} class="randomized-image-style"
|
|
20
|
-
aria-hidden="true"
|
|
21
|
-
style="--rotateRandom:{rotateRandom}deg;"
|
|
22
|
-
alt=""
|
|
23
|
-
/>
|
|
24
|
-
<!-- todo: migration -->
|
|
25
|
-
<!-- class:darkMode={modeCurrent} />-->
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<style>
|
|
29
|
-
div {
|
|
30
|
-
padding-top: var(--paddingTop);
|
|
31
|
-
padding-left: var(--paddingLeft);
|
|
32
|
-
padding-right: var(--paddingRight);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
img {
|
|
36
|
-
width: 8rem;
|
|
37
|
-
height: 8rem;
|
|
38
|
-
transform: rotate(var(--rotateRandom));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.darkMode {
|
|
42
|
-
filter: brightness(50%);
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {onMount} from "svelte";
|
|
3
|
-
import {fly} from "svelte/transition";
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
isFirst?: boolean;
|
|
7
|
-
children?: import('svelte').Snippet;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let { isFirst = false, children }: Props = $props();
|
|
11
|
-
|
|
12
|
-
let stickyElem: HTMLElement = $state();
|
|
13
|
-
let isSticky = $state(false);
|
|
14
|
-
|
|
15
|
-
let observer: undefined | IntersectionObserver;
|
|
16
|
-
onMount(() => {
|
|
17
|
-
observer = new IntersectionObserver(
|
|
18
|
-
([e]) => {
|
|
19
|
-
isSticky = e.intersectionRatio < 1;
|
|
20
|
-
},
|
|
21
|
-
{threshold: [1]}
|
|
22
|
-
);
|
|
23
|
-
observer.observe(stickyElem);
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<span transition:fly={{y: -100}}>
|
|
28
|
-
{#if (isFirst && !isSticky)}
|
|
29
|
-
<!-- intentionally empty -->
|
|
30
|
-
{:else if (isSticky)}
|
|
31
|
-
{" | "}
|
|
32
|
-
{:else }
|
|
33
|
-
<br>
|
|
34
|
-
{/if}
|
|
35
|
-
<span class="sticky-div" bind:this={stickyElem}>
|
|
36
|
-
{@render children?.()}
|
|
37
|
-
</span>
|
|
38
|
-
</span>
|
|
39
|
-
|
|
40
|
-
<style>
|
|
41
|
-
.sticky-div {
|
|
42
|
-
position: sticky;
|
|
43
|
-
top: -1px;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { run } from 'svelte/legacy';
|
|
3
|
-
|
|
4
|
-
import { ToggleableContentType } from "./ToggleableContentType";
|
|
5
|
-
import { onMount } from "svelte";
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
toggle?: ToggleableContentType;
|
|
9
|
-
children?: import('svelte').Snippet;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let { toggle = ToggleableContentType.Default, children }: Props = $props();
|
|
13
|
-
|
|
14
|
-
enum GibberishState {
|
|
15
|
-
NonExistent,
|
|
16
|
-
CreatingParent,
|
|
17
|
-
Binded
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let defaultSlot: HTMLDivElement | undefined = $state(undefined);
|
|
21
|
-
let gibberishState: GibberishState = $state(GibberishState.NonExistent);
|
|
22
|
-
let gibberishParent: HTMLDivElement | undefined;
|
|
23
|
-
let gibberishSlot: Node | undefined;
|
|
24
|
-
|
|
25
|
-
const chaoticWordBank = ["niko", "toba", "seal", "aquarium", "ojisan", "baikal"];
|
|
26
|
-
const turnToGibberish = (node: Node) => {
|
|
27
|
-
for (const childNodes of node.childNodes) {
|
|
28
|
-
turnToGibberish(childNodes);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) {
|
|
32
|
-
const max = node.textContent.length;
|
|
33
|
-
node.textContent = "";
|
|
34
|
-
while (node.textContent.length < max) {
|
|
35
|
-
node.textContent += (chaoticWordBank[Math.floor(Math.random() * chaoticWordBank.length)]) + " ";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const processDefaultSlot = (slot: HTMLDivElement | undefined) => {
|
|
41
|
-
if (!slot || toggle == ToggleableContentType.Default) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
turnToGibberish(slot);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const attachGibberish = (parent: HTMLDivElement | undefined) => {
|
|
49
|
-
console.log("Help");
|
|
50
|
-
if (gibberishState !== GibberishState.CreatingParent && parent !== undefined) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
console.log("Help1");
|
|
55
|
-
if (gibberishSlot === undefined) {
|
|
56
|
-
console.warn("Gibberish slot was not created");
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
console.log("Help2");
|
|
61
|
-
if (gibberishParent === undefined) {
|
|
62
|
-
console.warn("Gibberish parent was not created");
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
console.log("Help3");
|
|
67
|
-
gibberishParent.appendChild(gibberishSlot);
|
|
68
|
-
console.log(gibberishParent);
|
|
69
|
-
gibberishState = GibberishState.Binded;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
onMount(() => {
|
|
73
|
-
processDefaultSlot(defaultSlot);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// afterUpdate(() => {
|
|
77
|
-
// console.log("after update:", gibberishState);
|
|
78
|
-
// console.log("after update:", gibberishParent);
|
|
79
|
-
// if (gibberishParent !== undefined && gibberishState === GibberishState.CreatingParent) {
|
|
80
|
-
// gibberishState = GibberishState.ParentCreated;
|
|
81
|
-
// }
|
|
82
|
-
// });
|
|
83
|
-
|
|
84
|
-
run(() => {
|
|
85
|
-
attachGibberish(gibberishParent);
|
|
86
|
-
});
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
{#if toggle === ToggleableContentType.Default}
|
|
90
|
-
{@render children?.()}
|
|
91
|
-
{:else if (ToggleableContentType.Gibberish === toggle)}
|
|
92
|
-
<div bind:this={defaultSlot} style={`visibility: ${gibberishState === GibberishState.Binded}`}>
|
|
93
|
-
{@render children?.()}
|
|
94
|
-
</div>
|
|
95
|
-
{/if}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ToggleableContentType } from "./ToggleableContentType";
|
|
2
|
-
interface Props {
|
|
3
|
-
toggle?: ToggleableContentType;
|
|
4
|
-
children?: import('svelte').Snippet;
|
|
5
|
-
}
|
|
6
|
-
declare const ToggleableContent: import("svelte").Component<Props, {}, "">;
|
|
7
|
-
type ToggleableContent = ReturnType<typeof ToggleableContent>;
|
|
8
|
-
export default ToggleableContent;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export var ToggleableContentType;
|
|
2
|
-
(function (ToggleableContentType) {
|
|
3
|
-
ToggleableContentType[ToggleableContentType["Default"] = 0] = "Default";
|
|
4
|
-
ToggleableContentType[ToggleableContentType["Gibberish"] = 1] = "Gibberish";
|
|
5
|
-
})(ToggleableContentType || (ToggleableContentType = {}));
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { run } from "svelte/legacy";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
onClick?: undefined | (() => void);
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
children?: import("svelte").Snippet;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let { onClick = undefined, checked = true, children }: Props = $props();
|
|
11
|
-
|
|
12
|
-
// todo: look at isLightMode usage
|
|
13
|
-
// let textColorClass = $derived($isLightMode ? "local-light" : "local-dark");
|
|
14
|
-
let buttonClass = $state("preset-filled-tertiary-500");
|
|
15
|
-
const toggleChipColor = (isLightMode: boolean, checked: boolean) => {
|
|
16
|
-
if (isLightMode) {
|
|
17
|
-
buttonClass = checked ? "normal-bg" : "light-unchecked-bg";
|
|
18
|
-
} else {
|
|
19
|
-
buttonClass = checked ? "normal-bg" : "dark-unchecked-bg";
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
// run(() => {
|
|
23
|
-
// toggleChipColor($isLightMode, checked);
|
|
24
|
-
// });
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
{#if onClick}
|
|
28
|
-
<!-- <button class={`chip ${buttonClass} ${textColorClass}`}-->
|
|
29
|
-
<button class={`chip ${buttonClass}`}
|
|
30
|
-
onclick={onClick}>
|
|
31
|
-
{@render children?.()}
|
|
32
|
-
</button>
|
|
33
|
-
{:else }
|
|
34
|
-
<!-- <span class={`local-chip normal-bg ${textColorClass}`}>-->
|
|
35
|
-
<span class={`local-chip normal-bg`}>
|
|
36
|
-
{@render children?.()}
|
|
37
|
-
</span>
|
|
38
|
-
{/if}
|
|
39
|
-
|
|
40
|
-
<style>
|
|
41
|
-
/*todo: migration*/
|
|
42
|
-
/*@apply chip;*/
|
|
43
|
-
.local-chip {
|
|
44
|
-
border-radius: 1em;
|
|
45
|
-
margin: 0.25em;
|
|
46
|
-
font-weight: bold;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.normal-bg {
|
|
51
|
-
--tw-bg-opacity: 1;
|
|
52
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dark-unchecked-bg {
|
|
56
|
-
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.light-unchecked-bg {
|
|
60
|
-
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.local-light {
|
|
64
|
-
color: rgb(var(--theme-font-color-base));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.local-dark {
|
|
68
|
-
color: whitesmoke;
|
|
69
|
-
/*color: rgb(var(--theme-font-color-dark));*/
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import "./combo-box.postcss";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
stringItems?: string[];
|
|
6
|
-
selectedValue?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let { stringItems = ["Select item"], selectedValue = $bindable("") }: Props = $props();
|
|
10
|
-
selectedValue = stringItems.length === 0 ? "" : stringItems[0];
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<select bind:value={selectedValue} class="select">
|
|
14
|
-
{#each stringItems as item}
|
|
15
|
-
<option value={item}>{item}</option>
|
|
16
|
-
{/each}
|
|
17
|
-
</select>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import ComboBox from "./ComboBox.svelte";
|
|
3
|
-
import "./combo-box.postcss";
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
selectedValue?: string;
|
|
7
|
-
stringItems?: string[];
|
|
8
|
-
onClick?: undefined | ((selected: string) => void);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { selectedValue = $bindable(""), stringItems = $bindable([]), onClick = undefined }: Props = $props();
|
|
12
|
-
|
|
13
|
-
let onClickInternal = () => {
|
|
14
|
-
onClick?.(selectedValue);
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<div class="combo-box-wrapper">
|
|
19
|
-
<button class="combo-box-side-button btn preset-filled-primary-500" onclick={onClickInternal}>+ Add entry</button>
|
|
20
|
-
<ComboBox bind:selectedValue={selectedValue}
|
|
21
|
-
bind:stringItems={stringItems}></ComboBox>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<style>
|
|
25
|
-
.combo-box-wrapper {
|
|
26
|
-
display: flex;
|
|
27
|
-
gap: 1em;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./combo-box.postcss";
|
|
2
|
-
interface Props {
|
|
3
|
-
selectedValue?: string;
|
|
4
|
-
stringItems?: string[];
|
|
5
|
-
onClick?: undefined | ((selected: string) => void);
|
|
6
|
-
}
|
|
7
|
-
declare const ComboBoxWithButton: import("svelte").Component<Props, {}, "stringItems" | "selectedValue">;
|
|
8
|
-
type ComboBoxWithButton = ReturnType<typeof ComboBoxWithButton>;
|
|
9
|
-
export default ComboBoxWithButton;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.combo-box-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.select {
|
|
6
|
-
flex-grow: 1;
|
|
7
|
-
@apply preset-filled-primary-500;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dark .select option {
|
|
11
|
-
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.combo-box-side-button {
|
|
15
|
-
@apply btn preset-filled-primary-500;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dark .option,
|
|
19
|
-
.dark .select,
|
|
20
|
-
.dark .combo-box-side-button {
|
|
21
|
-
color: var(--color-text-50);
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as LazyAsset } from "./LazyAsset.svelte";
|
|
2
|
-
export { default as Card } from "./Card.svelte";
|
|
3
|
-
export { default as Chip } from "./chip/Chip.svelte";
|
|
4
|
-
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
5
|
-
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
6
|
-
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
7
|
-
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
8
|
-
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
package/dist/components/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// noinspection JSUnusedGlobalSymbols
|
|
2
|
-
export { default as LazyAsset } from "./LazyAsset.svelte";
|
|
3
|
-
export { default as Card } from "./Card.svelte";
|
|
4
|
-
export { default as Chip } from "./chip/Chip.svelte";
|
|
5
|
-
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
6
|
-
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
7
|
-
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
8
|
-
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
9
|
-
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AppShellBackground = "app-shell-token";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const AppShellBackground = "app-shell-token";
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
// For auto dark/light mode
|
|
3
|
-
import { AppBar } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
-
import RandomizedBackground from "../RandomizedBackground.svelte";
|
|
5
|
-
|
|
6
|
-
// store
|
|
7
|
-
import { enableBackground } from "../../store";
|
|
8
|
-
// assets
|
|
9
|
-
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
10
|
-
import { writable } from "svelte/store";
|
|
11
|
-
import { fly } from "svelte/transition";
|
|
12
|
-
import { appState } from "../../ui/templates/index";
|
|
13
|
-
|
|
14
|
-
// todo: clean up all these imports!
|
|
15
|
-
|
|
16
|
-
interface Props {
|
|
17
|
-
shouldDisplayLeadingIcons?: boolean;
|
|
18
|
-
extraLeadingIcons?: import("svelte").Snippet;
|
|
19
|
-
s?: import("svelte").Snippet;
|
|
20
|
-
children?: import("svelte").Snippet<[any]>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let {
|
|
24
|
-
shouldDisplayLeadingIcons = $bindable(false),
|
|
25
|
-
extraLeadingIcons,
|
|
26
|
-
s,
|
|
27
|
-
children
|
|
28
|
-
}: Props = $props();
|
|
29
|
-
|
|
30
|
-
$effect(() => {
|
|
31
|
-
if (extraLeadingIcons && shouldDisplayLeadingIcons) {
|
|
32
|
-
appState.lead = extraLeadingIcons;
|
|
33
|
-
} else {
|
|
34
|
-
appState.lead = undefined;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
let enableBackgroundValue = $state(true);
|
|
39
|
-
enableBackground.subscribe((value) => {
|
|
40
|
-
enableBackgroundValue = value;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
enableDialogueOverlay.set(false); // false by default until we unlock the fab for public
|
|
44
|
-
|
|
45
|
-
let shouldDisplaySocialIcons = writable(false);
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<!-- App Shell -->
|
|
49
|
-
<!--<svelte:head>-->
|
|
50
|
-
<!-- {@html `<script>${autoModeWatcher.toString()} autoModeWatcher();</script>`}-->
|
|
51
|
-
<!--</svelte:head>-->
|
|
52
|
-
|
|
53
|
-
<div>
|
|
54
|
-
<!-- App Bar -->
|
|
55
|
-
<AppBar background="bg-surface-600 dark:bg-surface-900">
|
|
56
|
-
{#snippet lead()}
|
|
57
|
-
|
|
58
|
-
<span class="lead-slot-placeholder"></span>
|
|
59
|
-
|
|
60
|
-
{#if extraLeadingIcons && shouldDisplayLeadingIcons}
|
|
61
|
-
<div transition:fly={{x:-10}}>
|
|
62
|
-
{@render extraLeadingIcons?.()}
|
|
63
|
-
</div>
|
|
64
|
-
{:else if extraLeadingIcons}
|
|
65
|
-
<div hidden>
|
|
66
|
-
{@render s?.()}
|
|
67
|
-
</div>
|
|
68
|
-
{/if}
|
|
69
|
-
|
|
70
|
-
{/snippet}
|
|
71
|
-
{#snippet trail()}
|
|
72
|
-
|
|
73
|
-
<!-- todo: -->
|
|
74
|
-
<!-- <LightSwitch bgLight="bg-surface-400" />-->
|
|
75
|
-
|
|
76
|
-
{/snippet}
|
|
77
|
-
</AppBar>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<RandomizedBackground enable={enableBackgroundValue} />
|
|
81
|
-
|
|
82
|
-
<!--{#if enableDialogueOverlayValue}-->
|
|
83
|
-
<!-- Page Route Content -->
|
|
84
|
-
<div class="default-page-container">
|
|
85
|
-
{@render children?.({ shouldDisplaySocialIcons, })}
|
|
86
|
-
<div class="footer-space"></div>
|
|
87
|
-
</div>
|
|
88
|
-
<!-- todo: eventually re-add -->
|
|
89
|
-
<!-- <DialogOverlay />-->
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<style>
|
|
93
|
-
.default-page-container {
|
|
94
|
-
max-width: 2100px;
|
|
95
|
-
margin: 4em auto;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
z-index: 0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.lead-slot-placeholder {
|
|
101
|
-
height: 3em;
|
|
102
|
-
margin-inline-end: 0.5em;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/*todo: consider left handedness or customizability*/
|
|
106
|
-
/*.fab {*/
|
|
107
|
-
/* @apply btn-icon variant-filled-surface;*/
|
|
108
|
-
/* position: fixed;*/
|
|
109
|
-
/* height: 5em;*/
|
|
110
|
-
/* width: 5em;*/
|
|
111
|
-
/* bottom: 3em;*/
|
|
112
|
-
/* right: 2em;*/
|
|
113
|
-
/* box-shadow: 0.5em 0.5em 0.5em gray;*/
|
|
114
|
-
/*}*/
|
|
115
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
shouldDisplayLeadingIcons?: boolean;
|
|
3
|
-
extraLeadingIcons?: import("svelte").Snippet;
|
|
4
|
-
s?: import("svelte").Snippet;
|
|
5
|
-
children?: import("svelte").Snippet<[any]>;
|
|
6
|
-
}
|
|
7
|
-
declare const SeaweedBaseLayout: import("svelte").Component<Props, {}, "shouldDisplayLeadingIcons">;
|
|
8
|
-
type SeaweedBaseLayout = ReturnType<typeof SeaweedBaseLayout>;
|
|
9
|
-
export default SeaweedBaseLayout;
|