@pihanga2/shadcn 0.2.18 → 0.2.20

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/README.md +4 -1
  2. package/cards/button/button.types.d.ts +2 -2
  3. package/cards/checkbox/checkbox.types.d.ts +2 -2
  4. package/cards/codeMirror/codeMirror.types.d.ts +1 -1
  5. package/cards/collapsibleCard/collapsibleCard.types.d.ts +1 -1
  6. package/cards/dataTable/dataTable.types.d.ts +5 -5
  7. package/cards/dialog/dialog.types.d.ts +3 -3
  8. package/cards/drawer/drawer.types.d.ts +3 -3
  9. package/cards/dropDownMenu/drop-down.types.d.ts +1 -1
  10. package/cards/emptyCard/emptyCard.component.js +25 -0
  11. package/cards/emptyCard/emptyCard.component.js.map +1 -0
  12. package/cards/emptyCard/emptyCard.types.js +7 -0
  13. package/cards/emptyCard/emptyCard.types.js.map +1 -0
  14. package/cards/emptyCard/index.js +12 -0
  15. package/cards/emptyCard/index.js.map +1 -0
  16. package/cards/fileDrop/fileDrop.types.d.ts +2 -2
  17. package/cards/form/form.types.d.ts +2 -2
  18. package/cards/graphin/graphin.types.d.ts +9 -9
  19. package/cards/input/input.component.js +28 -23
  20. package/cards/input/input.component.js.map +1 -1
  21. package/cards/input/input.types.d.ts +10 -4
  22. package/cards/input/input.types.js.map +1 -1
  23. package/cards/jsonViewer/jsonViewer.types.d.ts +2 -2
  24. package/cards/keyboardOverlay/keyboardOverlay.component.js +1 -0
  25. package/cards/keyboardOverlay/keyboardOverlay.component.js.map +1 -1
  26. package/cards/keyboardOverlay/keyboardOverlay.types.d.ts +1 -1
  27. package/cards/list/list.types.d.ts +1 -1
  28. package/cards/menu/menu.types.d.ts +1 -1
  29. package/cards/modeToggle/mode-toggle.types.d.ts +1 -1
  30. package/cards/navbarSearch/navbarSearch.type.d.ts +3 -3
  31. package/cards/observable/index.d.ts +1 -0
  32. package/cards/observable/index.js +13 -0
  33. package/cards/observable/index.js.map +1 -0
  34. package/cards/observable/observable.component.d.ts +4 -0
  35. package/cards/observable/observable.component.js +74 -0
  36. package/cards/observable/observable.component.js.map +1 -0
  37. package/cards/observable/observable.types.d.ts +253 -0
  38. package/cards/observable/observable.types.js +21 -0
  39. package/cards/observable/observable.types.js.map +1 -0
  40. package/cards/pageWithNavbar/pageWithNavbar.type.d.ts +1 -1
  41. package/cards/pageWithNavbarMeta/pageWithNavbarMeta.types.d.ts +1 -1
  42. package/cards/pasteTarget/pasteTarget.types.d.ts +2 -2
  43. package/cards/scrollbarWithAnnotations/scrollbarWithAnnotations.types.d.ts +2 -2
  44. package/cards/select/select.types.d.ts +6 -6
  45. package/cards/sheetCard/sheetCard.types.d.ts +3 -3
  46. package/cards/slider/slider.types.d.ts +4 -4
  47. package/cards/stack/stack.component.js +51 -38
  48. package/cards/stack/stack.component.js.map +1 -1
  49. package/cards/stepper/stepper.types.d.ts +1 -1
  50. package/cards/switch/switch.types.d.ts +2 -2
  51. package/cards/tabs/tabs.types.d.ts +1 -1
  52. package/cards/textArea/index.d.ts +1 -0
  53. package/cards/textArea/index.js +13 -0
  54. package/cards/textArea/index.js.map +1 -0
  55. package/cards/textArea/textArea.component.d.ts +4 -0
  56. package/cards/textArea/textArea.component.js +83 -0
  57. package/cards/textArea/textArea.component.js.map +1 -0
  58. package/cards/textArea/textArea.types.d.ts +147 -0
  59. package/cards/textArea/textArea.types.js +7 -0
  60. package/cards/textArea/textArea.types.js.map +1 -0
  61. package/cards/textField/textField.types.d.ts +2 -2
  62. package/cards/toast/toast.types.d.ts +3 -3
  63. package/cards/toggleGroup/toggleGroup.types.d.ts +2 -2
  64. package/components/ui/empty.js +40 -0
  65. package/components/ui/empty.js.map +1 -0
  66. package/components/ui/input.js +11 -11
  67. package/components/ui/input.js.map +1 -1
  68. package/components/ui/textarea.js +15 -0
  69. package/components/ui/textarea.js.map +1 -0
  70. package/package.json +17 -2
@@ -5,13 +5,13 @@ export declare const NAVBAR_SEARCH_ACTION: {
5
5
  SEARCH_ITEMS: string;
6
6
  SEARCH_FOCUS: string;
7
7
  };
8
- export declare const onNavbarSearchSubmit: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
+ export declare const onNavbarSearchSubmit: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
9
  cardID: string;
10
10
  } & NavbarSearchEvent>) => void;
11
- export declare const onNavbarSearchItems: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
11
+ export declare const onNavbarSearchItems: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
12
  cardID: string;
13
13
  } & NavbarSearchInputEvent>) => void;
14
- export declare const onNavbarSearchFocus: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
14
+ export declare const onNavbarSearchFocus: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
15
15
  cardID: string;
16
16
  } & NavbarSearchFocusEvent>) => void;
17
17
  export type NavbarSearchProps = {
@@ -0,0 +1 @@
1
+ export * from './observable.types';
@@ -0,0 +1,13 @@
1
+ import { ObservableComponent as e } from "./observable.component.js";
2
+ import { OBSERVABLE_ACTION as t, OBSERVABLE_CARD as n, Observable as r, onObservableBlur as i, onObservableClicked as a, onObservableContextMenu as o, onObservableDoubleClicked as s, onObservableFocus as c, onObservableKeyDown as l, onObservableKeyUp as u, onObservableMouseDown as d, onObservableMouseEnter as f, onObservableMouseLeave as p, onObservableMouseMove as m, onObservableMouseUp as h, onObservableWheel as g } from "./observable.types.js";
3
+ import { actionTypesToEvents as _, registerCardComponent as v } from "@pihanga2/core";
4
+ //#region src/cards/observable/index.ts
5
+ v({
6
+ name: n,
7
+ component: e,
8
+ events: _(t)
9
+ });
10
+ //#endregion
11
+ export { t as OBSERVABLE_ACTION, n as OBSERVABLE_CARD, r as Observable, i as onObservableBlur, a as onObservableClicked, o as onObservableContextMenu, s as onObservableDoubleClicked, c as onObservableFocus, l as onObservableKeyDown, u as onObservableKeyUp, d as onObservableMouseDown, f as onObservableMouseEnter, p as onObservableMouseLeave, m as onObservableMouseMove, h as onObservableMouseUp, g as onObservableWheel };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/observable/index.ts"],"sourcesContent":["import {actionTypesToEvents, registerCardComponent} from \"@pihanga2/core\";\n\nimport {ObservableComponent} from \"./observable.component\";\nimport {OBSERVABLE_ACTION, OBSERVABLE_CARD} from \"./observable.types\";\n\nexport * from \"./observable.types\";\n\nregisterCardComponent({\n name: OBSERVABLE_CARD,\n component: ObservableComponent,\n events: actionTypesToEvents(OBSERVABLE_ACTION),\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;CACX,QAAQ,EAAoB,CAAiB;AAC/C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PiCardProps } from '@pihanga2/core';
2
+ import { ObservableEvents, ObservableProps } from './observable.types';
3
+ import * as React from "react";
4
+ export declare const ObservableComponent: (props: PiCardProps<ObservableProps, ObservableEvents>) => React.ReactNode;
@@ -0,0 +1,74 @@
1
+ import * as e from "react";
2
+ import { Card as t } from "@pihanga2/core";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/cards/observable/observable.component.tsx
5
+ function r(e, t) {
6
+ return {
7
+ absoluteX: e.pageX,
8
+ absoluteY: e.pageY,
9
+ relativeX: e.pageX - (t.left + window.scrollX),
10
+ relativeY: e.pageY - (t.top + window.scrollY)
11
+ };
12
+ }
13
+ var i = (i) => {
14
+ let { id: a, content: o, enable: s = {}, className: c, style: l, data: u, cardName: d, onClicked: f, onDoubleClicked: p, onMouseDown: m, onMouseUp: h, onMouseEnter: g, onMouseMove: _, onMouseLeave: v, onContextMenu: y, onWheel: b, onKeyDown: x, onKeyUp: S, onFocus: C, onBlur: w } = i, T = e.useRef(null);
15
+ function E(e) {
16
+ let t = T.current?.getBoundingClientRect() ?? {
17
+ left: 0,
18
+ top: 0
19
+ };
20
+ return {
21
+ id: a,
22
+ button: e.button,
23
+ buttons: e.buttons,
24
+ altKey: e.altKey,
25
+ ctrlKey: e.ctrlKey,
26
+ metaKey: e.metaKey,
27
+ shiftKey: e.shiftKey,
28
+ ...r(e, t)
29
+ };
30
+ }
31
+ function D(e) {
32
+ let t = T.current?.getBoundingClientRect() ?? {
33
+ left: 0,
34
+ top: 0
35
+ };
36
+ return {
37
+ id: a,
38
+ deltaX: e.deltaX,
39
+ deltaY: e.deltaY,
40
+ deltaZ: e.deltaZ,
41
+ ...r(e, t)
42
+ };
43
+ }
44
+ function O(e) {
45
+ return {
46
+ id: a,
47
+ key: e.key,
48
+ code: e.code,
49
+ repeat: e.repeat,
50
+ altKey: e.altKey,
51
+ ctrlKey: e.ctrlKey,
52
+ metaKey: e.metaKey,
53
+ shiftKey: e.shiftKey
54
+ };
55
+ }
56
+ let k = u ? Object.fromEntries(Object.entries(u).map(([e, t]) => [`data-${e}`, t])) : {}, A = {};
57
+ return s.clicked && (A.onClick = (e) => f(E(e))), s.doubleClicked && (A.onDoubleClick = (e) => p(E(e))), s.mouseDown && (A.onMouseDown = (e) => m(E(e))), s.mouseUp && (A.onMouseUp = (e) => h(E(e))), s.mouseEnter && (A.onMouseEnter = (e) => g(E(e))), s.mouseMove && (A.onMouseMove = (e) => _(E(e))), s.mouseLeave && (A.onMouseLeave = (e) => v(E(e))), s.contextMenu && (A.onContextMenu = (e) => y(E(e))), s.wheel && (A.onWheel = (e) => b(D(e))), s.keyDown && (A.onKeyDown = (e) => x(O(e))), s.keyUp && (A.onKeyUp = (e) => S(O(e))), s.focus && (A.onFocus = () => C({ id: a })), s.blur && (A.onBlur = () => w({ id: a })), /* @__PURE__ */ n("div", {
58
+ ref: T,
59
+ className: c,
60
+ style: l,
61
+ "data-pihanga": d,
62
+ tabIndex: s.keyDown || s.keyUp || s.focus || s.blur ? 0 : void 0,
63
+ ...k,
64
+ ...A,
65
+ children: o && /* @__PURE__ */ n(t, {
66
+ cardName: o,
67
+ parentCard: d
68
+ })
69
+ });
70
+ };
71
+ //#endregion
72
+ export { i as ObservableComponent };
73
+
74
+ //# sourceMappingURL=observable.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observable.component.js","names":[],"sources":["../../../src/cards/observable/observable.component.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport type {\n ObservableEnabledEvents,\n ObservableEvents,\n ObservableKeyEvent,\n ObservableMouseEvent,\n ObservableProps,\n ObservableWheelEvent,\n} from \"./observable.types\";\n\nfunction pointerPosition(\n e: {pageX: number; pageY: number},\n rect: DOMRect,\n): {\n absoluteX: number;\n absoluteY: number;\n relativeX: number;\n relativeY: number;\n} {\n return {\n absoluteX: e.pageX,\n absoluteY: e.pageY,\n relativeX: e.pageX - (rect.left + window.scrollX),\n relativeY: e.pageY - (rect.top + window.scrollY),\n };\n}\n\nexport const ObservableComponent = (\n props: PiCardProps<ObservableProps, ObservableEvents>,\n): React.ReactNode => {\n const {\n id,\n content,\n enable = {} as ObservableEnabledEvents,\n className,\n style,\n data,\n cardName,\n onClicked,\n onDoubleClicked,\n onMouseDown,\n onMouseUp,\n onMouseEnter,\n onMouseMove,\n onMouseLeave,\n onContextMenu,\n onWheel,\n onKeyDown,\n onKeyUp,\n onFocus,\n onBlur,\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n function mouseEvent(\n e: React.MouseEvent<HTMLDivElement>,\n ): ObservableMouseEvent {\n const rect =\n rootRef.current?.getBoundingClientRect() ??\n ({\n left: 0,\n top: 0,\n } as DOMRect);\n return {\n id,\n button: e.button,\n buttons: e.buttons,\n altKey: e.altKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n ...pointerPosition(e, rect),\n };\n }\n\n function wheelEvent(\n e: React.WheelEvent<HTMLDivElement>,\n ): ObservableWheelEvent {\n const rect =\n rootRef.current?.getBoundingClientRect() ??\n ({\n left: 0,\n top: 0,\n } as DOMRect);\n return {\n id,\n deltaX: e.deltaX,\n deltaY: e.deltaY,\n deltaZ: e.deltaZ,\n ...pointerPosition(e, rect),\n };\n }\n\n function keyEvent(\n e: React.KeyboardEvent<HTMLDivElement>,\n ): ObservableKeyEvent {\n return {\n id,\n key: e.key,\n code: e.code,\n repeat: e.repeat,\n altKey: e.altKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n };\n }\n\n const dataAttrs = data\n ? Object.fromEntries(Object.entries(data).map(([k, v]) => [`data-${k}`, v]))\n : {};\n\n // Only wire up handlers for events that are explicitly enabled.\n const handlers: Record<string, unknown> = {};\n\n if (enable.clicked) {\n handlers.onClick = (e: React.MouseEvent<HTMLDivElement>) =>\n onClicked(mouseEvent(e));\n }\n if (enable.doubleClicked) {\n handlers.onDoubleClick = (e: React.MouseEvent<HTMLDivElement>) =>\n onDoubleClicked(mouseEvent(e));\n }\n if (enable.mouseDown) {\n handlers.onMouseDown = (e: React.MouseEvent<HTMLDivElement>) =>\n onMouseDown(mouseEvent(e));\n }\n if (enable.mouseUp) {\n handlers.onMouseUp = (e: React.MouseEvent<HTMLDivElement>) =>\n onMouseUp(mouseEvent(e));\n }\n if (enable.mouseEnter) {\n handlers.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) =>\n onMouseEnter(mouseEvent(e));\n }\n if (enable.mouseMove) {\n handlers.onMouseMove = (e: React.MouseEvent<HTMLDivElement>) =>\n onMouseMove(mouseEvent(e));\n }\n if (enable.mouseLeave) {\n handlers.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) =>\n onMouseLeave(mouseEvent(e));\n }\n if (enable.contextMenu) {\n handlers.onContextMenu = (e: React.MouseEvent<HTMLDivElement>) =>\n onContextMenu(mouseEvent(e));\n }\n if (enable.wheel) {\n handlers.onWheel = (e: React.WheelEvent<HTMLDivElement>) =>\n onWheel(wheelEvent(e));\n }\n if (enable.keyDown) {\n handlers.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) =>\n onKeyDown(keyEvent(e));\n }\n if (enable.keyUp) {\n handlers.onKeyUp = (e: React.KeyboardEvent<HTMLDivElement>) =>\n onKeyUp(keyEvent(e));\n }\n if (enable.focus) {\n handlers.onFocus = () => onFocus({id});\n }\n if (enable.blur) {\n handlers.onBlur = () => onBlur({id});\n }\n\n // Keyboard events require the element to be focusable.\n const needsTabIndex = Boolean(\n enable.keyDown || enable.keyUp || enable.focus || enable.blur,\n );\n\n return (\n <div\n ref={rootRef}\n className={className}\n style={style as React.CSSProperties}\n data-pihanga={cardName}\n tabIndex={needsTabIndex ? 0 : undefined}\n {...dataAttrs}\n {...handlers}\n >\n {content && <Card cardName={content} parentCard={cardName} />}\n </div>\n );\n};\n"],"mappings":";;;;AAYA,SAAS,EACP,GACA,GAMA;CACA,OAAO;EACL,WAAW,EAAE;EACb,WAAW,EAAE;EACb,WAAW,EAAE,SAAS,EAAK,OAAO,OAAO;EACzC,WAAW,EAAE,SAAS,EAAK,MAAM,OAAO;CAC1C;AACF;AAEA,IAAa,KACX,MACoB;CACpB,IAAM,EACJ,OACA,YACA,YAAS,CAAC,GACV,cACA,UACA,SACA,aACA,cACA,oBACA,gBACA,cACA,iBACA,gBACA,iBACA,kBACA,YACA,cACA,YACA,YACA,cACE,GAEE,IAAU,EAAM,OAAuB,IAAI;CAEjD,SAAS,EACP,GACsB;EACtB,IAAM,IACJ,EAAQ,SAAS,sBAAsB,KACtC;GACC,MAAM;GACN,KAAK;EACP;EACF,OAAO;GACL;GACA,QAAQ,EAAE;GACV,SAAS,EAAE;GACX,QAAQ,EAAE;GACV,SAAS,EAAE;GACX,SAAS,EAAE;GACX,UAAU,EAAE;GACZ,GAAG,EAAgB,GAAG,CAAI;EAC5B;CACF;CAEA,SAAS,EACP,GACsB;EACtB,IAAM,IACJ,EAAQ,SAAS,sBAAsB,KACtC;GACC,MAAM;GACN,KAAK;EACP;EACF,OAAO;GACL;GACA,QAAQ,EAAE;GACV,QAAQ,EAAE;GACV,QAAQ,EAAE;GACV,GAAG,EAAgB,GAAG,CAAI;EAC5B;CACF;CAEA,SAAS,EACP,GACoB;EACpB,OAAO;GACL;GACA,KAAK,EAAE;GACP,MAAM,EAAE;GACR,QAAQ,EAAE;GACV,QAAQ,EAAE;GACV,SAAS,EAAE;GACX,SAAS,EAAE;GACX,UAAU,EAAE;EACd;CACF;CAEA,IAAM,IAAY,IACd,OAAO,YAAY,OAAO,QAAQ,CAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,IACzE,CAAC,GAGC,IAAoC,CAAC;CA0D3C,OAxDI,EAAO,YACT,EAAS,WAAW,MAClB,EAAU,EAAW,CAAC,CAAC,IAEvB,EAAO,kBACT,EAAS,iBAAiB,MACxB,EAAgB,EAAW,CAAC,CAAC,IAE7B,EAAO,cACT,EAAS,eAAe,MACtB,EAAY,EAAW,CAAC,CAAC,IAEzB,EAAO,YACT,EAAS,aAAa,MACpB,EAAU,EAAW,CAAC,CAAC,IAEvB,EAAO,eACT,EAAS,gBAAgB,MACvB,EAAa,EAAW,CAAC,CAAC,IAE1B,EAAO,cACT,EAAS,eAAe,MACtB,EAAY,EAAW,CAAC,CAAC,IAEzB,EAAO,eACT,EAAS,gBAAgB,MACvB,EAAa,EAAW,CAAC,CAAC,IAE1B,EAAO,gBACT,EAAS,iBAAiB,MACxB,EAAc,EAAW,CAAC,CAAC,IAE3B,EAAO,UACT,EAAS,WAAW,MAClB,EAAQ,EAAW,CAAC,CAAC,IAErB,EAAO,YACT,EAAS,aAAa,MACpB,EAAU,EAAS,CAAC,CAAC,IAErB,EAAO,UACT,EAAS,WAAW,MAClB,EAAQ,EAAS,CAAC,CAAC,IAEnB,EAAO,UACT,EAAS,gBAAgB,EAAQ,EAAC,MAAE,CAAC,IAEnC,EAAO,SACT,EAAS,eAAe,EAAO,EAAC,MAAE,CAAC,IASnC,kBAAC,OAAD;EACE,KAAK;EACM;EACJ;EACP,gBAAc;EACd,UATF,EAAO,WAAW,EAAO,SAAS,EAAO,SAAS,EAAO,OAS7B,IAAI,KAAA;EAC9B,GAAI;EACJ,GAAI;YAEH,KAAW,kBAAC,GAAD;GAAM,UAAU;GAAS,YAAY;EAAW,CAAA;CACzD,CAAA;AAET"}
@@ -0,0 +1,253 @@
1
+ import { PiCardRef } from '@pihanga2/core';
2
+ export declare const OBSERVABLE_CARD = "shad/observable";
3
+ export declare const Observable: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<ObservableProps<object>, S, ObservableEvents>) => import('@pihanga2/core').PiCardDef;
4
+ export declare const OBSERVABLE_ACTION: {
5
+ CLICKED: string;
6
+ BLUR: string;
7
+ FOCUS: string;
8
+ WHEEL: string;
9
+ DOUBLE_CLICKED: string;
10
+ MOUSE_DOWN: string;
11
+ MOUSE_UP: string;
12
+ MOUSE_ENTER: string;
13
+ MOUSE_MOVE: string;
14
+ MOUSE_LEAVE: string;
15
+ CONTEXT_MENU: string;
16
+ KEY_DOWN: string;
17
+ KEY_UP: string;
18
+ };
19
+ export declare const onObservableClicked: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
20
+ cardID: string;
21
+ } & ObservablePointerPosition & {
22
+ id?: string;
23
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
24
+ button?: number;
25
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
26
+ buttons?: number;
27
+ altKey: boolean;
28
+ ctrlKey: boolean;
29
+ metaKey: boolean;
30
+ shiftKey: boolean;
31
+ }>) => void;
32
+ export declare const onObservableDoubleClicked: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
33
+ cardID: string;
34
+ } & ObservablePointerPosition & {
35
+ id?: string;
36
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
37
+ button?: number;
38
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
39
+ buttons?: number;
40
+ altKey: boolean;
41
+ ctrlKey: boolean;
42
+ metaKey: boolean;
43
+ shiftKey: boolean;
44
+ }>) => void;
45
+ export declare const onObservableMouseDown: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
46
+ cardID: string;
47
+ } & ObservablePointerPosition & {
48
+ id?: string;
49
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
50
+ button?: number;
51
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
52
+ buttons?: number;
53
+ altKey: boolean;
54
+ ctrlKey: boolean;
55
+ metaKey: boolean;
56
+ shiftKey: boolean;
57
+ }>) => void;
58
+ export declare const onObservableMouseUp: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
59
+ cardID: string;
60
+ } & ObservablePointerPosition & {
61
+ id?: string;
62
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
63
+ button?: number;
64
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
65
+ buttons?: number;
66
+ altKey: boolean;
67
+ ctrlKey: boolean;
68
+ metaKey: boolean;
69
+ shiftKey: boolean;
70
+ }>) => void;
71
+ export declare const onObservableMouseEnter: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
72
+ cardID: string;
73
+ } & ObservablePointerPosition & {
74
+ id?: string;
75
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
76
+ button?: number;
77
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
78
+ buttons?: number;
79
+ altKey: boolean;
80
+ ctrlKey: boolean;
81
+ metaKey: boolean;
82
+ shiftKey: boolean;
83
+ }>) => void;
84
+ export declare const onObservableMouseMove: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
85
+ cardID: string;
86
+ } & ObservablePointerPosition & {
87
+ id?: string;
88
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
89
+ button?: number;
90
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
91
+ buttons?: number;
92
+ altKey: boolean;
93
+ ctrlKey: boolean;
94
+ metaKey: boolean;
95
+ shiftKey: boolean;
96
+ }>) => void;
97
+ export declare const onObservableMouseLeave: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
98
+ cardID: string;
99
+ } & ObservablePointerPosition & {
100
+ id?: string;
101
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
102
+ button?: number;
103
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
104
+ buttons?: number;
105
+ altKey: boolean;
106
+ ctrlKey: boolean;
107
+ metaKey: boolean;
108
+ shiftKey: boolean;
109
+ }>) => void;
110
+ export declare const onObservableContextMenu: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
111
+ cardID: string;
112
+ } & ObservablePointerPosition & {
113
+ id?: string;
114
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
115
+ button?: number;
116
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
117
+ buttons?: number;
118
+ altKey: boolean;
119
+ ctrlKey: boolean;
120
+ metaKey: boolean;
121
+ shiftKey: boolean;
122
+ }>) => void;
123
+ export declare const onObservableWheel: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
124
+ cardID: string;
125
+ } & ObservablePointerPosition & {
126
+ id?: string;
127
+ deltaX: number;
128
+ deltaY: number;
129
+ deltaZ: number;
130
+ }>) => void;
131
+ export declare const onObservableKeyDown: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
132
+ cardID: string;
133
+ } & ObservableKeyEvent>) => void;
134
+ export declare const onObservableKeyUp: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
135
+ cardID: string;
136
+ } & ObservableKeyEvent>) => void;
137
+ export declare const onObservableFocus: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
138
+ cardID: string;
139
+ } & ObservableFocusEvent>) => void;
140
+ export declare const onObservableBlur: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
141
+ cardID: string;
142
+ } & ObservableFocusEvent>) => void;
143
+ /**
144
+ * Flags to selectively enable interaction events on the `Observable` card.
145
+ *
146
+ * An event is only wired up (listened for on the DOM) **and** reported (its
147
+ * `onXxx` callback fired) when its corresponding flag is `true`. Disabled
148
+ * events incur zero overhead — no listener is even attached.
149
+ */
150
+ export type ObservableEnabledEvents = {
151
+ /** Single click. */
152
+ clicked?: boolean;
153
+ /** Double click. */
154
+ doubleClicked?: boolean;
155
+ /** Mouse button pressed down. */
156
+ mouseDown?: boolean;
157
+ /** Mouse button released. */
158
+ mouseUp?: boolean;
159
+ /** Pointer entered the bounding box. */
160
+ mouseEnter?: boolean;
161
+ /** Pointer moved while inside the bounding box. */
162
+ mouseMove?: boolean;
163
+ /** Pointer left the bounding box. */
164
+ mouseLeave?: boolean;
165
+ /** Right-click / context-menu request. */
166
+ contextMenu?: boolean;
167
+ /** Mouse wheel / trackpad scroll. */
168
+ wheel?: boolean;
169
+ /** Key pressed down (requires the root to be focused). */
170
+ keyDown?: boolean;
171
+ /** Key released (requires the root to be focused). */
172
+ keyUp?: boolean;
173
+ /** Root element gained focus. */
174
+ focus?: boolean;
175
+ /** Root element lost focus. */
176
+ blur?: boolean;
177
+ };
178
+ export type ObservableProps<S = object> = {
179
+ /** Optional caller-defined id, echoed back in every emitted event. */
180
+ id?: string;
181
+ /** Single child card rendered inside the transparent wrapper `<div>`. */
182
+ content?: PiCardRef;
183
+ /**
184
+ * Selectively enable which interaction events are captured and reported.
185
+ * Any event not set to `true` here is neither listened for nor emitted.
186
+ */
187
+ enable?: ObservableEnabledEvents;
188
+ /** Additional Tailwind / CSS utility classes for the wrapper `<div>`. */
189
+ className?: string;
190
+ /** Inline style object for the wrapper `<div>`. */
191
+ style?: S;
192
+ /** Arbitrary data attributes rendered as `data-{key}={value}` on the root element */
193
+ data?: Record<string, string>;
194
+ };
195
+ /**
196
+ * Pointer position reported by every mouse/wheel event.
197
+ *
198
+ * - `absoluteX` / `absoluteY` — relative to the top-left of the **page**
199
+ * (i.e. `event.pageX` / `event.pageY`; includes scroll offset).
200
+ * - `relativeX` / `relativeY` — relative to the top-left of the
201
+ * `Observable` card's own bounding box.
202
+ */
203
+ export type ObservablePointerPosition = {
204
+ absoluteX: number;
205
+ absoluteY: number;
206
+ relativeX: number;
207
+ relativeY: number;
208
+ };
209
+ export type ObservableMouseEvent = ObservablePointerPosition & {
210
+ id?: string;
211
+ /** Mouse button that triggered the event (`MouseEvent.button`). */
212
+ button?: number;
213
+ /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */
214
+ buttons?: number;
215
+ altKey: boolean;
216
+ ctrlKey: boolean;
217
+ metaKey: boolean;
218
+ shiftKey: boolean;
219
+ };
220
+ export type ObservableWheelEvent = ObservablePointerPosition & {
221
+ id?: string;
222
+ deltaX: number;
223
+ deltaY: number;
224
+ deltaZ: number;
225
+ };
226
+ export type ObservableKeyEvent = {
227
+ id?: string;
228
+ key: string;
229
+ code: string;
230
+ repeat: boolean;
231
+ altKey: boolean;
232
+ ctrlKey: boolean;
233
+ metaKey: boolean;
234
+ shiftKey: boolean;
235
+ };
236
+ export type ObservableFocusEvent = {
237
+ id?: string;
238
+ };
239
+ export type ObservableEvents = {
240
+ onClicked: ObservableMouseEvent;
241
+ onDoubleClicked: ObservableMouseEvent;
242
+ onMouseDown: ObservableMouseEvent;
243
+ onMouseUp: ObservableMouseEvent;
244
+ onMouseEnter: ObservableMouseEvent;
245
+ onMouseMove: ObservableMouseEvent;
246
+ onMouseLeave: ObservableMouseEvent;
247
+ onContextMenu: ObservableMouseEvent;
248
+ onWheel: ObservableWheelEvent;
249
+ onKeyDown: ObservableKeyEvent;
250
+ onKeyUp: ObservableKeyEvent;
251
+ onFocus: ObservableFocusEvent;
252
+ onBlur: ObservableFocusEvent;
253
+ };
@@ -0,0 +1,21 @@
1
+ import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
2
+ //#region src/cards/observable/observable.types.ts
3
+ var r = "shad/observable", i = e(r), a = n(r, [
4
+ "clicked",
5
+ "double_clicked",
6
+ "mouse_down",
7
+ "mouse_up",
8
+ "mouse_enter",
9
+ "mouse_move",
10
+ "mouse_leave",
11
+ "context_menu",
12
+ "wheel",
13
+ "key_down",
14
+ "key_up",
15
+ "focus",
16
+ "blur"
17
+ ]), o = t(a.CLICKED), s = t(a.DOUBLE_CLICKED), c = t(a.MOUSE_DOWN), l = t(a.MOUSE_UP), u = t(a.MOUSE_ENTER), d = t(a.MOUSE_MOVE), f = t(a.MOUSE_LEAVE), p = t(a.CONTEXT_MENU), m = t(a.WHEEL), h = t(a.KEY_DOWN), g = t(a.KEY_UP), _ = t(a.FOCUS), v = t(a.BLUR);
18
+ //#endregion
19
+ export { a as OBSERVABLE_ACTION, r as OBSERVABLE_CARD, i as Observable, v as onObservableBlur, o as onObservableClicked, p as onObservableContextMenu, s as onObservableDoubleClicked, _ as onObservableFocus, h as onObservableKeyDown, g as onObservableKeyUp, c as onObservableMouseDown, u as onObservableMouseEnter, f as onObservableMouseLeave, d as onObservableMouseMove, l as onObservableMouseUp, m as onObservableWheel };
20
+
21
+ //# sourceMappingURL=observable.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observable.types.js","names":[],"sources":["../../../src/cards/observable/observable.types.ts"],"sourcesContent":["import {\n type PiCardRef,\n createCardDeclaration,\n createOnAction,\n registerActions,\n} from \"@pihanga2/core\";\n\nexport const OBSERVABLE_CARD = \"shad/observable\";\n\nexport const Observable = createCardDeclaration<\n ObservableProps,\n ObservableEvents\n>(OBSERVABLE_CARD);\n\n// ---------------------------------------------------------------------------\n// Actions\n// ---------------------------------------------------------------------------\n\nexport const OBSERVABLE_ACTION = registerActions(OBSERVABLE_CARD, [\n \"clicked\",\n \"double_clicked\",\n \"mouse_down\",\n \"mouse_up\",\n \"mouse_enter\",\n \"mouse_move\",\n \"mouse_leave\",\n \"context_menu\",\n \"wheel\",\n \"key_down\",\n \"key_up\",\n \"focus\",\n \"blur\",\n]);\n\nexport const onObservableClicked = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.CLICKED,\n);\nexport const onObservableDoubleClicked = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.DOUBLE_CLICKED,\n);\nexport const onObservableMouseDown = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.MOUSE_DOWN,\n);\nexport const onObservableMouseUp = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.MOUSE_UP,\n);\nexport const onObservableMouseEnter = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.MOUSE_ENTER,\n);\nexport const onObservableMouseMove = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.MOUSE_MOVE,\n);\nexport const onObservableMouseLeave = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.MOUSE_LEAVE,\n);\nexport const onObservableContextMenu = createOnAction<ObservableMouseEvent>(\n OBSERVABLE_ACTION.CONTEXT_MENU,\n);\nexport const onObservableWheel = createOnAction<ObservableWheelEvent>(\n OBSERVABLE_ACTION.WHEEL,\n);\nexport const onObservableKeyDown = createOnAction<ObservableKeyEvent>(\n OBSERVABLE_ACTION.KEY_DOWN,\n);\nexport const onObservableKeyUp = createOnAction<ObservableKeyEvent>(\n OBSERVABLE_ACTION.KEY_UP,\n);\nexport const onObservableFocus = createOnAction<ObservableFocusEvent>(\n OBSERVABLE_ACTION.FOCUS,\n);\nexport const onObservableBlur = createOnAction<ObservableFocusEvent>(\n OBSERVABLE_ACTION.BLUR,\n);\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\n/**\n * Flags to selectively enable interaction events on the `Observable` card.\n *\n * An event is only wired up (listened for on the DOM) **and** reported (its\n * `onXxx` callback fired) when its corresponding flag is `true`. Disabled\n * events incur zero overhead — no listener is even attached.\n */\nexport type ObservableEnabledEvents = {\n /** Single click. */\n clicked?: boolean;\n /** Double click. */\n doubleClicked?: boolean;\n /** Mouse button pressed down. */\n mouseDown?: boolean;\n /** Mouse button released. */\n mouseUp?: boolean;\n /** Pointer entered the bounding box. */\n mouseEnter?: boolean;\n /** Pointer moved while inside the bounding box. */\n mouseMove?: boolean;\n /** Pointer left the bounding box. */\n mouseLeave?: boolean;\n /** Right-click / context-menu request. */\n contextMenu?: boolean;\n /** Mouse wheel / trackpad scroll. */\n wheel?: boolean;\n /** Key pressed down (requires the root to be focused). */\n keyDown?: boolean;\n /** Key released (requires the root to be focused). */\n keyUp?: boolean;\n /** Root element gained focus. */\n focus?: boolean;\n /** Root element lost focus. */\n blur?: boolean;\n};\n\nexport type ObservableProps<S = object> = {\n /** Optional caller-defined id, echoed back in every emitted event. */\n id?: string;\n\n /** Single child card rendered inside the transparent wrapper `<div>`. */\n content?: PiCardRef;\n\n /**\n * Selectively enable which interaction events are captured and reported.\n * Any event not set to `true` here is neither listened for nor emitted.\n */\n enable?: ObservableEnabledEvents;\n\n /** Additional Tailwind / CSS utility classes for the wrapper `<div>`. */\n className?: string;\n /** Inline style object for the wrapper `<div>`. */\n style?: S;\n\n /** Arbitrary data attributes rendered as `data-{key}={value}` on the root element */\n data?: Record<string, string>;\n};\n\n// ---------------------------------------------------------------------------\n// Event payloads\n// ---------------------------------------------------------------------------\n\n/**\n * Pointer position reported by every mouse/wheel event.\n *\n * - `absoluteX` / `absoluteY` — relative to the top-left of the **page**\n * (i.e. `event.pageX` / `event.pageY`; includes scroll offset).\n * - `relativeX` / `relativeY` — relative to the top-left of the\n * `Observable` card's own bounding box.\n */\nexport type ObservablePointerPosition = {\n absoluteX: number;\n absoluteY: number;\n relativeX: number;\n relativeY: number;\n};\n\nexport type ObservableMouseEvent = ObservablePointerPosition & {\n id?: string;\n /** Mouse button that triggered the event (`MouseEvent.button`). */\n button?: number;\n /** Bitmask of currently-pressed buttons (`MouseEvent.buttons`). */\n buttons?: number;\n altKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n shiftKey: boolean;\n};\n\nexport type ObservableWheelEvent = ObservablePointerPosition & {\n id?: string;\n deltaX: number;\n deltaY: number;\n deltaZ: number;\n};\n\nexport type ObservableKeyEvent = {\n id?: string;\n key: string;\n code: string;\n repeat: boolean;\n altKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n shiftKey: boolean;\n};\n\nexport type ObservableFocusEvent = {\n id?: string;\n};\n\nexport type ObservableEvents = {\n onClicked: ObservableMouseEvent;\n onDoubleClicked: ObservableMouseEvent;\n onMouseDown: ObservableMouseEvent;\n onMouseUp: ObservableMouseEvent;\n onMouseEnter: ObservableMouseEvent;\n onMouseMove: ObservableMouseEvent;\n onMouseLeave: ObservableMouseEvent;\n onContextMenu: ObservableMouseEvent;\n onWheel: ObservableWheelEvent;\n onKeyDown: ObservableKeyEvent;\n onKeyUp: ObservableKeyEvent;\n onFocus: ObservableFocusEvent;\n onBlur: ObservableFocusEvent;\n};\n"],"mappings":";;AAOA,IAAa,IAAkB,mBAElB,IAAa,EAGxB,CAAe,GAMJ,IAAoB,EAAgB,GAAiB;CAChE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,GAEY,IAAsB,EACjC,EAAkB,OACpB,GACa,IAA4B,EACvC,EAAkB,cACpB,GACa,IAAwB,EACnC,EAAkB,UACpB,GACa,IAAsB,EACjC,EAAkB,QACpB,GACa,IAAyB,EACpC,EAAkB,WACpB,GACa,IAAwB,EACnC,EAAkB,UACpB,GACa,IAAyB,EACpC,EAAkB,WACpB,GACa,IAA0B,EACrC,EAAkB,YACpB,GACa,IAAoB,EAC/B,EAAkB,KACpB,GACa,IAAsB,EACjC,EAAkB,QACpB,GACa,IAAoB,EAC/B,EAAkB,MACpB,GACa,IAAoB,EAC/B,EAAkB,KACpB,GACa,IAAmB,EAC9B,EAAkB,IACpB"}
@@ -5,7 +5,7 @@ export declare const PageWithNavbar: <S extends import('@pihanga2/core').ReduxSt
5
5
  export declare const PAGE_WITH_NAVBAR_ACTION: {
6
6
  NAVIGATE_TO: string;
7
7
  };
8
- export declare const onPageWithNavbarNavigateTo: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
+ export declare const onPageWithNavbarNavigateTo: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
9
  cardID: string;
10
10
  } & PageWithNavbarNavigateToEvent>) => void;
11
11
  /**
@@ -7,7 +7,7 @@ export declare const PageWithNavbarMeta: <S extends import('@pihanga2/core').Red
7
7
  export declare const PAGE_WITH_NAVBAR_META_ACTION: {
8
8
  NAVIGATE_TO: string;
9
9
  };
10
- export declare const onPageWithNavbarMetaNavigateTo: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
10
+ export declare const onPageWithNavbarMetaNavigateTo: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
11
11
  cardID: string;
12
12
  } & PageWithNavbarMetaNavigateToEvent>) => void;
13
13
  export type NavLink = {
@@ -4,10 +4,10 @@ export declare const PASTE_TARGET_ACTION: {
4
4
  ERROR: string;
5
5
  PASTED_CONTENT: string;
6
6
  };
7
- export declare const onContentPasted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
7
+ export declare const onContentPasted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
8
  cardID: string;
9
9
  } & CloseEvent>) => void;
10
- export declare const onPasteError: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
10
+ export declare const onPasteError: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
11
11
  cardID: string;
12
12
  } & PasteTargetErrorEvent>) => void;
13
13
  export declare const DEF_HEIGHT = "120px";
@@ -5,10 +5,10 @@ export declare const SCROLLBAR_WITH_ANNOTATIONS_ACTION: {
5
5
  ANNOTATION_CLICKED: string;
6
6
  ANNOTATION_HOVERED: string;
7
7
  };
8
- export declare const onScrollbarAnnotationClicked: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
+ export declare const onScrollbarAnnotationClicked: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
9
  cardID: string;
10
10
  } & AnnotationClickedEvent>) => void;
11
- export declare const onScrollbarAnnotationHovered: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
11
+ export declare const onScrollbarAnnotationHovered: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
12
  cardID: string;
13
13
  } & AnnotationHoveredEvent>) => void;
14
14
  /**
@@ -5,25 +5,25 @@ export declare const PI_SELECT_ACTION: {
5
5
  CLOSED: string;
6
6
  OPENED: string;
7
7
  };
8
- export declare const onSelectChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
+ export declare const onSelectChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
9
  cardID: string;
10
10
  } & PiSelectChangedEvent>) => void;
11
11
  /** @deprecated Use `onSelectChanged` instead. */
12
- export declare const onPiSelectChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
+ export declare const onPiSelectChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
13
13
  cardID: string;
14
14
  } & PiSelectChangedEvent>) => void;
15
- export declare const onSelectOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
15
+ export declare const onSelectOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
16
16
  cardID: string;
17
17
  } & PiSelectOpenedEvent>) => void;
18
18
  /** @deprecated Use `onSelectOpened` instead. */
19
- export declare const onPiSelectOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
19
+ export declare const onPiSelectOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
20
20
  cardID: string;
21
21
  } & PiSelectOpenedEvent>) => void;
22
- export declare const onSelectClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
22
+ export declare const onSelectClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
23
23
  cardID: string;
24
24
  } & PiSelectClosedEvent>) => void;
25
25
  /** @deprecated Use `onSelectClosed` instead. */
26
- export declare const onPiSelectClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
26
+ export declare const onPiSelectClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
27
27
  cardID: string;
28
28
  } & PiSelectClosedEvent>) => void;
29
29
  export type PiSelectOption = {
@@ -6,13 +6,13 @@ export declare const PI_SHEET_ACTION: {
6
6
  OPENED: string;
7
7
  OPEN_CHANGED: string;
8
8
  };
9
- export declare const onSheetOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
+ export declare const onSheetOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
10
10
  cardID: string;
11
11
  } & SheetOpenedEvent>) => void;
