@bexis2/bexis2-core-ui 0.4.59 → 0.4.61
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 +4 -0
- package/dist/components/page/Page.svelte +20 -2
- package/dist/components/page/PageCaller.d.ts +1 -0
- package/dist/components/page/PageCaller.js +9 -0
- package/dist/services/Api.js +5 -3
- package/dist/stores/apiStores.d.ts +2 -0
- package/dist/stores/apiStores.js +5 -0
- package/package.json +1 -1
- package/src/lib/components/page/Page.svelte +29 -2
- package/src/lib/components/page/PageCaller.js +9 -0
- package/src/lib/services/Api.ts +6 -3
- package/src/lib/stores/apiStores.ts +11 -0
- package/src/lib/stores/pageStores.ts +2 -0
- package/dist/MarkdownReder.svelte +0 -7
- package/dist/MarkdownReder.svelte.d.ts +0 -16
- package/dist/css/themes/theme-bexis2.d.ts +0 -2
- package/dist/css/themes/theme-bexis2.js +0 -229
- package/dist/md/Images/create_party.png +0 -0
- package/dist/md/Images/view_parties.png +0 -0
- package/dist/md.d.ts +0 -7
- package/dist/md.js +0 -52
- package/src/lib/MarkdownReder.svelte +0 -8
- package/src/lib/css/themes/theme-bexis2.js +0 -229
- package/src/lib/md/Images/create_party.png +0 -0
- package/src/lib/md/Images/view_parties.png +0 -0
- package/src/lib/md.ts +0 -73
package/README.md
CHANGED
|
@@ -10,10 +10,12 @@ import Notification from "./Notification.svelte";
|
|
|
10
10
|
import { computePosition, autoUpdate, offset, shift, flip, arrow } from "@floating-ui/dom";
|
|
11
11
|
import { storePopup } from "@skeletonlabs/skeleton";
|
|
12
12
|
import { breadcrumbStore, notificationStore } from "../../stores/pageStores";
|
|
13
|
-
import { errorStore } from "../../stores/apiStores";
|
|
13
|
+
import { errorStore, csrfTokenStore } from "../../stores/apiStores";
|
|
14
14
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
15
15
|
import Docs from "./Docs.svelte";
|
|
16
16
|
import GoToTop from "./GoToTop.svelte";
|
|
17
|
+
import { getAntiForgeryToken } from "./PageCaller";
|
|
18
|
+
import { get } from "svelte/store";
|
|
17
19
|
export let title = "";
|
|
18
20
|
export let note = "";
|
|
19
21
|
export let links = [];
|
|
@@ -22,6 +24,7 @@ export let footer = true;
|
|
|
22
24
|
export let help = false;
|
|
23
25
|
export let contentLayoutType = pageContentLayoutType.center;
|
|
24
26
|
export let fixLeft = true;
|
|
27
|
+
let aftIsReady = false;
|
|
25
28
|
errorStore.subscribe((error) => {
|
|
26
29
|
console.log("\u{1F680} ~ errorStore.subscribe ~ value:", error.error);
|
|
27
30
|
notificationStore.showNotification({
|
|
@@ -33,6 +36,19 @@ onMount(async () => {
|
|
|
33
36
|
console.log("page");
|
|
34
37
|
breadcrumbStore.clean();
|
|
35
38
|
breadcrumbStore.addItem({ label: title, link: window.location.pathname });
|
|
39
|
+
var token = get(csrfTokenStore);
|
|
40
|
+
console.log("\u{1F680} ~ token:", token);
|
|
41
|
+
if (!token || token.length === 0) {
|
|
42
|
+
const data = await getAntiForgeryToken();
|
|
43
|
+
csrfTokenStore.set(data.csrfToken);
|
|
44
|
+
var x = get(csrfTokenStore);
|
|
45
|
+
console.log("\u{1F680} ~ x:", x);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
csrfTokenStore.subscribe((value) => {
|
|
49
|
+
if (value.length > 0) {
|
|
50
|
+
aftIsReady = true;
|
|
51
|
+
}
|
|
36
52
|
});
|
|
37
53
|
let app;
|
|
38
54
|
function scrollToTop() {
|
|
@@ -61,6 +77,8 @@ function scrollToTop() {
|
|
|
61
77
|
|
|
62
78
|
<slot name="description" />
|
|
63
79
|
|
|
80
|
+
{#if aftIsReady}
|
|
81
|
+
|
|
64
82
|
<div class="flex flex-initial space-x-5">
|
|
65
83
|
{#if $$slots.left}
|
|
66
84
|
<div class="p-5 flex-shrink-0 w-96 w-min-96 border-y border-solid border-surface-500">
|
|
@@ -89,7 +107,7 @@ function scrollToTop() {
|
|
|
89
107
|
{/if}
|
|
90
108
|
</div>
|
|
91
109
|
|
|
92
|
-
|
|
110
|
+
{/if}
|
|
93
111
|
|
|
94
112
|
<GoToTop/>
|
|
95
113
|
<HelpPopUp active={help} />
|
|
@@ -17,3 +17,12 @@ export const getHeader = async () => {
|
|
|
17
17
|
console.error(error);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
export const getAntiForgeryToken = async () => {
|
|
22
|
+
try {
|
|
23
|
+
const response = await Api.get('/tokens/getAntiForgeryToken');
|
|
24
|
+
return response.data;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
}
|
|
28
|
+
};
|
package/dist/services/Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Api.js
|
|
2
2
|
import axios from 'axios';
|
|
3
|
-
import { host, username, password, errorStore } from '../stores/apiStores';
|
|
3
|
+
import { host, username, password, errorStore, csrfToken } from '../stores/apiStores';
|
|
4
4
|
console.log('setup axios');
|
|
5
5
|
// implement a method to execute all the request from here.
|
|
6
6
|
const apiRequest = (method, url, request) => {
|
|
@@ -8,8 +8,10 @@ const apiRequest = (method, url, request) => {
|
|
|
8
8
|
const axiosAPI = axios.create({
|
|
9
9
|
baseURL: host
|
|
10
10
|
});
|
|
11
|
+
const requestVerificationToken = csrfToken;
|
|
11
12
|
const headers = {
|
|
12
|
-
authorization: 'Basic ' + btoa(username + ':' + password)
|
|
13
|
+
authorization: 'Basic ' + btoa(username + ':' + password),
|
|
14
|
+
'__RequestVerificationToken': requestVerificationToken
|
|
13
15
|
};
|
|
14
16
|
//using the axios instance to perform the request that received from each http method
|
|
15
17
|
return axiosAPI({
|
|
@@ -19,7 +21,7 @@ const apiRequest = (method, url, request) => {
|
|
|
19
21
|
headers
|
|
20
22
|
})
|
|
21
23
|
.then((res) => {
|
|
22
|
-
//
|
|
24
|
+
//console.log("res-test",res);
|
|
23
25
|
return Promise.resolve(res);
|
|
24
26
|
})
|
|
25
27
|
.catch((er) => {
|
|
@@ -2,5 +2,7 @@ import { errorType } from '../models/Models';
|
|
|
2
2
|
export declare let host: string;
|
|
3
3
|
export declare let username: string;
|
|
4
4
|
export declare let password: string;
|
|
5
|
+
export declare let csrfToken: string;
|
|
6
|
+
export declare const csrfTokenStore: import("svelte/store").Writable<string>;
|
|
5
7
|
export declare const errorStore: import("svelte/store").Writable<errorType>;
|
|
6
8
|
export declare function setApiConfig(_host: string, _user: string, _pw: string): void;
|
package/dist/stores/apiStores.js
CHANGED
|
@@ -3,6 +3,8 @@ import { errorType } from '../models/Models';
|
|
|
3
3
|
export let host = 'window.location.origin';
|
|
4
4
|
export let username = '';
|
|
5
5
|
export let password = '';
|
|
6
|
+
export let csrfToken = '';
|
|
7
|
+
export const csrfTokenStore = writable('');
|
|
6
8
|
const hostStore = writable(''); //writable(window.location.origin);
|
|
7
9
|
const usernameStore = writable('');
|
|
8
10
|
const passwordStore = writable('');
|
|
@@ -10,6 +12,9 @@ export const errorStore = writable(new errorType());
|
|
|
10
12
|
hostStore.subscribe((value) => {
|
|
11
13
|
host = value;
|
|
12
14
|
});
|
|
15
|
+
csrfTokenStore.subscribe((value) => {
|
|
16
|
+
csrfToken = value;
|
|
17
|
+
});
|
|
13
18
|
usernameStore.subscribe((value) => {
|
|
14
19
|
username = value;
|
|
15
20
|
});
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
18
18
|
import { storePopup } from '@skeletonlabs/skeleton';
|
|
19
19
|
import { breadcrumbStore,notificationStore } from '$store/pageStores';
|
|
20
|
-
import { errorStore } from '$store/apiStores';
|
|
20
|
+
import { errorStore,csrfTokenStore } from '$store/apiStores';
|
|
21
21
|
|
|
22
22
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
23
23
|
|
|
@@ -27,6 +27,9 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
27
27
|
|
|
28
28
|
import Docs from './Docs.svelte';
|
|
29
29
|
import GoToTop from './GoToTop.svelte';
|
|
30
|
+
import { getAntiForgeryToken } from './PageCaller';
|
|
31
|
+
import { get } from 'svelte/store';
|
|
32
|
+
|
|
30
33
|
|
|
31
34
|
export let title = '';
|
|
32
35
|
export let note = '';
|
|
@@ -39,6 +42,8 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
39
42
|
export let contentLayoutType: pageContentLayoutType = pageContentLayoutType.center;
|
|
40
43
|
export let fixLeft: boolean = true;
|
|
41
44
|
|
|
45
|
+
let aftIsReady = false;
|
|
46
|
+
|
|
42
47
|
errorStore.subscribe((error:errorType) => {
|
|
43
48
|
console.log("🚀 ~ errorStore.subscribe ~ value:", error.error)
|
|
44
49
|
notificationStore.showNotification({
|
|
@@ -51,8 +56,28 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
51
56
|
console.log('page');
|
|
52
57
|
breadcrumbStore.clean();
|
|
53
58
|
breadcrumbStore.addItem({ label: title, link: window.location.pathname });
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
var token = get(csrfTokenStore);
|
|
62
|
+
console.log("🚀 ~ token:", token)
|
|
63
|
+
|
|
64
|
+
if(!token || token.length===0){
|
|
65
|
+
|
|
66
|
+
const data = await getAntiForgeryToken();
|
|
67
|
+
csrfTokenStore.set(data.csrfToken);
|
|
68
|
+
var x = get(csrfTokenStore);
|
|
69
|
+
console.log("🚀 ~ x:", x)
|
|
70
|
+
}
|
|
54
71
|
});
|
|
55
72
|
|
|
73
|
+
|
|
74
|
+
csrfTokenStore.subscribe(value => {
|
|
75
|
+
if(value.length>0){
|
|
76
|
+
aftIsReady = true;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
|
|
56
81
|
let app;
|
|
57
82
|
function scrollToTop() {
|
|
58
83
|
app.scrollIntoView();
|
|
@@ -81,6 +106,8 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
81
106
|
|
|
82
107
|
<slot name="description" />
|
|
83
108
|
|
|
109
|
+
{#if aftIsReady}
|
|
110
|
+
|
|
84
111
|
<div class="flex flex-initial space-x-5">
|
|
85
112
|
{#if $$slots.left}
|
|
86
113
|
<div class="p-5 flex-shrink-0 w-96 w-min-96 border-y border-solid border-surface-500">
|
|
@@ -109,7 +136,7 @@ import type { helpItemType, helpStoreType } from '$models/Models';
|
|
|
109
136
|
{/if}
|
|
110
137
|
</div>
|
|
111
138
|
|
|
112
|
-
|
|
139
|
+
{/if}
|
|
113
140
|
|
|
114
141
|
<GoToTop/>
|
|
115
142
|
<HelpPopUp active={help} />
|
|
@@ -17,3 +17,12 @@ export const getHeader = async () => {
|
|
|
17
17
|
console.error(error);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
export const getAntiForgeryToken = async () => {
|
|
22
|
+
try {
|
|
23
|
+
const response = await Api.get('/tokens/getAntiForgeryToken');
|
|
24
|
+
return response.data;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
}
|
|
28
|
+
};
|
package/src/lib/services/Api.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Api.js
|
|
2
2
|
import axios from 'axios';
|
|
3
|
-
import { host, username, password, errorStore } from '../stores/apiStores';
|
|
3
|
+
import { host, username, password, errorStore, csrfToken } from '../stores/apiStores';
|
|
4
4
|
import type { errorType } from '$models/Models';
|
|
5
5
|
|
|
6
6
|
console.log('setup axios');
|
|
@@ -12,10 +12,13 @@ const apiRequest = (method, url, request) => {
|
|
|
12
12
|
baseURL: host
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
+
const requestVerificationToken = csrfToken;
|
|
15
16
|
const headers = {
|
|
16
|
-
authorization: 'Basic ' + btoa(username + ':' + password)
|
|
17
|
+
authorization: 'Basic ' + btoa(username + ':' + password),
|
|
18
|
+
'__RequestVerificationToken': requestVerificationToken
|
|
17
19
|
};
|
|
18
20
|
|
|
21
|
+
|
|
19
22
|
//using the axios instance to perform the request that received from each http method
|
|
20
23
|
return axiosAPI({
|
|
21
24
|
method,
|
|
@@ -24,7 +27,7 @@ const apiRequest = (method, url, request) => {
|
|
|
24
27
|
headers
|
|
25
28
|
})
|
|
26
29
|
.then((res) => {
|
|
27
|
-
//
|
|
30
|
+
//console.log("res-test",res);
|
|
28
31
|
|
|
29
32
|
return Promise.resolve(res);
|
|
30
33
|
|
|
@@ -4,17 +4,28 @@ import { errorType } from '$models/Models'
|
|
|
4
4
|
export let host = 'window.location.origin';
|
|
5
5
|
export let username = '';
|
|
6
6
|
export let password = '';
|
|
7
|
+
export let csrfToken = '';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export const csrfTokenStore = writable('');
|
|
11
|
+
|
|
7
12
|
|
|
8
13
|
const hostStore = writable(''); //writable(window.location.origin);
|
|
9
14
|
const usernameStore = writable('');
|
|
10
15
|
const passwordStore = writable('');
|
|
11
16
|
|
|
17
|
+
|
|
12
18
|
export const errorStore = writable(new errorType());
|
|
13
19
|
|
|
14
20
|
hostStore.subscribe((value) => {
|
|
15
21
|
host = value;
|
|
16
22
|
});
|
|
17
23
|
|
|
24
|
+
csrfTokenStore.subscribe((value) => {
|
|
25
|
+
csrfToken = value;
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
usernameStore.subscribe((value) => {
|
|
19
30
|
username = value;
|
|
20
31
|
});
|
|
@@ -1,16 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,229 +0,0 @@
|
|
|
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
DELETED
package/dist/md.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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();
|
|
@@ -1,8 +0,0 @@
|
|
|
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>
|
|
@@ -1,229 +0,0 @@
|
|
|
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/src/lib/md.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
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();
|