@turnipxenon/pineapple 3.0.0-alpha.1 → 3.0.0-alpha.10

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 (112) hide show
  1. package/dist/assets/icons/icon-check-dark-contrast.svg +1 -0
  2. package/dist/assets/icons/icon-check-light-contrast.svg +1 -0
  3. package/dist/assets/icons/icon-copy-dark-contrast.svg +1 -0
  4. package/dist/assets/icons/icon-copy-light-contrast.svg +1 -0
  5. package/dist/components/PineappleSlideToggle.svelte +12 -6
  6. package/dist/components/PineappleSlideToggle.svelte.d.ts +3 -2
  7. package/dist/components/blog_template/BlogTemplate.svelte +3 -1
  8. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
  9. package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
  10. package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
  11. package/dist/components/dialog_manager/DialogManagerStore.d.ts +0 -15
  12. package/dist/components/dialog_manager/DialogManagerStore.js +0 -15
  13. package/dist/components/dialog_manager/DialogMangerInit.d.ts +15 -0
  14. package/dist/components/dialog_manager/DialogMangerInit.js +15 -0
  15. package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +1 -1
  16. package/dist/components/dialog_overlay/DialogOverlay.svelte +1 -1
  17. package/dist/components/index.d.ts +1 -1
  18. package/dist/components/index.js +1 -1
  19. package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -2
  20. package/dist/components/navigation_component/NavigationComponent.svelte +2 -1
  21. package/dist/components/navigation_component/NavigationControl.svelte +1 -1
  22. package/dist/components/pineapple/PineappleBaseLayout.svelte +2 -1
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/styles/app.css +92 -1
  26. package/dist/styles/turnip-theme.css +65 -61
  27. package/dist/template/seaweed/CreateUrlForm.svelte +17 -11
  28. package/dist/template/seaweed/CreateUrlForm.svelte.d.ts +4 -1
  29. package/dist/template/seaweed/ToastSettings.d.ts +15 -0
  30. package/dist/template/seaweed/ToastSettings.js +1 -0
  31. package/dist/template/seaweed/entries/ThisWebpage.svelte +1 -1
  32. package/dist/template/seaweed/entries/WorkExperience.svelte +1 -1
  33. package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +34 -1
  34. package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +0 -1
  35. package/dist/ui/components/SocialSection.svelte +4 -1
  36. package/dist/ui/components/accordion/PinyaAccordion.svelte +21 -0
  37. package/dist/ui/components/accordion/PinyaAccordion.svelte.d.ts +8 -0
  38. package/dist/ui/components/accordion/PinyaAccordionItem.svelte +29 -0
  39. package/dist/ui/components/accordion/PinyaAccordionItem.svelte.d.ts +9 -0
  40. package/dist/ui/components/accordion/index.d.ts +2 -0
  41. package/dist/ui/components/accordion/index.js +2 -0
  42. package/dist/ui/components/index.d.ts +1 -0
  43. package/dist/ui/components/index.js +1 -0
  44. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +65 -0
  45. package/dist/ui/elements/CodeBlock/CodeBlock.svelte.d.ts +5 -0
  46. package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +11 -0
  47. package/dist/ui/elements/CodeBlock/CodeBlockProps.js +1 -0
  48. package/dist/ui/elements/CodeBlock/index.d.ts +2 -0
  49. package/dist/ui/elements/CodeBlock/index.js +2 -0
  50. package/dist/{components/ElementVisbilityDetector.svelte → ui/elements/ElementVisibilityDetector.svelte} +6 -3
  51. package/dist/ui/elements/ElementVisibilityDetector.svelte.d.ts +8 -0
  52. package/dist/ui/elements/PineappleSwitch.svelte +29 -0
  53. package/dist/ui/elements/PineappleSwitch.svelte.d.ts +10 -0
  54. package/dist/ui/elements/Placeholder.svelte +17 -0
  55. package/dist/ui/elements/Placeholder.svelte.d.ts +7 -0
  56. package/dist/ui/elements/index.d.ts +11 -8
  57. package/dist/ui/elements/index.js +11 -8
  58. package/dist/ui/elements/pinya-button/component.svelte +2 -1
  59. package/dist/ui/elements/pinya-button/props.d.ts +1 -0
  60. package/dist/ui/elements/pinya-card/component.svelte +10 -8
  61. package/dist/ui/elements/pinya-card/component.svelte.d.ts +3 -3
  62. package/dist/ui/elements/pinya-card/props.d.ts +3 -0
  63. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +35 -0
  64. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte.d.ts +18 -0
  65. package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.d.ts +18 -0
  66. package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.js +1 -0
  67. package/dist/ui/elements/text-chip/TextChip.svelte +15 -0
  68. package/dist/ui/elements/text-chip/TextChip.svelte.d.ts +4 -0
  69. package/dist/ui/elements/text-chip/TextChipProps.d.ts +4 -0
  70. package/dist/ui/elements/text-chip/TextChipProps.js +1 -0
  71. package/dist/ui/elements/text-chip/index.d.ts +2 -0
  72. package/dist/ui/elements/text-chip/index.js +2 -0
  73. package/dist/ui/modules/index.d.ts +2 -1
  74. package/dist/ui/modules/index.js +2 -1
  75. package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +10 -20
  76. package/dist/ui/modules/projects/Hepcat.svelte +71 -0
  77. package/dist/ui/modules/projects/Hepcat.svelte.d.ts +22 -0
  78. package/dist/ui/modules/projects/Pengi.svelte +60 -0
  79. package/dist/ui/modules/projects/Pengi.svelte.d.ts +22 -0
  80. package/dist/ui/modules/projects/Soulwork.svelte +55 -0
  81. package/dist/ui/modules/projects/Soulwork.svelte.d.ts +22 -0
  82. package/dist/ui/modules/projects/ThisWebpage.svelte +62 -0
  83. package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +22 -0
  84. package/dist/ui/modules/projects/index.d.ts +4 -0
  85. package/dist/ui/modules/projects/index.js +4 -0
  86. package/dist/ui/modules/seaweed/ChumBucket.svelte +38 -38
  87. package/dist/ui/templates/PinyaBase.svelte +9 -6
  88. package/dist/ui/templates/PinyaBase.svelte.d.ts +1 -1
  89. package/dist/ui/templates/index.d.ts +3 -2
  90. package/dist/ui/templates/index.js +3 -2
  91. package/dist/ui/templates/pinya-page-layout/component.svelte +17 -10
  92. package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +2 -1
  93. package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +89 -0
  94. package/dist/ui/templates/seaweed-layout/EntryGroup.svelte.d.ts +4 -0
  95. package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte +45 -0
  96. package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte.d.ts +9 -0
  97. package/dist/ui/templates/seaweed-layout/ProjectComponentProps.d.ts +4 -0
  98. package/dist/ui/templates/seaweed-layout/ProjectComponentProps.js +1 -0
  99. package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte +316 -0
  100. package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte.d.ts +14 -0
  101. package/dist/ui/templates/seaweed-layout/SeaweedLayout.md +4 -0
  102. package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +277 -0
  103. package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte.d.ts +4 -0
  104. package/dist/ui/templates/seaweed-layout/index.d.ts +4 -0
  105. package/dist/ui/templates/seaweed-layout/index.js +4 -0
  106. package/dist/ui/templates/seaweed-layout/props.d.ts +27 -0
  107. package/dist/ui/templates/seaweed-layout/props.js +1 -0
  108. package/dist/util/util.d.ts +1 -0
  109. package/dist/util/util.js +9 -0
  110. package/package.json +20 -15
  111. package/src/lib/styles/app.css +92 -1
  112. package/dist/components/ElementVisbilityDetector.svelte.d.ts +0 -7
