@turnipxenon/pineapple 2.4.52 → 2.4.54
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/.idea/workspace.xml +54 -51
- package/.svelte-kit/__package__/components/combo_box/ComboBox.svelte +7 -7
- package/.svelte-kit/__package__/components/combo_box/ComboBoxWithButton.svelte +7 -7
- package/.svelte-kit/__package__/components/combo_box/combo-box.postcss +22 -22
- package/.svelte-kit/__package__/template/seaweed/ParseQueryTerms.d.ts +1 -0
- package/.svelte-kit/__package__/template/seaweed/ParseQueryTerms.js +23 -0
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +10 -22
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte +117 -117
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/combo_box/ComboBox.svelte +7 -7
- package/dist/components/combo_box/ComboBoxWithButton.svelte +7 -7
- package/dist/components/combo_box/combo-box.postcss +22 -22
- package/dist/template/seaweed/ParseQueryTerms.d.ts +1 -0
- package/dist/template/seaweed/ParseQueryTerms.js +23 -0
- package/dist/template/seaweed/SeaweedTemplate.svelte +10 -22
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +117 -117
- package/package.json +1 -1
- package/src/lib/components/combo_box/ComboBox.svelte +13 -13
- package/src/lib/components/combo_box/ComboBoxWithButton.svelte +18 -18
- package/src/lib/components/combo_box/combo-box.postcss +22 -22
- package/src/lib/template/seaweed/ParseQueryTerms.ts +26 -0
- package/src/lib/template/seaweed/RunChaos.ts +44 -44
- package/src/lib/template/seaweed/SeaweedTemplate.svelte +11 -34
- package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte +166 -166
- package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.ts +6 -6
package/.idea/workspace.xml
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Move parseQtTerm on afterUpdate">
|
|
8
|
+
<change afterPath="$PROJECT_DIR$/src/lib/template/seaweed/ParseQueryTerms.ts" afterDir="false" />
|
|
8
9
|
<change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
|
|
9
10
|
</list>
|
|
10
11
|
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
<component name="Git.Settings">
|
|
60
61
|
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
61
62
|
<map>
|
|
62
|
-
<entry key="$PROJECT_DIR$" value="
|
|
63
|
+
<entry key="$PROJECT_DIR$" value="dbc946a316ca6b2c95588d487cf48fe8f4a04801" />
|
|
63
64
|
</map>
|
|
64
65
|
</option>
|
|
65
66
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
@@ -107,41 +108,41 @@
|
|
|
107
108
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
108
109
|
<option name="showLibraryContents" value="true" />
|
|
109
110
|
</component>
|
|
110
|
-
<component name="PropertiesComponent"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
111
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
112
|
+
"keyToString": {
|
|
113
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
114
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
115
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
116
|
+
"WebServerToolWindowFactoryState": "false",
|
|
117
|
+
"git-widget-placeholder": "turnip/customizable2",
|
|
118
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
119
|
+
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/lib/template/seaweed",
|
|
120
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
121
|
+
"node.js.detected.package.eslint": "true",
|
|
122
|
+
"node.js.detected.package.tslint": "true",
|
|
123
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
124
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
125
|
+
"nodejs_interpreter_path": "node",
|
|
126
|
+
"nodejs_package_manager_path": "yarn",
|
|
127
|
+
"npm.build.executor": "Run",
|
|
128
|
+
"npm.dev (1).executor": "Run",
|
|
129
|
+
"npm.dev --open.executor": "Run",
|
|
130
|
+
"npm.dev offline.executor": "Run",
|
|
131
|
+
"npm.dev-offline.executor": "Run",
|
|
132
|
+
"npm.dev.executor": "Run",
|
|
133
|
+
"npm.to-dev.executor": "Run",
|
|
134
|
+
"settings.editor.selected.configurable": "preferences.general",
|
|
135
|
+
"ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
|
|
136
|
+
"vue.rearranger.settings.migration": "true"
|
|
136
137
|
}
|
|
137
|
-
}
|
|
138
|
+
}]]></component>
|
|
138
139
|
<component name="RecentsManager">
|
|
139
140
|
<key name="CopyFile.RECENT_KEYS">
|
|
141
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\template\seaweed" />
|
|
140
142
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\template\seaweed\entries" />
|
|
141
143
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page7\(test_layout)\page8" />
|
|
142
144
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
|
|
143
145
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page2" />
|
|
144
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\navigation_component" />
|
|
145
146
|
</key>
|
|
146
147
|
<key name="MoveFile.RECENT_KEYS">
|
|
147
148
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\combo_box" />
|
|
@@ -197,8 +198,8 @@
|
|
|
197
198
|
<item itemvalue="npm.dev --open" />
|
|
198
199
|
<item itemvalue="npm.to-dev" />
|
|
199
200
|
<item itemvalue="npm.dev-offline" />
|
|
200
|
-
<item itemvalue="npm.dev-offline" />
|
|
201
201
|
<item itemvalue="npm.dev --open" />
|
|
202
|
+
<item itemvalue="npm.to-dev" />
|
|
202
203
|
</list>
|
|
203
204
|
</recent_temporary>
|
|
204
205
|
</component>
|
|
@@ -327,23 +328,9 @@
|
|
|
327
328
|
<workItem from="1712533167568" duration="339000" />
|
|
328
329
|
<workItem from="1712533592123" duration="803000" />
|
|
329
330
|
<workItem from="1712534451700" duration="490000" />
|
|
330
|
-
<workItem from="1712535021202" duration="
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<option name="closed" value="true" />
|
|
334
|
-
<created>1711682610806</created>
|
|
335
|
-
<option name="number" value="00117" />
|
|
336
|
-
<option name="presentableId" value="LOCAL-00117" />
|
|
337
|
-
<option name="project" value="LOCAL" />
|
|
338
|
-
<updated>1711682610806</updated>
|
|
339
|
-
</task>
|
|
340
|
-
<task id="LOCAL-00118" summary="Fix allowLinkedin arg in SocialSection">
|
|
341
|
-
<option name="closed" value="true" />
|
|
342
|
-
<created>1711683031188</created>
|
|
343
|
-
<option name="number" value="00118" />
|
|
344
|
-
<option name="presentableId" value="LOCAL-00118" />
|
|
345
|
-
<option name="project" value="LOCAL" />
|
|
346
|
-
<updated>1711683031188</updated>
|
|
331
|
+
<workItem from="1712535021202" duration="299000" />
|
|
332
|
+
<workItem from="1712535434722" duration="522000" />
|
|
333
|
+
<workItem from="1712536086680" duration="3391000" />
|
|
347
334
|
</task>
|
|
348
335
|
<task id="LOCAL-00119" summary="Change media to containre">
|
|
349
336
|
<option name="closed" value="true" />
|
|
@@ -721,7 +708,23 @@
|
|
|
721
708
|
<option name="project" value="LOCAL" />
|
|
722
709
|
<updated>1712535101486</updated>
|
|
723
710
|
</task>
|
|
724
|
-
<
|
|
711
|
+
<task id="LOCAL-00166" summary="Add logs to observe parseQtTerms in downstream package">
|
|
712
|
+
<option name="closed" value="true" />
|
|
713
|
+
<created>1712535169690</created>
|
|
714
|
+
<option name="number" value="00166" />
|
|
715
|
+
<option name="presentableId" value="LOCAL-00166" />
|
|
716
|
+
<option name="project" value="LOCAL" />
|
|
717
|
+
<updated>1712535169690</updated>
|
|
718
|
+
</task>
|
|
719
|
+
<task id="LOCAL-00167" summary="Move parseQtTerm on afterUpdate">
|
|
720
|
+
<option name="closed" value="true" />
|
|
721
|
+
<created>1712537061829</created>
|
|
722
|
+
<option name="number" value="00167" />
|
|
723
|
+
<option name="presentableId" value="LOCAL-00167" />
|
|
724
|
+
<option name="project" value="LOCAL" />
|
|
725
|
+
<updated>1712537061829</updated>
|
|
726
|
+
</task>
|
|
727
|
+
<option name="localTasksCounter" value="168" />
|
|
725
728
|
<servers />
|
|
726
729
|
</component>
|
|
727
730
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -779,7 +782,6 @@
|
|
|
779
782
|
</option>
|
|
780
783
|
</component>
|
|
781
784
|
<component name="VcsManagerConfiguration">
|
|
782
|
-
<MESSAGE value="Add cdktf" />
|
|
783
785
|
<MESSAGE value="Implement cdktf for empty AppService" />
|
|
784
786
|
<MESSAGE value="WIP: cdktf" />
|
|
785
787
|
<MESSAGE value="Revert "Correct app_build_command in Azure SWA GithubActions" Revert b34caf17" />
|
|
@@ -804,6 +806,7 @@
|
|
|
804
806
|
<MESSAGE value="Put parseQTTerms in afterUpdate instead of onMount" />
|
|
805
807
|
<MESSAGE value="Add logs to observe queryTermMap in downstream package" />
|
|
806
808
|
<MESSAGE value="Add logs to observe parseQtTerms in downstream package" />
|
|
807
|
-
<
|
|
809
|
+
<MESSAGE value="Move parseQtTerm on afterUpdate" />
|
|
810
|
+
<option name="LAST_COMMIT_MESSAGE" value="Move parseQtTerm on afterUpdate" />
|
|
808
811
|
</component>
|
|
809
812
|
</project>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
export let stringItems = ["Select item"];
|
|
3
3
|
export let selectedValue = "";
|
|
4
4
|
selectedValue = stringItems.length === 0 ? "" : stringItems[0];
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<select bind:value={selectedValue} class="select">
|
|
8
|
-
{#each stringItems as item}
|
|
9
|
-
<option value={item}>{item}</option>
|
|
10
|
-
{/each}
|
|
11
|
-
</select>
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<select bind:value={selectedValue} class="select">
|
|
8
|
+
{#each stringItems as item}
|
|
9
|
+
<option value={item}>{item}</option>
|
|
10
|
+
{/each}
|
|
11
|
+
</select>
|
|
@@ -6,10 +6,10 @@ export let onClick = void 0;
|
|
|
6
6
|
let onClickInternal = () => {
|
|
7
7
|
onClick?.(selectedValue);
|
|
8
8
|
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div class="combo-box-wrapper">
|
|
12
|
-
<button class="combo-box-side-button btn variant-filled-primary" on:click={onClickInternal}>+ Add entry</button>
|
|
13
|
-
<ComboBox bind:selectedValue={selectedValue}
|
|
14
|
-
bind:stringItems={stringItems}></ComboBox>
|
|
15
|
-
</div>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div class="combo-box-wrapper">
|
|
12
|
+
<button class="combo-box-side-button btn variant-filled-primary" on:click={onClickInternal}>+ Add entry</button>
|
|
13
|
+
<ComboBox bind:selectedValue={selectedValue}
|
|
14
|
+
bind:stringItems={stringItems}></ComboBox>
|
|
15
|
+
</div>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
.combo-box-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.select {
|
|
6
|
-
flex-grow: 1;
|
|
7
|
-
@apply variant-filled-primary;
|
|
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 variant-filled-primary;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dark .option,
|
|
19
|
-
.dark .select,
|
|
20
|
-
.dark .combo-box-side-button {
|
|
21
|
-
color: var(--color-text-50);
|
|
22
|
-
}
|
|
1
|
+
.combo-box-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.select {
|
|
6
|
+
flex-grow: 1;
|
|
7
|
+
@apply variant-filled-primary;
|
|
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 variant-filled-primary;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dark .option,
|
|
19
|
+
.dark .select,
|
|
20
|
+
.dark .combo-box-side-button {
|
|
21
|
+
color: var(--color-text-50);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseQueryTerms: (node: Element, querySet: Set<string>) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const parseQueryTerms = (node, querySet) => {
|
|
2
|
+
// change all text content to gibberish
|
|
3
|
+
for (const child of Array.from(node.children)) {
|
|
4
|
+
if (child.nodeType === Node.ELEMENT_NODE) {
|
|
5
|
+
parseQueryTerms(child, querySet);
|
|
6
|
+
// todo: if it's a span and it wraps a word, and qt class then we count that as query
|
|
7
|
+
// for (const childOfChild of child.childNodes) {
|
|
8
|
+
// if (childOfChild.nodeType === Node.TEXT_NODE && childOfChild.textContent?.trim()) {
|
|
9
|
+
// // todo analyze textcontent
|
|
10
|
+
// }
|
|
11
|
+
// }
|
|
12
|
+
// Warning: below is not redundant and is a catch-all
|
|
13
|
+
// Long-term solution: figure out the correct typing
|
|
14
|
+
if ((typeof child.className === "string") && child.className?.includes("qt-")) {
|
|
15
|
+
child.className.split(" ").forEach(c => {
|
|
16
|
+
if (c.startsWith("qt-")) {
|
|
17
|
+
querySet.add(c);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -8,13 +8,13 @@ import { Accordion, AccordionItem, CodeBlock, SlideToggle } from "@skeletonlabs/
|
|
|
8
8
|
import { page } from "$app/stores";
|
|
9
9
|
import Card from "../../components/Card.svelte";
|
|
10
10
|
import ElementVisbilityDetector from "../../components/ElementVisbilityDetector.svelte";
|
|
11
|
-
import selfContent from "./SeaweedTemplate.svelte?raw";
|
|
12
11
|
import {
|
|
13
12
|
AllGroupedEntriesProjectFirst,
|
|
14
13
|
GetEntryFromGlobal,
|
|
15
14
|
seaweedTemplateData,
|
|
16
15
|
TurnGroupEntriesMutable
|
|
17
16
|
} from "./SeaweedTemplateData";
|
|
17
|
+
import { parseQueryTerms } from "./ParseQueryTerms";
|
|
18
18
|
export let letChaos = true;
|
|
19
19
|
export let name = "Turnip";
|
|
20
20
|
export let email = "turnipxenon@gmail.com";
|
|
@@ -25,7 +25,6 @@ export let extraComponent = void 0;
|
|
|
25
25
|
const entryProps = {
|
|
26
26
|
email
|
|
27
27
|
};
|
|
28
|
-
const entryList = import.meta.glob("./entries/*.svelte", { query: "?raw", eager: true });
|
|
29
28
|
const paramQTSet = /* @__PURE__ */ new Set();
|
|
30
29
|
let isVisible = true;
|
|
31
30
|
let isAdvanceSettingOn = false;
|
|
@@ -46,25 +45,9 @@ const syncQT = () => {
|
|
|
46
45
|
});
|
|
47
46
|
seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
|
|
48
47
|
};
|
|
49
|
-
const
|
|
50
|
-
console.log("parsing", seaweedTemplateData.queryTermMap.size);
|
|
48
|
+
const parseQueryTermsLocal = async () => {
|
|
51
49
|
const qtSet = /* @__PURE__ */ new Set();
|
|
52
|
-
|
|
53
|
-
[...Object.values(entryList).map((e) => e.default), selfContent].forEach((body) => {
|
|
54
|
-
console.log("parsing", body);
|
|
55
|
-
rawTermList.push(
|
|
56
|
-
...body.split('"').filter((s) => s.startsWith("qt-"))
|
|
57
|
-
// step 2: filter out texts that does not begin with "qt-"
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
rawTermList.forEach((t) => {
|
|
61
|
-
t.split(" ").forEach((nt) => {
|
|
62
|
-
if (["qt-1", "qt-2", "qt-*", "qt-"].includes(nt)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
qtSet.add(nt);
|
|
66
|
-
});
|
|
67
|
-
});
|
|
50
|
+
parseQueryTerms(document.body, qtSet);
|
|
68
51
|
qtSet.forEach((t) => seaweedTemplateData.queryTermMap.set(t, true));
|
|
69
52
|
seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
|
|
70
53
|
syncQT();
|
|
@@ -126,8 +109,13 @@ onMount(async () => {
|
|
|
126
109
|
if (letChaos) {
|
|
127
110
|
runChaos(document.body);
|
|
128
111
|
chaosDone = true;
|
|
129
|
-
}
|
|
130
|
-
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
let isParsed = false;
|
|
115
|
+
afterUpdate(async () => {
|
|
116
|
+
if (!letChaos && !isParsed) {
|
|
117
|
+
isParsed = true;
|
|
118
|
+
await parseQueryTermsLocal();
|
|
131
119
|
}
|
|
132
120
|
});
|
|
133
121
|
const toggleTerm = (term) => {
|
|
@@ -90,120 +90,120 @@ const removeEntry = (entry, group) => {
|
|
|
90
90
|
};
|
|
91
91
|
const allDefaultEntries = Array.from(GetAllEntryFromGlobal().keys());
|
|
92
92
|
console.log("Test", Array.from(GetAllEntryFromGlobal().keys()));
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<h3>Site ordering</h3>
|
|
96
|
-
<blockquote>Sorry! This part of the website is still WIP, but here it is anyway. As long as it functions</blockquote>
|
|
97
|
-
|
|
98
|
-
<!-- formatting: group1:entry1|entry2,group2:entry3
|
|
99
|
-
: <= separates the group header, the entries, and the class
|
|
100
|
-
| <= separates each entries
|
|
101
|
-
, <= separates each group
|
|
102
|
-
-->
|
|
103
|
-
<div class="advanced-setting-list">
|
|
104
|
-
<!-- todo: we might have to extract this into it's own component -->
|
|
105
|
-
<!-- todo: NOW!!! -->
|
|
106
|
-
{#each seaweedEntries as group, groupIndex}
|
|
107
|
-
<div>
|
|
108
|
-
<div>
|
|
109
|
-
<button class="editable-button" on:click={removeGroup(group)}>X</button>
|
|
110
|
-
<!-- todo: move group up or down -->
|
|
111
|
-
<button class="editable-button" on:click={swapGroups(groupIndex, true)}>^</button>
|
|
112
|
-
<button class="editable-button" on:click={swapGroups(groupIndex, false)}>v</button>
|
|
113
|
-
{group.name}
|
|
114
|
-
</div>
|
|
115
|
-
<div class="advanced-setting-list card">
|
|
116
|
-
{#each group.items as entry, entryIndex}
|
|
117
|
-
<div class="editable-entry">
|
|
118
|
-
<button on:click={removeEntry(entry, group)}>-</button>
|
|
119
|
-
<button on:click={swapEntry(entryIndex, group, true)}>^</button>
|
|
120
|
-
<button on:click={swapEntry(entryIndex, group, false)}>v</button>
|
|
121
|
-
{entry.name}
|
|
122
|
-
</div>
|
|
123
|
-
{/each}
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
<ComboBoxWithButton stringItems={allDefaultEntries}
|
|
127
|
-
onClick={addEntry(group)}></ComboBoxWithButton>
|
|
128
|
-
|
|
129
|
-
</div>
|
|
130
|
-
{/each}
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
<style>
|
|
134
|
-
.advanced-setting-list {
|
|
135
|
-
display: flex;
|
|
136
|
-
flex-direction: column;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
:is(.dark .editable-entry > button),:is(.dark .editable-button) {
|
|
140
|
-
--tw-bg-opacity: 1;
|
|
141
|
-
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
142
|
-
color: rgb(var(--on-primary));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.editable-entry > button:disabled, .editable-button:disabled {
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
opacity: 0.5;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.editable-entry > button:disabled:hover, .editable-button:disabled:hover {
|
|
151
|
-
--tw-brightness: brightness(1);
|
|
152
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.editable-entry > button:disabled:active, .editable-button:disabled:active {
|
|
156
|
-
--tw-scale-x: 1;
|
|
157
|
-
--tw-scale-y: 1;
|
|
158
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.editable-entry > button, .editable-button {
|
|
162
|
-
font-size: 1rem;
|
|
163
|
-
line-height: 1.5rem;
|
|
164
|
-
padding-left: 1.25rem;
|
|
165
|
-
padding-right: 1.25rem;
|
|
166
|
-
padding-top: 9px;
|
|
167
|
-
padding-bottom: 9px;
|
|
168
|
-
white-space: nowrap;
|
|
169
|
-
text-align: center;
|
|
170
|
-
display: inline-flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
justify-content: center;
|
|
173
|
-
transition-property: all;
|
|
174
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
175
|
-
transition-duration: 150ms;
|
|
176
|
-
border-radius: var(--theme-rounded-base);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.editable-entry > button > :not([hidden]) ~ :not([hidden]), .editable-button > :not([hidden]) ~ :not([hidden]) {
|
|
180
|
-
--tw-space-x-reverse: 0;
|
|
181
|
-
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
182
|
-
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.editable-entry > button:hover, .editable-button:hover {
|
|
186
|
-
--tw-brightness: brightness(1.15);
|
|
187
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.editable-entry > button:active, .editable-button:active {
|
|
191
|
-
--tw-scale-x: 95%;
|
|
192
|
-
--tw-scale-y: 95%;
|
|
193
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
194
|
-
--tw-brightness: brightness(.9);
|
|
195
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.editable-entry > button, .editable-button {
|
|
199
|
-
--tw-bg-opacity: 1;
|
|
200
|
-
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
201
|
-
color: rgb(var(--on-primary));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
:is(.dark .editable-entry > button),:is(.dark .editable-button) {
|
|
205
|
-
--tw-bg-opacity: 1;
|
|
206
|
-
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
207
|
-
color: rgb(var(--on-primary));
|
|
208
|
-
}
|
|
209
|
-
</style>
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<h3>Site ordering</h3>
|
|
96
|
+
<blockquote>Sorry! This part of the website is still WIP, but here it is anyway. As long as it functions</blockquote>
|
|
97
|
+
|
|
98
|
+
<!-- formatting: group1:entry1|entry2,group2:entry3
|
|
99
|
+
: <= separates the group header, the entries, and the class
|
|
100
|
+
| <= separates each entries
|
|
101
|
+
, <= separates each group
|
|
102
|
+
-->
|
|
103
|
+
<div class="advanced-setting-list">
|
|
104
|
+
<!-- todo: we might have to extract this into it's own component -->
|
|
105
|
+
<!-- todo: NOW!!! -->
|
|
106
|
+
{#each seaweedEntries as group, groupIndex}
|
|
107
|
+
<div>
|
|
108
|
+
<div>
|
|
109
|
+
<button class="editable-button" on:click={removeGroup(group)}>X</button>
|
|
110
|
+
<!-- todo: move group up or down -->
|
|
111
|
+
<button class="editable-button" on:click={swapGroups(groupIndex, true)}>^</button>
|
|
112
|
+
<button class="editable-button" on:click={swapGroups(groupIndex, false)}>v</button>
|
|
113
|
+
{group.name}
|
|
114
|
+
</div>
|
|
115
|
+
<div class="advanced-setting-list card">
|
|
116
|
+
{#each group.items as entry, entryIndex}
|
|
117
|
+
<div class="editable-entry">
|
|
118
|
+
<button on:click={removeEntry(entry, group)}>-</button>
|
|
119
|
+
<button on:click={swapEntry(entryIndex, group, true)}>^</button>
|
|
120
|
+
<button on:click={swapEntry(entryIndex, group, false)}>v</button>
|
|
121
|
+
{entry.name}
|
|
122
|
+
</div>
|
|
123
|
+
{/each}
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<ComboBoxWithButton stringItems={allDefaultEntries}
|
|
127
|
+
onClick={addEntry(group)}></ComboBoxWithButton>
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
{/each}
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<style>
|
|
134
|
+
.advanced-setting-list {
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:is(.dark .editable-entry > button),:is(.dark .editable-button) {
|
|
140
|
+
--tw-bg-opacity: 1;
|
|
141
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
142
|
+
color: rgb(var(--on-primary));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.editable-entry > button:disabled, .editable-button:disabled {
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
opacity: 0.5;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.editable-entry > button:disabled:hover, .editable-button:disabled:hover {
|
|
151
|
+
--tw-brightness: brightness(1);
|
|
152
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.editable-entry > button:disabled:active, .editable-button:disabled:active {
|
|
156
|
+
--tw-scale-x: 1;
|
|
157
|
+
--tw-scale-y: 1;
|
|
158
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.editable-entry > button, .editable-button {
|
|
162
|
+
font-size: 1rem;
|
|
163
|
+
line-height: 1.5rem;
|
|
164
|
+
padding-left: 1.25rem;
|
|
165
|
+
padding-right: 1.25rem;
|
|
166
|
+
padding-top: 9px;
|
|
167
|
+
padding-bottom: 9px;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
text-align: center;
|
|
170
|
+
display: inline-flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
transition-property: all;
|
|
174
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
175
|
+
transition-duration: 150ms;
|
|
176
|
+
border-radius: var(--theme-rounded-base);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.editable-entry > button > :not([hidden]) ~ :not([hidden]), .editable-button > :not([hidden]) ~ :not([hidden]) {
|
|
180
|
+
--tw-space-x-reverse: 0;
|
|
181
|
+
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
182
|
+
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.editable-entry > button:hover, .editable-button:hover {
|
|
186
|
+
--tw-brightness: brightness(1.15);
|
|
187
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.editable-entry > button:active, .editable-button:active {
|
|
191
|
+
--tw-scale-x: 95%;
|
|
192
|
+
--tw-scale-y: 95%;
|
|
193
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
194
|
+
--tw-brightness: brightness(.9);
|
|
195
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.editable-entry > button, .editable-button {
|
|
199
|
+
--tw-bg-opacity: 1;
|
|
200
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
201
|
+
color: rgb(var(--on-primary));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:is(.dark .editable-entry > button),:is(.dark .editable-button) {
|
|
205
|
+
--tw-bg-opacity: 1;
|
|
206
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
207
|
+
color: rgb(var(--on-primary));
|
|
208
|
+
}
|
|
209
|
+
</style>
|
|
@@ -21,7 +21,7 @@ export const options = {
|
|
|
21
21
|
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
|
|
22
22
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
23
23
|
},
|
|
24
|
-
version_hash: "
|
|
24
|
+
version_hash: "kjai7p"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
export let stringItems = ["Select item"];
|
|
3
3
|
export let selectedValue = "";
|
|
4
4
|
selectedValue = stringItems.length === 0 ? "" : stringItems[0];
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<select bind:value={selectedValue} class="select">
|
|
8
|
-
{#each stringItems as item}
|
|
9
|
-
<option value={item}>{item}</option>
|
|
10
|
-
{/each}
|
|
11
|
-
</select>
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<select bind:value={selectedValue} class="select">
|
|
8
|
+
{#each stringItems as item}
|
|
9
|
+
<option value={item}>{item}</option>
|
|
10
|
+
{/each}
|
|
11
|
+
</select>
|
|
@@ -6,10 +6,10 @@ export let onClick = void 0;
|
|
|
6
6
|
let onClickInternal = () => {
|
|
7
7
|
onClick?.(selectedValue);
|
|
8
8
|
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div class="combo-box-wrapper">
|
|
12
|
-
<button class="combo-box-side-button btn variant-filled-primary" on:click={onClickInternal}>+ Add entry</button>
|
|
13
|
-
<ComboBox bind:selectedValue={selectedValue}
|
|
14
|
-
bind:stringItems={stringItems}></ComboBox>
|
|
15
|
-
</div>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div class="combo-box-wrapper">
|
|
12
|
+
<button class="combo-box-side-button btn variant-filled-primary" on:click={onClickInternal}>+ Add entry</button>
|
|
13
|
+
<ComboBox bind:selectedValue={selectedValue}
|
|
14
|
+
bind:stringItems={stringItems}></ComboBox>
|
|
15
|
+
</div>
|