@skeletonlabs/skeleton 2.0.0 → 2.1.0-dev.53dc1d76
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/dist/actions/Clipboard/clipboard.d.ts +1 -1
- package/dist/actions/Clipboard/clipboard.js +4 -0
- package/dist/components/AppShell/AppShell.svelte +3 -2
- package/dist/components/AppShell/AppShell.svelte.d.ts +2 -0
- package/dist/utilities/Modal/Modal.svelte +6 -4
- package/dist/utilities/Modal/ModalTest.svelte +8 -0
- package/dist/utilities/Modal/ModalTest.svelte.d.ts +17 -0
- package/dist/utilities/TableOfContents/crawler.js +4 -4
- package/dist/utilities/Toast/ToastTest.svelte +12 -0
- package/dist/utilities/Toast/ToastTest.svelte.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export function clipboard(node, args) {
|
|
2
|
+
if (!window.isSecureContext) {
|
|
3
|
+
console.error('Clipboard action failed: app not running in secure context, see: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard');
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
2
6
|
const fireCopyCompleteEvent = () => {
|
|
3
7
|
node.dispatchEvent(new CustomEvent('copyComplete'));
|
|
4
8
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script>export let
|
|
1
|
+
<script>export let scrollbarGutter = "auto";
|
|
2
|
+
export let regionPage = "";
|
|
2
3
|
export let slotHeader = "z-10";
|
|
3
4
|
export let slotSidebarLeft = "w-auto";
|
|
4
5
|
export let slotSidebarRight = "w-auto";
|
|
@@ -43,7 +44,7 @@ $:
|
|
|
43
44
|
{/if}
|
|
44
45
|
|
|
45
46
|
<!-- Page -->
|
|
46
|
-
<div id="page" class="{regionPage} {cPage}" on:scroll>
|
|
47
|
+
<div id="page" class="{regionPage} {cPage}" style:scrollbar-gutter={scrollbarGutter} on:scroll>
|
|
47
48
|
<!-- Slot: Page Header -->
|
|
48
49
|
{#if $$slots.pageHeader}
|
|
49
50
|
<header id="page-header" class="flex-none {classesPageHeader}"><slot name="pageHeader">(slot:header)</slot></header>
|
|
@@ -10,6 +10,8 @@ import type { SvelteEvent } from '../../index.js';
|
|
|
10
10
|
declare const __propDef: {
|
|
11
11
|
props: {
|
|
12
12
|
[x: string]: any;
|
|
13
|
+
/** Set `scrollbar-gutter` style.*/
|
|
14
|
+
scrollbarGutter?: string | undefined;
|
|
13
15
|
/** Apply arbitrary classes to the entire `#page` region.*/
|
|
14
16
|
regionPage?: string | undefined;
|
|
15
17
|
/** Apply arbitrary classes to the `header` slot container element*/
|
|
@@ -202,11 +202,13 @@ $:
|
|
|
202
202
|
aria-modal="true"
|
|
203
203
|
aria-label={$modalStore[0].title ?? ''}
|
|
204
204
|
>
|
|
205
|
-
|
|
206
|
-
{
|
|
205
|
+
{#if currentComponent?.slot}
|
|
206
|
+
<svelte:component this={currentComponent?.ref} {...currentComponent?.props} {parent}>
|
|
207
207
|
{@html currentComponent?.slot}
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
</svelte:component>
|
|
209
|
+
{:else}
|
|
210
|
+
<svelte:component this={currentComponent?.ref} {...currentComponent?.props} {parent} />
|
|
211
|
+
{/if}
|
|
210
212
|
</div>
|
|
211
213
|
{/if}
|
|
212
214
|
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ModalSettings } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
modalSetting: ModalSettings;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type ModalTestProps = typeof __propDef.props;
|
|
13
|
+
export type ModalTestEvents = typeof __propDef.events;
|
|
14
|
+
export type ModalTestSlots = typeof __propDef.slots;
|
|
15
|
+
export default class ModalTest extends SvelteComponentTyped<ModalTestProps, ModalTestEvents, ModalTestSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -6,16 +6,16 @@ export function tocCrawler(node, args) {
|
|
|
6
6
|
let headings;
|
|
7
7
|
let permalinks = [];
|
|
8
8
|
function init() {
|
|
9
|
-
// Reset headings
|
|
10
|
-
headings = node.querySelectorAll(queryElements);
|
|
11
|
-
// Reset the permalinks array:
|
|
12
|
-
permalinks = [];
|
|
13
9
|
// Set accepted list of query elements
|
|
10
|
+
// (IMPORTANT: must proceed resetting `headings` below)
|
|
14
11
|
if (args?.queryElements)
|
|
15
12
|
queryElements = args.queryElements;
|
|
16
13
|
// Set the desired scroll target to monitor
|
|
17
14
|
if (args?.scrollTarget)
|
|
18
15
|
scrollTarget = args.scrollTarget;
|
|
16
|
+
// Reset local values
|
|
17
|
+
headings = node.querySelectorAll(queryElements);
|
|
18
|
+
permalinks = [];
|
|
19
19
|
// Query and process the headings
|
|
20
20
|
queryHeadings();
|
|
21
21
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { initializeToastStore, getToastStore } from "./stores.js";
|
|
2
|
+
import Toast from "./Toast.svelte";
|
|
3
|
+
export let toastSettings = [];
|
|
4
|
+
export let max = void 0;
|
|
5
|
+
initializeToastStore();
|
|
6
|
+
const toastStore = getToastStore();
|
|
7
|
+
toastSettings.forEach((element) => {
|
|
8
|
+
toastStore.trigger(element);
|
|
9
|
+
});
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Toast {max} />
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ToastSettings } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
toastSettings?: ToastSettings[] | undefined;
|
|
6
|
+
max?: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type ToastTestProps = typeof __propDef.props;
|
|
14
|
+
export type ToastTestEvents = typeof __propDef.events;
|
|
15
|
+
export type ToastTestSlots = typeof __propDef.slots;
|
|
16
|
+
export default class ToastTest extends SvelteComponentTyped<ToastTestProps, ToastTestEvents, ToastTestSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|