@ulu/frontend-vue 0.1.3-beta.10 → 0.1.3-beta.11

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.
Files changed (37) hide show
  1. package/dist/frontend-vue.css +1 -1
  2. package/dist/frontend-vue.js +2917 -2774
  3. package/dist/types/components/layout/UluDataGrid.vue.d.ts +16 -1
  4. package/dist/types/components/layout/UluDataGrid.vue.d.ts.map +1 -1
  5. package/dist/types/components/systems/index.d.ts +4 -0
  6. package/dist/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts +20 -58
  7. package/dist/types/components/systems/scroll-anchors/UluScrollAnchors.vue.d.ts.map +1 -1
  8. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsHeadlessSection.vue.d.ts +24 -0
  9. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsHeadlessSection.vue.d.ts.map +1 -0
  10. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts +17 -13
  11. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsNav.vue.d.ts.map +1 -1
  12. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts +27 -30
  13. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue.d.ts.map +1 -1
  14. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts +27 -45
  15. package/dist/types/components/systems/scroll-anchors/UluScrollAnchorsSection.vue.d.ts.map +1 -1
  16. package/dist/types/components/systems/scroll-anchors/useScrollAnchorSection.d.ts +9 -0
  17. package/dist/types/components/systems/scroll-anchors/useScrollAnchorSection.d.ts.map +1 -0
  18. package/dist/types/components/systems/scroll-anchors/useScrollAnchorSections.d.ts +8 -0
  19. package/dist/types/components/systems/scroll-anchors/useScrollAnchorSections.d.ts.map +1 -0
  20. package/dist/types/components/systems/scroll-anchors/useScrollAnchors.d.ts +14 -0
  21. package/dist/types/components/systems/scroll-anchors/useScrollAnchors.d.ts.map +1 -0
  22. package/lib/components/_index.scss +1 -0
  23. package/lib/components/layout/UluDataGrid.vue +45 -16
  24. package/lib/components/systems/index.js +4 -0
  25. package/lib/components/systems/scroll-anchors/UluScrollAnchors.vue +46 -145
  26. package/lib/components/systems/scroll-anchors/UluScrollAnchorsHeadlessSection.vue +36 -0
  27. package/lib/components/systems/scroll-anchors/UluScrollAnchorsNav.vue +18 -16
  28. package/lib/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue +100 -92
  29. package/lib/components/systems/scroll-anchors/UluScrollAnchorsSection.vue +55 -52
  30. package/lib/components/systems/scroll-anchors/_scroll-anchors-nav-animated.scss +66 -0
  31. package/lib/components/systems/scroll-anchors/useScrollAnchorSection.js +56 -0
  32. package/lib/components/systems/scroll-anchors/useScrollAnchorSections.js +15 -0
  33. package/lib/components/systems/scroll-anchors/useScrollAnchors.js +152 -0
  34. package/package.json +2 -2
  35. package/dist/types/components/systems/scroll-anchors/symbols.d.ts +0 -7
  36. package/dist/types/components/systems/scroll-anchors/symbols.d.ts.map +0 -1
  37. package/lib/components/systems/scroll-anchors/symbols.js +0 -6
@@ -1,3 +1,18 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
2
2
  export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $props: Partial<typeof props>;
8
+ element: string;
9
+ hidden: boolean;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ type __VLS_Slots = {
12
+ default?: ((props: {}) => any) | undefined;
13
+ };
14
+ declare const props: {
15
+ readonly element: string;
16
+ readonly hidden: boolean;
17
+ };
3
18
  //# sourceMappingURL=UluDataGrid.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluDataGrid.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/layout/UluDataGrid.vue"],"names":[],"mappings":""}
1
+ {"version":3,"file":"UluDataGrid.vue.d.ts","sourceRoot":"","sources":["../../../../lib/components/layout/UluDataGrid.vue"],"names":[],"mappings":"wBA0KqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;2OAErC;;;;AA9FD;;;EAaG"}
@@ -10,10 +10,14 @@ export { default as UluFacetsSearch } from "./facets/UluFacetsSearch.vue";
10
10
  export { default as UluFacetsSidebarLayout } from "./facets/UluFacetsSidebarLayout.vue";
11
11
  export { default as UluFacetsSort } from "./facets/UluFacetsSort.vue";
12
12
  export { default as UluFacetsList } from "./facets/UluFacetsList.vue";
