@elmethis/qwik 1.0.0-alpha.24 → 1.0.0-alpha.25

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 (70) hide show
  1. package/lib/index.qwik.cjs +723 -819
  2. package/lib/index.qwik.mjs +721 -817
  3. package/lib/q-manifest.json +5 -7
  4. package/lib/style.css +332 -365
  5. package/lib-types/components/ag-ui-client/elm-ag-ui-message-renderer.spec.d.ts +1 -0
  6. package/lib-types/components/ag-ui-client/elm-ag-ui-prompt-picker.browser.spec.d.ts +1 -0
  7. package/lib-types/components/ag-ui-client/elm-ag-ui-tool-execution.spec.d.ts +1 -0
  8. package/lib-types/components/ag-ui-client/input-content/elm-ag-ui-input-content.spec.d.ts +1 -0
  9. package/lib-types/components/code/elm-code-block.spec.d.ts +1 -0
  10. package/lib-types/components/code/elm-katex.spec.d.ts +1 -0
  11. package/lib-types/components/code/elm-shiki-highlighter.spec.d.ts +1 -0
  12. package/lib-types/components/containments/elm-modal.browser.spec.d.ts +1 -0
  13. package/lib-types/components/containments/elm-modal.d.ts +6 -0
  14. package/lib-types/components/containments/elm-modal.spec.d.ts +1 -0
  15. package/lib-types/components/containments/elm-parallax.spec.d.ts +1 -0
  16. package/lib-types/components/containments/elm-toggle.browser.spec.d.ts +1 -0
  17. package/lib-types/components/containments/elm-toggle.spec.d.ts +1 -0
  18. package/lib-types/components/containments/elm-tooltip.browser.spec.d.ts +1 -0
  19. package/lib-types/components/containments/elm-tooltip.spec.d.ts +1 -0
  20. package/lib-types/components/fallback/elm-block-fallback.spec.d.ts +1 -0
  21. package/lib-types/components/fallback/elm-rectangle-wave.spec.d.ts +1 -0
  22. package/lib-types/components/fallback/elm-unsupported-block.spec.d.ts +1 -0
  23. package/lib-types/components/form/elm-button.d.ts +1 -1
  24. package/lib-types/components/form/elm-button.spec.d.ts +1 -0
  25. package/lib-types/components/form/elm-checkbox.d.ts +2 -2
  26. package/lib-types/components/form/elm-checkbox.spec.d.ts +1 -0
  27. package/lib-types/components/form/elm-select.browser.spec.d.ts +1 -0
  28. package/lib-types/components/form/elm-select.d.ts +1 -1
  29. package/lib-types/components/form/elm-switch.spec.d.ts +1 -0
  30. package/lib-types/components/form/elm-text-area.d.ts +1 -1
  31. package/lib-types/components/form/elm-text-area.spec.d.ts +1 -0
  32. package/lib-types/components/form/elm-text-field.d.ts +1 -1
  33. package/lib-types/components/form/elm-text-field.spec.d.ts +1 -0
  34. package/lib-types/components/form/elm-validation.spec.d.ts +1 -0
  35. package/lib-types/components/icon/elm-copy-icon.spec.d.ts +1 -0
  36. package/lib-types/components/icon/elm-dot-loading-icon.spec.d.ts +1 -0
  37. package/lib-types/components/icon/elm-inline-icon.spec.d.ts +1 -0
  38. package/lib-types/components/icon/elm-language-icon.spec.d.ts +1 -0
  39. package/lib-types/components/icon/elm-mdi-icon.spec.d.ts +1 -0
  40. package/lib-types/components/icon/elm-square-loading-icon.spec.d.ts +1 -0
  41. package/lib-types/components/icon/elm-toggle-theme.spec.d.ts +1 -0
  42. package/lib-types/components/media/elm-block-image.browser.spec.d.ts +1 -0
  43. package/lib-types/components/media/elm-block-image.spec.d.ts +1 -0
  44. package/lib-types/components/media/elm-file.spec.d.ts +1 -0
  45. package/lib-types/components/navigation/elm-bookmark.spec.d.ts +1 -0
  46. package/lib-types/components/navigation/elm-breadcrumb.spec.d.ts +1 -0
  47. package/lib-types/components/navigation/elm-page-top.spec.d.ts +1 -0
  48. package/lib-types/components/others/elm-color-primitive-sample.spec.d.ts +1 -0
  49. package/lib-types/components/others/elm-color-semantic-sample.spec.d.ts +1 -0
  50. package/lib-types/components/others/elm-jarkup.spec.d.ts +1 -0
  51. package/lib-types/components/others/elm-markdown.d.ts +1 -1
  52. package/lib-types/components/others/elm-markdown.spec.d.ts +1 -0
  53. package/lib-types/components/others/use-wordle.browser.spec.d.ts +1 -0
  54. package/lib-types/components/table/elm-table-composition.spec.d.ts +1 -0
  55. package/lib-types/components/typography/elm-block-quote.spec.d.ts +1 -0
  56. package/lib-types/components/typography/elm-callout.spec.d.ts +1 -0
  57. package/lib-types/components/typography/elm-divider.spec.d.ts +1 -0
  58. package/lib-types/components/typography/elm-fragment-identifier.spec.d.ts +1 -0
  59. package/lib-types/components/typography/elm-heading.spec.d.ts +1 -0
  60. package/lib-types/components/typography/elm-inline-text.spec.d.ts +1 -0
  61. package/lib-types/components/typography/elm-list.spec.d.ts +1 -0
  62. package/lib-types/components/typography/elm-paragraph.spec.d.ts +1 -0
  63. package/lib-types/hooks/use-auto-animate.browser.spec.d.ts +1 -0
  64. package/lib-types/hooks/use-clipboard.browser.spec.d.ts +1 -0
  65. package/lib-types/hooks/use-elmethis-theme.browser.spec.d.ts +1 -0
  66. package/lib-types/hooks/use-modal.browser.spec.d.ts +1 -0
  67. package/lib-types/hooks/use-modal.d.ts +5 -10
  68. package/lib-types/hooks/use-storage.browser.spec.d.ts +1 -0
  69. package/lib-types/index.d.ts +0 -1
  70. package/package.json +13 -5
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,12 @@
1
1
  import { PropsOf, QRL } from "@qwik.dev/core";
