@stimulus-library/mixins 1.0.0-alpha.0 → 1.0.0-alpha.2

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/index.d.ts +16 -16
  2. package/dist/index.js +16 -16
  3. package/dist/{useClickOutside.js → use_click_outside.js} +2 -2
  4. package/dist/{useEventBus.js → use_event_bus.js} +1 -1
  5. package/dist/{UseEventListener.js → use_event_listener.js} +1 -1
  6. package/dist/{UseFullscreen.js → use_fullscreen.js} +1 -1
  7. package/dist/{UseGeolocation.js → use_geolocation.js} +1 -1
  8. package/dist/{useHover.js → use_hover.js} +2 -2
  9. package/dist/{UseInjectedHtml.js → use_injected_html.js} +1 -1
  10. package/dist/{UseIntersection.js → use_intersection.js} +1 -1
  11. package/dist/{UseInterval.js → use_interval.js} +1 -1
  12. package/dist/{UseMutationObserver.js → use_mutation_observer.js} +1 -1
  13. package/dist/{UseResizeObserver.js → use_resize_observer.js} +1 -1
  14. package/dist/{UseTemporaryContent.js → use_temporary_content.js} +2 -2
  15. package/dist/{useTimeout.js → use_timeout.js} +1 -1
  16. package/package.json +2 -2
  17. /package/dist/{createMixin.d.ts → create_mixin.d.ts} +0 -0
  18. /package/dist/{createMixin.js → create_mixin.js} +0 -0
  19. /package/dist/{installClassMethods.d.ts → install_class_methods.d.ts} +0 -0
  20. /package/dist/{installClassMethods.js → install_class_methods.js} +0 -0
  21. /package/dist/{useClickOutside.d.ts → use_click_outside.d.ts} +0 -0
  22. /package/dist/{useEventBus.d.ts → use_event_bus.d.ts} +0 -0
  23. /package/dist/{UseEventListener.d.ts → use_event_listener.d.ts} +0 -0
  24. /package/dist/{UseFullscreen.d.ts → use_fullscreen.d.ts} +0 -0
  25. /package/dist/{UseGeolocation.d.ts → use_geolocation.d.ts} +0 -0
  26. /package/dist/{useHover.d.ts → use_hover.d.ts} +0 -0
  27. /package/dist/{UseInjectedHtml.d.ts → use_injected_html.d.ts} +0 -0
  28. /package/dist/{UseIntersection.d.ts → use_intersection.d.ts} +0 -0
  29. /package/dist/{UseInterval.d.ts → use_interval.d.ts} +0 -0
  30. /package/dist/{UseLocalstorage.d.ts → use_localstorage.d.ts} +0 -0
  31. /package/dist/{UseLocalstorage.js → use_localstorage.js} +0 -0
  32. /package/dist/{UseMutationObserver.d.ts → use_mutation_observer.d.ts} +0 -0
  33. /package/dist/{UseResizeObserver.d.ts → use_resize_observer.d.ts} +0 -0
  34. /package/dist/{UseTemporaryContent.d.ts → use_temporary_content.d.ts} +0 -0
  35. /package/dist/{useTimeout.d.ts → use_timeout.d.ts} +0 -0
  36. /package/dist/{useTrixModifiers.d.ts → use_trix_modifiers.d.ts} +0 -0
  37. /package/dist/{useTrixModifiers.js → use_trix_modifiers.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- export * from './installClassMethods';
2
- export * from './useClickOutside';
3
- export * from './useEventBus';
4
- export * from './useEventListener';
5
- export * from './useFullscreen';
6
- export * from './useGeolocation';
7
- export * from './useHover';
8
- export * from './useInjectedHtml';
9
- export * from './useIntersection';
10
- export * from './useInterval';
11
- export * from './useLocalstorage';
12
- export * from './useMutationObserver';
13
- export * from './useResizeObserver';
14
- export * from './useTemporaryContent';
15
- export * from './useTimeout';
16
- export * from './useTrixModifiers';
1
+ export * from './install_class_methods';
2
+ export * from './use_click_outside';
3
+ export * from './use_event_bus';
4
+ export * from './use_event_listener';
5
+ export * from './use_fullscreen';
6
+ export * from './use_geolocation';
7
+ export * from './use_hover';
8
+ export * from './use_injected_html';
9
+ export * from './use_intersection';
10
+ export * from './use_interval';
11
+ export * from './use_localstorage';
12
+ export * from './use_mutation_observer';
13
+ export * from './use_resize_observer';
14
+ export * from './use_temporary_content';
15
+ export * from './use_timeout';
16
+ export * from './use_trix_modifiers';
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- export * from './installClassMethods';
2
- export * from './useClickOutside';
3
- export * from './useEventBus';
4
- export * from './useEventListener';
5
- export * from './useFullscreen';
6
- export * from './useGeolocation';
7
- export * from './useHover';
8
- export * from './useInjectedHtml';
9
- export * from './useIntersection';
10
- export * from './useInterval';
11
- export * from './useLocalstorage';
12
- export * from './useMutationObserver';
13
- export * from './useResizeObserver';
14
- export * from './useTemporaryContent';
15
- export * from './useTimeout';
16
- export * from './useTrixModifiers';
1
+ export * from './install_class_methods';
2
+ export * from './use_click_outside';
3
+ export * from './use_event_bus';
4
+ export * from './use_event_listener';
5
+ export * from './use_fullscreen';
6
+ export * from './use_geolocation';
7
+ export * from './use_hover';
8
+ export * from './use_injected_html';
9
+ export * from './use_intersection';
10
+ export * from './use_interval';
11
+ export * from './use_localstorage';
12
+ export * from './use_mutation_observer';
13
+ export * from './use_resize_observer';
14
+ export * from './use_temporary_content';
15
+ export * from './use_timeout';
16
+ export * from './use_trix_modifiers';
@@ -1,6 +1,6 @@
1
1
  import { isElementInViewport } from "@stimulus-library/utilities";
2
- import { useEventListener } from "./useEventListener";
3
- import { useMixin } from "./createMixin";
2
+ import { useEventListener } from "./use_event_listener";
3
+ import { useMixin } from "./create_mixin";
4
4
  export function useClickOutside(controller, element, callback) {
5
5
  callback = callback.bind(controller);
6
6
  const handler = (event) => {
@@ -1,5 +1,5 @@
1
1
  import { debounce, EventBus, wrapArray } from "@stimulus-library/utilities";
2
- import { useMixin } from "./createMixin";
2
+ import { useMixin } from "./create_mixin";
3
3
  export function useEventBus(controller, eventNameOrNames, handler, opts) {
4
4
  let options = opts;
5
5
  if (options?.debounce) {
@@ -1,5 +1,5 @@
1
1
  import { debounce, wrapArray } from "@stimulus-library/utilities";
2
- import { useMixin } from "./createMixin";
2
+ import { useMixin } from "./create_mixin";
3
3
  export function useEventListener(controller, element, eventNameOrNames, handler, opts) {
4
4
  if (opts?.debounce) {
5
5
  handler = debounce(handler.bind(controller), opts.debounce);
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useFullscreen(controller, el) {
3
3
  let element = el || document.documentElement;
4
4
  let fullscreenOpen = document.fullscreenElement !== null;
@@ -1,5 +1,5 @@
1
1
  import { reactive } from "@stimulus-library/utilities";
2
- import { useMixin } from "./createMixin";
2
+ import { useMixin } from "./create_mixin";
3
3
  export function useGeolocation(controller, options = {}, update, error) {
4
4
  // Ensure passed functions are bound to the correct controller scope
5
5
  if (update) {
@@ -1,5 +1,5 @@
1
- import { useEventListener } from "./useEventListener";
2
- import { useMixin } from "./createMixin";
1
+ import { useEventListener } from "./use_event_listener";
2
+ import { useMixin } from "./create_mixin";
3
3
  export function useHover(controller, element, enter, leave) {
4
4
  let teardownEnter = null;
5
5
  let teardownLeave = null;
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useInjectedFragment(controller, targetElement, insertPosition, fragment, options = {}) {
3
3
  let nodes = Array.from(fragment.childNodes);
4
4
  let setup = () => {
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useIntersectionObserver(controller, handler, options) {
3
3
  handler = handler.bind(controller);
4
4
  let observer = new IntersectionObserver(handler, options);
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useInterval(controller, handler, interval) {
3
3
  handler = handler.bind(controller);
4
4
  let intervalHandle = null;
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useMutationObserver(controller, element, handler, options) {
3
3
  handler = handler.bind(controller);
4
4
  let observer = new MutationObserver(handler);
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useResizeObserver(controller, element, handler, options) {
3
3
  handler = handler.bind(controller);
4
4
  let observer = new ResizeObserver(handler);
@@ -1,5 +1,5 @@
1
- import { useMixin } from "./createMixin";
2
- import { useTimeout } from "./useTimeout";
1
+ import { useMixin } from "./create_mixin";
2
+ import { useTimeout } from "./use_timeout";
3
3
  import { isHTMLInputElement } from "@stimulus-library/utilities";
4
4
  export function useTemporaryContent(controller, target, content, timeout, teardownCallback) {
5
5
  const setContent = (element, text) => {
@@ -1,4 +1,4 @@
1
- import { useMixin } from "./createMixin";
1
+ import { useMixin } from "./create_mixin";
2
2
  export function useTimeout(controller, handler, timeout) {
3
3
  let controllerDisconnect;
4
4
  let timeoutHandle = null;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "ruby on rails",
10
10
  "ruby-on-rails"
11
11
  ],
12
- "version": "1.0.0-alpha.0",
12
+ "version": "1.0.0-alpha.2",
13
13
  "license": "MIT",
14
14
  "author": {
15
15
  "name": "Sub-Xaero",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@hotwired/stimulus": "^3.0.0",
38
- "@stimulus-library/utilities": "^1.0.0-alpha.0"
38
+ "@stimulus-library/utilities": "^1.0.0-alpha.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "agadoo": "^3.0.0",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes