@agnos-ui/svelte-headless 0.1.1 → 0.2.0
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/Slot.svelte +9 -1
- package/components/pagination/pagination.js +1 -1
- package/components/slider/slider.d.ts +6 -0
- package/components/slider/slider.js +2 -0
- package/components/toast/index.d.ts +1 -0
- package/components/toast/index.js +1 -0
- package/components/toast/toast.d.ts +7 -0
- package/components/toast/toast.js +3 -0
- package/generated/index.d.ts +2 -0
- package/generated/index.js +2 -0
- package/generated/services/hash.d.ts +1 -0
- package/generated/services/hash.js +1 -0
- package/generated/services/resizeObserver.d.ts +1 -0
- package/generated/services/resizeObserver.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +4 -3
package/Slot.svelte
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import {BROWSER} from 'esm-env';
|
|
2
3
|
import type {SlotContent, SlotSvelteComponent} from './types';
|
|
3
|
-
import {isSvelteComponent} from './utils/widget';
|
|
4
4
|
import {useSvelteSlot} from './types';
|
|
5
|
+
import {isSvelteComponent} from './utils/widget';
|
|
5
6
|
type Props = $$Generic<object>; // eslint-disable-line no-undef
|
|
6
7
|
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
|
|
7
8
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -11,6 +12,13 @@
|
|
|
11
12
|
};
|
|
12
13
|
export let slotContent: SlotContent<Props> = null;
|
|
13
14
|
export let props: Props;
|
|
15
|
+
|
|
16
|
+
// Workaround for a svelte issue that prevents code generation for SSR/slot
|
|
17
|
+
// To be removed when https://github.com/sveltejs/svelte/issues/9137 is fixed
|
|
18
|
+
if (!BROWSER) {
|
|
19
|
+
// @ts-expect-error Setting the global variable `props`, which is not defined in the SSR Svelte-kit compilation
|
|
20
|
+
globalThis['props'] = props;
|
|
21
|
+
}
|
|
14
22
|
</script>
|
|
15
23
|
|
|
16
24
|
{#if slotContent === useSvelteSlot}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
import type { AdaptWidgetSlots, WidgetPropsSlots, WidgetFactory, WidgetProps, WidgetState } from '../../types';
|
|
1
2
|
export * from '@agnos-ui/core/components/slider';
|
|
3
|
+
export type SliderWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/slider').SliderWidget>;
|
|
4
|
+
export type SliderProps = WidgetProps<SliderWidget>;
|
|
5
|
+
export type SliderState = WidgetState<SliderWidget>;
|
|
6
|
+
export type SliderSlots = WidgetPropsSlots<SliderProps>;
|
|
7
|
+
export declare const createSlider: WidgetFactory<SliderWidget>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toast';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toast';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AdaptWidgetSlots, WidgetPropsSlots, WidgetFactory, WidgetProps, WidgetState } from '../../types';
|
|
2
|
+
export * from '@agnos-ui/core/components/toast';
|
|
3
|
+
export type ToastWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/toast').ToastWidget>;
|
|
4
|
+
export type ToastProps = WidgetProps<ToastWidget>;
|
|
5
|
+
export type ToastState = WidgetState<ToastWidget>;
|
|
6
|
+
export type ToastSlots = WidgetPropsSlots<ToastProps>;
|
|
7
|
+
export declare const createToast: WidgetFactory<ToastWidget>;
|
package/generated/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './services/siblingsInert';
|
|
2
|
+
export * from './services/resizeObserver';
|
|
2
3
|
export * from './services/portal';
|
|
3
4
|
export * from './services/navManager';
|
|
4
5
|
export * from './services/intersection';
|
|
6
|
+
export * from './services/hash';
|
|
5
7
|
export * from './services/focustrack';
|
|
6
8
|
export * from './services/floatingUI';
|
|
7
9
|
export * from './services/extendWidget';
|
package/generated/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './services/siblingsInert';
|
|
2
|
+
export * from './services/resizeObserver';
|
|
2
3
|
export * from './services/portal';
|
|
3
4
|
export * from './services/navManager';
|
|
4
5
|
export * from './services/intersection';
|
|
6
|
+
export * from './services/hash';
|
|
5
7
|
export * from './services/focustrack';
|
|
6
8
|
export * from './services/floatingUI';
|
|
7
9
|
export * from './services/extendWidget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/hash';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/hash';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/resizeObserver';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/services/resizeObserver';
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -48,14 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@agnos-ui/core": "0.
|
|
52
|
-
"
|
|
51
|
+
"@agnos-ui/core": "0.2.0",
|
|
52
|
+
"esm-env": "^1.0.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
+
"@amadeus-it-group/tansu": "*",
|
|
55
56
|
"svelte": "*"
|
|
56
57
|
},
|
|
57
58
|
"sideEffects": false,
|
|
58
|
-
"version": "0.
|
|
59
|
+
"version": "0.2.0",
|
|
59
60
|
"homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
|
|
60
61
|
"bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
|
|
61
62
|
"license": "MIT",
|