@@ -0,0 +1,277 @@
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 { PinyaPageLayout } from "../index";
6
+ import { SocialSection } from "../../components/index";
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 EntryOrderConfig2 from "./EntryOrderConfig2.svelte";
12
+ import CreateUrlForm from "../../../template/seaweed/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
+ <EntryOrderConfig2
227
+ bind:layout={actualLayout}
228
+ bind:orderUrl={orderUrl}
229
+ allEntries={entryList}
230
+ ></EntryOrderConfig2>
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
+ }
277
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { SeaweedLayoutProps } from "./props";
2
+ declare const SeaweedLayout: import("svelte").Component<SeaweedLayoutProps, {}, "">;
3
+ type SeaweedLayout = ReturnType<typeof SeaweedLayout>;
4
+ export default SeaweedLayout;
@@ -0,0 +1,4 @@
1
+ export { default as SeaweedLayout } from "./SeaweedLayout.svelte";
2
+ export { default as EntryGroup } from "./EntryGroup.svelte";
3
+ export * from "./props";
4
+ export * from "./ProjectComponentProps";
@@ -0,0 +1,4 @@
1
+ export { default as SeaweedLayout } from "./SeaweedLayout.svelte";
2
+ export { default as EntryGroup } from "./EntryGroup.svelte";
3
+ export * from "./props";
4
+ export * from "./ProjectComponentProps";
@@ -0,0 +1,27 @@
1
+ import type { Snippet } from "svelte";
2
+ interface ProjectComponentProps {
3
+ }
4
+ type ComponentSnippet = Snippet<[ProjectComponentProps]>;
5
+ export interface SnippetMeta {
6
+ key: string;
7
+ component: ComponentSnippet;
8
+ }
9
+ export interface ProjectGroup {
10
+ key: string;
11
+ title: string;
12
+ entryList: SnippetMeta[];
13
+ }
14
+ export interface SeaweedLayoutProps {
15
+ name: string;
16
+ email: string;
17
+ linkedinSlug: string;
18
+ domain: string;
19
+ sideSection: Snippet<[Snippet]>;
20
+ children: Snippet;
21
+ entryList: SnippetMeta[];
22
+ layout: ProjectGroup[];
23
+ queryTerms: string[];
24
+ showMiniSocial?: boolean;
25
+ serverParams?: string;
26
+ }
27
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -8,3 +8,4 @@ export declare const createExternalLinkWarningFunction: (args: ExternalLinkWarni
8
8
  export interface RawGlob {
9
9
  default: string;
10
10
  }
11
+ export declare const getQueryTerms: (modules: Record<string, unknown>) => string[];
package/dist/util/util.js CHANGED
@@ -25,3 +25,12 @@ export const createExternalLinkWarningFunction = (args) => {
25
25
  location.href = args.href;
26
26
  });