2
2
  export interface ElmModalProps extends PropsOf<"dialog"> {
3
3
  isOpen?: boolean;
4
+ /**
5
+ * Delay in **milliseconds** of the open/close fade. Emitted as the
6
+ * `--elmethis-scoped-modal-delay` custom property so the stylesheet
7
+ * transition stays in sync with the JS close timer. Defaults to `200`.
8
+ */
9
+ delay?: number;
4
10
  onClose$?: QRL<(event: Event, element: HTMLDialogElement) => void>;
5
11
  }
6
12
  export declare const ElmModal: import("@qwik.dev/core").Component<ElmModalProps>;
@@ -3,7 +3,7 @@ export interface ElmButtonProps extends PropsOf<"button"> {
3
3
  /**
4
4
  * Whether the button is in loading state.
5
5
  */
6
- loading?: boolean;
6
+ isLoading?: boolean;
7
7
  /**
8
8
  * Whether the button is block.
9
9
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -7,11 +7,11 @@ export interface ElmCheckboxProps extends PropsOf<"div"> {
7
7
  /**
8
8
  * Whether the checkbox is in a loading state.
9
9
  */
10
- loading?: boolean;
10
+ isLoading?: boolean;
11
11
  /**
12
12
  * Whether the checkbox is disabled.
13
13
  */
14
- disable?: boolean;
14
+ disabled?: boolean;
15
15
  /**
16
16
  * Controlled checked state. When provided the parent owns the signal.
17
17
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -23,7 +23,7 @@ export interface ElmSelectProps extends PropsOf<"div"> {
23
23
  /**
24
24
  * Whether the select is in a loading state.
25
25
  */
26
- loading?: boolean;
26
+ isLoading?: boolean;
27
27
  /**
28
28
  * Options to display in the dropdown.
29
29
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -4,7 +4,7 @@ export interface ElmTextAreaProps extends Omit<PropsOf<"label">, "onInput$"> {
4
4
  maxLength?: number;
5
5
  placeholder?: string;
6
6
  disabled?: boolean;
7
- loading?: boolean;
7
+ isLoading?: boolean;
8
8
  required?: boolean;
9
9
  /**
10
10
  * Controlled value. When provided the parent owns the state.
@@ -0,0 +1 @@
1
+ export {};
@@ -6,7 +6,7 @@ export interface ElmTextFieldProps extends Omit<PropsOf<"label">, "onInput$"> {
6
6
  suffix?: string;
7
7
  placeholder?: string;
8
8
  disabled?: boolean;
9
- loading?: boolean;
9
+ isLoading?: boolean;
10
10
  /**
11
11
  * Controlled value. When provided the parent owns the state.
12
12
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -5,6 +5,6 @@ export interface ElmMarkdownProps extends PropsOf<"div"> {
5
5
  * Set to true when markdown is being streamed incrementally.
6
6
  * Keeps completed blocks stable and only re-renders the trailing block on each token.
7
7
  */
8
- streaming?: boolean;
8
+ isStreaming?: boolean;
9
9
  }
10
10
  export declare const ElmMarkdown: import("@qwik.dev/core").Component<ElmMarkdownProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,23 +1,18 @@
1
1
  export interface UseModalOptions {
2
2
  /**
3
- * Delay in **milliseconds** before the modal is completely hidden after hiding animation starts.
3
+ * Delay in **milliseconds** of the open/close fade animation.
4
4
  */
5
5
  delay?: number;
6
6
  }