12
- export declare const onSheetClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
+ export declare const onSheetClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
13
13
  cardID: string;
14
14
  } & SheetClosedEvent>) => void;
15
- export declare const onSheetOpenChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
15
+ export declare const onSheetOpenChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
16
16
  cardID: string;
17
17
  } & SheetOpenChangedEvent>) => void;
18
18
  export type PiSheetProps = {
@@ -4,11 +4,11 @@ export declare const PI_SLIDER_ACTION: {
4
4
  CHANGED: string;
5
5
  COMMITTED: string;
6
6
  };
7
- export declare const onSliderChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
7
+ export declare const onSliderChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
8
  cardID: string;
9
9
  } & PiSliderChangedEvent>) => void;
10
10
  /** @deprecated Use `onSliderChanged` instead. */
11
- export declare const onPiSliderChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
11
+ export declare const onPiSliderChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
12
  cardID: string;
13
13
  } & PiSliderChangedEvent>) => void;
14
14
  /**
@@ -17,11 +17,11 @@ export declare const onPiSliderChanged: <S extends import('@pihanga2/core').Redu
17
17
  * Use this instead of `onSliderChanged` when you only care about the final
18
18
  * settled value and do not want to process every intermediate drag position.
19
19
  */
20
- export declare const onSliderCommitted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
20
+ export declare const onSliderCommitted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
21
21
  cardID: string;
22
22
  } & PiSliderCommittedEvent>) => void;
23
23
  /** @deprecated Use `onSliderCommitted` instead. */
24
- export declare const onPiSliderCommitted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
24
+ export declare const onPiSliderCommitted: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core/types').PiRegisterMinimal, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
25
25
  cardID: string;
26
26
  } & PiSliderCommittedEvent>) => void;
27
27
  export type PiSliderProps = {