@k2b/ui 0.5.1 → 0.6.1

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 (48) hide show
  1. package/dist/browser/actions/Button.js +11 -2
  2. package/dist/browser/actions/Button.js.map +1 -1
  3. package/dist/browser/actions/SplitButton.js.map +1 -1
  4. package/dist/browser/actions/index.js.map +1 -1
  5. package/dist/browser/content/ZoomPanViewport.js +396 -0
  6. package/dist/browser/content/ZoomPanViewport.js.map +1 -0
  7. package/dist/browser/content/index.js +1 -0
  8. package/dist/browser/content/index.js.map +1 -1
  9. package/dist/browser/content/zoom-pan.js +54 -0
  10. package/dist/browser/content/zoom-pan.js.map +1 -0
  11. package/dist/browser/feedback/prompts.js.map +1 -1
  12. package/dist/browser/feedback/toast.js +9 -5
  13. package/dist/browser/feedback/toast.js.map +1 -1
  14. package/dist/browser/inputs/TextInput.js +2 -1
  15. package/dist/browser/inputs/TextInput.js.map +1 -1
  16. package/dist/browser/intl/messages.js +6 -0
  17. package/dist/browser/intl/messages.js.map +1 -1
  18. package/dist/browser/layout/PullToRefresh.js +8 -7
  19. package/dist/browser/layout/PullToRefresh.js.map +1 -1
  20. package/dist/ssr/actions/Button.js +11 -2
  21. package/dist/ssr/actions/Button.js.map +1 -1
  22. package/dist/ssr/actions/SplitButton.js.map +1 -1
  23. package/dist/ssr/actions/index.js.map +1 -1
  24. package/dist/ssr/content/ZoomPanViewport.js +300 -0
  25. package/dist/ssr/content/ZoomPanViewport.js.map +1 -0
  26. package/dist/ssr/content/index.js +1 -0
  27. package/dist/ssr/content/index.js.map +1 -1
  28. package/dist/ssr/content/zoom-pan.js +54 -0
  29. package/dist/ssr/content/zoom-pan.js.map +1 -0
  30. package/dist/ssr/feedback/prompts.js.map +1 -1
  31. package/dist/ssr/feedback/toast.js +9 -5
  32. package/dist/ssr/feedback/toast.js.map +1 -1
  33. package/dist/ssr/inputs/TextInput.js +2 -1
  34. package/dist/ssr/inputs/TextInput.js.map +1 -1
  35. package/dist/ssr/intl/messages.js +6 -0
  36. package/dist/ssr/intl/messages.js.map +1 -1
  37. package/dist/ssr/layout/PullToRefresh.js +1 -1
  38. package/dist/ssr/layout/PullToRefresh.js.map +1 -1
  39. package/dist/styles.css +1 -1
  40. package/dist/types/actions/Button.d.ts +5 -0
  41. package/dist/types/actions/SplitButton.d.ts +1 -1
  42. package/dist/types/actions/index.d.ts +1 -1
  43. package/dist/types/content/ZoomPanViewport.d.ts +33 -0
  44. package/dist/types/content/index.d.ts +2 -0
  45. package/dist/types/content/zoom-pan.d.ts +29 -0
  46. package/dist/types/feedback/prompts.d.ts +2 -1
  47. package/dist/types/intl/messages.d.ts +3 -0
  48. package/package.json +3 -4
@@ -17,7 +17,7 @@ import { Show, splitProps } from "solid-js";
17
17
  import { Tooltip } from "../feedback/Tooltip";
18
18
  const buttonClass = className => ["k2b-button", className].filter(Boolean).join(" ");
19
19
  export function Button(props) {
20
- const [local, rest] = splitProps(props, ["children", "class", "disabled", "loading", "loadingLabel", "ref", "size", "tooltip", "tooltipDelay", "tooltipPlacement", "type", "variant", "wrap"]);
20
+ const [local, rest] = splitProps(props, ["children", "class", "disabled", "loading", "loadingLabel", "ref", "size", "tooltip", "tooltipDelay", "tooltipPlacement", "type", "variant", "wrap", "align"]);
21
21
  let target;
22
22
  const setRef = element => {
23
23
  target = element;
@@ -45,6 +45,9 @@ export function Button(props) {
45
45
  get ["data-wrap"]() {
46
46
  return local.wrap || undefined;
47
47
  },
48
+ get ["data-align"]() {
49
+ return local.align === "start" ? "start" : undefined;
50
+ },
48
51
  get disabled() {
49
52
  return local.disabled || local.loading;
50
53
  },
@@ -98,7 +101,7 @@ export function Button(props) {
98
101
  })];
99
102
  }