27
27
  };
28
+ export const getQueryTerms = (modules) => {
29
+ const re = new RegExp("qt-(\\w+)+", "g");
30
+ const queryTerms = new Set();
31
+ for (const path in modules) {
32
+ const modStr = modules[path];
33
+ [...modStr.matchAll(re).map(i => i[1])].forEach(term => queryTerms.add(term));
34
+ }
35
+ return [...queryTerms].sort();
36
+ };
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-alpha.1",
4
+ "version": "3.0.0-alpha.10",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -18,33 +18,32 @@
18
18
  "to-dev": "git checkout main && git pull origin main && git branch -d turnip/dev && git checkout -b turnip/dev"
19
19
  },
20
20
  "devDependencies": {
21
- "@inlang/paraglide-js": "2.0.0-beta.30",
22
- "@sveltejs/adapter-auto": "^3.1.1",
21
+ "@eslint/compat": "^1.2.5",
22
+ "@eslint/js": "^9.18.0",
23
+ "@sveltejs/adapter-auto": "^4.0.0",
23
24
  "@sveltejs/kit": "^2.5.27",
24
25
  "@sveltejs/package": "^2.3.7",
25
- "@tailwindcss/forms": "^0.5.3",
26
- "@tailwindcss/typography": "^0.5.9",
27
- "@typescript-eslint/eslint-plugin": "^5.45.0",
28
- "@typescript-eslint/parser": "^5.45.0",
29
- "eslint": "^8.28.0",
30
- "eslint-config-prettier": "^8.5.0",
31
- "eslint-plugin-svelte3": "^4.0.0",
32
- "prettier": "^3.2.5",
33
- "prettier-plugin-svelte": "^3.2.6",
26
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
27
+ "eslint": "^9.18.0",
28
+ "eslint-config-prettier": "^10.0.1",
29
+ "eslint-plugin-svelte": "^3.0.0",
30
+ "globals": "^16.0.0",
31
+ "prettier": "^3.4.2",
32
+ "prettier-plugin-svelte": "^3.3.3",
33
+ "prettier-plugin-tailwindcss": "^0.6.11",
34
34
  "prisma": "^5.12.1",
35
- "svelte": "^5.0.0",
36
35
  "svelte-check": "^4.0.0",
37
36
  "svelte2tsx": "^0.6.20",
38
- "tailwindcss": "^4.0.14",
39
37
  "tslib": "^2.4.1",
40
38
  "typescript": "^5.5.0",
39
+ "typescript-eslint": "^8.20.0",
41
40
  "vite": "^5.4.4"
42
41
  },
43
42
  "dependencies": {
43
+ "@inlang/paraglide-js": "2.0.0-beta.30",
44
44
  "@prisma/client": "^5.12.1",
45
45
  "@skeletonlabs/skeleton": "^3.1.0",
46
46
  "@skeletonlabs/skeleton-svelte": "^1.0.0",
47
- "@sveltejs/kit": "^2.5.27",
48
47
  "@sveltejs/vite-plugin-svelte": "^4.0.0",
49
48
  "@tailwindcss/vite": "^4.0.14",
50
49
  "@types/htmlparser2": "^3.10.7",
@@ -54,9 +53,12 @@
54
53
  "mode-watcher": "^0.5.1",
55
54
  "node-html-parser": "^6.1.5",
56
55
  "publint": "^0.2.7",
56
+ "shiki": "^3.2.1",
57
+ "shiki-transformer-copy-button": "0.0.3",
57
58
  "string-width": "^7.1.0",
58
59
  "svelte": "^5.0.0",
59
60
  "svelte-modals": "^2.0.1",
61
+ "tailwindcss": "^4.0.14",
60
62
  "ts-node": "^10.9.1"
61
63
  },