13
+ export { useScrollAnchors } from "./scroll-anchors/useScrollAnchors.js";
14
+ export { useScrollAnchorSection } from "./scroll-anchors/useScrollAnchorSection.js";
15
+ export { useScrollAnchorSections } from "./scroll-anchors/useScrollAnchorSections.js";
13
16
  export { default as UluScrollAnchors } from "./scroll-anchors/UluScrollAnchors.vue";
14
17
  export { default as UluScrollAnchorsNav } from "./scroll-anchors/UluScrollAnchorsNav.vue";
15
18
  export { default as UluScrollAnchorsNavAnimated } from "./scroll-anchors/UluScrollAnchorsNavAnimated.vue";
16
19
  export { default as UluScrollAnchorsSection } from "./scroll-anchors/UluScrollAnchorsSection.vue";
20
+ export { default as UluScrollAnchorsHeadlessSection } from "./scroll-anchors/UluScrollAnchorsHeadlessSection.vue";
17
21
  export { default as UluShowSkeleton } from "./skeleton/UluShowSkeleton.vue";
18
22
  export { default as UluSkeletonContent } from "./skeleton/UluSkeletonContent.vue";
19
23
  export { default as UluSkeletonMedia } from "./skeleton/UluSkeletonMedia.vue";
@@ -1,60 +1,22 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- firstItemActive: BooleanConstructor;
3
- /**
4
- * Observe
5
- */
6
- observerOptions: {
7
- type: ObjectConstructor;
8
- default: () => {
9
- root: null;
10
- threshhold: number[];
11
- rootMargin: string;
12
- };
13
- };
14
- }>, {}, {
15
- isMounted: boolean;
16
- sections: never[];
17
- }, {}, {
18
- update(): void;
19
- getSectionIndex(el: any): number;
20
- /**
21
- * Sets up a new observer to watch the section visibility
22
- */
23
- createObserver(): void;
24
- /**
25
- * Add all slide elements as targets in observer
26
- */
27
- observeItems(): void;
28
- removeActive(except?: null): void;
29
- /**
30
- * Remove observer and it's internal DOM references (GC)
31
- */
32
- destroyObserver(): void;
33
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "section-change"[], "section-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
- firstItemActive: BooleanConstructor;
35
- /**
36
- * Observe
37
- */
38
- observerOptions: {
39
- type: ObjectConstructor;
40
- default: () => {
41
- root: null;
42
- threshhold: number[];
43
- rootMargin: string;
44
- };
45
- };
46
- }>> & Readonly<{
47
- "onSection-change"?: ((...args: any[]) => any) | undefined;
48
- }>, {
49
- firstItemActive: boolean;
50
- observerOptions: Record<string, any>;
51
- }, {}, {}, {}, string, () => {
52
- [SECTIONS]: import("vue").ComputedRef<never[]>;
53
- [REGISTER]: (instance: any) => void;
54
- [UNREGISTER]: (instance: any) => void;
55
- }, true, {}, any>;
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
56
2
  export default _default;
57
- import { SECTIONS } from "./symbols.js";
58
- import { REGISTER } from "./symbols.js";
59
- import { UNREGISTER } from "./symbols.js";
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $emit: typeof emit;
8
+ $props: Partial<typeof props>;
9
+ observerOptions: Record<string, any>;
10
+ debug: boolean;
11
+ firstItemActive: boolean;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ type __VLS_Slots = {
14
+ default?: ((props: {}) => any) | undefined;
15
+ };
16
+ declare const emit: (event: "section-change", ...args: any[]) => void;
17
+ declare const props: {
18
+ readonly observerOptions: Record<string, any>;
19
+ readonly debug: boolean;
20
+ readonly firstItemActive: boolean;
21
+ };
60
22
  //# sourceMappingURL=UluScrollAnchors.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluScrollAnchors.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchors.vue"],"names":[],"mappings":";;IAiKM;;OAEG;;;;;;;;;;;;;;;IAyDH;;OAEG;;IAoCH;;OAEG;;;IAiBH;;OAEG;;;;IAtHH;;OAEG;;;;;;;;;;;;;;;;;;;;yBARwC,cAAc;yBAAd,cAAc;2BAAd,cAAc"}
