@turnipxenon/pineapple 3.0.0 → 3.1.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.
Files changed (62) hide show
  1. package/dist/components/blog_template/BlogTemplate.svelte +1 -1
  2. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
  3. package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
  4. package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
  5. package/dist/components/dialog_manager/DialogMangerInit.d.ts +1 -1
  6. package/dist/components/dialog_manager/IDialogManager.d.ts +1 -1
  7. package/dist/components/dialog_overlay/DialogOverlay.svelte +127 -17
  8. package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
  9. package/dist/components/pineapple/PineappleBaseLayout.svelte +0 -19
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/styles/app.css +9 -14
  13. package/dist/ui/components/ModalBase.svelte +74 -74
  14. package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
  15. package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
  16. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +64 -64
  17. package/dist/ui/elements/ImageIcon.svelte +53 -53
  18. package/dist/ui/elements/{pinya-card/component.svelte → PinyaCard/PinyaCard.svelte} +21 -20
  19. package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
  20. package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
  21. package/dist/ui/elements/PinyaCard/index.js +2 -0
  22. package/dist/ui/elements/Placeholder.svelte +17 -17
  23. package/dist/ui/elements/TextLink.svelte +16 -16
  24. package/dist/ui/elements/index.d.ts +1 -1
  25. package/dist/ui/elements/index.js +1 -1
  26. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
  27. package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
  28. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
  29. package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
  30. package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
  31. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
  32. package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
  33. package/dist/ui/modules/NavigationMenu/index.js +2 -0
  34. package/dist/ui/modules/index.d.ts +1 -1
  35. package/dist/ui/modules/index.js +1 -1
  36. package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
  37. package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -42
  38. package/dist/ui/modules/projects/Pengi.svelte +61 -61
  39. package/dist/ui/modules/projects/ThisWebpage.svelte +10 -8
  40. package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +2 -0
  41. package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
  42. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +65 -88
  43. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +1 -0
  44. package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +316 -316
  45. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.md +3 -3
  46. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +278 -276
  47. package/dist/ui/templates/SeaweedLayout/props.d.ts +2 -2
  48. package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
  49. package/package.json +1 -1
  50. package/src/lib/styles/app.css +9 -14
  51. package/dist/components/navigation_component/index.d.ts +0 -2
  52. package/dist/components/navigation_component/index.js +0 -3
  53. package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
  54. package/dist/ui/elements/pinya-card/index.d.ts +0 -2
  55. package/dist/ui/elements/pinya-card/index.js +0 -2
  56. package/dist/ui/modules/seaweed/index.d.ts +0 -3
  57. package/dist/ui/modules/seaweed/index.js +0 -4
  58. /package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +0 -0
  59. /package/dist/ui/elements/{pinya-card/props.js → PinyaCard/PinyaCardProps.js} +0 -0
  60. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
  61. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
  62. /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