62
64
  "exports": {
@@ -88,6 +90,9 @@
88
90
  "src/lib/styles/app.css",
89
91
  "src/lib/theme.css"
90
92
  ],
93
+ "engines": {
94
+ "node": ">=22"
95
+ },
91
96
  "repository": "https://github.com/TurnipXenon/pineapple",
92
97
  "author": "turnipxenon <turnipxenon@gmail.com>",
93
98
  "license": "MIT",
@@ -4,7 +4,7 @@
4
4
  @import "@skeletonlabs/skeleton/themes/crimson";
5
5
  @import "./turnip-theme.css";
6
6
 
7
- @source "../node_modules/@skeletonlabs/skeleton-svelte/dist";
7
+ @source "../../../node_modules/@skeletonlabs/skeleton-svelte/dist";
8
8
 
9
9
  @custom-variant dark (&:where(.dark, .dark *));
10
10
 
@@ -51,3 +51,94 @@ a.external-link {
51
51
  --tw-ring-color: rgb(var(--color-text-400));
52
52
  /*background-color: red;*/
53
53
  }
54
+
55
+ @layer base {
56
+ .game-link-section {
57
+ @apply mt-6 flex gap-2 justify-center;
58
+ }
59
+
60
+ .game-video-cover {
61
+ @apply rounded-t-lg max-h-64 object-cover w-full;
62
+ }
63
+
64
+ .text-chip-container {
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ gap: 0.5rem;
68
+ }
69
+
70
+ .text-chip {
71
+ background-color: var(--color-secondary-50-950) /* light-dark(var(--color-secondary-50), var(--color-secondary-950)) */;
72
+ color: var(--color-secondary-950-50) /* light-dark(var(--color-secondary-950), var(--color-secondary-50)) */;
73
+ }
74
+ }
75
+
76
+ /*https://shiki.style/guide/dual-themes*/
77
+ html.dark .shiki,
78
+ html.dark .shiki span {
79
+ color: var(--shiki-dark) !important;
80
+ background-color: var(--shiki-dark-bg) !important;
81
+ /* Optional, if you also want font styles */
82
+ font-style: var(--shiki-dark-font-style) !important;
83
+ font-weight: var(--shiki-dark-font-weight) !important;
84
+ text-decoration: var(--shiki-dark-text-decoration) !important;
85
+ }
86
+
87
+ .shiki {
88
+ span {
89
+ white-space: pre-wrap;
90
+ word-wrap: break-word;
91
+ }
92
+ }
93
+
94
+ /* region shiki copy button */
95
+ pre:has(code) {
96
+ position: relative;
97
+ }
98
+
99
+ pre button.copy {
100
+ position: absolute;
101
+ right: 16px;
102
+ top: 16px;
103
+ height: 28px;
104
+ width: 28px;
105
+ padding: 0;
106
+ display: flex;
107
+
108
+ & span {
109
+ width: 100%;
110
+ aspect-ratio: 1 / 1;
111
+ background-repeat: no-repeat;
112
+ background-position: center;
113
+ background-size: cover;
114
+ }
115
+
116
+ & .ready {
117
+ background-image: url("$pkg/assets/icons/icon-copy-light-contrast.svg");
118
+
119
+ @variant dark {
120
+ background-image: url("$pkg/assets/icons/icon-copy-dark-contrast.svg");
121
+ }
122
+ }
123
+
124
+ & .success {
125
+ display: none;
126
+ background-image: url("$pkg/assets/icons/icon-check-light-contrast.svg");
127
+
128
+ @variant dark {
129
+ background-image: url("$pkg/assets/icons/icon-check-dark-contrast.svg");
130
+ }
131
+ }
132
+
133
+ &.copied {
134
+ & .success {
135
+ display: block;
136
+ }
137
+
138
+ & .ready {
139
+ display: none;
140
+ }
141
+ }
142
+ }
143
+
144
+ /* endregion shiki copy button */
@@ -1,7 +0,0 @@
1
- interface Props {
2
- isVisible?: boolean;
3
- children?: import('svelte').Snippet;
4
- }
5
- declare const ElementVisbilityDetector: import("svelte").Component<Props, {}, "isVisible">;
6
- type ElementVisbilityDetector = ReturnType<typeof ElementVisbilityDetector>;
7
- export default ElementVisbilityDetector;