1
+ {"version":3,"file":"UluScrollAnchors.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchors.vue"],"names":[],"mappings":"wBAwJqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AATzB;WAIkB,OAAO,IAAI;YADV,OAAO,CAAC,OAAO,KAAK,CAAC;;;;2OAGrC;;;;AApED,sEAA6C;AAxB7C;;;;EAsBG"}
@@ -0,0 +1,24 @@
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
2
+ export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $props: Partial<typeof props>;
8
+ title: string;
9
+ element: string;
10
+ customTitleId?: string | undefined;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ type __VLS_Slots = {
13
+ default?: ((props: {
14
+ isActive: any;
15
+ titleId: any;
16
+ section: any;
17
+ }) => any) | undefined;
18
+ };
19
+ declare const props: {
20
+ readonly title: string;
21
+ readonly element: string;
22
+ readonly customTitleId?: string | undefined;
23
+ };
24
+ //# sourceMappingURL=UluScrollAnchorsHeadlessSection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UluScrollAnchorsHeadlessSection.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsHeadlessSection.vue"],"names":[],"mappings":"wBAgIqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;;2OAErC;;;;;;;;AAvFD;;;;EAmBG"}
@@ -1,15 +1,19 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- element: {
3
- type: StringConstructor;
4
- default: string;
5
- };
6
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
- element: {
8
- type: StringConstructor;
9
- default: string;
10
- };
11
- }>> & Readonly<{}>, {
12
- element: string;
13
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
2
  export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $props: Partial<typeof __VLS_props>;
8
+ element: string;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ type __VLS_Slots = {
11
+ default?: ((props: {
12
+ item: never;
13
+ index: never;
14
+ }) => any) | undefined;
15
+ };
16
+ declare const __VLS_props: {
17
+ readonly element: string;
18
+ };
15
19
  //# sourceMappingURL=UluScrollAnchorsNav.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluScrollAnchorsNav.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsNav.vue"],"names":[],"mappings":""}
1
+ {"version":3,"file":"UluScrollAnchorsNav.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsNav.vue"],"names":[],"mappings":"wBAkIqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,WAAW,CAAC;;2OAE3C;;;;;;;AAtFD;;EAQG"}
@@ -1,32 +1,29 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- /**
3
- * Element to use for container
4
- */
5
- element: {
6
- type: StringConstructor;
7
- default: string;
8
- };
9
- }>, {}, {
10
- linkRefs: {};
11
- indicatorAnimReady: boolean;
12
- }, {
13
- indicatorStyles(): false | {
14
- y: any;
15
- height: any;
16
- initial: any;
17
- };
18
- }, {
19
- addLinkRef(index: any, el: any): void;
20
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
- /**
22
- * Element to use for container
23
- */
24
- element: {
25
- type: StringConstructor;
26
- default: string;
27
- };
28
- }>> & Readonly<{}>, {
29
- element: string;
30
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
2
  export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $props: Partial<typeof props>;
8
+ element: string;
9
+ railWidth: number;
10
+ indicatorWidth: number;
11
+ indicatorHeight: number;
12
+ indicatorAlignment: string;
13
+ indicatorAlignmentOffset: number;
14
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ type __VLS_Slots = {
16
+ default?: ((props: {
17
+ item: never;
18
+ index: never;
19
+ }) => any) | undefined;
20
+ };
21
+ declare const props: {
22
+ readonly element: string;
23
+ readonly railWidth: number;
24
+ readonly indicatorWidth: number;
25
+ readonly indicatorHeight: number;
26
+ readonly indicatorAlignment: string;
27
+ readonly indicatorAlignmentOffset: number;
28
+ };
32
29
  //# sourceMappingURL=UluScrollAnchorsNavAnimated.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluScrollAnchorsNavAnimated.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue"],"names":[],"mappings":";IAwIM;;OAEG;;;;;;;;;;;;;;;;;IAFH;;OAEG"}
1
+ {"version":3,"file":"UluScrollAnchorsNavAnimated.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsNavAnimated.vue"],"names":[],"mappings":"wBAmVqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;2OAErC;;;;;;;AArMD;;;;;;;EA2CG"}
@@ -1,50 +1,32 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- title: StringConstructor;
3
- titleElement: {
4
- type: StringConstructor;
5
- default: string;
6
- };
7
- titleClass: {
8
- type: StringConstructor;
9
- default: string;
10
- };
11
- anchorId: StringConstructor;
12
- wrapperClass: {
13
- type: StringConstructor;
14
- default: string;
15
- };
16
- activeClass: {
17
- type: StringConstructor;
18
- default: string;
19
- };
20
- }>, {}, {
21
- titleId: string;
22
- }, {
23
- section(): any;
24
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
- title: StringConstructor;
26
- titleElement: {
27
- type: StringConstructor;
28
- default: string;
29
- };
30
- titleClass: {
31
- type: StringConstructor;
32
- default: string;
33
- };
34
- anchorId: StringConstructor;
35
- wrapperClass: {
36
- type: StringConstructor;
37
- default: string;
38
- };
39
- activeClass: {
40
- type: StringConstructor;
41
- default: string;
42
- };
43
- }>> & Readonly<{}>, {
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
2
+ export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $props: Partial<typeof props>;
44
8
  activeClass: string;
9
+ element: string;
45
10
  titleElement: string;
46
11
  titleClass: string;
47
12
  wrapperClass: string;
48
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
- export default _default;
13
+ title?: string | undefined;
14
+ customTitleId?: string | undefined;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
+ type __VLS_Slots = {
17
+ title?: ((props: {}) => any) | undefined;
18
+ } & {
19
+ default?: ((props: {
20
+ section: any;
21
+ }) => any) | undefined;
22
+ };
23
+ declare const props: {
24
+ readonly activeClass: string;
25
+ readonly element: string;
26
+ readonly titleElement: string;
27
+ readonly titleClass: string;
28
+ readonly wrapperClass: string;
29
+ readonly title?: string | undefined;
30
+ readonly customTitleId?: string | undefined;
31
+ };
50
32
  //# sourceMappingURL=UluScrollAnchorsSection.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UluScrollAnchorsSection.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsSection.vue"],"names":[],"mappings":""}
1
+ {"version":3,"file":"UluScrollAnchorsSection.vue.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/UluScrollAnchorsSection.vue"],"names":[],"mappings":"wBAuMqB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;;qBAEpD,CAAC,EAAE,CAAC;;;AARzB;YAGmB,OAAO,CAAC,OAAO,KAAK,CAAC;;;;;;;;2OAErC;;;;;;;;AAhID;;;;;;;;EA4CG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Composable for a component that acts as a section within the Scroll Anchors system.
3
+ * It handles registering the section with the parent `UluScrollAnchors` component,
4
+ * manages its active state, and provides reactive properties for use in the template.
5
+ * @param {object} props The component props, requires `title` and optional `customTitleId`.
6
+ * @returns {object} An object with reactive properties for the section: `sectionRef` (the ref to bind), `titleId`, `isActive`, and the raw `section` object.
7
+ */
8
+ export function useScrollAnchorSection(props: object): object;
9
+ //# sourceMappingURL=useScrollAnchorSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollAnchorSection.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/useScrollAnchorSection.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,8CAHW,MAAM,GACJ,MAAM,CA+ClB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Composable that provides a reactive list of all registered scroll anchor sections.
3
+ * This is the recommended way to access section data for building custom navigation.
4
+ * Must be used within a component that is a descendant of `UluScrollAnchors`.
5
+ * @returns {object} A reactive ref containing an array of section objects.
6
+ */
7
+ export function useScrollAnchorSections(): object;
8
+ //# sourceMappingURL=useScrollAnchorSections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollAnchorSections.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/useScrollAnchorSections.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,2CAFa,MAAM,CAQlB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The main composable that contains the core "engine" for the Scroll Anchors system.
3
+ * It encapsulates the IntersectionObserver logic to track sections and manage their active state.
4
+ * This is intended for advanced use cases where a developer needs to build a custom provider
5
+ * component instead of using the default `UluScrollAnchors`.
6
+ * @param {{sections: object, props: object, emit: Function, componentElRef: object}} options
7
+ */
8
+ export function useScrollAnchors({ sections, props, emit, componentElRef }: {
9
+ sections: object;
10
+ props: object;
11
+ emit: Function;
12
+ componentElRef: object;
13
+ }): void;
14
+ //# sourceMappingURL=useScrollAnchors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollAnchors.d.ts","sourceRoot":"","sources":["../../../../../lib/components/systems/scroll-anchors/useScrollAnchors.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,4EAFW;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,WAAW;IAAC,cAAc,EAAE,MAAM,CAAA;CAAC,QA+InF"}
@@ -5,3 +5,4 @@
5
5
 
6
6
  @forward "systems/table-sticky/table-sticky" as table-sticky-*;
7
7
  @forward "systems/facets/facets-sidebar" as facets-sidebar-*;
8
+ @forward "systems/scroll-anchors/scroll-anchors-nav-animated" as scroll-anchors-nav-animated-*;
@@ -16,26 +16,55 @@
16
16
  -->
17
17
 
18
18
  <template>
19
- <div>
19
+ <component :is="element" ref="rootElement">
20
20
  <slot />
21
- </div>
21
+ </component>
22
22
  </template>
23
23
 
24
- <script>
25
- import { setPositionClasses } from "@ulu/frontend/js/utils/dom.js";
24
+ <script setup>
25
+ import { ref, onMounted, onBeforeUnmount, watch } from "vue";
26
26
  import { debounce } from "@ulu/utils/performance.js";
27
- export default {
28
- name: "UluDataGrid",
29
- async mounted() {
30
- const setClasses = () => setPositionClasses(this.$el);
31
- setClasses();
32
- this.resizeHandler = debounce(setClasses, 200, false, this);
33
- window.addEventListener("resize", this.resizeHandler);
27
+ import { setPositionClasses } from "@ulu/frontend/js/utils/dom.js";
28
+
29
+ const props = defineProps({
30
+ /**
31
+ * The element to use on data-grid container
32
+ */
33
+ element: {
34
+ type: String,
35
+ default: "div"
34
36
  },
35
- beforeUnmount() {
36
- if (this.resizeHandler) {
37
- window.removeEventListener("resize", this.resizeHandler);
38
- }
37
+ /**
38
+ * Tell the component when this grid is actually in a hidden container
39
+ * - When value changes the component will properly update position classes
40
+ */
41
+ hidden: Boolean // New prop from SSR version
42
+ });
43
+
44
+ const rootElement = ref(null); // Ref for the template root element
45
+ let setThisPositionClasses = null; // To store the setPositionClasses function
46
+ let resizeHandler = null; // To store the debounced resize handler
47
+
48
+ onMounted(async () => {
49
+ setThisPositionClasses = () => setPositionClasses(rootElement.value);
50
+ setThisPositionClasses(); // Initial call
51
+ resizeHandler = debounce(setThisPositionClasses, 200, false); // `this` context is not needed in setup
52
+ window.addEventListener("resize", resizeHandler);
53
+ });
54
+
55
+ onBeforeUnmount(() => {
56
+ if (resizeHandler) {
57
+ window.removeEventListener("resize", resizeHandler);
58
+ resizeHandler = null;
59
+ setThisPositionClasses = null; // Clear the function reference
60
+ }
61
+ });
62
+
63
+ // Watcher for the hidden prop
64
+ watch(() => props.hidden, (newVal, oldVal) => {
65
+ // Only run setClasses if it was hidden and now it's not, and the function exists
66
+ if (oldVal && !newVal && setThisPositionClasses) {
67
+ setThisPositionClasses();
39
68
  }
40
- };
69
+ });
41
70
  </script>
@@ -11,10 +11,14 @@ export { default as UluFacetsSidebarLayout } from './facets/UluFacetsSidebarLayo
11
11
  export { default as UluFacetsSort } from './facets/UluFacetsSort.vue';
12
12
  export { default as UluFacetsList } from './facets/UluFacetsList.vue';
13
13
 
14
+ export { useScrollAnchors } from './scroll-anchors/useScrollAnchors.js';
15
+ export { useScrollAnchorSection } from './scroll-anchors/useScrollAnchorSection.js';
16
+ export { useScrollAnchorSections } from './scroll-anchors/useScrollAnchorSections.js';
14
17
  export { default as UluScrollAnchors } from './scroll-anchors/UluScrollAnchors.vue';
15
18
  export { default as UluScrollAnchorsNav } from './scroll-anchors/UluScrollAnchorsNav.vue';
16
19
  export { default as UluScrollAnchorsNavAnimated } from './scroll-anchors/UluScrollAnchorsNavAnimated.vue';
17
20
  export { default as UluScrollAnchorsSection } from './scroll-anchors/UluScrollAnchorsSection.vue';
21
+ export { default as UluScrollAnchorsHeadlessSection } from './scroll-anchors/UluScrollAnchorsHeadlessSection.vue';
18
22
 
19
23
  export { default as UluShowSkeleton } from './skeleton/UluShowSkeleton.vue';
20
24
  export { default as UluSkeletonContent } from './skeleton/UluSkeletonContent.vue';