7
7
  /**
8
- * ## show
9
- * 1. `hideGen++` (invalidates any pending hide timeout)
10
- * 2. `isOpen = true`
11
- * 3. `isShown = true`
12
- *
13
- * ## hide
14
- * 1. `isShown = false`
15
- * 2. `setTimeout(() => { if gen matches: isOpen = false }, delay)`
8
+ * Imperative sugar over {@link ElmModal}. Owns a single `isOpen` intent signal
9
+ * and returns `show` / `hide` / `toggle` to drive it, plus a `Modal` component
10
+ * that renders the native `<dialog>` (open/animate/close lifecycle and timer
11
+ * cleanup all live in `ElmModal`).
16
12
  */
17
13
  export declare const useModal: (options?: UseModalOptions) => {
18
14
  Modal: import("@qwik.dev/core").Component<unknown>;
19
15
  isOpen: import("@qwik.dev/core").Signal<boolean>;
20
- isShown: import("@qwik.dev/core").Signal<boolean>;
21
16
  show: import("@qwik.dev/core").QRL<() => void>;
22
17
  hide: import("@qwik.dev/core").QRL<() => void>;
23
18
  toggle: import("@qwik.dev/core").QRL<() => void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -48,7 +48,6 @@ export { useDelayedSignal } from "./hooks/use-delayed-signal";
48
48
  export { useThrottledSignal } from "./hooks/use-throttled-signal";
49
49
  export { useThrottledStore } from "./hooks/use-throttled-store";
50
50
  export { THEME_CHANGE_EVENT, useElmethisTheme, } from "./hooks/use-elmethis-theme";
51
- export { useInView } from "./hooks/use-in-view";
52
51
  export { useModal, type UseModalOptions } from "./hooks/use-modal";
53
52
  export { useLocalStorage, type UseLocalStorageOptions, useSessionStorage, type UseSessionStorageOptions, } from "./hooks/use-storage";
54
53
  export { useThrottledQueue, ThrottledQueue } from "./hooks/use-throttled-queue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/qwik",
3
- "version": "1.0.0-alpha.24",
3
+ "version": "1.0.0-alpha.25",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -43,13 +43,16 @@
43
43
  "@storybook/addon-docs": "^10.4.4",
44
44
  "@types/lodash-es": "^4.17.12",
45
45
  "@types/node": "25.7.0",
46
+ "@vitest/browser-playwright": "^4.1.8",
46
47
  "@vitest/ui": "^4.1.8",
48
+ "concurrently": "^10.0.3",
47
49
  "eslint": "10.4.1",
48
50
  "eslint-plugin-qwik": "2.0.0-beta.37",
49
51
  "globals": "17.6.0",
50
52
  "happy-dom": "^20.10.2",
51
53
  "jarkup-ts": "^0.14.0",
52
54
  "np": "^11.2.1",
55
+ "playwright": "^1.60.0",
53
56
  "prettier": "3.8.4",
54
57
  "storybook": "^10.4.4",
55
58
  "storybook-framework-qwik": "0.6.2--canary.95.25602496384.0",
@@ -62,7 +65,8 @@
62
65
  "undici": "*",
63
66
  "vite": "^7",
64
67
  "vite-tsconfig-paths": "^6.1.1",
65
- "vitest": "^4.1.8"
68
+ "vitest": "^4.1.8",
69
+ "vitest-browser-qwik": "^0.3.8"
66
70
  },
67
71
  "dependencies": {
68
72
  "@46ki75/ikuma-theme": "^0.0.10",
@@ -91,14 +95,18 @@
91
95
  "build.lib": "vite build --mode lib",
92
96
  "build.types": "tsc --emitDeclarationOnly --incremental false",
93
97
  "dev": "storybook dev -p 19211 --no-open",
94
- "fmt": "prettier --write .",
95
- "fmt.check": "prettier --check .",
98
+ "fmt": "prettier --write ./src",
99
+ "fmt.check": "prettier --check ./src",
96
100
  "lint": "eslint \"src/**/*.ts*\"",
97
101
  "lint.css": "stylelint \"src/**/*.css\"",
98
102
  "release": "np",
99
103
  "start": "vite --open --mode ssr",
104
+ "test": "pnpm run test.unit && pnpm run test.browser",
100
105
  "test.unit": "vitest --run",
101
- "test.unit.ui": "vitest --ui",
106
+ "test.browser": "vitest --run --config vitest.browser.config.ts",
107
+ "test.build": "pnpm run build && pnpm run build-storybook",
108
+ "check": "concurrently -g \"pnpm:fmt.check\" \"pnpm:lint\" \"pnpm:lint.css\" \"pnpm:test.unit\"",
109
+ "check.ci": "concurrently -g \"pnpm:check\" \"pnpm:test.browser\" \"pnpm:test.build\"",
102
110
  "qwik": "qwik"
103
111
  }
104
112
  }