@@ -1,277 +1,279 @@
1
- <script lang="ts">
2
- import { fly } from "svelte/transition";
3
- import type { ProjectGroup, SeaweedLayoutProps } from "./props";
4
- import ChumBucket from "../../modules/seaweed/ChumBucket.svelte";
5
- import { default as PinyaPageLayout } from "../PinyaPageLayout/PinyaPageLayout.svelte";
6
- import { default as SocialSection } from "../../components/SocialSection.svelte";
7
- import EntryGroup from "./EntryGroup.svelte";
8
- import PineappleSwitch from "../../elements/PineappleSwitch.svelte";
9
- import { CodeBlock, TextChip } from "../../elements/index";
10
- import { SvelteMap } from "svelte/reactivity";
11
- import EntryOrderConfig from "./EntryOrderConfig.svelte";
12
- import CreateUrlForm from "./CreateUrlForm.svelte";
13
- import { onMount } from "svelte";
14
- import { page } from "$app/state";
15
-
16
- let {
17
- children,
18
- sideSection,
19
- entryList, // todo
20
- layout, // todo
21
- domain = "http://localhost:5173/seaweed2",
22
- queryTerms,
23
- showMiniSocial = false,
24
- serverParams = ""
25
- }: SeaweedLayoutProps = $props();
26
-
27
- let actualLayout = $state(layout);
28
- let isAdvanceSettingOn = $state(false);
29
- let orderUrl = $state("");
30
-
31
- let queryStates = new SvelteMap<string, boolean>(queryTerms.map(term => [term, true]));
32
- let styleStr = $state("");
33
- let queryQt = $derived.by(() => {
34
- const qtArr = [...queryStates.entries()
35
- .filter(([, state]) => state)
36
- .map(([term]) => term)
37
- ];
38
-
39
- if (qtArr.length === queryStates.size) {
40
- return "";
41
- }
42
-
43
- const qtStr = qtArr.join(",");
44
-
45
- if (qtStr) {
46
- return `qt=${qtStr}`;
47
- }
48
-
49
- return "qt=clear";
50
- });
51
-
52
- $effect(() => {
53
- const chipList: string[] = [];
54
- const termList: string[] = [];
55
- queryStates.entries()
56
- .filter(([, state]) => state)
57
- .forEach(([term]) => {
58
- const qtTerm = `.qt-${term}`;
59
- termList.push(qtTerm);
60
- chipList.push(`.text-chip${qtTerm}`);
61
- });
62
- styleStr = `<style>
63
- ${termList.join(", ")} {
64
- font-weight: bolder;
65
- color: var(--color-secondary-400);
66
- }
67
-
68
- ${chipList.join(", ")} {
69
- background-color: var(--color-secondary-500) /* oklch(55.6% 0 0deg) = #737373 */;
70
- color: var(--color-secondary-contrast-500) /* var(--color-secondary-contrast-light) */;
71
- }
72
- </style>`;
73
- });
74
-
75
- let advancedQuery = $derived.by(() => {
76
- const query = [orderUrl, queryQt]
77
- .filter(q => q)
78
- .join("&");
79
- if (query) {
80
- return `${query}`;
81
- }
82
-
83
- return "";
84
- });
85
-
86
- let advancedUrl = $derived.by(() => `${domain}/?${advancedQuery}`);
87
-
88
-
89
- /** qt values and what they mean:
90
- * undefined: set all qt terms to font-weight: bold
91
- * todo: implement clear
92
- * clear: unset all terms to font-weight: normal
93
- * <term>: only set qt-<term> to bold
94
- * <term1>,<term2>: only set qt-<term1> and qt-<term2> to bold,
95
- *
96
- * ONLY CALL INSIDE onMount()
97
- **/
98
- const filterSearchParams = (searchParams: URLSearchParams) => {
99
- // region Order
100
- const orderParam = searchParams.get("order")?.trim();
101
- console.log(searchParams);
102
- console.log(orderParam);
103
- if (orderParam) {
104
- actualLayout = [];
105
-
106
- orderParam.split(",").forEach((groupDefinition, idx) => {
107
- const pair = groupDefinition.split(":");
108
- if (pair.length >= 2) {
109
- const group: ProjectGroup = {
110
- title: pair[0],
111
- entryList: [],
112
- key: `${pair[0]}-${idx}`
113
- };
114
-
115
- pair[1].split("|").forEach(key => {
116
- const component = entryList.find(e => e.key === key);
117
- if (component) {
118
- group.entryList.push(component);
119
- }
120
- });
121
-
122
- actualLayout.push(group);
123
- }
124
- });
125
-
126
- actualLayout = [...actualLayout];
127
- console.log(actualLayout);
128
- }
129
- // endregion
130
-
131
- // region Bold terms
132
- const qtValue = searchParams.get("qt")?.trim();
133
- if (qtValue !== undefined) {
134
- queryStates.keys()
135
- .forEach(key => queryStates.set(key, false));
136
-
137
- if (qtValue !== "clear") {
138
- qtValue.split(",").forEach((term) => {
139
- if (queryStates.has(term)) {
140
- queryStates.set(term, true);
141
- }
142
- });
143
- }
144
- }
145
- // endregion Bold terms
146
- };
147
-
148
- onMount(() => {
149
- if (serverParams) {
150
- filterSearchParams(new URLSearchParams(serverParams));
151
- } else if (page.url.searchParams.size) {
152
- filterSearchParams(page.url.searchParams);
153
- }
154
- });
155
- </script>
156
-
157
- <svelte:head>
158
- {@html styleStr}
159
- </svelte:head>
160
-
161
-
162
- {#snippet socialSection()}
163
- <SocialSection></SocialSection>
164
- {/snippet}
165
- <PinyaPageLayout>
166
- {#snippet appBarLead()}
167
- {#if showMiniSocial}
168
- <div
169
- class="flex flex-row"
170
- transition:fly={{x:-10}}
171
- >
172
- <SocialSection isSmallVersion={true} />
173
- </div>
174
- {/if}
175
- {/snippet}
176
-
177
- <div id="upper-section">
178
-
179
- <div class="upper-section-start">
180
- {@render sideSection(socialSection)}
181
- </div>
182
-
183
- <div class="upper-section-end">
184
- {@render children()}
185
- </div>
186
- </div>
187
-
188
- <!--todo: render list #migration-->
189
- {#each actualLayout as group (group.title)}
190
- <EntryGroup {...group}></EntryGroup>
191
- {/each}
192
-
193
- {#snippet footer()}
194
- <div class="footer">
195
- <ChumBucket></ChumBucket>
196
-
197
- <div class="default-card advanced-setting mt-16 mb-32">
198
- <h1>Advanced settings</h1>
199
- <p>This one is for those curious how I customize this page.</p>
200
-
201
- <PineappleSwitch name="advanced-setting-slider"
202
- bind:checked={isAdvanceSettingOn}>
203
- </PineappleSwitch>
204
- Advanced settings: {isAdvanceSettingOn ? "On" : "Off"}
205
-
206
- {#if (isAdvanceSettingOn)}
207
-
208
- <h3 class="mt-6">Query terms to bold</h3>
209
- <div class="query-term-grid max-w-2xl">
210
- {#each queryStates as [term, shouldBold] (term)}
211
- <button
212
- class="bg-transparent hover:brightness-110"
213
- onclick={() => { queryStates.set(term, !shouldBold); }}
214
- >
215
- <TextChip queryClass={shouldBold ? 'highlight-chip' : ''}>
216
- <!-- todo: change shouldBold -->
217
- <span style={`font-weight: ${shouldBold ? "bold" : "normal"}`}>
218
- {#if (shouldBold)}✓{/if}
219
- {term}
220
- </span>
221
- </TextChip>
222
- </button>
223
- {/each}
224
- </div>
225
-
226
- <EntryOrderConfig
227
- bind:layout={actualLayout}
228
- bind:orderUrl={orderUrl}
229
- allEntries={entryList}
230
- ></EntryOrderConfig>
231
-
232
- <br>
233
- <p>Copy the url below and open a new page with it</p>
234
- <CodeBlock code={advancedUrl} lang="markdown" classes="max-w-2xl" />
235
- <CreateUrlForm queryParams={advancedQuery}></CreateUrlForm>
236
- {/if}
237
- </div>
238
- </div>
239
- {/snippet}
240
- </PinyaPageLayout>
241
-
242
- <style>
243
- :global(html) {
244
- --color-bg-footer: var(--color-surface-200);
245
- --color-footer-border: var(--color-primary-500);
246
- }
247
-
248
- :global(html.dark) {
249
- --color-bg-footer: var(--color-surface-900);
250
- --color-footer-border: var(--color-primary-950);
251
- }
252
-
253
- .footer {
254
- width: 100vw;
255
- display: flex;
256
- flex-direction: column;
257
- align-items: center;
258
- margin-top: 3lh;
259
- background-color: var(--color-bg-footer);
260
- border-top: 2px solid var(--color-footer-border);
261
- }
262
-
263
- #upper-section {
264
- display: flex;
265
- flex-direction: row;
266
- flex-wrap: wrap;
267
- gap: 2rem;
268
- justify-content: center;
269
- }
270
-
271
- .query-term-grid {
272
- display: flex;
273
- flex-wrap: wrap;
274
- gap: 0.25em;
275
- margin-top: 1lh;
276
- }
1
+ <script lang="ts">
2
+ import { fly } from "svelte/transition";
3
+ import type { ProjectGroup, SeaweedLayoutProps } from "./props";
4
+ import ChumBucket from "./ChumBucket.svelte";
5
+ import { default as PinyaPageLayout } from "../PinyaPageLayout/PinyaPageLayout.svelte";
6
+ import { default as SocialSection } from "../../components/SocialSection.svelte";
7
+ import EntryGroup from "./EntryGroup.svelte";
8
+ import PineappleSwitch from "../../elements/PineappleSwitch.svelte";
9
+ import { CodeBlock, TextChip } from "../../elements/index";
10
+ import { SvelteMap } from "svelte/reactivity";
11
+ import EntryOrderConfig from "./EntryOrderConfig.svelte";
12
+ import CreateUrlForm from "./CreateUrlForm.svelte";
13
+ import { onMount } from "svelte";
14
+ import { page } from "$app/state";
15
+
16
+ let {
17
+ children,
18
+ sideSection,
19
+ entryList, // todo
20
+ layout, // todo
21
+ domain = "http://localhost:5173/seaweed2",
22
+ queryTerms,
23
+ showMiniSocial = false,
24
+ serverParams = "",
25
+ }: SeaweedLayoutProps = $props();
26
+
27
+ let actualLayout = $state(layout);
28
+ let isAdvanceSettingOn = $state(false);
29
+ let orderUrl = $state("");
30
+
31
+ let queryStates = new SvelteMap<string, boolean>(queryTerms.map(term => [term, true]));
32
+ let styleStr = $state("");
33
+ let queryQt = $derived.by(() => {
34
+ const qtArr = [...queryStates.entries()
35
+ .filter(([, state]) => state)
36
+ .map(([term]) => term)
37
+ ];
38
+
39
+ if (qtArr.length === queryStates.size) {
40
+ return "";
41
+ }
42
+
43
+ const qtStr = qtArr.join(",");
44
+
45
+ if (qtStr) {
46
+ return `qt=${qtStr}`;
47
+ }
48
+
49
+ return "qt=clear";
50
+ });
51
+
52
+ $effect(() => {
53
+ const chipList: string[] = [];
54
+ const termList: string[] = [];
55
+ queryStates.entries()
56
+ .filter(([, state]) => state)
57
+ .forEach(([term]) => {
58
+ const qtTerm = `.qt-${term}`;
59
+ termList.push(qtTerm);
60
+ chipList.push(`.text-chip${qtTerm}`);
61
+ });
62
+ styleStr = `<style>
63
+ ${termList.join(", ")} {
64
+ font-weight: bolder;
65
+ color: var(--color-secondary-400);
66
+ }
67
+
68
+ ${chipList.join(", ")} {
69
+ background-color: var(--color-secondary-500) /* oklch(55.6% 0 0deg) = #737373 */;
70
+ color: var(--color-secondary-contrast-500) /* var(--color-secondary-contrast-light) */;
71
+ }
72
+ </style>`;
73
+ });
74
+
75
+ let advancedQuery = $derived.by(() => {
76
+ const query = [orderUrl, queryQt]
77
+ .filter(q => q)
78
+ .join("&");
79
+ if (query) {
80
+ return `${query}`;
81
+ }
82
+
83
+ return "";
84
+ });
85
+
86
+ let advancedUrl = $derived.by(() => `${domain}/?${advancedQuery}`);
87
+
88
+
89
+ /** qt values and what they mean:
90
+ * undefined: set all qt terms to font-weight: bold
91
+ * todo: implement clear
92
+ * clear: unset all terms to font-weight: normal
93
+ * <term>: only set qt-<term> to bold
94
+ * <term1>,<term2>: only set qt-<term1> and qt-<term2> to bold,
95
+ *
96
+ * ONLY CALL INSIDE onMount()
97
+ **/
98
+ const filterSearchParams = (searchParams: URLSearchParams) => {
99
+ // region Order
100
+ const orderParam = searchParams.get("order")?.trim();
101
+ console.log(searchParams);
102
+ console.log(orderParam);
103
+ if (orderParam) {
104
+ actualLayout = [];
105
+
106
+ orderParam.split(",").forEach((groupDefinition, idx) => {
107
+ const pair = groupDefinition.split(":");
108
+ if (pair.length >= 2) {
109
+ const group: ProjectGroup = {
110
+ title: pair[0],
111
+ entryList: [],
112
+ key: `${pair[0]}-${idx}`
113
+ };
114
+
115
+ pair[1].split("|").forEach(key => {
116
+ const component = entryList.find(e => e.key === key);
117
+ if (component) {
118
+ group.entryList.push(component);
119
+ }
120
+ });
121
+
122
+ actualLayout.push(group);
123
+ }
124
+ });
125
+
126
+ actualLayout = [...actualLayout];
127
+ console.log(actualLayout);
128
+ }
129
+ // endregion
130
+
131
+ // region Bold terms
132
+ const qtValue = searchParams.get("qt")?.trim();
133
+ if (qtValue !== undefined) {
134
+ queryStates.keys()
135
+ .forEach(key => queryStates.set(key, false));
136
+
137
+ if (qtValue !== "clear") {
138
+ qtValue.split(",").forEach((term) => {
139
+ if (queryStates.has(term)) {
140
+ queryStates.set(term, true);
141
+ }
142
+ });
143
+ }
144
+ }
145
+ // endregion Bold terms
146
+ };
147
+
148
+ onMount(() => {
149
+ if (serverParams) {
150
+ filterSearchParams(new URLSearchParams(serverParams));
151
+ } else if (page.url.searchParams.size) {
152
+ filterSearchParams(page.url.searchParams);
153
+ }
154
+ });
155
+ </script>
156
+
157
+ <svelte:head>
158
+ {@html styleStr}
159
+ </svelte:head>
160
+
161
+
162
+ {#snippet socialSection()}
163
+ <SocialSection></SocialSection>
164
+ {/snippet}
165
+ <PinyaPageLayout>
166
+ {#snippet appBarLead()}
167
+ {#if showMiniSocial}
168
+ <div
169
+ class="flex flex-row"
170
+ transition:fly={{x:-10}}
171
+ >
172
+ <SocialSection isSmallVersion={true} />
173
+ </div>
174
+ {/if}
175
+ {/snippet}
176
+
177
+ <div id="upper-section">
178
+
179
+ <div class="upper-section-start">
180
+ {@render sideSection(socialSection)}
181
+ </div>
182
+
183
+ <div class="upper-section-end">
184
+ {@render children()}
185
+ </div>
186
+ </div>
187
+
188
+ <!--todo: render list #migration-->
189
+ {#each actualLayout as group (group.title)}
190
+ <EntryGroup
191
+ {...group}
192
+ />
193
+ {/each}
194
+
195
+ {#snippet footer()}
196
+ <div class="footer">
197
+ <ChumBucket></ChumBucket>
198
+
199
+ <div class="default-card advanced-setting mt-16 mb-32">
200
+ <h1>Advanced settings</h1>
201
+ <p>This one is for those curious how I customize this page.</p>
202
+
203
+ <PineappleSwitch name="advanced-setting-slider"
204
+ bind:checked={isAdvanceSettingOn}>
205
+ </PineappleSwitch>
206
+ Advanced settings: {isAdvanceSettingOn ? "On" : "Off"}
207
+
208
+ {#if (isAdvanceSettingOn)}
209
+
210
+ <h3 class="mt-6">Query terms to bold</h3>
211
+ <div class="query-term-grid max-w-2xl">
212
+ {#each queryStates as [term, shouldBold] (term)}
213
+ <button
214
+ class="bg-transparent hover:brightness-110"
215
+ onclick={() => { queryStates.set(term, !shouldBold); }}
216
+ >
217
+ <TextChip queryClass={shouldBold ? 'highlight-chip' : ''}>
218
+ <!-- todo: change shouldBold -->
219
+ <span style={`font-weight: ${shouldBold ? "bold" : "normal"}`}>
220
+ {#if (shouldBold)}✓{/if}
221
+ {term}
222
+ </span>
223
+ </TextChip>
224
+ </button>
225
+ {/each}
226
+ </div>
227
+
228
+ <EntryOrderConfig
229
+ bind:layout={actualLayout}
230
+ bind:orderUrl={orderUrl}
231
+ allEntries={entryList}
232
+ ></EntryOrderConfig>
233
+
234
+ <br>
235
+ <p>Copy the url below and open a new page with it</p>
236
+ <CodeBlock code={advancedUrl} lang="markdown" classes="max-w-2xl" />
237
+ <CreateUrlForm queryParams={advancedQuery}></CreateUrlForm>
238
+ {/if}
239
+ </div>
240
+ </div>
241
+ {/snippet}
242
+ </PinyaPageLayout>
243
+
244
+ <style>
245
+ :global(html) {
246
+ --color-bg-footer: var(--color-surface-200);
247
+ --color-footer-border: var(--color-primary-500);
248
+ }
249
+
250
+ :global(html.dark) {
251
+ --color-bg-footer: var(--color-surface-900);
252
+ --color-footer-border: var(--color-primary-950);
253
+ }
254
+
255
+ .footer {
256
+ width: 100vw;
257
+ display: flex;
258
+ flex-direction: column;
259
+ align-items: center;
260
+ margin-top: 3lh;
261
+ background-color: var(--color-bg-footer);
262
+ border-top: 2px solid var(--color-footer-border);
263
+ }
264
+
265
+ #upper-section {
266
+ display: flex;
267
+ flex-direction: row;
268
+ flex-wrap: wrap;
269
+ gap: 2rem;
270
+ justify-content: center;
271
+ }
272
+
273
+ .query-term-grid {
274
+ display: flex;
275
+ flex-wrap: wrap;
276
+ gap: 0.25em;
277
+ margin-top: 1lh;
278
+ }
277
279
  </style>
@@ -1,6 +1,5 @@
1
1
  import type { Snippet } from "svelte";
2
- interface ProjectComponentProps {
3
- }
2
+ import type { ProjectComponentProps } from "../index";
4
3
  type ComponentSnippet = Snippet<[ProjectComponentProps]>;
5
4
  export interface SnippetMeta {
6
5
  key: string;
@@ -10,6 +9,7 @@ export interface ProjectGroup {
10
9
  key: string;
11
10
  title: string;
12
11
  entryList: SnippetMeta[];
12
+ projectComponentProps?: ProjectComponentProps;
13
13
  }
14
14
  export interface SeaweedLayoutProps {
15
15
  name: string;
@@ -1,47 +1,47 @@
1
- <script lang="ts">
2
- import type { ConfirmationModalProps } from './props';
3
- import { default as ModalBase } from '../../components/ModalBase.svelte';
4
- import { ColorScheme, PinyaButton } from '../../elements';
5
-
6
- let {
7
- children,
8
- confirm,
9
- ...props
10
- }: ConfirmationModalProps = $props();
11
- </script>
12
-
13
- <ModalBase {...props}>
14
- <div class="prose-h2:mt-4 max-w-xl">
15
-
16
- {@render children()}
17
-
18
- <div class="actions">
19
- <PinyaButton
20
- onclick={() => {
21
- confirm.onclick();
22
- props.close();
23
- }}
24
- title={confirm.hoverOver ?? 'Ok'}
25
- colorScheme={ColorScheme.Warning}
26
- >
27
- {confirm.text ?? 'Ok'}
28
- </PinyaButton>
29
- <PinyaButton
30
- onclick={() => props.close()}
31
- title="Close modal"
32
- colorScheme={ColorScheme.Surface}
33
- >
34
- Close
35
- </PinyaButton>
36
- </div>
37
- </div>
38
- </ModalBase>
39
-
40
- <style>
41
- .actions {
42
- display: flex;
43
- flex-direction: row-reverse;
44
- margin-top: 1.4lh;
45
- gap: 1rem;
46
- }
1
+ <script lang="ts">
2
+ import type { ConfirmationModalProps } from './props';
3
+ import { default as ModalBase } from '../../components/ModalBase.svelte';
4
+ import { ColorScheme, PinyaButton } from '../../elements';
5
+
6
+ let {
7
+ children,
8
+ confirm,
9
+ ...props
10
+ }: ConfirmationModalProps = $props();
11
+ </script>
12
+
13
+ <ModalBase {...props}>
14
+ <div class="prose-h2:mt-4 max-w-xl">
15
+
16
+ {@render children()}
17
+
18
+ <div class="actions">
19
+ <PinyaButton
20
+ onclick={() => {
21
+ confirm.onclick();
22
+ props.close();
23
+ }}
24
+ title={confirm.hoverOver ?? 'Ok'}
25
+ colorScheme={ColorScheme.Warning}
26
+ >
27
+ {confirm.text ?? 'Ok'}
28
+ </PinyaButton>
29
+ <PinyaButton
30
+ onclick={() => props.close()}
31
+ title="Close modal"
32
+ colorScheme={ColorScheme.Surface}
33
+ >
34
+ Close
35
+ </PinyaButton>
36
+ </div>
37
+ </div>
38
+ </ModalBase>
39
+
40
+ <style>
41
+ .actions {
42
+ display: flex;
43
+ flex-direction: row-reverse;
44
+ margin-top: 1.4lh;
45
+ gap: 1rem;
46
+ }
47
47
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "3.0.0",
4
+ "version": "3.1.0-alpha.1",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",