@bexis2/bexis2-core-ui 0.4.58 → 0.4.60

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 CHANGED
@@ -1,4 +1,11 @@
1
1
  # bexis-core-ui
2
+ ## 0.4.59
3
+ - Table
4
+ - remove static title "table"
5
+ - shorten upload text
6
+ - remove last comma allowed files list
7
+ - remove title about sorting, if not possible
8
+
2
9
  ## 0.4.49 -> 0.4.53
3
10
  - Api
4
11
  - remove __RequestVerificationToken from header
@@ -18,7 +25,6 @@
18
25
  - Add hover to menu
19
26
  - Fix Missing nowrap in menu
20
27
 
21
-
22
28
  ## 0.4.45
23
29
  - Menu
24
30
  - hide gear if settings array has no entry
@@ -0,0 +1,7 @@
1
+ <!-- filepath: /c:/Daten/Documents/Projekte/Svelte/bexis2-core-ui/src/components/MarkdownRenderer.svelte -->
2
+ <script>import { marked } from "marked";
3
+ import { mdsvex } from "mdsvex";
4
+ export let content;
5
+ </script>
6
+
7
+ <div >{@html content}</div>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ content: string;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type MarkdownRederProps = typeof __propDef.props;
12
+ export type MarkdownRederEvents = typeof __propDef.events;
13
+ export type MarkdownRederSlots = typeof __propDef.slots;
14
+ export default class MarkdownReder extends SvelteComponent<MarkdownRederProps, MarkdownRederEvents, MarkdownRederSlots> {
15
+ }
16
+ export {};
@@ -105,13 +105,13 @@ async function handleSubmit() {
105
105
  >
106
106
  <b style="font-size:xx-large"><Fa icon={faFileUpload} /></b>
107
107
  <span
108
- ><b>Drag 'n' drop some files here, or click to select files</b>
108
+ ><b>Drag 'n' drop or click to select files</b>
109
109
  <b>(max file size: {model.maxSize} mb)</b></span
110
110
  >
111
111
  <p>
112
112
  {#if model.accept}
113
- {#each model.accept as ext}
114
- {ext} ,
113
+ {#each model.accept as ext, i}
114
+ {ext}{#if i < model.accept.length - 1}, {/if}
115
115
  {/each}
116
116
  {/if}
117
117
  </p>
@@ -455,8 +455,8 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
455
455
  {...$tableAttrs}
456
456
  class="table table-auto table-compact bg-tertiary-500/30 dark:bg-tertiary-900/10 overflow-clip"
457
457
  id="{tableId}-table"
458
- title="Table"
459
458
  >
459
+ <!-- title="Table" removed from top, as this should be handled by the surrounding container for better accessibility -->
460
460
  <!-- If table height is provided, making the top row sticky -->
461
461
  <thead class={height != null && $pageRows.length > 0 ? `sticky top-0` : ''}>
462
462
  <!-- {#if $data.length > 0} -->
@@ -503,11 +503,11 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
503
503
  class:cursor-pointer={!props.sort.disabled}
504
504
  on:click={props.sort.toggle}
505
505
  on:keydown={props.sort.toggle}
506
- title={props.sort.order === 'asc'
506
+ title={props.sort.disabled ? undefined : (props.sort.order === 'asc'
507
507
  ? `Sort by ${cell.label} column in descending order`
508
508
  : props.sort.order === 'desc'
509
509
  ? `Remove sorting by ${cell.label} column`
510
- : `Sort by ${cell.label} column in ascending order`}
510
+ : `Sort by ${cell.label} column in ascending order`)}
511
511
  >
512
512
  {cell.render().replaceAll("%%%", '.')}
513
513
  </span>
@@ -29,7 +29,7 @@ const noteSettings = {
29
29
  {/if}
30
30
 
31
31
  {#each links as link}
32
- <span role="button" tabindex="0" title="link" class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
32
+ <span role="button" tabindex="0" title={link.label} class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
33
33
  <span>
34
34
  {#if link.label.toLowerCase()=='manual'}
35
35
  <Fa icon={faBook} />
@@ -27,7 +27,7 @@ let popupCombobox = {
27
27
  <AccordionItem padding="p-2">
28
28
  <svelte:fragment slot="summary"
29
29
  ><button class="flex items-center gap-x-1">
30
- <span class="capitalize text-lg hover:text-primary-500">{menubarItem.Title}</span>
30
+ <span class="capitalize text-lg hover:text-secondary-500">{menubarItem.Title}</span>
31
31
  </button></svelte:fragment
32
32
  >
33
33
  <svelte:fragment slot="content"
@@ -38,7 +38,7 @@ let popupCombobox = {
38
38
  </div>
39
39
  <div class="hidden sm:block place-self-center" use:popup={popupCombobox}>
40
40
  <button class="flex items-center gap-x-1 px-2">
41
- <span class="capitalize text-lg whitespace-nowrap hover:text-primary-500">{menubarItem.Title}▾</span>
41
+ <span class="capitalize text-lg whitespace-nowrap hover:text-secondary-500">{menubarItem.Title}▾</span>
42
42
  </button>
43
43
 
44
44
  <div class="z-50 w-max" data-popup={id}>
@@ -0,0 +1,2 @@
1
+ export default cerberus;
2
+ declare const cerberus: Theme;
@@ -0,0 +1,229 @@
1
+ import type { Theme } from '@skeletonlabs/skeleton/themes';
2
+
3
+ const cerberus = {
4
+ "name": "bexis2",
5
+ "properties": {
6
+ "--type-scale-factor": "1.067",
7
+ "--type-scale-1": "calc(0.75rem * var(--type-scale-factor))",
8
+ "--type-scale-2": "calc(0.875rem * var(--type-scale-factor))",
9
+ "--type-scale-3": "calc(1rem * var(--type-scale-factor))",
10
+ "--type-scale-4": "calc(1.125rem * var(--type-scale-factor))",
11
+ "--type-scale-5": "calc(1.25rem * var(--type-scale-factor))",
12
+ "--type-scale-6": "calc(1.5rem * var(--type-scale-factor))",
13
+ "--type-scale-7": "calc(1.875rem * var(--type-scale-factor))",
14
+ "--type-scale-8": "calc(2.25rem * var(--type-scale-factor))",
15
+ "--type-scale-9": "calc(3rem * var(--type-scale-factor))",
16
+ "--type-scale-10": "calc(3.75rem * var(--type-scale-factor))",
17
+ "--type-scale-11": "calc(4.5rem * var(--type-scale-factor))",
18
+ "--type-scale-12": "calc(6rem * var(--type-scale-factor))",
19
+ "--type-scale-13": "calc(8rem * var(--type-scale-factor))",
20
+ "--base-font-color": "var(--color-surface-950)",
21
+ "--base-font-color-dark": "var(--color-surface-50)",
22
+ "--base-font-family": "system-ui",
23
+ "--base-font-size": "inherit",
24
+ "--base-line-height": "inherit",
25
+ "--base-font-weight": "normal",
26
+ "--base-font-style": "normal",
27
+ "--base-letter-spacing": "0em",
28
+ "--heading-font-color": "inherit",
29
+ "--heading-font-color-dark": "inherit",
30
+ "--heading-font-family": "inherit",
31
+ "--heading-font-weight": "bold",
32
+ "--heading-font-style": "normal",
33
+ "--heading-letter-spacing": "inherit",
34
+ "--anchor-font-color": "var(--color-primary-500)",
35
+ "--anchor-font-color-dark": "var(--color-primary-500)",
36
+ "--anchor-font-family": "inherit",
37
+ "--anchor-font-size": "inherit",
38
+ "--anchor-line-height": "inherit",
39
+ "--anchor-font-weight": "inherit",
40
+ "--anchor-font-style": "inherit",
41
+ "--anchor-letter-spacing": "inherit",
42
+ "--anchor-text-decoration": "none",
43
+ "--anchor-text-decoration-hover": "underline",
44
+ "--anchor-text-decoration-active": "none",
45
+ "--anchor-text-decoration-focus": "none",
46
+ "--space-scale-factor": "1",
47
+ "--radii-default": "6px",
48
+ "--radii-container": "6px",
49
+ "--border-width-default": "1px",
50
+ "--divide-width-default": "1px",
51
+ "--outline-width-default": "1px",
52
+ "--ring-width-default": "1px",
53
+ "--body-background-color": "var(--color-surface-50)",
54
+ "--body-background-color-dark": "var(--color-surface-950)",
55
+ "--color-primary-50": "227 243 241",
56
+ "--color-primary-100": "218 240 236",
57
+ "--color-primary-200": "209 236 232",
58
+ "--color-primary-300": "181 224 217",
59
+ "--color-primary-400": "125 201 189",
60
+ "--color-primary-500": "69 178 161",
61
+ "--color-primary-600": "62 160 145",
62
+ "--color-primary-700": "52 134 121",
63
+ "--color-primary-800": "41 107 97",
64
+ "--color-primary-900": "34 87 79",
65
+ "--color-primary-950": "9 39 80",
66
+ "--color-primary-contrast-dark": "var(--color-primary-950)",
67
+ "--color-primary-contrast-light": "var(--color-primary-50)",
68
+ "--color-primary-contrast-50": "var(--color-primary-contrast-dark)",
69
+ "--color-primary-contrast-100": "var(--color-primary-contrast-dark)",
70
+ "--color-primary-contrast-200": "var(--color-primary-contrast-dark)",
71
+ "--color-primary-contrast-300": "var(--color-primary-contrast-dark)",
72
+ "--color-primary-contrast-400": "var(--color-primary-contrast-dark)",
73
+ "--color-primary-contrast-500": "var(--color-primary-contrast-light)",
74
+ "--color-primary-contrast-600": "var(--color-primary-contrast-light)",
75
+ "--color-primary-contrast-700": "var(--color-primary-contrast-light)",
76
+ "--color-primary-contrast-800": "var(--color-primary-contrast-light)",
77
+ "--color-primary-contrast-900": "var(--color-primary-contrast-light)",
78
+ "--color-primary-contrast-950": "var(--color-primary-contrast-light)",
79
+ "--color-secondary-50": "255 239 217",
80
+ "--color-secondary-100": "255 234 204",
81
+ "--color-secondary-200": "255 229 191",
82
+ "--color-secondary-300": "255 213 153",
83
+ "--color-secondary-400": "255 182 77",
84
+ "--color-secondary-500": "255 151 0",
85
+ "--color-secondary-600": "230 136 0",
86
+ "--color-secondary-700": "191 113 0",
87
+ "--color-secondary-800": "153 91 0",
88
+ "--color-secondary-900": "125 74 0",
89
+ "--color-secondary-950": "50 25 104",
90
+ "--color-secondary-contrast-dark": "var(--color-secondary-950)",
91
+ "--color-secondary-contrast-light": "var(--color-secondary-50)",
92
+ "--color-secondary-contrast-50": "var(--color-secondary-contrast-dark)",
93
+ "--color-secondary-contrast-100": "var(--color-secondary-contrast-dark)",
94
+ "--color-secondary-contrast-200": "var(--color-secondary-contrast-dark)",
95
+ "--color-secondary-contrast-300": "var(--color-secondary-contrast-dark)",
96
+ "--color-secondary-contrast-400": "var(--color-secondary-contrast-light)",
97
+ "--color-secondary-contrast-500": "var(--color-secondary-contrast-light)",
98
+ "--color-secondary-contrast-600": "var(--color-secondary-contrast-light)",
99
+ "--color-secondary-contrast-700": "var(--color-secondary-contrast-light)",
100
+ "--color-secondary-contrast-800": "var(--color-secondary-contrast-light)",
101
+ "--color-secondary-contrast-900": "var(--color-secondary-contrast-light)",
102
+ "--color-secondary-contrast-950": "var(--color-secondary-contrast-light)",
103
+ "--color-tertiary-50": "245 251 249",
104
+ "--color-tertiary-100": "242 249 248",
105
+ "--color-tertiary-200": "239 248 246",
106
+ "--color-tertiary-300": "229 243 240",
107
+ "--color-tertiary-400": "210 234 229",
108
+ "--color-tertiary-500": "190 225 218",
109
+ "--color-tertiary-600": "171 203 196",
110
+ "--color-tertiary-700": "143 169 164",
111
+ "--color-tertiary-800": "114 135 131",
112
+ "--color-tertiary-900": "93 110 107",
113
+ "--color-tertiary-950": "118 0 67",
114
+ "--color-tertiary-contrast-dark": "var(--color-tertiary-950)",
115
+ "--color-tertiary-contrast-light": "var(--color-tertiary-50)",
116
+ "--color-tertiary-contrast-50": "var(--color-tertiary-contrast-dark)",
117
+ "--color-tertiary-contrast-100": "var(--color-tertiary-contrast-dark)",
118
+ "--color-tertiary-contrast-200": "var(--color-tertiary-contrast-dark)",
119
+ "--color-tertiary-contrast-300": "var(--color-tertiary-contrast-light)",
120
+ "--color-tertiary-contrast-400": "var(--color-tertiary-contrast-light)",
121
+ "--color-tertiary-contrast-500": "var(--color-tertiary-contrast-light)",
122
+ "--color-tertiary-contrast-600": "var(--color-tertiary-contrast-light)",
123
+ "--color-tertiary-contrast-700": "var(--color-tertiary-contrast-light)",
124
+ "--color-tertiary-contrast-800": "var(--color-tertiary-contrast-light)",
125
+ "--color-tertiary-contrast-900": "var(--color-tertiary-contrast-light)",
126
+ "--color-tertiary-contrast-950": "var(--color-tertiary-contrast-light)",
127
+ "--color-success-50": "228 244 227",
128
+ "--color-success-100": "219 240 217",
129
+ "--color-success-200": "210 237 208",
130
+ "--color-success-300": "183 225 180",
131
+ "--color-success-400": "129 203 123",
132
+ "--color-success-500": "75 181 67",
133
+ "--color-success-600": "68 163 60",
134
+ "--color-success-700": "56 136 50",
135
+ "--color-success-800": "45 109 40",
136
+ "--color-success-900": "37 89 33",
137
+ "--color-success-950": "5 46 42",
138
+ "--color-success-contrast-dark": "var(--color-success-950)",
139
+ "--color-success-contrast-light": "var(--color-success-50)",
140
+ "--color-success-contrast-50": "var(--color-success-contrast-dark)",
141
+ "--color-success-contrast-100": "var(--color-success-contrast-dark)",
142
+ "--color-success-contrast-200": "var(--color-success-contrast-dark)",
143
+ "--color-success-contrast-300": "var(--color-success-contrast-dark)",
144
+ "--color-success-contrast-400": "var(--color-success-contrast-dark)",
145
+ "--color-success-contrast-500": "var(--color-success-contrast-dark)",
146
+ "--color-success-contrast-600": "var(--color-success-contrast-light)",
147
+ "--color-success-contrast-700": "var(--color-success-contrast-light)",
148
+ "--color-success-contrast-800": "var(--color-success-contrast-light)",
149
+ "--color-success-contrast-900": "var(--color-success-contrast-light)",
150
+ "--color-success-contrast-950": "var(--color-success-contrast-light)",
151
+ "--color-warning-50": "252 244 218",
152
+ "--color-warning-100": "251 240 206",
153
+ "--color-warning-200": "250 236 193",
154
+ "--color-warning-300": "247 225 156",
155
+ "--color-warning-400": "240 202 82",
156
+ "--color-warning-500": "234 179 8",
157
+ "--color-warning-600": "211 161 7",
158
+ "--color-warning-700": "176 134 6",
159
+ "--color-warning-800": "140 107 5",
160
+ "--color-warning-900": "115 88 4",
161
+ "--color-warning-950": "161 77 5",
162
+ "--color-warning-contrast-dark": "var(--color-warning-950)",
163
+ "--color-warning-contrast-light": "var(--color-warning-50)",
164
+ "--color-warning-contrast-50": "var(--color-warning-contrast-dark)",
165
+ "--color-warning-contrast-100": "var(--color-warning-contrast-dark)",
166
+ "--color-warning-contrast-200": "var(--color-warning-contrast-dark)",
167
+ "--color-warning-contrast-300": "var(--color-warning-contrast-dark)",
168
+ "--color-warning-contrast-400": "var(--color-warning-contrast-dark)",
169
+ "--color-warning-contrast-500": "var(--color-warning-contrast-dark)",
170
+ "--color-warning-contrast-600": "var(--color-warning-contrast-light)",
171
+ "--color-warning-contrast-700": "var(--color-warning-contrast-light)",
172
+ "--color-warning-contrast-800": "var(--color-warning-contrast-light)",
173
+ "--color-warning-contrast-900": "var(--color-warning-contrast-light)",
174
+ "--color-warning-contrast-950": "var(--color-warning-contrast-light)",
175
+ "--color-error-50": "255 217 217",
176
+ "--color-error-100": "255 204 204",
177
+ "--color-error-200": "255 191 191",
178
+ "--color-error-300": "255 153 153",
179
+ "--color-error-400": "255 77 77",
180
+ "--color-error-500": "255 0 0",
181
+ "--color-error-600": "230 0 0",
182
+ "--color-error-700": "191 0 0",
183
+ "--color-error-800": "153 0 0",
184
+ "--color-error-900": "125 0 0",
185
+ "--color-error-950": "148 0 0",
186
+ "--color-error-contrast-dark": "var(--color-error-950)",
187
+ "--color-error-contrast-light": "var(--color-error-50)",
188
+ "--color-error-contrast-50": "var(--color-error-contrast-dark)",
189
+ "--color-error-contrast-100": "var(--color-error-contrast-dark)",
190
+ "--color-error-contrast-200": "var(--color-error-contrast-dark)",
191
+ "--color-error-contrast-300": "var(--color-error-contrast-dark)",
192
+ "--color-error-contrast-400": "var(--color-error-contrast-dark)",
193
+ "--color-error-contrast-500": "var(--color-error-contrast-light)",
194
+ "--color-error-contrast-600": "var(--color-error-contrast-light)",
195
+ "--color-error-contrast-700": "var(--color-error-contrast-light)",
196
+ "--color-error-contrast-800": "var(--color-error-contrast-light)",
197
+ "--color-error-contrast-900": "var(--color-error-contrast-light)",
198
+ "--color-error-contrast-950": "var(--color-error-contrast-light)",
199
+ "--color-surface-50": "247 247 247",
200
+ "--color-surface-100": "244 244 244",
201
+ "--color-surface-200": "241 241 241",
202
+ "--color-surface-300": "233 233 233",
203
+ "--color-surface-400": "216 216 216",
204
+ "--color-surface-500": "199 199 199",
205
+ "--color-surface-600": "179 179 179",
206
+ "--color-surface-700": "149 149 149",
207
+ "--color-surface-800": "119 119 119",
208
+ "--color-surface-900": "98 98 98",
209
+ "--color-surface-950": "17 17 17",
210
+ "--color-surface-contrast-dark": "var(--color-surface-950)",
211
+ "--color-surface-contrast-light": "var(--color-surface-50)",
212
+ "--color-surface-contrast-50": "var(--color-surface-contrast-dark)",
213
+ "--color-surface-contrast-100": "var(--color-surface-contrast-dark)",
214
+ "--color-surface-contrast-200": "var(--color-surface-contrast-dark)",
215
+ "--color-surface-contrast-300": "var(--color-surface-contrast-dark)",
216
+ "--color-surface-contrast-400": "var(--color-surface-contrast-light)",
217
+ "--color-surface-contrast-500": "var(--color-surface-contrast-light)",
218
+ "--color-surface-contrast-600": "var(--color-surface-contrast-light)",
219
+ "--color-surface-contrast-700": "var(--color-surface-contrast-light)",
220
+ "--color-surface-contrast-800": "var(--color-surface-contrast-light)",
221
+ "--color-surface-contrast-900": "var(--color-surface-contrast-light)",
222
+ "--color-surface-contrast-950": "var(--color-surface-contrast-light)"
223
+ },
224
+ "metadata": {
225
+ "version": "3.0.0"
226
+ }
227
+ } satisfies Theme;
228
+
229
+ export default cerberus;
Binary file
Binary file
package/dist/md.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export interface Metadata {
2
+ title: string;
3
+ }
4
+ export declare const md: {
5
+ data: any[];
6
+ allHeadings: string[][];
7
+ };
package/dist/md.js ADDED
@@ -0,0 +1,52 @@
1
+ import { all } from 'axios';
2
+ import { marked } from 'marked';
3
+ ;
4
+ let slug = '';
5
+ async function loadMDFiles() {
6
+ const repoUrl = 'https://api.github.com/repos/BEXIS2/Documents/contents/Docs';
7
+ const response = await fetch(repoUrl);
8
+ const files = await response.json();
9
+ const allHeadings = [];
10
+ const entries = await Promise.all(files.map(async (file) => {
11
+ if (file.download_url) {
12
+ const fileResponse = await fetch(file.download_url);
13
+ const content = await fileResponse.text();
14
+ slug = file.name.replace('.md', '');
15
+ // Extract metadata and content from the Markdown file
16
+ const metadata = extractMetadata(content);
17
+ allHeadings.push(metadata.headings);
18
+ return {
19
+ slug,
20
+ ...metadata,
21
+ content
22
+ };
23
+ }
24
+ else {
25
+ console.error('File has no download URL:', file);
26
+ return null;
27
+ }
28
+ }));
29
+ const data = await entries.filter(entry => entry !== null);
30
+ return { data, allHeadings };
31
+ }
32
+ function extractMetadata(content) {
33
+ // const { data, content: markdownContent } = matter(content);
34
+ // Extract headings using marked
35
+ const headings = [];
36
+ const renderer = new marked.Renderer();
37
+ renderer.heading = (text, level) => {
38
+ text.base = slug;
39
+ headings.push(text);
40
+ return `<h${level}>${text}</h${level}>`;
41
+ };
42
+ marked(content, { renderer });
43
+ return { headings };
44
+ }
45
+ function extractMetadata2(content) {
46
+ // Implement metadata extraction logic here
47
+ // For example, using front-matter or similar library
48
+ return {
49
+ title: 'Example Title' // Replace with actual metadata extraction
50
+ };
51
+ }
52
+ export const md = await loadMDFiles();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.58",
3
+ "version": "0.4.60",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -0,0 +1,8 @@
1
+ <!-- filepath: /c:/Daten/Documents/Projekte/Svelte/bexis2-core-ui/src/components/MarkdownRenderer.svelte -->
2
+ <script lang="ts">
3
+ import { marked } from 'marked';
4
+ import { mdsvex } from 'mdsvex';
5
+ export let content: string;
6
+ </script>
7
+
8
+ <div >{@html content}</div>
@@ -177,13 +177,13 @@
177
177
  >
178
178
  <b style="font-size:xx-large"><Fa icon={faFileUpload} /></b>
179
179
  <span
180
- ><b>Drag 'n' drop some files here, or click to select files</b>
180
+ ><b>Drag 'n' drop or click to select files</b>
181
181
  <b>(max file size: {model.maxSize} mb)</b></span
182
182
  >
183
183
  <p>
184
184
  {#if model.accept}
185
- {#each model.accept as ext}
186
- {ext} ,
185
+ {#each model.accept as ext, i}
186
+ {ext}{#if i < model.accept.length - 1}, {/if}
187
187
  {/each}
188
188
  {/if}
189
189
  </p>
@@ -535,8 +535,8 @@
535
535
  {...$tableAttrs}
536
536
  class="table table-auto table-compact bg-tertiary-500/30 dark:bg-tertiary-900/10 overflow-clip"
537
537
  id="{tableId}-table"
538
- title="Table"
539
538
  >
539
+ <!-- title="Table" removed from top, as this should be handled by the surrounding container for better accessibility -->
540
540
  <!-- If table height is provided, making the top row sticky -->
541
541
  <thead class={height != null && $pageRows.length > 0 ? `sticky top-0` : ''}>
542
542
  <!-- {#if $data.length > 0} -->
@@ -583,11 +583,11 @@
583
583
  class:cursor-pointer={!props.sort.disabled}
584
584
  on:click={props.sort.toggle}
585
585
  on:keydown={props.sort.toggle}
586
- title={props.sort.order === 'asc'
586
+ title={props.sort.disabled ? undefined : (props.sort.order === 'asc'
587
587
  ? `Sort by ${cell.label} column in descending order`
588
588
  : props.sort.order === 'desc'
589
589
  ? `Remove sorting by ${cell.label} column`
590
- : `Sort by ${cell.label} column in ascending order`}
590
+ : `Sort by ${cell.label} column in ascending order`)}
591
591
  >
592
592
  {cell.render().replaceAll("%%%", '.')}
593
593
  </span>
@@ -39,7 +39,7 @@
39
39
  {/if}
40
40
 
41
41
  {#each links as link}
42
- <span role="button" tabindex="0" title="link" class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
42
+ <span role="button" tabindex="0" title={link.label} class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
43
43
  <span>
44
44
  {#if link.label.toLowerCase()=='manual'}
45
45
  <Fa icon={faBook} />
@@ -38,7 +38,7 @@
38
38
  <AccordionItem padding="p-2">
39
39
  <svelte:fragment slot="summary"
40
40
  ><button class="flex items-center gap-x-1">
41
- <span class="capitalize text-lg hover:text-primary-500">{menubarItem.Title}</span>
41
+ <span class="capitalize text-lg hover:text-secondary-500">{menubarItem.Title}</span>
42
42
  </button></svelte:fragment
43
43
  >
44
44
  <svelte:fragment slot="content"
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
  <div class="hidden sm:block place-self-center" use:popup={popupCombobox}>
51
51
  <button class="flex items-center gap-x-1 px-2">
52
- <span class="capitalize text-lg whitespace-nowrap hover:text-primary-500">{menubarItem.Title}▾</span>
52
+ <span class="capitalize text-lg whitespace-nowrap hover:text-secondary-500">{menubarItem.Title}▾</span>
53
53
  </button>
54
54
 
55
55
  <div class="z-50 w-max" data-popup={id}>
@@ -0,0 +1,229 @@
1
+ import type { Theme } from '@skeletonlabs/skeleton/themes';
2
+
3
+ const cerberus = {
4
+ "name": "bexis2",
5
+ "properties": {
6
+ "--type-scale-factor": "1.067",
7
+ "--type-scale-1": "calc(0.75rem * var(--type-scale-factor))",
8
+ "--type-scale-2": "calc(0.875rem * var(--type-scale-factor))",
9
+ "--type-scale-3": "calc(1rem * var(--type-scale-factor))",
10
+ "--type-scale-4": "calc(1.125rem * var(--type-scale-factor))",
11
+ "--type-scale-5": "calc(1.25rem * var(--type-scale-factor))",
12
+ "--type-scale-6": "calc(1.5rem * var(--type-scale-factor))",
13
+ "--type-scale-7": "calc(1.875rem * var(--type-scale-factor))",
14
+ "--type-scale-8": "calc(2.25rem * var(--type-scale-factor))",
15
+ "--type-scale-9": "calc(3rem * var(--type-scale-factor))",
16
+ "--type-scale-10": "calc(3.75rem * var(--type-scale-factor))",
17
+ "--type-scale-11": "calc(4.5rem * var(--type-scale-factor))",
18
+ "--type-scale-12": "calc(6rem * var(--type-scale-factor))",
19
+ "--type-scale-13": "calc(8rem * var(--type-scale-factor))",
20
+ "--base-font-color": "var(--color-surface-950)",
21
+ "--base-font-color-dark": "var(--color-surface-50)",
22
+ "--base-font-family": "system-ui",
23
+ "--base-font-size": "inherit",
24
+ "--base-line-height": "inherit",
25
+ "--base-font-weight": "normal",
26
+ "--base-font-style": "normal",
27
+ "--base-letter-spacing": "0em",
28
+ "--heading-font-color": "inherit",
29
+ "--heading-font-color-dark": "inherit",
30
+ "--heading-font-family": "inherit",
31
+ "--heading-font-weight": "bold",
32
+ "--heading-font-style": "normal",
33
+ "--heading-letter-spacing": "inherit",
34
+ "--anchor-font-color": "var(--color-primary-500)",
35
+ "--anchor-font-color-dark": "var(--color-primary-500)",
36
+ "--anchor-font-family": "inherit",
37
+ "--anchor-font-size": "inherit",
38
+ "--anchor-line-height": "inherit",
39
+ "--anchor-font-weight": "inherit",
40
+ "--anchor-font-style": "inherit",
41
+ "--anchor-letter-spacing": "inherit",
42
+ "--anchor-text-decoration": "none",
43
+ "--anchor-text-decoration-hover": "underline",
44
+ "--anchor-text-decoration-active": "none",
45
+ "--anchor-text-decoration-focus": "none",
46
+ "--space-scale-factor": "1",
47
+ "--radii-default": "6px",
48
+ "--radii-container": "6px",
49
+ "--border-width-default": "1px",
50
+ "--divide-width-default": "1px",
51
+ "--outline-width-default": "1px",
52
+ "--ring-width-default": "1px",
53
+ "--body-background-color": "var(--color-surface-50)",
54
+ "--body-background-color-dark": "var(--color-surface-950)",
55
+ "--color-primary-50": "227 243 241",
56
+ "--color-primary-100": "218 240 236",
57
+ "--color-primary-200": "209 236 232",
58
+ "--color-primary-300": "181 224 217",
59
+ "--color-primary-400": "125 201 189",
60
+ "--color-primary-500": "69 178 161",
61
+ "--color-primary-600": "62 160 145",
62
+ "--color-primary-700": "52 134 121",
63
+ "--color-primary-800": "41 107 97",
64
+ "--color-primary-900": "34 87 79",
65
+ "--color-primary-950": "9 39 80",
66
+ "--color-primary-contrast-dark": "var(--color-primary-950)",
67
+ "--color-primary-contrast-light": "var(--color-primary-50)",
68
+ "--color-primary-contrast-50": "var(--color-primary-contrast-dark)",
69
+ "--color-primary-contrast-100": "var(--color-primary-contrast-dark)",
70
+ "--color-primary-contrast-200": "var(--color-primary-contrast-dark)",
71
+ "--color-primary-contrast-300": "var(--color-primary-contrast-dark)",
72
+ "--color-primary-contrast-400": "var(--color-primary-contrast-dark)",
73
+ "--color-primary-contrast-500": "var(--color-primary-contrast-light)",
74
+ "--color-primary-contrast-600": "var(--color-primary-contrast-light)",
75
+ "--color-primary-contrast-700": "var(--color-primary-contrast-light)",
76
+ "--color-primary-contrast-800": "var(--color-primary-contrast-light)",
77
+ "--color-primary-contrast-900": "var(--color-primary-contrast-light)",
78
+ "--color-primary-contrast-950": "var(--color-primary-contrast-light)",
79
+ "--color-secondary-50": "255 239 217",
80
+ "--color-secondary-100": "255 234 204",
81
+ "--color-secondary-200": "255 229 191",
82
+ "--color-secondary-300": "255 213 153",
83
+ "--color-secondary-400": "255 182 77",
84
+ "--color-secondary-500": "255 151 0",
85
+ "--color-secondary-600": "230 136 0",
86
+ "--color-secondary-700": "191 113 0",
87
+ "--color-secondary-800": "153 91 0",
88
+ "--color-secondary-900": "125 74 0",
89
+ "--color-secondary-950": "50 25 104",
90
+ "--color-secondary-contrast-dark": "var(--color-secondary-950)",
91
+ "--color-secondary-contrast-light": "var(--color-secondary-50)",
92
+ "--color-secondary-contrast-50": "var(--color-secondary-contrast-dark)",
93
+ "--color-secondary-contrast-100": "var(--color-secondary-contrast-dark)",
94
+ "--color-secondary-contrast-200": "var(--color-secondary-contrast-dark)",
95
+ "--color-secondary-contrast-300": "var(--color-secondary-contrast-dark)",
96
+ "--color-secondary-contrast-400": "var(--color-secondary-contrast-light)",
97
+ "--color-secondary-contrast-500": "var(--color-secondary-contrast-light)",
98
+ "--color-secondary-contrast-600": "var(--color-secondary-contrast-light)",
99
+ "--color-secondary-contrast-700": "var(--color-secondary-contrast-light)",
100
+ "--color-secondary-contrast-800": "var(--color-secondary-contrast-light)",
101
+ "--color-secondary-contrast-900": "var(--color-secondary-contrast-light)",
102
+ "--color-secondary-contrast-950": "var(--color-secondary-contrast-light)",
103
+ "--color-tertiary-50": "245 251 249",
104
+ "--color-tertiary-100": "242 249 248",
105
+ "--color-tertiary-200": "239 248 246",
106
+ "--color-tertiary-300": "229 243 240",
107
+ "--color-tertiary-400": "210 234 229",
108
+ "--color-tertiary-500": "190 225 218",
109
+ "--color-tertiary-600": "171 203 196",
110
+ "--color-tertiary-700": "143 169 164",
111
+ "--color-tertiary-800": "114 135 131",
112
+ "--color-tertiary-900": "93 110 107",
113
+ "--color-tertiary-950": "118 0 67",
114
+ "--color-tertiary-contrast-dark": "var(--color-tertiary-950)",
115
+ "--color-tertiary-contrast-light": "var(--color-tertiary-50)",
116
+ "--color-tertiary-contrast-50": "var(--color-tertiary-contrast-dark)",
117
+ "--color-tertiary-contrast-100": "var(--color-tertiary-contrast-dark)",
118
+ "--color-tertiary-contrast-200": "var(--color-tertiary-contrast-dark)",
119
+ "--color-tertiary-contrast-300": "var(--color-tertiary-contrast-light)",
120
+ "--color-tertiary-contrast-400": "var(--color-tertiary-contrast-light)",
121
+ "--color-tertiary-contrast-500": "var(--color-tertiary-contrast-light)",
122
+ "--color-tertiary-contrast-600": "var(--color-tertiary-contrast-light)",
123
+ "--color-tertiary-contrast-700": "var(--color-tertiary-contrast-light)",
124
+ "--color-tertiary-contrast-800": "var(--color-tertiary-contrast-light)",
125
+ "--color-tertiary-contrast-900": "var(--color-tertiary-contrast-light)",
126
+ "--color-tertiary-contrast-950": "var(--color-tertiary-contrast-light)",
127
+ "--color-success-50": "228 244 227",
128
+ "--color-success-100": "219 240 217",
129
+ "--color-success-200": "210 237 208",
130
+ "--color-success-300": "183 225 180",
131
+ "--color-success-400": "129 203 123",
132
+ "--color-success-500": "75 181 67",
133
+ "--color-success-600": "68 163 60",
134
+ "--color-success-700": "56 136 50",
135
+ "--color-success-800": "45 109 40",
136
+ "--color-success-900": "37 89 33",
137
+ "--color-success-950": "5 46 42",
138
+ "--color-success-contrast-dark": "var(--color-success-950)",
139
+ "--color-success-contrast-light": "var(--color-success-50)",
140
+ "--color-success-contrast-50": "var(--color-success-contrast-dark)",
141
+ "--color-success-contrast-100": "var(--color-success-contrast-dark)",
142
+ "--color-success-contrast-200": "var(--color-success-contrast-dark)",
143
+ "--color-success-contrast-300": "var(--color-success-contrast-dark)",
144
+ "--color-success-contrast-400": "var(--color-success-contrast-dark)",
145
+ "--color-success-contrast-500": "var(--color-success-contrast-dark)",
146
+ "--color-success-contrast-600": "var(--color-success-contrast-light)",
147
+ "--color-success-contrast-700": "var(--color-success-contrast-light)",
148
+ "--color-success-contrast-800": "var(--color-success-contrast-light)",
149
+ "--color-success-contrast-900": "var(--color-success-contrast-light)",
150
+ "--color-success-contrast-950": "var(--color-success-contrast-light)",
151
+ "--color-warning-50": "252 244 218",
152
+ "--color-warning-100": "251 240 206",
153
+ "--color-warning-200": "250 236 193",
154
+ "--color-warning-300": "247 225 156",
155
+ "--color-warning-400": "240 202 82",
156
+ "--color-warning-500": "234 179 8",
157
+ "--color-warning-600": "211 161 7",
158
+ "--color-warning-700": "176 134 6",
159
+ "--color-warning-800": "140 107 5",
160
+ "--color-warning-900": "115 88 4",
161
+ "--color-warning-950": "161 77 5",
162
+ "--color-warning-contrast-dark": "var(--color-warning-950)",
163
+ "--color-warning-contrast-light": "var(--color-warning-50)",
164
+ "--color-warning-contrast-50": "var(--color-warning-contrast-dark)",
165
+ "--color-warning-contrast-100": "var(--color-warning-contrast-dark)",
166
+ "--color-warning-contrast-200": "var(--color-warning-contrast-dark)",
167
+ "--color-warning-contrast-300": "var(--color-warning-contrast-dark)",
168
+ "--color-warning-contrast-400": "var(--color-warning-contrast-dark)",
169
+ "--color-warning-contrast-500": "var(--color-warning-contrast-dark)",
170
+ "--color-warning-contrast-600": "var(--color-warning-contrast-light)",
171
+ "--color-warning-contrast-700": "var(--color-warning-contrast-light)",
172
+ "--color-warning-contrast-800": "var(--color-warning-contrast-light)",
173
+ "--color-warning-contrast-900": "var(--color-warning-contrast-light)",
174
+ "--color-warning-contrast-950": "var(--color-warning-contrast-light)",
175
+ "--color-error-50": "255 217 217",
176
+ "--color-error-100": "255 204 204",
177
+ "--color-error-200": "255 191 191",
178
+ "--color-error-300": "255 153 153",
179
+ "--color-error-400": "255 77 77",
180
+ "--color-error-500": "255 0 0",
181
+ "--color-error-600": "230 0 0",
182
+ "--color-error-700": "191 0 0",
183
+ "--color-error-800": "153 0 0",
184
+ "--color-error-900": "125 0 0",
185
+ "--color-error-950": "148 0 0",
186
+ "--color-error-contrast-dark": "var(--color-error-950)",
187
+ "--color-error-contrast-light": "var(--color-error-50)",
188
+ "--color-error-contrast-50": "var(--color-error-contrast-dark)",
189
+ "--color-error-contrast-100": "var(--color-error-contrast-dark)",
190
+ "--color-error-contrast-200": "var(--color-error-contrast-dark)",
191
+ "--color-error-contrast-300": "var(--color-error-contrast-dark)",
192
+ "--color-error-contrast-400": "var(--color-error-contrast-dark)",
193
+ "--color-error-contrast-500": "var(--color-error-contrast-light)",
194
+ "--color-error-contrast-600": "var(--color-error-contrast-light)",
195
+ "--color-error-contrast-700": "var(--color-error-contrast-light)",
196
+ "--color-error-contrast-800": "var(--color-error-contrast-light)",
197
+ "--color-error-contrast-900": "var(--color-error-contrast-light)",
198
+ "--color-error-contrast-950": "var(--color-error-contrast-light)",
199
+ "--color-surface-50": "247 247 247",
200
+ "--color-surface-100": "244 244 244",
201
+ "--color-surface-200": "241 241 241",
202
+ "--color-surface-300": "233 233 233",
203
+ "--color-surface-400": "216 216 216",
204
+ "--color-surface-500": "199 199 199",
205
+ "--color-surface-600": "179 179 179",
206
+ "--color-surface-700": "149 149 149",
207
+ "--color-surface-800": "119 119 119",
208
+ "--color-surface-900": "98 98 98",
209
+ "--color-surface-950": "17 17 17",
210
+ "--color-surface-contrast-dark": "var(--color-surface-950)",
211
+ "--color-surface-contrast-light": "var(--color-surface-50)",
212
+ "--color-surface-contrast-50": "var(--color-surface-contrast-dark)",
213
+ "--color-surface-contrast-100": "var(--color-surface-contrast-dark)",
214
+ "--color-surface-contrast-200": "var(--color-surface-contrast-dark)",
215
+ "--color-surface-contrast-300": "var(--color-surface-contrast-dark)",
216
+ "--color-surface-contrast-400": "var(--color-surface-contrast-light)",
217
+ "--color-surface-contrast-500": "var(--color-surface-contrast-light)",
218
+ "--color-surface-contrast-600": "var(--color-surface-contrast-light)",
219
+ "--color-surface-contrast-700": "var(--color-surface-contrast-light)",
220
+ "--color-surface-contrast-800": "var(--color-surface-contrast-light)",
221
+ "--color-surface-contrast-900": "var(--color-surface-contrast-light)",
222
+ "--color-surface-contrast-950": "var(--color-surface-contrast-light)"
223
+ },
224
+ "metadata": {
225
+ "version": "3.0.0"
226
+ }
227
+ } satisfies Theme;
228
+
229
+ export default cerberus;
package/src/lib/md.ts ADDED
@@ -0,0 +1,73 @@
1
+ import { all } from 'axios';
2
+ import { marked } from 'marked';
3
+
4
+ export interface Metadata {
5
+ title: string;
6
+ };
7
+
8
+ interface Md {
9
+ metadata: Metadata;
10
+ content: string;
11
+ }
12
+
13
+ let slug = '';
14
+
15
+ async function loadMDFiles() {
16
+ const repoUrl = 'https://api.github.com/repos/BEXIS2/Documents/contents/Docs';
17
+ const response = await fetch(repoUrl);
18
+ const files = await response.json();
19
+ const allHeadings: string[][] = []
20
+
21
+ const entries = await Promise.all(files.map(async (file: any) => {
22
+ if (file.download_url) {
23
+ const fileResponse = await fetch(file.download_url);
24
+ const content = await fileResponse.text();
25
+
26
+ slug = file.name.replace('.md', '');
27
+ // Extract metadata and content from the Markdown file
28
+ const metadata = extractMetadata(content);
29
+ allHeadings.push(metadata.headings);
30
+
31
+
32
+ return {
33
+ slug,
34
+ ...metadata,
35
+ content
36
+ };
37
+ } else {
38
+ console.error('File has no download URL:', file);
39
+ return null;
40
+ }
41
+ }));
42
+ const data = await entries.filter(entry => entry !== null);
43
+ return { data, allHeadings};
44
+ }
45
+
46
+ function extractMetadata(content: string): { headings: string[] } {
47
+ // const { data, content: markdownContent } = matter(content);
48
+
49
+ // Extract headings using marked
50
+ const headings: string[] = [];
51
+ const renderer = new marked.Renderer();
52
+ renderer.heading = (text, level) => {
53
+ text.base = slug
54
+ headings.push(text);
55
+ return `<h${level}>${text}</h${level}>`;
56
+ };
57
+ marked(content, { renderer });
58
+
59
+ return { headings };
60
+ }
61
+
62
+
63
+
64
+
65
+ function extractMetadata2(content: string): Metadata {
66
+ // Implement metadata extraction logic here
67
+ // For example, using front-matter or similar library
68
+ return {
69
+ title: 'Example Title' // Replace with actual metadata extraction
70
+ };
71
+ }
72
+
73
+ export const md = await loadMDFiles();