100
103
  export function ButtonLink(props) {
101
- const [local, rest] = splitProps(props, ["children", "class", "href", "navigation", "onClick", "onNavigate", "replace", "ref", "scroll", "size", "tooltip", "tooltipDelay", "tooltipPlacement", "variant", "wrap"]);
104
+ const [local, rest] = splitProps(props, ["children", "class", "href", "navigation", "onClick", "onNavigate", "replace", "ref", "scroll", "size", "tooltip", "tooltipDelay", "tooltipPlacement", "variant", "wrap", "align"]);
102
105
  let target;
103
106
  const setRef = element => {
104
107
  target = element;
@@ -145,6 +148,9 @@ export function ButtonLink(props) {
145
148
  get ["data-wrap"]() {
146
149
  return local.wrap || undefined;
147
150
  },
151
+ get ["data-align"]() {
152
+ return local.align === "start" ? "start" : undefined;
153
+ },
148
154
  get onClick() {
149
155
  return local.onClick;
150
156
  },
@@ -177,6 +183,9 @@ export function ButtonLink(props) {
177
183
  get ["data-wrap"]() {
178
184
  return local.wrap || undefined;
179
185
  },
186
+ get ["data-align"]() {
187
+ return local.align === "start" ? "start" : undefined;
188
+ },
180
189
  get onClick() {
181
190
  return local.onClick;
182
191
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["actions/Button.tsx"],"sourcesContent":["import { Link, type LinkNavigateEvent, type NavigationScrollMode } from \"@k2b/ssr/nav\";\nimport { type JSX, Show, splitProps } from \"solid-js\";\nimport { Tooltip, type TooltipPlacement } from \"../feedback/Tooltip\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"text\" | \"subtle\" | \"input\" | \"warning\" | \"danger\" | \"success\" | \"ai\";\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\nexport type ButtonProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & {\n /** Allow a deliberately long or rich label to wrap. Defaults to false. */\n wrap?: boolean;\n loading?: boolean;\n loadingLabel?: string;\n size?: ButtonSize;\n variant?: ButtonVariant;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n};\n\nexport type ButtonLinkProps = Omit<JSX.AnchorHTMLAttributes<HTMLAnchorElement>, \"onClick\"> & {\n /** Allow a deliberately long or rich label to wrap. Defaults to false. */\n wrap?: boolean;\n navigation?: \"document\" | \"enhanced\";\n onClick?: JSX.EventHandlerUnion<HTMLAnchorElement, MouseEvent>;\n onNavigate?: (event: LinkNavigateEvent) => void | Promise<void>;\n replace?: boolean;\n scroll?: NavigationScrollMode;\n size?: ButtonSize;\n variant?: ButtonVariant;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n};\n\nconst buttonClass = (className?: string): string => [\"k2b-button\", className].filter(Boolean).join(\" \");\n\nexport function Button(props: ButtonProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"children\",\n \"class\",\n \"disabled\",\n \"loading\",\n \"loadingLabel\",\n \"ref\",\n \"size\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"type\",\n \"variant\",\n \"wrap\",\n ]);\n let target: HTMLButtonElement | undefined;\n const setRef = (element: HTMLButtonElement) => {\n target = element;\n if (typeof local.ref === \"function\") local.ref(element);\n };\n\n const control = (\n <button\n {...rest}\n ref={setRef}\n type={local.type ?? \"button\"}\n class={buttonClass(local.class)}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n disabled={local.disabled || local.loading}\n aria-busy={local.loading ? \"true\" : undefined}\n >\n <Show when={local.loading}>\n <i class=\"ti ti-loader-2 k2b-spin\" aria-hidden=\"true\" />\n </Show>\n <span class=\"k2b-button__label\">\n <Show when={local.loading && local.loadingLabel} fallback={local.children}>\n {local.loadingLabel}\n </Show>\n </span>\n </button>\n );\n\n return (\n <>\n {control}\n <Show when={local.tooltip !== false && local.tooltip !== undefined}>\n <Tooltip\n content={local.tooltip as JSX.Element}\n target={() => target}\n delay={local.tooltipDelay}\n disabled={local.disabled || local.loading}\n placement={local.tooltipPlacement}\n />\n </Show>\n </>\n );\n}\n\nexport function ButtonLink(props: ButtonLinkProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"children\",\n \"class\",\n \"href\",\n \"navigation\",\n \"onClick\",\n \"onNavigate\",\n \"replace\",\n \"ref\",\n \"scroll\",\n \"size\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"variant\",\n \"wrap\",\n ]);\n let target: HTMLAnchorElement | undefined;\n const setRef = (element: HTMLAnchorElement) => {\n target = element;\n if (typeof local.ref === \"function\") local.ref(element);\n };\n const className = buttonClass(local.class);\n const content = <span class=\"k2b-button__label\">{local.children}</span>;\n\n const tooltip = () => (\n <Show when={local.tooltip !== false && local.tooltip !== undefined}>\n <Tooltip content={local.tooltip as JSX.Element} target={() => target} delay={local.tooltipDelay} placement={local.tooltipPlacement} />\n </Show>\n );\n\n if (local.navigation === \"enhanced\" && local.href && local.onNavigate) {\n return (\n <>\n <Link\n {...rest}\n ref={setRef}\n href={local.href}\n class={className}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n onClick={local.onClick}\n onNavigate={local.onNavigate}\n replace={local.replace}\n scroll={local.scroll}\n >\n {content}\n </Link>\n {tooltip()}\n </>\n );\n }\n\n return (\n <>\n <a\n {...rest}\n ref={setRef}\n href={local.href}\n class={className}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n onClick={local.onClick}\n >\n {content}\n </a>\n {tooltip()}\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"children\"> & {\n children: JSX.Element;\n label: string;\n};\n\nexport type IconButtonLinkProps = Omit<ButtonLinkProps, \"children\"> & {\n children: JSX.Element;\n label: string;\n};\n\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"children\", \"class\", \"label\", \"loading\", \"loadingLabel\", \"tooltip\", \"variant\"]);\n\n return (\n <Button\n {...rest}\n loading={local.loading}\n variant={local.variant ?? \"ghost\"}\n class={`k2b-icon-button ${local.class ?? \"\"}`}\n aria-label={local.loading ? (local.loadingLabel ?? local.label) : local.label}\n title={rest.title ?? (local.tooltip === undefined ? local.label : undefined)}\n tooltip={local.tooltip}\n >\n <Show when={!local.loading}>{local.children}</Show>\n </Button>\n );\n}\n\nexport function IconButtonLink(props: IconButtonLinkProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"children\", \"class\", \"label\", \"tooltip\", \"variant\"]);\n\n return (\n <ButtonLink\n {...rest}\n variant={local.variant ?? \"ghost\"}\n class={`k2b-icon-button ${local.class ?? \"\"}`}\n aria-label={local.label}\n title={rest.title ?? (local.tooltip === undefined ? local.label : undefined)}\n tooltip={local.tooltip}\n >\n {local.children}\n </ButtonLink>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,IAAI,QAA2D,cAAc;AACtF,SAAmB,IAAI,EAAE,UAAU,QAAQ,UAAU;AACrD,SAAS,OAAO,QAA+B,qBAAqB;AAgCpE,MAAM,WAAW,GAAI,SAAkB,IAAa,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAEvG,OAAO,SAAS,MAAM,CAAC,KAAkB,EAAe;EACtD,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CACtC,UAAU,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,cAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,MAAM,CACP,CAAC;EACF,IAAI,MAAqC;EACzC,MAAM,MAAM,GAAI,OAA0B,IAAK;IAC7C,MAAM,GAAG,OAAO;IAChB,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;EACzD,CAAC;EAED,MAAM,OAAO;IAAA;MAAA;MAAA;MAAA;IAAA,MAGJ,MAAM;IAAA,4BADP,IAAI;MAAA,IAER,IAAI;QAAA,OAAE,KAAK,CAAC,IAAI,IAAI,QAAQ;MAAA;MAAA;QAAA,OACrB,WAAW,CAAC,KAAK,CAAC,KAAK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C7E,KAAK;MAAA,OAAE,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAAA;IAAA,IAC5E,OAAO;MAAA,OAAE,KAAK,CAAC,OAAO;IAAA;IAAA;MAAA,yBAErB,IAAI;QAAA,IAAC,IAAI;UAAA,OAAE,CAAC,KAAK,CAAC,OAAO;QAAA;QAAA;UAAA,OAAG,KAAK,CAAC,QAAQ;QAAA;MAAA;IAAA;EAAA;AAGjD;AAEA,OAAO,SAAS,cAAc,CAAC,KAA0B,EAAe;EACtE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;EAE7F,yBACG,UAAU,eACL,IAAI;IAAA,IACR,OAAO;MAAA,OAAE,KAAK,CAAC,OAAO,IAAI,OAAO;IAAA;IAAA;MAAA,OAC1B,mBAAmB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;IAAA;IAAA;MAAA,OACjC,KAAK,CAAC,KAAK;IAAA;IAAA,IACvB,KAAK;MAAA,OAAE,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAAA;IAAA,IAC5E,OAAO;MAAA,OAAE,KAAK,CAAC,OAAO;IAAA;IAAA;MAAA,OAErB,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGrB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["actions/Button.tsx"],"sourcesContent":["import { Link, type LinkNavigateEvent, type NavigationScrollMode } from \"@k2b/ssr/nav\";\nimport { type JSX, Show, splitProps } from \"solid-js\";\nimport { Tooltip, type TooltipPlacement } from \"../feedback/Tooltip\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"text\" | \"subtle\" | \"input\" | \"warning\" | \"danger\" | \"success\" | \"ai\";\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\nexport type ButtonAlign = \"center\" | \"start\";\n\nexport type ButtonProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & {\n /** Allow a deliberately long or rich label to wrap. Defaults to false. */\n wrap?: boolean;\n /** Start-align the content and let the label fill the button, for full-width rows. Defaults to `\"center\"`. */\n align?: ButtonAlign;\n loading?: boolean;\n loadingLabel?: string;\n size?: ButtonSize;\n variant?: ButtonVariant;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n};\n\nexport type ButtonLinkProps = Omit<JSX.AnchorHTMLAttributes<HTMLAnchorElement>, \"onClick\"> & {\n /** Allow a deliberately long or rich label to wrap. Defaults to false. */\n wrap?: boolean;\n /** Start-align the content and let the label fill the button, for full-width rows. Defaults to `\"center\"`. */\n align?: ButtonAlign;\n navigation?: \"document\" | \"enhanced\";\n onClick?: JSX.EventHandlerUnion<HTMLAnchorElement, MouseEvent>;\n onNavigate?: (event: LinkNavigateEvent) => void | Promise<void>;\n replace?: boolean;\n scroll?: NavigationScrollMode;\n size?: ButtonSize;\n variant?: ButtonVariant;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n};\n\nconst buttonClass = (className?: string): string => [\"k2b-button\", className].filter(Boolean).join(\" \");\n\nexport function Button(props: ButtonProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"children\",\n \"class\",\n \"disabled\",\n \"loading\",\n \"loadingLabel\",\n \"ref\",\n \"size\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"type\",\n \"variant\",\n \"wrap\",\n \"align\",\n ]);\n let target: HTMLButtonElement | undefined;\n const setRef = (element: HTMLButtonElement) => {\n target = element;\n if (typeof local.ref === \"function\") local.ref(element);\n };\n\n const control = (\n <button\n {...rest}\n ref={setRef}\n type={local.type ?? \"button\"}\n class={buttonClass(local.class)}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n data-align={local.align === \"start\" ? \"start\" : undefined}\n disabled={local.disabled || local.loading}\n aria-busy={local.loading ? \"true\" : undefined}\n >\n <Show when={local.loading}>\n <i class=\"ti ti-loader-2 k2b-spin\" aria-hidden=\"true\" />\n </Show>\n <span class=\"k2b-button__label\">\n <Show when={local.loading && local.loadingLabel} fallback={local.children}>\n {local.loadingLabel}\n </Show>\n </span>\n </button>\n );\n\n return (\n <>\n {control}\n <Show when={local.tooltip !== false && local.tooltip !== undefined}>\n <Tooltip\n content={local.tooltip as JSX.Element}\n target={() => target}\n delay={local.tooltipDelay}\n disabled={local.disabled || local.loading}\n placement={local.tooltipPlacement}\n />\n </Show>\n </>\n );\n}\n\nexport function ButtonLink(props: ButtonLinkProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"children\",\n \"class\",\n \"href\",\n \"navigation\",\n \"onClick\",\n \"onNavigate\",\n \"replace\",\n \"ref\",\n \"scroll\",\n \"size\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"variant\",\n \"wrap\",\n \"align\",\n ]);\n let target: HTMLAnchorElement | undefined;\n const setRef = (element: HTMLAnchorElement) => {\n target = element;\n if (typeof local.ref === \"function\") local.ref(element);\n };\n const className = buttonClass(local.class);\n const content = <span class=\"k2b-button__label\">{local.children}</span>;\n\n const tooltip = () => (\n <Show when={local.tooltip !== false && local.tooltip !== undefined}>\n <Tooltip content={local.tooltip as JSX.Element} target={() => target} delay={local.tooltipDelay} placement={local.tooltipPlacement} />\n </Show>\n );\n\n if (local.navigation === \"enhanced\" && local.href && local.onNavigate) {\n return (\n <>\n <Link\n {...rest}\n ref={setRef}\n href={local.href}\n class={className}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n data-align={local.align === \"start\" ? \"start\" : undefined}\n onClick={local.onClick}\n onNavigate={local.onNavigate}\n replace={local.replace}\n scroll={local.scroll}\n >\n {content}\n </Link>\n {tooltip()}\n </>\n );\n }\n\n return (\n <>\n <a\n {...rest}\n ref={setRef}\n href={local.href}\n class={className}\n data-size={local.size ?? \"md\"}\n data-variant={local.variant ?? \"primary\"}\n data-wrap={local.wrap || undefined}\n data-align={local.align === \"start\" ? \"start\" : undefined}\n onClick={local.onClick}\n >\n {content}\n </a>\n {tooltip()}\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"children\"> & {\n children: JSX.Element;\n label: string;\n};\n\nexport type IconButtonLinkProps = Omit<ButtonLinkProps, \"children\"> & {\n children: JSX.Element;\n label: string;\n};\n\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"children\", \"class\", \"label\", \"loading\", \"loadingLabel\", \"tooltip\", \"variant\"]);\n\n return (\n <Button\n {...rest}\n loading={local.loading}\n variant={local.variant ?? \"ghost\"}\n class={`k2b-icon-button ${local.class ?? \"\"}`}\n aria-label={local.loading ? (local.loadingLabel ?? local.label) : local.label}\n title={rest.title ?? (local.tooltip === undefined ? local.label : undefined)}\n tooltip={local.tooltip}\n >\n <Show when={!local.loading}>{local.children}</Show>\n </Button>\n );\n}\n\nexport function IconButtonLink(props: IconButtonLinkProps): JSX.Element {\n const [local, rest] = splitProps(props, [\"children\", \"class\", \"label\", \"tooltip\", \"variant\"]);\n\n return (\n <ButtonLink\n {...rest}\n variant={local.variant ?? \"ghost\"}\n class={`k2b-icon-button ${local.class ?? \"\"}`}\n aria-label={local.label}\n title={rest.title ?? (local.tooltip === undefined ? local.label : undefined)}\n tooltip={local.tooltip}\n >\n {local.children}\n </ButtonLink>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,IAAI,QAA2D,cAAc;AACtF,SAAmB,IAAI,EAAE,UAAU,QAAQ,UAAU;AACrD,SAAS,OAAO,QAA+B,qBAAqB;AAqCpE,MAAM,WAAW,GAAI,SAAk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OAAE,CAAC,KAAK,CAAC,OAAO;QAAA;QAAA;UAAA,OAAG,KAAK,CAAC,QAAQ;QAAA;MAAA;IAAA;EAAA;AAGjD;AAEA,OAAO,SAAS,cAAc,CAAC,KAA0B,EAAe;EACtE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;EAE7F,yBACG,UAAU,eACL,IAAI;IAAA,IACR,OAAO;MAAA,OAAE,KAAK,CAAC,OAAO,IAAI,OAAO;IAAA;IAAA;MAAA,OAC1B,mBAAmB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;IAAA;IAAA;MAAA,OACjC,KAAK,CAAC,KAAK;IAAA;IAAA,IACvB,KAAK;MAAA,OAAE,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,SAAS,GAAG,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAAA;IAAA,IAC5E,OAAO;MAAA,OAAE,KAAK,CAAC,OAAO;IAAA;IAAA;MAAA,OAErB,KAAK,CAAC,QAAQ;IAAA;EAAA;AAGrB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["actions/SplitButton.tsx"],"sourcesContent":["import { type JSX, Show, splitProps } from \"solid-js\";\nimport { Button, type ButtonProps } from \"./Button\";\nimport { Dropdown, type DropdownItem, type DropdownPosition } from \"./Dropdown\";\n\nexport type SplitButtonProps = ButtonProps & {\n /** Actions shown from the secondary menu trigger. */\n items: readonly DropdownItem[];\n /** Optional selection menu in place of the primary immediate action. */\n primaryItems?: readonly DropdownItem[];\n /** Accessible name for the primary selection menu. */\n primaryMenuLabel?: string;\n /** Secondary menu glyph; defaults to a chevron. */\n menuIcon?: JSX.Element;\n /** Accessible name and title for the icon-only menu trigger. */\n menuLabel: string;\n menuPosition?: DropdownPosition | (() => DropdownPosition);\n menuWidth?: string;\n};\n\n/** One primary button action with a separate menu of related alternatives. */\nexport function SplitButton(props: SplitButtonProps): JSX.Element {\n const [local, buttonProps] = splitProps(props, [\n \"children\",\n \"primaryItems\",\n \"primaryMenuLabel\",\n \"menuIcon\",\n \"class\",\n \"disabled\",\n \"items\",\n \"loading\",\n \"menuLabel\",\n \"menuPosition\",\n \"menuWidth\",\n \"size\",\n \"variant\",\n ]);\n const disabled = () => Boolean(local.disabled || local.loading);\n\n return (\n <Dropdown.Root\n class=\"k2b-split-button\"\n disabled={disabled()}\n items={local.items}\n label={local.menuLabel}\n position={local.menuPosition ?? \"bottom-left\"}\n width={local.menuWidth}\n >\n <Show\n when={local.primaryItems}\n fallback={\n <Button\n {...buttonProps}\n class={`k2b-split-button__primary ${local.class ?? \"\"}`}\n disabled={local.disabled}\n loading={local.loading}\n size={local.size}\n variant={local.variant ?? \"primary\"}\n >\n {local.children}\n </Button>\n }\n >\n {(items) => (\n <Dropdown.Root\n items={items()}\n disabled={disabled()}\n class=\"k2b-split-button__primary-menu\"\n position={local.menuPosition ?? \"bottom-left\"}\n width={local.menuWidth}\n >\n <Dropdown.Trigger\n wrap={buttonProps.wrap}\n disabled={disabled()}\n size={local.size}\n variant={local.variant ?? \"primary\"}\n label={local.primaryMenuLabel}\n class={`k2b-split-button__primary ${local.class ?? \"\"}`}\n >\n {local.children}\n </Dropdown.Trigger>\n </Dropdown.Root>\n )}\n </Show>\n <Dropdown.Trigger\n class=\"k2b-split-button__menu-trigger\"\n disabled={disabled()}\n iconOnly\n label={local.menuLabel}\n size={local.size}\n title={local.menuLabel}\n variant={local.variant ?? \"primary\"}\n >\n {local.menuIcon ?? <i class=\"ti ti-chevron-down\" aria-hidden=\"true\" />}\n </Dropdown.Trigger>\n </Dropdown.Root>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAmB,IAAI,EAAE,UAAU,QAAQ,UAAU;AACrD,SAAS,MAAM,QAA0B,UAAU;AACnD,SAAS,QAAQ,QAAkD,YAAY;AAiB/E;AACA,O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A,OAAE,KAAK,CAAC,CAAC;UAAA;UAAA,IACd,QAAQ;YAAA,OAAE,QAAQ,CAAC,CAAC;UAAA;UAAA;UAAA,IAEpB,QAAQ;YAAA,OAAE,KAAK,CAAC,YAAY,IAAI,aAAa;UAAA;UAAA,IAC7C,KAAK;YAAA,OAAE,KAAK,CAAC,SAAS;UAAA;UAAA;YAAA,yBAErB,QAAQ,CAAC,OAAO;cAAA,IACf,IAAI;gBAAA,OAAE,WAAW,CAAC,IAAI;cAAA;cAAA,IACtB,QAAQ;gBAAA,OAAE,QAAQ,CAAC,CAAC;cAAA;cAAA,IACpB,IAAI;gBAAA,OAAE,KAAK,CAAC,IAAI;cAAA;cAAA,IAChB,OAAO;gBAAA,OAAE,KAAK,CAAC,OAAO,IAAI,SAAS;cAAA;cAAA,IACnC,KAAK;gBAAA,OAAE,KAAK,CAAC,gBAAgB;cAAA;cAAA;gBAAA,OACtB,6BAA6B,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;cAAA;cAAA;gBAAA,OAEtD,KAAK,CAAC,QAAQ;cAAA;YAAA;UAAA;QAAA;MAGpB,sBAEF,QAAQ,CAAC,OAAO;QAAA;QAAA,IAEf,QAAQ;UAAA,OAAE,QAAQ,CAAC,CAAC;QAAA;QACpB,QAAQ;QAAA,IACR,KAAK;UAAA,OAAE,KAAK,CAAC,SAAS;QAAA;QAAA,IACtB,IAAI;UAAA,OAAE,KAAK,CAAC,IAAI;QAAA;QAAA,IAChB,KAAK;UAAA,OAAE,KAAK,CAAC,SAAS;QAAA;QAAA,IACtB,OAAO;UAAA,OAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QAAA;QAAA;UAAA,OAElC,KAAK,CAAC,QAAQ,4BAAuD;QAAA;MAAA;IAAA;EAAA;AAI9E","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["actions/SplitButton.tsx"],"sourcesContent":["import { type JSX, Show, splitProps } from \"solid-js\";\nimport { Button, type ButtonProps } from \"./Button\";\nimport { Dropdown, type DropdownItem, type DropdownPosition } from \"./Dropdown\";\n\nexport type SplitButtonProps = Omit<ButtonProps, \"align\"> & {\n /** Actions shown from the secondary menu trigger. */\n items: readonly DropdownItem[];\n /** Optional selection menu in place of the primary immediate action. */\n primaryItems?: readonly DropdownItem[];\n /** Accessible name for the primary selection menu. */\n primaryMenuLabel?: string;\n /** Secondary menu glyph; defaults to a chevron. */\n menuIcon?: JSX.Element;\n /** Accessible name and title for the icon-only menu trigger. */\n menuLabel: string;\n menuPosition?: DropdownPosition | (() => DropdownPosition);\n menuWidth?: string;\n};\n\n/** One primary button action with a separate menu of related alternatives. */\nexport function SplitButton(props: SplitButtonProps): JSX.Element {\n const [local, buttonProps] = splitProps(props, [\n \"children\",\n \"primaryItems\",\n \"primaryMenuLabel\",\n \"menuIcon\",\n \"class\",\n \"disabled\",\n \"items\",\n \"loading\",\n \"menuLabel\",\n \"menuPosition\",\n \"menuWidth\",\n \"size\",\n \"variant\",\n ]);\n const disabled = () => Boolean(local.disabled || local.loading);\n\n return (\n <Dropdown.Root\n class=\"k2b-split-button\"\n disabled={disabled()}\n items={local.items}\n label={local.menuLabel}\n position={local.menuPosition ?? \"bottom-left\"}\n width={local.menuWidth}\n >\n <Show\n when={local.primaryItems}\n fallback={\n <Button\n {...buttonProps}\n class={`k2b-split-button__primary ${local.class ?? \"\"}`}\n disabled={local.disabled}\n loading={local.loading}\n size={local.size}\n variant={local.variant ?? \"primary\"}\n >\n {local.children}\n </Button>\n }\n >\n {(items) => (\n <Dropdown.Root\n items={items()}\n disabled={disabled()}\n class=\"k2b-split-button__primary-menu\"\n position={local.menuPosition ?? \"bottom-left\"}\n width={local.menuWidth}\n >\n <Dropdown.Trigger\n wrap={buttonProps.wrap}\n disabled={disabled()}\n size={local.size}\n variant={local.variant ?? \"primary\"}\n label={local.primaryMenuLabel}\n class={`k2b-split-button__primary ${local.class ?? \"\"}`}\n >\n {local.children}\n </Dropdown.Trigger>\n </Dropdown.Root>\n )}\n </Show>\n <Dropdown.Trigger\n class=\"k2b-split-button__menu-trigger\"\n disabled={disabled()}\n iconOnly\n label={local.menuLabel}\n size={local.size}\n title={local.menuLabel}\n variant={local.variant ?? \"primary\"}\n >\n {local.menuIcon ?? <i class=\"ti ti-chevron-down\" aria-hidden=\"true\" />}\n </Dropdown.Trigger>\n </Dropdown.Root>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAmB,IAAI,EAAE,UAAU,QAAQ,UAAU;AACrD,SAAS,MAAM,QAA0B,UAAU;AACnD,SAAS,QAAQ,QAAkD,YAAY;AAiB/E;AACA,OAAO,SAAS,WAAW,CAAC,KAAuB,EAAe;EAChE,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAC7C,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,UAAU,EACV,OAAO,EACP,SAAS,EACT,WAAW,EACX,cAAc,EACd,WAAW,EACX,MAAM,EACN,SAAS,CACV,CAAC;EACF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC;EAE/D,yBACG,QAAQ,CAAC,IAAI;IAAA;IAAA,IAEZ,QAAQ;MAAA,OAAE,QAAQ,CAAC,CAAC;IAAA;IAAA,IACpB,KAAK;MAAA,OAAE,KAAK,CAAC,KAAK;IAAA;IAAA,IAClB,KAAK;MAAA,OAAE,KAAK,CAAC,SAAS;IAAA;IAAA,IACtB,QAAQ;MAAA,OAAE,KAAK,CAAC,YAAY,IAAI,aAAa;IAAA;IAAA,IAC7C,KAAK;MAAA,OAAE,KAAK,CAAC,SAAS;IAAA;IAAA;MAAA,0BAErB,IAAI;QAAA,IACH,IAAI;UAAA,OAAE,KAAK,CAAC,YAAY;QAAA;QAAA,IACxB,QAAQ;UAAA,yBACL,MAAM,eACD,WAAW;YAAA;cAAA,OACR,6BAA6B,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;YAAA;Y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,CAAC,IAAI;QAAA;QAAA,IAChB,KAAK;UAAA,OAAE,KAAK,CAAC,SAAS;QAAA;QAAA,IACtB,OAAO;UAAA,OAAE,KAAK,CAAC,OAAO,IAAI,SAAS;QAAA;QAAA;UAAA,OAElC,KAAK,CAAC,QAAQ,4BAAuD;QAAA;MAAA;IAAA;EAAA;AAI9E","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["actions/index.ts"],"sourcesContent":["export type { ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, IconButtonLinkProps, IconButtonProps } from \"./Button\";\nexport { Button, ButtonLink, IconButton, IconButtonLink } from \"./Button\";\nexport type { ContextMenuProps } from \"./ContextMenu\";\nexport { ContextMenu } from \"./ContextMenu\";\nexport type { CopyButtonProps, CopyButtonValue } from \"./CopyButton\";\nexport { CopyButton } from \"./CopyButton\";\nexport type { DisclosureProps } from \"./Disclosure\";\nexport { Disclosure } from \"./Disclosure\";\nexport type {\n DropdownAction,\n DropdownActionBase,\n DropdownChoice,\n DropdownItemProps,\n DropdownPosition,\n DropdownProps,\n DropdownSection,\n DropdownTriggerProps,\n} from \"./Dropdown\";\nexport { Dropdown, DropdownItem, dropdownPosition } from \"./Dropdown\";\nexport type { FilterChipOption, FilterChipProps, FilterChipSection } from \"./FilterChip\";\nexport { FilterChip } from \"./FilterChip\";\nexport type { RemoveButtonProps } from \"./RemoveButton\";\nexport { RemoveButton } from \"./RemoveButton\";\nexport type { SegmentedControlProps, SegmentOption } from \"./SegmentedControl\";\nexport { SegmentedControl } from \"./SegmentedControl\";\nexport type { SplitButtonProps } from \"./SplitButton\";\nexport { SplitButton } from \"./SplitButton\";\nexport type {\n SpotlightButtonProps,\n SpotlightButtonVariant,\n SpotlightSearchOptions,\n SpotlightSearchResolver,\n} from \"./SpotlightSearch\";\nexport {\n openSpotlightSearch,\n SpotlightButton,\n} from \"./SpotlightSearch\";\nexport type { TabOption, TabsItemProps, TabsProps } from \"./Tabs\";\nexport { Tabs } from \"./Tabs\";\nexport type { ToolbarGroupProps, ToolbarProps, ToolbarSeparatorProps } from \"./Toolbar\";\nexport { Toolbar } from \"./Toolbar\";\n"],"mappings":"AACA,SAAS,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,QAAQ,UAAU;AAEzE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,UAAU,QAAQ,cAAc;AAWzC,SAAS,QAAQ,EAAE,YAAY,EAAE,gBAAgB,QAAQ,YAAY;AAErE,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,YAAY,QAAQ,gBAAgB;AAE7C,SAAS,gBAAgB,QAAQ,oBAAoB;AAErD,SAAS,WAAW,QAAQ,eAAe;AAO3C,SACE,mBAAmB,EACnB,eAAe,QACV,mBAAmB;AAE1B,SAAS,IAAI,QAAQ,QAAQ;AAE7B,SAAS,OAAO,QAAQ,WAAW","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["actions/index.ts"],"sourcesContent":["export type { ButtonAlign, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, IconButtonLinkProps, IconButtonProps } from \"./Button\";\nexport { Button, ButtonLink, IconButton, IconButtonLink } from \"./Button\";\nexport type { ContextMenuProps } from \"./ContextMenu\";\nexport { ContextMenu } from \"./ContextMenu\";\nexport type { CopyButtonProps, CopyButtonValue } from \"./CopyButton\";\nexport { CopyButton } from \"./CopyButton\";\nexport type { DisclosureProps } from \"./Disclosure\";\nexport { Disclosure } from \"./Disclosure\";\nexport type {\n DropdownAction,\n DropdownActionBase,\n DropdownChoice,\n DropdownItemProps,\n DropdownPosition,\n DropdownProps,\n DropdownSection,\n DropdownTriggerProps,\n} from \"./Dropdown\";\nexport { Dropdown, DropdownItem, dropdownPosition } from \"./Dropdown\";\nexport type { FilterChipOption, FilterChipProps, FilterChipSection } from \"./FilterChip\";\nexport { FilterChip } from \"./FilterChip\";\nexport type { RemoveButtonProps } from \"./RemoveButton\";\nexport { RemoveButton } from \"./RemoveButton\";\nexport type { SegmentedControlProps, SegmentOption } from \"./SegmentedControl\";\nexport { SegmentedControl } from \"./SegmentedControl\";\nexport type { SplitButtonProps } from \"./SplitButton\";\nexport { SplitButton } from \"./SplitButton\";\nexport type {\n SpotlightButtonProps,\n SpotlightButtonVariant,\n SpotlightSearchOptions,\n SpotlightSearchResolver,\n} from \"./SpotlightSearch\";\nexport {\n openSpotlightSearch,\n SpotlightButton,\n} from \"./SpotlightSearch\";\nexport type { TabOption, TabsItemProps, TabsProps } from \"./Tabs\";\nexport { Tabs } from \"./Tabs\";\nexport type { ToolbarGroupProps, ToolbarProps, ToolbarSeparatorProps } from \"./Toolbar\";\nexport { Toolbar } from \"./Toolbar\";\n"],"mappings":"AACA,SAAS,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,QAAQ,UAAU;AAEzE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,UAAU,QAAQ,cAAc;AAWzC,SAAS,QAAQ,EAAE,YAAY,EAAE,gBAAgB,QAAQ,YAAY;AAErE,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,YAAY,QAAQ,gBAAgB;AAE7C,SAAS,gBAAgB,QAAQ,oBAAoB;AAErD,SAAS,WAAW,QAAQ,eAAe;AAO3C,SACE,mBAAmB,EACnB,eAAe,QACV,mBAAmB;AAE1B,SAAS,IAAI,QAAQ,QAAQ;AAE7B,SAAS,OAAO,QAAQ,WAAW","ignoreList":[]}
@@ -0,0 +1,396 @@
1
+ import { template as _$template } from "solid-js/web";
2
+ import { delegateEvents as _$delegateEvents } from "solid-js/web";
3
+ import { setStyleProperty as _$setStyleProperty } from "solid-js/web";
4
+ import { style as _$style } from "solid-js/web";
5
+ import { use as _$use } from "solid-js/web";
6
+ import { runHydrationEvents as _$runHydrationEvents } from "solid-js/web";
7
+ import { addEventListener as _$addEventListener } from "solid-js/web";
8
+ import { setAttribute as _$setAttribute } from "solid-js/web";
9
+ import { getNextMarker as _$getNextMarker } from "solid-js/web";
10
+ import { insert as _$insert } from "solid-js/web";
11
+ import { className as _$className } from "solid-js/web";
12
+ import { effect as _$effect } from "solid-js/web";
13
+ import { getNextElement as _$getNextElement } from "solid-js/web";
14
+ import { memo as _$memo } from "solid-js/web";
15
+ import { createComponent as _$createComponent } from "solid-js/web";
16
+ var _tmpl$ = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
17
+ _tmpl$2 = /*#__PURE__*/_$template(`<footer class=k2b-dialog__actions>`),
18
+ _tmpl$3 = /*#__PURE__*/_$template(`<div class="k2b-dialog__panel k2b-dialog__stack"><!$><!/><div class=k2b-zoom-pan-dialog><!$><!/><!$><!/>`),
19
+ _tmpl$4 = /*#__PURE__*/_$template(`<button type=button class="k2b-button k2b-icon-button"data-variant=secondary><i aria-hidden=true>`),
20
+ _tmpl$5 = /*#__PURE__*/_$template(`<div role=group tabindex=0><div class=k2b-zoom-pan__stage></div><div class=k2b-zoom-pan__controls><!$><!/><!$><!/><!$><!/><!$><!/>`);
21
+ import { createSignal, For, onCleanup, onMount, Show } from "solid-js";
22
+ import { Button } from "../actions/Button";
23
+ import { dialogCore } from "../feedback/dialog-core";
24
+ import { DialogHeader } from "../feedback/prompts";
25
+ import { LocaleProvider, useLocale } from "../intl/locale";
26
+ import { useUiMessages } from "../intl/messages";
27
+ import { clampZoomPan, panZoomPan, ZOOM_PAN_FIT, ZOOM_PAN_STEP, zoomZoomPanAt } from "./zoom-pan";
28
+ const PAN_KEY_STEP = 48;
29
+ const DRAG_THRESHOLD = 4;
30
+ const PAN_KEYS = {
31
+ ArrowLeft: [PAN_KEY_STEP, 0],
32
+ ArrowRight: [-PAN_KEY_STEP, 0],
33
+ ArrowUp: [0, PAN_KEY_STEP],
34
+ ArrowDown: [0, -PAN_KEY_STEP]
35
+ };
36
+
37
+ /** Current screen transform of the stage, including a running CSS transition. */
38
+ const renderedTransform = (stage, fallback) => {
39
+ const match = /^matrix\(([^)]+)\)$/.exec(getComputedStyle(stage).transform ?? "");
40
+ const values = match?.[1]?.split(",").map(Number);
41
+ if (!values || values.length !== 6 || values.some(value => !Number.isFinite(value)) || !values[0]) return fallback;
42
+ return {
43
+ scale: values[0],
44
+ x: values[4] ?? 0,
45
+ y: values[5] ?? 0
46
+ };
47
+ };
48
+ const ActionButton = props => {
49
+ const [pending, setPending] = createSignal(false);
50
+ const run = async () => {
51
+ if (pending()) return;
52
+ setPending(true);
53
+ try {
54
+ await props.action.onSelect();
55
+ } catch (error) {
56
+ console.error("Zoom-pan action failed", error);
57
+ } finally {
58
+ setPending(false);
59
+ }
60
+ };
61
+ return _$createComponent(Button, {
62
+ variant: "secondary",
63
+ get loading() {
64
+ return pending();
65
+ },
66
+ onClick: () => void run(),
67
+ get children() {
68
+ return [_$createComponent(Show, {
69
+ get when() {
70
+ return props.action.icon;
71
+ },
72
+ children: icon => (() => {
73
+ var _el$ = _$getNextElement(_tmpl$);
74
+ _$effect(() => _$className(_el$, icon()));
75
+ return _el$;
76
+ })()
77
+ }), _$memo(() => props.action.label)];
78
+ }
79
+ });
80
+ };
81
+
82
+ /**
83
+ * Makes any content zoomable (fit to 8×) and pannable with buttons, Ctrl/Cmd +
84
+ * wheel, pinch, drag, and keys. It applies a CSS transform, so vector content
85
+ * stays crisp and is never re-rendered. The view always starts at fit.
86
+ */
87
+ export function ZoomPanViewport(props) {
88
+ const messages = useUiMessages();
89
+ const locale = useLocale();
90
+ const [transform, setTransform] = createSignal(ZOOM_PAN_FIT);
91
+ const [smooth, setSmooth] = createSignal(false);
92
+ const [dragging, setDragging] = createSignal(false);
93
+ let root;
94
+ let stage;
95
+ const pointers = new Map();
96
+ let drag;
97
+ let pinch;
98
+ let suppressClick = false;
99
+ const zoomed = () => transform().scale > 1;
100
+ const geometry = () => {
101
+ const rect = root?.getBoundingClientRect();
102
+ const width = rect?.width ?? 0;
103
+ const height = rect?.height ?? 0;
104
+ const content = stage?.firstElementChild?.getBoundingClientRect();
105
+ if (!rect || !stage || !content || content.width <= 0 || content.height <= 0) {
106
+ return {
107
+ width,
108
+ height,
109
+ content: {
110
+ left: 0,
111
+ top: 0,
112
+ width,
113
+ height
114
+ }
115
+ };
116
+ }
117
+ const current = renderedTransform(stage, transform());
118
+ return {
119
+ width,
120
+ height,
121
+ content: {
122
+ left: (content.left - rect.left - current.x) / current.scale,
123
+ top: (content.top - rect.top - current.y) / current.scale,
124
+ width: content.width / current.scale,
125
+ height: content.height / current.scale
126
+ }
127
+ };
128
+ };
129
+ const apply = (next, animate) => {
130
+ setSmooth(animate);
131
+ setTransform(next);
132
+ };
133
+ const local = event => {
134
+ const rect = root?.getBoundingClientRect();
135
+ return {
136
+ x: event.clientX - (rect?.left ?? 0),
137
+ y: event.clientY - (rect?.top ?? 0)
138
+ };
139
+ };
140
+ const zoomBy = (factor, point, animate = true) => {
141
+ const box = geometry();
142
+ const current = transform();
143
+ apply(zoomZoomPanAt(current, current.scale * factor, point ?? {
144
+ x: box.width / 2,
145
+ y: box.height / 2
146
+ }, box), animate);
147
+ };
148
+ const reset = () => apply(ZOOM_PAN_FIT, true);
149
+ const openFullscreen = () => {
150
+ const fullscreen = props.fullscreen;
151
+ if (!fullscreen) return;
152
+ const currentLocale = locale();
153
+ void dialogCore.open(close => _$createComponent(LocaleProvider, {
154
+ locale: currentLocale,
155
+ get children() {
156
+ var _el$2 = _$getNextElement(_tmpl$3),
157
+ _el$9 = _el$2.firstChild,
158
+ [_el$0, _co$3] = _$getNextMarker(_el$9.nextSibling),
159
+ _el$3 = _el$0.nextSibling,
160
+ _el$5 = _el$3.firstChild,
161
+ [_el$6, _co$] = _$getNextMarker(_el$5.nextSibling),
162
+ _el$7 = _el$6.nextSibling,
163
+ [_el$8, _co$2] = _$getNextMarker(_el$7.nextSibling);
164
+ _$insert(_el$2, _$createComponent(DialogHeader, {
165
+ get title() {
166
+ return fullscreen.title;
167
+ },
168
+ close: () => close()
169
+ }), _el$0, _co$3);
170
+ _$insert(_el$3, _$createComponent(ZoomPanViewport, {
171
+ get label() {
172
+ return props.label;
173
+ },
174
+ get children() {
175
+ return fullscreen.content();
176
+ }
177
+ }), _el$6, _co$);
178
+ _$insert(_el$3, _$createComponent(Show, {
179
+ get when() {
180
+ return fullscreen.actions?.length;
181
+ },
182
+ get children() {
183
+ var _el$4 = _$getNextElement(_tmpl$2);
184
+ _$insert(_el$4, _$createComponent(For, {
185
+ get each() {
186
+ return fullscreen.actions;
187
+ },
188
+ children: action => _$createComponent(ActionButton, {
189
+ action: action
190
+ })
191
+ }));
192
+ return _el$4;
193
+ }
194
+ }), _el$8, _co$2);
195
+ return _el$2;
196
+ }
197
+ }), {
198
+ panelClassName: "k2b-dialog k2b-dialog--full",
199
+ ariaLabel: fullscreen.title,
200
+ initialFocus: dialog => dialog.querySelector(".k2b-zoom-pan")
201
+ });
202
+ };
203
+ const handleKeyDown = event => {
204
+ if (event.target !== root || event.ctrlKey || event.metaKey || event.altKey) return;
205
+ const key = event.key;
206
+ if (key === "+" || key === "=") zoomBy(ZOOM_PAN_STEP);else if (key === "-" || key === "_") zoomBy(1 / ZOOM_PAN_STEP);else if (key === "0") reset();else if ((key === "f" || key === "F") && props.fullscreen) openFullscreen();else {
207
+ const delta = PAN_KEYS[key];
208
+ // At fit the arrow keys keep scrolling the page.
209
+ if (!delta || !zoomed()) return;
210
+ apply(panZoomPan(transform(), delta[0], delta[1], geometry()), true);
211
+ }
212
+ event.preventDefault();
213
+ };
214
+
215
+ // Plain wheel keeps scrolling the page; Ctrl/Cmd + wheel (and trackpad pinch) zooms toward the pointer.
216
+ const handleWheel = event => {
217
+ if (!event.ctrlKey && !event.metaKey) return;
218
+ event.preventDefault();
219
+ const lines = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? 400 : 1;
220
+ const delta = Math.max(-50, Math.min(50, event.deltaY * lines));
221
+ zoomBy(Math.exp(-delta / 100), local(event), false);
222
+ };
223
+ const handlePointerDown = event => {
224
+ if (event.button !== 0 || event.target.closest("button, a, input, select, textarea")) return;
225
+ pointers.set(event.pointerId, local(event));
226
+ if (pointers.size === 2) {
227
+ const [first, second] = [...pointers.values()];
228
+ pinch = {
229
+ distance: Math.max(1, Math.hypot(second.x - first.x, second.y - first.y)),
230
+ center: {
231
+ x: (first.x + second.x) / 2,
232
+ y: (first.y + second.y) / 2
233
+ },
234
+ origin: transform()
235
+ };
236
+ drag = undefined;
237
+ } else if (pointers.size === 1 && zoomed()) {
238
+ // Panning starts only above fit, so clicks and text selection keep working at fit.
239
+ drag = {
240
+ id: event.pointerId,
241
+ x: event.clientX,
242
+ y: event.clientY,
243
+ origin: transform(),
244
+ moved: false
245
+ };
246
+ } else return;
247
+ try {
248
+ event.currentTarget.setPointerCapture(event.pointerId);
249
+ } catch {
250
+ // A synthetic or already released pointer cannot be captured; moves still arrive while inside.
251
+ }
252
+ };
253
+ const handlePointerMove = event => {
254
+ if (!pointers.has(event.pointerId)) return;
255
+ pointers.set(event.pointerId, local(event));
256
+ if (pinch && pointers.size >= 2) {
257
+ const [first, second] = [...pointers.values()];
258
+ const distance = Math.hypot(second.x - first.x, second.y - first.y);
259
+ const center = {
260
+ x: (first.x + second.x) / 2,
261
+ y: (first.y + second.y) / 2
262
+ };
263
+ const box = geometry();
264
+ const scaled = zoomZoomPanAt(pinch.origin, pinch.origin.scale * (distance / pinch.distance), pinch.center, box);
265
+ apply(panZoomPan(scaled, center.x - pinch.center.x, center.y - pinch.center.y, box), false);
266
+ return;
267
+ }
268
+ if (drag?.id !== event.pointerId) return;
269
+ const dx = event.clientX - drag.x;
270
+ const dy = event.clientY - drag.y;
271
+ if (!drag.moved && Math.hypot(dx, dy) < DRAG_THRESHOLD) return;
272
+ drag.moved = true;
273
+ setDragging(true);
274
+ apply(panZoomPan(drag.origin, dx, dy, geometry()), false);
275
+ };
276
+ const handlePointerEnd = event => {
277
+ pointers.delete(event.pointerId);
278
+ if (pointers.size < 2) pinch = undefined;
279
+ if (drag?.id !== event.pointerId) return;
280
+ if (drag.moved) {
281
+ // The click that follows this pointerup (if the browser sends one) comes in the same task.
282
+ suppressClick = true;
283
+ setTimeout(() => {
284
+ suppressClick = false;
285
+ });
286
+ }
287
+ drag = undefined;
288
+ setDragging(false);
289
+ };
290
+ onMount(() => {
291
+ const element = root;
292
+ if (!element) return;
293
+ // A drag must not also count as a click on the content or its owner.
294
+ const click = event => {
295
+ if (!suppressClick) return;
296
+ suppressClick = false;
297
+ event.preventDefault();
298
+ event.stopPropagation();
299
+ };
300
+ // Keep a two-finger gesture for pinch zoom instead of page panning.
301
+ const touchMove = event => {
302
+ if (event.touches.length > 1) event.preventDefault();
303
+ };
304
+ element.addEventListener("click", click, true);
305
+ element.addEventListener("touchmove", touchMove, {
306
+ passive: false
307
+ });
308
+ const observer = typeof ResizeObserver === "undefined" ? undefined : new ResizeObserver(() => apply(clampZoomPan(transform(), geometry()), false));
309
+ observer?.observe(element);
310
+ onCleanup(() => {
311
+ element.removeEventListener("click", click, true);
312
+ element.removeEventListener("touchmove", touchMove);
313
+ observer?.disconnect();
314
+ });
315
+ });
316
+ const control = (label, shortcut, icon, action) => (() => {
317
+ var _el$1 = _$getNextElement(_tmpl$4),
318
+ _el$10 = _el$1.firstChild;
319
+ _$addEventListener(_el$1, "click", action, true);
320
+ _$setAttribute(_el$1, "aria-label", label);
321
+ _$setAttribute(_el$1, "title", `${label} (${shortcut})`);
322
+ _$className(_el$10, `ti ${icon}`);
323
+ _$runHydrationEvents();
324
+ return _el$1;
325
+ })();
326
+ return (() => {
327
+ var _el$11 = _$getNextElement(_tmpl$5),
328
+ _el$12 = _el$11.firstChild,
329
+ _el$13 = _el$12.nextSibling,
330
+ _el$14 = _el$13.firstChild,
331
+ [_el$15, _co$4] = _$getNextMarker(_el$14.nextSibling),
332
+ _el$16 = _el$15.nextSibling,
333
+ [_el$17, _co$5] = _$getNextMarker(_el$16.nextSibling),
334
+ _el$18 = _el$17.nextSibling,
335
+ [_el$19, _co$6] = _$getNextMarker(_el$18.nextSibling),
336
+ _el$20 = _el$19.nextSibling,
337
+ [_el$21, _co$7] = _$getNextMarker(_el$20.nextSibling);
338
+ _el$11.addEventListener("pointercancel", handlePointerEnd);
339
+ _el$11.$$pointerup = handlePointerEnd;
340
+ _el$11.$$pointermove = handlePointerMove;
341
+ _el$11.$$pointerdown = handlePointerDown;
342
+ _el$11.addEventListener("wheel", handleWheel);
343
+ _el$11.$$keydown = handleKeyDown;
344
+ var _ref$ = root;
345
+ typeof _ref$ === "function" ? _$use(_ref$, _el$11) : root = _el$11;
346
+ var _ref$2 = stage;
347
+ typeof _ref$2 === "function" ? _$use(_ref$2, _el$12) : stage = _el$12;
348
+ _$insert(_el$12, () => props.children);
349
+ _$insert(_el$13, () => control(messages().zoomIn, "+", "ti-plus", () => zoomBy(ZOOM_PAN_STEP)), _el$15, _co$4);
350
+ _$insert(_el$13, () => control(messages().zoomOut, "-", "ti-minus", () => zoomBy(1 / ZOOM_PAN_STEP)), _el$17, _co$5);
351
+ _$insert(_el$13, () => control(messages().resetZoom, "0", "ti-focus-centered", reset), _el$19, _co$6);
352
+ _$insert(_el$13, _$createComponent(Show, {
353
+ get when() {
354
+ return props.fullscreen;
355
+ },
356
+ get children() {
357
+ return control(messages().openFullscreen, "F", "ti-maximize", openFullscreen);
358
+ }
359
+ }), _el$21, _co$7);
360
+ _$effect(_p$ => {
361
+ var _v$ = `k2b-zoom-pan ${props.class ?? ""}`,
362
+ _v$2 = props.style,
363
+ _v$3 = props.label,
364
+ _v$4 = messages().zoomPanKeys,
365
+ _v$5 = props.controls ?? "visible",
366
+ _v$6 = zoomed() ? "true" : undefined,
367
+ _v$7 = dragging() ? "true" : undefined,
368
+ _v$8 = smooth() ? "true" : undefined,
369
+ _v$9 = `translate(${transform().x}px, ${transform().y}px) scale(${transform().scale})`;
370
+ _v$ !== _p$.e && _$className(_el$11, _p$.e = _v$);
371
+ _p$.t = _$style(_el$11, _v$2, _p$.t);
372
+ _v$3 !== _p$.a && _$setAttribute(_el$11, "aria-label", _p$.a = _v$3);
373
+ _v$4 !== _p$.o && _$setAttribute(_el$11, "aria-description", _p$.o = _v$4);
374
+ _v$5 !== _p$.i && _$setAttribute(_el$11, "data-controls", _p$.i = _v$5);
375
+ _v$6 !== _p$.n && _$setAttribute(_el$11, "data-zoomed", _p$.n = _v$6);
376
+ _v$7 !== _p$.s && _$setAttribute(_el$11, "data-dragging", _p$.s = _v$7);
377
+ _v$8 !== _p$.h && _$setAttribute(_el$12, "data-smooth", _p$.h = _v$8);
378
+ _v$9 !== _p$.r && _$setStyleProperty(_el$12, "transform", _p$.r = _v$9);
379
+ return _p$;
380
+ }, {
381
+ e: undefined,
382
+ t: undefined,
383
+ a: undefined,
384
+ o: undefined,
385
+ i: undefined,
386
+ n: undefined,
387
+ s: undefined,
388
+ h: undefined,
389
+ r: undefined
390
+ });
391
+ _$runHydrationEvents();
392
+ return _el$11;
393
+ })();
394
+ }
395
+ _$delegateEvents(["click", "keydown", "pointerdown", "pointermove", "pointerup"]);
396
+ //# sourceMappingURL=ZoomPanViewport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["content/ZoomPanViewport.tsx"],"sourcesContent":["import { createSignal, For, type JSX, onCleanup, onMount, Show } from \"solid-js\";\nimport { Button } from \"../actions/Button\";\nimport { dialogCore } from \"../feedback/dialog-core\";\nimport { DialogHeader } from \"../feedback/prompts\";\nimport { LocaleProvider, useLocale } from \"../intl/locale\";\nimport { useUiMessages } from \"../intl/messages\";\nimport {\n clampZoomPan,\n panZoomPan,\n ZOOM_PAN_FIT,\n ZOOM_PAN_STEP,\n type ZoomPanGeometry,\n type ZoomPanTransform,\n zoomZoomPanAt,\n} from \"./zoom-pan\";\n\nexport type ZoomPanAction = {\n label: string;\n icon?: string;\n /** Runs the action; the button shows a pending state until a returned promise settles. Handle failures here. */\n onSelect: () => void | Promise<void>;\n};\n\nexport type ZoomPanFullscreen = {\n /** Heading and accessible name of the fullscreen dialog. */\n title: string;\n /** Renders a fresh copy of the content for the dialog. Called once per opening. */\n content: () => JSX.Element;\n /** Actions shown in the fullscreen dialog, for example exports. */\n actions?: readonly ZoomPanAction[];\n};\n\nexport type ZoomPanViewportProps = {\n /** Accessible name of the focusable viewport. */\n label: string;\n /** The zoomable content. Its first element is measured to keep it on screen. */\n children: JSX.Element;\n /** Enables the fullscreen control and the `F` shortcut. */\n fullscreen?: ZoomPanFullscreen;\n /** `hover` reveals the controls on hover, on focus, and while zoomed in. Touch screens always show them. */\n controls?: \"visible\" | \"hover\";\n class?: string;\n style?: JSX.CSSProperties;\n};\n\nconst PAN_KEY_STEP = 48;\nconst DRAG_THRESHOLD = 4;\nconst PAN_KEYS: Record<string, readonly [number, number]> = {\n ArrowLeft: [PAN_KEY_STEP, 0],\n ArrowRight: [-PAN_KEY_STEP, 0],\n ArrowUp: [0, PAN_KEY_STEP],\n ArrowDown: [0, -PAN_KEY_STEP],\n};\n\n/** Current screen transform of the stage, including a running CSS transition. */\nconst renderedTransform = (stage: HTMLElement, fallback: ZoomPanTransform): ZoomPanTransform => {\n const match = /^matrix\\(([^)]+)\\)$/.exec(getComputedStyle(stage).transform ?? \"\");\n const values = match?.[1]?.split(\",\").map(Number);\n if (!values || values.length !== 6 || values.some((value) => !Number.isFinite(value)) || !values[0]) return fallback;\n return { scale: values[0], x: values[4] ?? 0, y: values[5] ?? 0 };\n};\n\nconst ActionButton = (props: { action: ZoomPanAction }): JSX.Element => {\n const [pending, setPending] = createSignal(false);\n const run = async () => {\n if (pending()) return;\n setPending(true);\n try {\n await props.action.onSelect();\n } catch (error) {\n console.error(\"Zoom-pan action failed\", error);\n } finally {\n setPending(false);\n }\n };\n return (\n <Button variant=\"secondary\" loading={pending()} onClick={() => void run()}>\n <Show when={props.action.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>\n {props.action.label}\n </Button>\n );\n};\n\n/**\n * Makes any content zoomable (fit to 8×) and pannable with buttons, Ctrl/Cmd +\n * wheel, pinch, drag, and keys. It applies a CSS transform, so vector content\n * stays crisp and is never re-rendered. The view always starts at fit.\n */\nexport function ZoomPanViewport(props: ZoomPanViewportProps): JSX.Element {\n const messages = useUiMessages();\n const locale = useLocale();\n const [transform, setTransform] = createSignal<ZoomPanTransform>(ZOOM_PAN_FIT);\n const [smooth, setSmooth] = createSignal(false);\n const [dragging, setDragging] = createSignal(false);\n let root: HTMLDivElement | undefined;\n let stage: HTMLDivElement | undefined;\n const pointers = new Map<number, { x: number; y: number }>();\n let drag: { id: number; x: number; y: number; origin: ZoomPanTransform; moved: boolean } | undefined;\n let pinch: { distance: number; center: { x: number; y: number }; origin: ZoomPanTransform } | undefined;\n let suppressClick = false;\n\n const zoomed = () => transform().scale > 1;\n\n const geometry = (): ZoomPanGeometry => {\n const rect = root?.getBoundingClientRect();\n const width = rect?.width ?? 0;\n const height = rect?.height ?? 0;\n const content = stage?.firstElementChild?.getBoundingClientRect();\n if (!rect || !stage || !content || content.width <= 0 || content.height <= 0) {\n return { width, height, content: { left: 0, top: 0, width, height } };\n }\n const current = renderedTransform(stage, transform());\n return {\n width,\n height,\n content: {\n left: (content.left - rect.left - current.x) / current.scale,\n top: (content.top - rect.top - current.y) / current.scale,\n width: content.width / current.scale,\n height: content.height / current.scale,\n },\n };\n };\n\n const apply = (next: ZoomPanTransform, animate: boolean) => {\n setSmooth(animate);\n setTransform(next);\n };\n\n const local = (event: { clientX: number; clientY: number }) => {\n const rect = root?.getBoundingClientRect();\n return { x: event.clientX - (rect?.left ?? 0), y: event.clientY - (rect?.top ?? 0) };\n };\n\n const zoomBy = (factor: number, point?: { x: number; y: number }, animate = true) => {\n const box = geometry();\n const current = transform();\n apply(zoomZoomPanAt(current, current.scale * factor, point ?? { x: box.width / 2, y: box.height / 2 }, box), animate);\n };\n\n const reset = () => apply(ZOOM_PAN_FIT, true);\n\n const openFullscreen = () => {\n const fullscreen = props.fullscreen;\n if (!fullscreen) return;\n const currentLocale = locale();\n void dialogCore.open<void>(\n (close) => (\n <LocaleProvider locale={currentLocale}>\n <div class=\"k2b-dialog__panel k2b-dialog__stack\">\n <DialogHeader title={fullscreen.title} close={() => close()} />\n <div class=\"k2b-zoom-pan-dialog\">\n <ZoomPanViewport label={props.label}>{fullscreen.content()}</ZoomPanViewport>\n <Show when={fullscreen.actions?.length}>\n <footer class=\"k2b-dialog__actions\">\n <For each={fullscreen.actions}>{(action) => <ActionButton action={action} />}</For>\n </footer>\n </Show>\n </div>\n </div>\n </LocaleProvider>\n ),\n {\n panelClassName: \"k2b-dialog k2b-dialog--full\",\n ariaLabel: fullscreen.title,\n initialFocus: (dialog) => dialog.querySelector<HTMLElement>(\".k2b-zoom-pan\"),\n },\n );\n };\n\n const handleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n if (event.target !== root || event.ctrlKey || event.metaKey || event.altKey) return;\n const key = event.key;\n if (key === \"+\" || key === \"=\") zoomBy(ZOOM_PAN_STEP);\n else if (key === \"-\" || key === \"_\") zoomBy(1 / ZOOM_PAN_STEP);\n else if (key === \"0\") reset();\n else if ((key === \"f\" || key === \"F\") && props.fullscreen) openFullscreen();\n else {\n const delta = PAN_KEYS[key];\n // At fit the arrow keys keep scrolling the page.\n if (!delta || !zoomed()) return;\n apply(panZoomPan(transform(), delta[0], delta[1], geometry()), true);\n }\n event.preventDefault();\n };\n\n // Plain wheel keeps scrolling the page; Ctrl/Cmd + wheel (and trackpad pinch) zooms toward the pointer.\n const handleWheel: JSX.EventHandler<HTMLDivElement, WheelEvent> = (event) => {\n if (!event.ctrlKey && !event.metaKey) return;\n event.preventDefault();\n const lines = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? 400 : 1;\n const delta = Math.max(-50, Math.min(50, event.deltaY * lines));\n zoomBy(Math.exp(-delta / 100), local(event), false);\n };\n\n const handlePointerDown: JSX.EventHandler<HTMLDivElement, PointerEvent> = (event) => {\n if (event.button !== 0 || (event.target as Element).closest(\"button, a, input, select, textarea\")) return;\n pointers.set(event.pointerId, local(event));\n if (pointers.size === 2) {\n const [first, second] = [...pointers.values()] as [{ x: number; y: number }, { x: number; y: number }];\n pinch = {\n distance: Math.max(1, Math.hypot(second.x - first.x, second.y - first.y)),\n center: { x: (first.x + second.x) / 2, y: (first.y + second.y) / 2 },\n origin: transform(),\n };\n drag = undefined;\n } else if (pointers.size === 1 && zoomed()) {\n // Panning starts only above fit, so clicks and text selection keep working at fit.\n drag = { id: event.pointerId, x: event.clientX, y: event.clientY, origin: transform(), moved: false };\n } else return;\n try {\n event.currentTarget.setPointerCapture(event.pointerId);\n } catch {\n // A synthetic or already released pointer cannot be captured; moves still arrive while inside.\n }\n };\n\n const handlePointerMove: JSX.EventHandler<HTMLDivElement, PointerEvent> = (event) => {\n if (!pointers.has(event.pointerId)) return;\n pointers.set(event.pointerId, local(event));\n if (pinch && pointers.size >= 2) {\n const [first, second] = [...pointers.values()] as [{ x: number; y: number }, { x: number; y: number }];\n const distance = Math.hypot(second.x - first.x, second.y - first.y);\n const center = { x: (first.x + second.x) / 2, y: (first.y + second.y) / 2 };\n const box = geometry();\n const scaled = zoomZoomPanAt(pinch.origin, pinch.origin.scale * (distance / pinch.distance), pinch.center, box);\n apply(panZoomPan(scaled, center.x - pinch.center.x, center.y - pinch.center.y, box), false);\n return;\n }\n if (drag?.id !== event.pointerId) return;\n const dx = event.clientX - drag.x;\n const dy = event.clientY - drag.y;\n if (!drag.moved && Math.hypot(dx, dy) < DRAG_THRESHOLD) return;\n drag.moved = true;\n setDragging(true);\n apply(panZoomPan(drag.origin, dx, dy, geometry()), false);\n };\n\n const handlePointerEnd: JSX.EventHandler<HTMLDivElement, PointerEvent> = (event) => {\n pointers.delete(event.pointerId);\n if (pointers.size < 2) pinch = undefined;\n if (drag?.id !== event.pointerId) return;\n if (drag.moved) {\n // The click that follows this pointerup (if the browser sends one) comes in the same task.\n suppressClick = true;\n setTimeout(() => {\n suppressClick = false;\n });\n }\n drag = undefined;\n setDragging(false);\n };\n\n onMount(() => {\n const element = root;\n if (!element) return;\n // A drag must not also count as a click on the content or its owner.\n const click = (event: MouseEvent) => {\n if (!suppressClick) return;\n suppressClick = false;\n event.preventDefault();\n event.stopPropagation();\n };\n // Keep a two-finger gesture for pinch zoom instead of page panning.\n const touchMove = (event: TouchEvent) => {\n if (event.touches.length > 1) event.preventDefault();\n };\n element.addEventListener(\"click\", click, true);\n element.addEventListener(\"touchmove\", touchMove, { passive: false });\n const observer =\n typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(() => apply(clampZoomPan(transform(), geometry()), false));\n observer?.observe(element);\n onCleanup(() => {\n element.removeEventListener(\"click\", click, true);\n element.removeEventListener(\"touchmove\", touchMove);\n observer?.disconnect();\n });\n });\n\n const control = (label: string, shortcut: string, icon: string, action: () => void) => (\n <button\n type=\"button\"\n class=\"k2b-button k2b-icon-button\"\n data-variant=\"secondary\"\n aria-label={label}\n title={`${label} (${shortcut})`}\n onClick={action}\n >\n <i class={`ti ${icon}`} aria-hidden=\"true\" />\n </button>\n );\n\n return (\n <div\n ref={root}\n class={`k2b-zoom-pan ${props.class ?? \"\"}`}\n style={props.style}\n role=\"group\"\n aria-label={props.label}\n aria-description={messages().zoomPanKeys}\n tabIndex={0}\n data-controls={props.controls ?? \"visible\"}\n data-zoomed={zoomed() ? \"true\" : undefined}\n data-dragging={dragging() ? \"true\" : undefined}\n onKeyDown={handleKeyDown}\n onWheel={handleWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerEnd}\n onPointerCancel={handlePointerEnd}\n >\n <div\n ref={stage}\n class=\"k2b-zoom-pan__stage\"\n data-smooth={smooth() ? \"true\" : undefined}\n style={{ transform: `translate(${transform().x}px, ${transform().y}px) scale(${transform().scale})` }}\n >\n {props.children}\n </div>\n <div class=\"k2b-zoom-pan__controls\">\n {control(messages().zoomIn, \"+\", \"ti-plus\", () => zoomBy(ZOOM_PAN_STEP))}\n {control(messages().zoomOut, \"-\", \"ti-minus\", () => zoomBy(1 / ZOOM_PAN_STEP))}\n {control(messages().resetZoom,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OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,mBAAmB,EAAE,KAAK,CAAC;IAAA,mCAC9D,IAAI;MAAA,IAAC,IAAI;QAAA,OAAE,KAAK,CAAC,UAAU;MAAA;MAAA;QAAA,OAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,EAAE,GAAG,EAAE,aAAa,EAAE,cAAc,CAAC;MAAA;IAAA;IAAA;MAAA,UA5BhG,gBAAgB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;QAAA,OACnC,KAAK,CAAC,KAAK;QAAA,OAEN,KAAK,CAAC,KAAK;QAAA,OACL,QAAQ,CAAC,CAAC,CAAC,WAAW;QAAA,OAEzB,KAAK,CAAC,QAAQ,IAAI,SAAS;QAAA,OAC7B,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS;QAAA,OAC3B,QAAQ,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS;QAAA,OAW/B,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS;QAAA,OACtB,aAAa,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;IAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;IAAA;IAAA;IAAA;EAAA;AAY3G;AAAC","ignoreList":[]}
@@ -22,4 +22,5 @@ export { Pagination } from "./Pagination";
22
22
  export { default as PdfPreview } from "./PdfPreview";
23
23
  export { default as RangePicker } from "./RangePicker";
24
24
  export { default as StructuredDataPreview, isStructuredDataValue } from "./StructuredDataPreview";
25
+ export { ZoomPanViewport } from "./ZoomPanViewport";
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type {\n CalendarAttendee,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarLabels,\n CalendarProps,\n CalendarRecurrence,\n CalendarResource,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport {\n canPreviewFile,\n default as FileView,\n type FileViewContent,\n type FileViewFile,\n type FileViewPreviewKind,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n formatFileViewSize,\n getFileViewPreviewKind,\n} from \"./FileView\";\nexport type { LightboxImage } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport type { PdfPreviewProps, PdfPreviewRequest } from \"./PdfPreview\";\nexport { default as PdfPreview } from \"./PdfPreview\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\n"],"mappings":"AAaA,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAGhD,SAAS,OAAO,IAAI,KAAK,QAAQ,SAAS;AAE1C,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,qBAAqB,QAAQ,yBAAyB;AAC/D,SAAS,mBAAmB,QAAuC,uBAAuB;AAC1F,SAAS,iBAAiB,QAAQ,qBAAqB;AAEvD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAA2B,iBAAiB,QAAQ,gBAAgB;AAUpE,SAAS,mBAAmB,QAAQ,kBAAkB;AAGtD,SAAS,oBAAoB,QAAQ,kBAAkB;AAQvD,SAAmC,yBAAyB,QAAiC,wBAAwB;AAarH,SAAS,OAAO,IAAI,SAAS,QAAQ,aAAa;AAElD,SAAS,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,QAAQ,QAAQ;AAC/G,SAAS,gBAAgB,EAA+C,eAAe,QAAQ,eAAe;AAC9G,SAAS,QAAQ,QAA4B,YAAY;AACzD,SAAS,OAAO,IAAI,QAAQ,QAAsE,YAAY;AAC9G,SACE,cAAc,EACd,OAAO,IAAI,QAAQ,EAOnB,kBAAkB,EAClB,sBAAsB,QACjB,YAAY;AAEnB,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAEhD,SAAS,OAAO,IAAI,eAAe,QAAQ,mBAAmB;AAC9D,SAAS,OAAO,IAAI,YAAY,EAAsD,kBAAkB,QAAQ,gBAAgB;AAChI,SAAS,UAAU,QAA8B,cAAc;AAE/D,SAAS,OAAO,IAAI,UAAU,QAAQ,cAAc;AAEpD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AAEtD,SAAS,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,QAAQ,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type {\n CalendarAttendee,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarLabels,\n CalendarProps,\n CalendarRecurrence,\n CalendarResource,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport {\n canPreviewFile,\n default as FileView,\n type FileViewContent,\n type FileViewFile,\n type FileViewPreviewKind,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n formatFileViewSize,\n getFileViewPreviewKind,\n} from \"./FileView\";\nexport type { LightboxImage } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport type { PdfPreviewProps, PdfPreviewRequest } from \"./PdfPreview\";\nexport { default as PdfPreview } from \"./PdfPreview\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\nexport type { ZoomPanAction, ZoomPanFullscreen, ZoomPanViewportProps } from \"./ZoomPanViewport\";\nexport { ZoomPanViewport } from \"./ZoomPanViewport\";\n"],"mappings":"AAaA,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAGhD,SAAS,OAAO,IAAI,KAAK,QAAQ,SAAS;AAE1C,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,qBAAqB,QAAQ,yBAAyB;AAC/D,SAAS,mBAAmB,QAAuC,uBAAuB;AAC1F,SAAS,iBAAiB,QAAQ,qBAAqB;AAEvD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAA2B,iBAAiB,QAAQ,gBAAgB;AAUpE,SAAS,mBAAmB,QAAQ,kBAAkB;AAGtD,SAAS,oBAAoB,QAAQ,kBAAkB;AAQvD,SAAmC,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