@plaidev/karte-action-sdk 1.1.270-29419384.246a50882 → 1.1.270-29420750.2ec690591

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 (46) hide show
  1. package/dist/components-flex/css.d.ts +2 -2
  2. package/dist/components-flex/props.d.ts +2 -2
  3. package/dist/components-flex/responsiveProp.d.ts +7 -0
  4. package/dist/hydrate/components-flex/css.d.ts +2 -2
  5. package/dist/hydrate/components-flex/props.d.ts +2 -2
  6. package/dist/hydrate/components-flex/responsiveProp.d.ts +7 -0
  7. package/dist/hydrate/index.d.ts +1 -0
  8. package/dist/hydrate/index.es.js +168 -102
  9. package/dist/hydrate/index.svelte5.d.ts +2 -1
  10. package/dist/hydrate/preview.d.ts +28 -0
  11. package/dist/hydrate/stores.d.ts +22 -1
  12. package/dist/hydrate/types.d.ts +13 -0
  13. package/dist/hydrate/utils.d.ts +1 -0
  14. package/dist/index.es.d.ts +1 -0
  15. package/dist/index.es.js +168 -102
  16. package/dist/preview.d.ts +28 -0
  17. package/dist/stores.d.ts +22 -1
  18. package/dist/svelte5/components-flex/css.d.ts +2 -2
  19. package/dist/svelte5/components-flex/props.d.ts +2 -2
  20. package/dist/svelte5/components-flex/responsiveProp.d.ts +7 -0
  21. package/dist/svelte5/hydrate/components-flex/css.d.ts +2 -2
  22. package/dist/svelte5/hydrate/components-flex/props.d.ts +2 -2
  23. package/dist/svelte5/hydrate/components-flex/responsiveProp.d.ts +7 -0
  24. package/dist/svelte5/hydrate/index.es.d.ts +2 -1
  25. package/dist/svelte5/hydrate/index.es.js +157 -94
  26. package/dist/svelte5/hydrate/preview.d.ts +28 -0
  27. package/dist/svelte5/hydrate/stores.d.ts +22 -1
  28. package/dist/svelte5/hydrate/types.d.ts +13 -0
  29. package/dist/svelte5/hydrate/utils.d.ts +1 -0
  30. package/dist/svelte5/index.es.d.ts +2 -1
  31. package/dist/svelte5/index.es.js +157 -94
  32. package/dist/svelte5/index.front2.es.js +157 -94
  33. package/dist/svelte5/index.svelte5.d.ts +2 -1
  34. package/dist/svelte5/preview.d.ts +28 -0
  35. package/dist/svelte5/stores.d.ts +22 -1
  36. package/dist/svelte5/types.d.ts +13 -0
  37. package/dist/svelte5/utils.d.ts +1 -0
  38. package/dist/templates.cjs.js +3 -2
  39. package/dist/templates.js +3 -2
  40. package/dist/types.d.ts +13 -0
  41. package/dist/utils.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/dist/components-flex/responsive.d.ts +0 -26
  44. package/dist/hydrate/components-flex/responsive.d.ts +0 -26
  45. package/dist/svelte5/components-flex/responsive.d.ts +0 -26
  46. package/dist/svelte5/hydrate/components-flex/responsive.d.ts +0 -26
@@ -1,5 +1,5 @@
1
1
  import { Properties } from "csstype";
2
- import { ResponsiveSetting } from "./responsive.js";
2
+ import { ResponsiveProp } from "./responsiveProp.js";
3
3
  export declare function createComponentRawCss(layerId: string, define: (style: (selector: string, styles: Properties) => string) => string[]): string;
4
- export declare function toResponsiveSelector(responsiveSetting: ResponsiveSetting<any>, body: string): string;
4
+ export declare function toResponsiveSelector(responsiveSetting: ResponsiveProp<any>, body: string): string;
5
5
  export declare function toStyleTag(css: string): string;
@@ -4,9 +4,9 @@ import type { BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET } from "./button/types.js";
4
4
  import type { BrandKit } from "./brand-kit.js";
5
5
  import type { AspectVariantCode, FontFamilyVariantCode, ShadowVariantCode, BackgroundColorVariantCode } from "./variants.js";
6
6
  import type { TEXT_THEME } from "./text/types.js";
7
- import { type ResponsiveSetting } from "./responsive.js";
7
+ import { type ResponsiveProp } from "./responsiveProp.js";
8
8
  export type FlexComponentProps<T extends object> = T & {
9
- responsiveSettings?: ResponsiveSetting<T>[];
9
+ responsiveSettings?: ResponsiveProp<T>[];
10
10
  };
11
11
  type PositionPlaceProps = {
12
12
  top?: Properties["top"];
@@ -0,0 +1,7 @@
1
+ import { FlexComponentProps } from "./props.js";
2
+ import { Readable } from "svelte/store";
3
+ export type ResponsiveProp<T extends object> = {
4
+ breakpointId?: string;
5
+ props: Partial<T>;
6
+ };
7
+ export declare function useResponsiveProps<T extends object>(props: FlexComponentProps<T>): Readable<T>;
@@ -1,5 +1,5 @@
1
1
  import { Properties } from "csstype";
2
- import { ResponsiveSetting } from "./responsive.js";
2
+ import { ResponsiveProp } from "./responsiveProp.js";
3
3
  export declare function createComponentRawCss(layerId: string, define: (style: (selector: string, styles: Properties) => string) => string[]): string;
4
- export declare function toResponsiveSelector(responsiveSetting: ResponsiveSetting<any>, body: string): string;
4
+ export declare function toResponsiveSelector(responsiveSetting: ResponsiveProp<any>, body: string): string;
5
5
  export declare function toStyleTag(css: string): string;
@@ -4,9 +4,9 @@ import type { BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET } from "./button/types.js";
4
4
  import type { BrandKit } from "./brand-kit.js";
5
5
  import type { AspectVariantCode, FontFamilyVariantCode, ShadowVariantCode, BackgroundColorVariantCode } from "./variants.js";
6
6
  import type { TEXT_THEME } from "./text/types.js";
7
- import { type ResponsiveSetting } from "./responsive.js";
7
+ import { type ResponsiveProp } from "./responsiveProp.js";
8
8
  export type FlexComponentProps<T extends object> = T & {
9
- responsiveSettings?: ResponsiveSetting<T>[];
9
+ responsiveSettings?: ResponsiveProp<T>[];
10
10
  };
11
11
  type PositionPlaceProps = {
12
12
  top?: Properties["top"];
@@ -0,0 +1,7 @@
1
+ import { FlexComponentProps } from "./props.js";
2
+ import { Readable } from "svelte/store";
3
+ export type ResponsiveProp<T extends object> = {
4
+ breakpointId?: string;
5
+ props: Partial<T>;
6
+ };
7
+ export declare function useResponsiveProps<T extends object>(props: FlexComponentProps<T>): Readable<T>;
@@ -17,6 +17,7 @@ export type { CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequ
17
17
  export { addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers } from "./form.js";
18
18
  export * as widget from "./widget.js";
19
19
  export { onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES } from "./components/index.js";
20
+ export * from "./preview.js";
20
21
  export { default as State } from "./components/State.svelte.js";
21
22
  export { default as StateItem } from "./components/StateItem.svelte.js";
22
23
  export { default as Modal } from "./components/Modal.svelte.js";
@@ -56,6 +56,9 @@ const NOOP = (_args) => {};
56
56
  /** @internal */
57
57
  const isPreview = () => true;
58
58
  const isCanvasPreview = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-canvas-preview") ?? "false") === "true" : false;
59
+ const getPreviewId = () => {
60
+ return typeof document !== "undefined" ? document.documentElement.getAttribute("data-krt-preview-id") ?? "" : "";
61
+ };
59
62
  const isOnSite = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-on-site") ?? "true") === "true" : true;
60
63
  /** @internal */
61
64
  const setPreviousFocus = () => {
@@ -1144,6 +1147,33 @@ function setDestroyed(on$1) {
1144
1147
  *
1145
1148
  * @internal
1146
1149
  */
1150
+ const breakpoints = writable([]);
1151
+ /**
1152
+ * ブレイクポイントの一覧を取得する
1153
+ *
1154
+ * @returns 現在のブレイクポイントの一覧
1155
+ */
1156
+ function getBreakpoints() {
1157
+ return get(breakpoints);
1158
+ }
1159
+ /**
1160
+ * 変数を設定する
1161
+ *
1162
+ * @remarks
1163
+ * 設定したブレイクポイントは、ビジュアルエディタでブレイクポイントとして利用できます。
1164
+ *
1165
+ * @param values - ブレイクポイントの一覧
1166
+ */
1167
+ function setBreakpoints(values) {
1168
+ if (!get(breakpoints)) breakpoints.set([]);
1169
+ breakpoints.update(() => values);
1170
+ return getBreakpoints();
1171
+ }
1172
+ /**
1173
+ * Store to handle variables
1174
+ *
1175
+ * @internal
1176
+ */
1147
1177
  const variables = writable({});
1148
1178
  /**
1149
1179
  * 変数の一覧を取得する
@@ -2560,6 +2590,93 @@ async function loadGlobalStyle(href) {
2560
2590
  });
2561
2591
  }
2562
2592
 
2593
+ //#endregion
2594
+ //#region src/preview.ts
2595
+ /** @internal */
2596
+ const initPreview = () => {
2597
+ if (!isPreview()) return () => {};
2598
+ let root;
2599
+ let timer = null;
2600
+ const previewId = getPreviewId();
2601
+ const LAYER_ID_ATTR_KEY = "data-layer-id";
2602
+ const toInfo = (element$1) => {
2603
+ if (!element$1) return null;
2604
+ const rect = element$1.getBoundingClientRect();
2605
+ const styles = window.getComputedStyle(element$1);
2606
+ return {
2607
+ layerId: element$1.getAttribute(LAYER_ID_ATTR_KEY),
2608
+ top: rect.top,
2609
+ left: rect.left,
2610
+ width: rect.width,
2611
+ height: rect.height,
2612
+ direction: styles?.flexDirection === "row" || styles?.flexDirection === "row-reverse" ? "row" : "column",
2613
+ classNames: Array.from(element$1.classList.values()),
2614
+ styles: {
2615
+ direction: styles.flexDirection,
2616
+ opacity: styles.opacity,
2617
+ rowGap: styles.rowGap,
2618
+ columnGap: styles.columnGap,
2619
+ paddingLeft: styles.paddingLeft,
2620
+ paddingRight: styles.paddingRight,
2621
+ paddingTop: styles.paddingTop,
2622
+ paddingBottom: styles.paddingBottom,
2623
+ zIndex: styles.zIndex,
2624
+ position: styles.position,
2625
+ top: styles.top,
2626
+ left: styles.left,
2627
+ right: styles.right,
2628
+ bottom: styles.bottom
2629
+ }
2630
+ };
2631
+ };
2632
+ const w$1 = (w$2) => w$2.parent === w$2 ? w$2 : w$2.parent;
2633
+ const postUpdateLayers = () => {
2634
+ const layerElements = Array.from(root.querySelectorAll(`[${LAYER_ID_ATTR_KEY}]`)).map((el) => toInfo(el));
2635
+ if (layerElements.length === 0) return;
2636
+ w$1(window).postMessage({
2637
+ type: "KARTE-ACTION-PREVIEW-UPDATE-LAYERS",
2638
+ detail: {
2639
+ previewId,
2640
+ layerElements
2641
+ }
2642
+ }, "*");
2643
+ };
2644
+ const rootObserver = new MutationObserver(postUpdateLayers);
2645
+ const handleMessage = (e) => {
2646
+ console.log("message", e);
2647
+ const data = e.data;
2648
+ if (data.event_name === "OVERRIDE_LAYER_STYLE") {
2649
+ const { layerId = "", styles = [] } = data.detail || {};
2650
+ const layerElement = root.querySelector(`[${LAYER_ID_ATTR_KEY}="${layerId}"]`);
2651
+ if (!layerElement) return;
2652
+ styles.forEach(({ key, value }) => {
2653
+ layerElement.style.setProperty(key, value);
2654
+ });
2655
+ }
2656
+ };
2657
+ (() => {
2658
+ const init$1 = () => {
2659
+ root = getActionRoot$1();
2660
+ if (root) {
2661
+ rootObserver.observe(root, {
2662
+ childList: true,
2663
+ subtree: true,
2664
+ characterData: true,
2665
+ attributes: true
2666
+ });
2667
+ timer = setInterval(postUpdateLayers, 1e3);
2668
+ window.addEventListener("message", handleMessage);
2669
+ } else setTimeout(init$1, 30);
2670
+ };
2671
+ init$1();
2672
+ })();
2673
+ return () => {
2674
+ if (timer) clearInterval(timer);
2675
+ rootObserver.disconnect();
2676
+ window.removeEventListener("message", handleMessage);
2677
+ };
2678
+ };
2679
+
2563
2680
  //#endregion
2564
2681
  //#region src/action.ts
2565
2682
  /**
@@ -2604,6 +2721,7 @@ function create(App, options) {
2604
2721
  publish: options.publish,
2605
2722
  data
2606
2723
  };
2724
+ const destroyPreview = initPreview();
2607
2725
  const handleDestroy = () => {
2608
2726
  const { onDestroyHandlers } = getInternalHandlers();
2609
2727
  onDestroyHandlers?.forEach((h$1) => {
@@ -2612,6 +2730,7 @@ function create(App, options) {
2612
2730
  });
2613
2731
  const { onDestroyHandlers: onDestroyWidgetHandlers } = getWidgetHandlers();
2614
2732
  if (onDestroyWidgetHandlers) onDestroyWidgetHandlers.forEach((h$1) => h$1(actionProps));
2733
+ destroyPreview();
2615
2734
  };
2616
2735
  setSystem({
2617
2736
  apiKey: data.api_key || null,
@@ -11548,19 +11667,17 @@ function createComponentRawCss(layerId, define) {
11548
11667
  return define(gen).join("\n");
11549
11668
  }
11550
11669
  function toResponsiveSelector(responsiveSetting, body) {
11551
- const { mediaQueryCondition, userAgentCondition } = responsiveSetting;
11552
- if (mediaQueryCondition) {
11553
- const { raw, range, orientation } = mediaQueryCondition;
11670
+ const { breakpointId } = responsiveSetting;
11671
+ const breakpoint = getBreakpoints().find((v) => v.id === breakpointId);
11672
+ if (breakpoint && breakpoint.mediaQuery) {
11673
+ const { maxWidth, minWidth, orientation } = breakpoint.mediaQuery;
11554
11674
  const prefix = `@media screen and`;
11555
- if (raw) return `${prefix} (${raw}) {\n${body}\n}`;
11556
11675
  const orientationStyle = orientation ? ` and (orientation: ${orientation})` : "";
11557
- if (range) {
11558
- if (range.min && range.max) return `${prefix} (min-width: ${range.min}px)${orientationStyle} and (max-width: ${range.max}) {\n${body}\n}`;
11559
- else if (range.max) return `${prefix} (max-width: ${range.max}px)${orientationStyle} {\n${body}\n}`;
11560
- else if (range.min) return `${prefix} (min-width: ${range.min}px)${orientationStyle} {\n${body}\n}`;
11561
- }
11676
+ if (minWidth && maxWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} and (max-width: ${maxWidth}px) {\n${body}\n}`;
11677
+ else if (maxWidth) return `${prefix} (max-width: ${maxWidth}px)${orientationStyle} {\n${body}\n}`;
11678
+ else if (minWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} {\n${body}\n}`;
11562
11679
  return "";
11563
- } else if (userAgentCondition) return "";
11680
+ }
11564
11681
  return "";
11565
11682
  }
11566
11683
  function toStyleTag(css) {
@@ -11610,11 +11727,7 @@ var Avatar_css_default = (layerId, props) => {
11610
11727
  appearance: "none"
11611
11728
  }),
11612
11729
  toDynamicStyle$3(layerId, props),
11613
- ...props.responsiveSettings?.map((v) => {
11614
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props));
11615
- else if (v.userAgentCondition) return "";
11616
- return "";
11617
- }) ?? [],
11730
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props))) ?? [],
11618
11731
  props.customizeCss
11619
11732
  ]);
11620
11733
  };
@@ -11740,57 +11853,25 @@ var StylePortal = class extends SvelteComponent {
11740
11853
  var StylePortal_default = StylePortal;
11741
11854
 
11742
11855
  //#endregion
11743
- //#region src/components-flex/responsive.ts
11744
- const USER_AGENT_VARIANT = {
11745
- smartphone: { regex: /iPhone|Android.*Mobile/i },
11746
- tablet: { regex: /iPad|Android(?!.*Mobile)/i },
11747
- pc: { regex: /Windows NT|Macintosh|Linux x86_64/i },
11748
- windows: { regex: /Windows NT/i },
11749
- mac: { regex: /Macintosh|Mac OS X/i },
11750
- ios: { regex: /iPhone|iPad|iPod/i },
11751
- android: { regex: /Android/i },
11752
- safari: { regex: /Safari/i },
11753
- chrome: { regex: /Chrome|CriOS/i },
11754
- firefox: { regex: /Firefox/i },
11755
- ios_webview: { regex: /iPhone|iPad|iPod/i },
11756
- android_webview: { regex: /; wv\)/i }
11757
- };
11856
+ //#region src/components-flex/responsiveProp.ts
11758
11857
  const isMatchMediaQueryCondition = (condition) => {
11759
- const { raw, range, orientation } = condition;
11858
+ const { minWidth, maxWidth, orientation } = condition;
11760
11859
  if (orientation) return window.matchMedia(`(orientation: ${condition.orientation})`).matches;
11761
- if (range) {
11762
- const { min, max } = range;
11763
- if (typeof min === "number" && typeof max === "number") return window.matchMedia(`(min-width: ${min}px) and (max-width: ${max}px)`).matches;
11764
- else if (typeof min === "number") return window.matchMedia(`(min-width: ${min}px)`).matches;
11765
- else if (typeof max === "number") return window.matchMedia(`(max-width: ${max}px)`).matches;
11766
- }
11767
- if (raw) return window.matchMedia(raw).matches;
11860
+ if (typeof minWidth === "number" && typeof maxWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px) and (max-width: ${maxWidth}px)`).matches;
11861
+ else if (typeof minWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px)`).matches;
11862
+ else if (typeof maxWidth === "number") return window.matchMedia(`(max-width: ${maxWidth}px)`).matches;
11768
11863
  return false;
11769
11864
  };
11770
- const isMatchUserAgentCondition = (condition) => {
11771
- const { variants, regex } = condition;
11772
- if (variants) return variants.some((variant) => {
11773
- const regex$1 = USER_AGENT_VARIANT[variant]?.regex;
11774
- if (!regex$1) return false;
11775
- return new RegExp(regex$1).test(navigator.userAgent);
11776
- });
11777
- else if (regex) return new RegExp(regex).test(navigator.userAgent);
11778
- return false;
11779
- };
11780
- const isMatchResponsiveSetting = (setting) => {
11781
- const { mediaQueryCondition, userAgentCondition } = setting;
11782
- if (mediaQueryCondition) return isMatchMediaQueryCondition(mediaQueryCondition);
11783
- else if (userAgentCondition) return isMatchUserAgentCondition(userAgentCondition);
11784
- else return false;
11785
- };
11786
11865
  function useResponsiveProps(props) {
11787
11866
  return readable(props, (set) => {
11788
11867
  if (!props.responsiveSettings) {
11789
11868
  set(props);
11790
11869
  return () => {};
11791
11870
  }
11871
+ const breakpoints$1 = getBreakpoints();
11792
11872
  const update = () => {
11793
- const matchedSetting = [...props.responsiveSettings ?? []].reverse().find(isMatchResponsiveSetting);
11873
+ const breakpoint = breakpoints$1.find((v) => v.mediaQuery && isMatchMediaQueryCondition(v.mediaQuery));
11874
+ const matchedSetting = props.responsiveSettings.find((v) => v.breakpointId === breakpoint?.id);
11794
11875
  if (matchedSetting) set(Object.assign({}, props, matchedSetting.props ?? {}));
11795
11876
  else set(props);
11796
11877
  };
@@ -14215,14 +14296,10 @@ var Icon_css_default = (layerId, props, _brandKit) => {
14215
14296
  style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
14216
14297
  style("&[aria-hidden=\"true\"]", { display: "none" }),
14217
14298
  toDynamicStyle$2(layerId, props),
14218
- ...props.responsiveSettings?.map((v) => {
14219
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$2(layerId, {
14220
- variant: v.props.variant ?? props.variant,
14221
- ...v.props
14222
- }));
14223
- else if (v.userAgentCondition) return "";
14224
- return "";
14225
- }) ?? [],
14299
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$2(layerId, {
14300
+ variant: v.props.variant ?? props.variant,
14301
+ ...v.props
14302
+ }))) ?? [],
14226
14303
  props.customizeCss
14227
14304
  ]);
14228
14305
  };
@@ -14637,11 +14714,7 @@ var Button_css_default = (layerId, props, brandKit) => {
14637
14714
  marginRight: "-0.2em"
14638
14715
  }),
14639
14716
  toDynamicStyle$1(layerId, props, brandKit),
14640
- ...props.responsiveSettings?.map((v) => {
14641
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit));
14642
- else if (v.userAgentCondition) return "";
14643
- return "";
14644
- }) ?? [],
14717
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit))) ?? [],
14645
14718
  props.customizeCss
14646
14719
  ]);
14647
14720
  };
@@ -16430,11 +16503,7 @@ var Layout_css_default = (layerId, props, brandKit) => {
16430
16503
  style("&[data-clickable=\"true\"]", { cursor: "pointer" }),
16431
16504
  style("&[data-clickable=\"true\"]:hover", { opacity: .8 }),
16432
16505
  toDynamicStyle$4(props),
16433
- ...props.responsiveSettings?.map((v) => {
16434
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$4(v.props));
16435
- else if (v.userAgentCondition) return "";
16436
- return "";
16437
- }) ?? [],
16506
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4(v.props))) ?? [],
16438
16507
  props.customizeCss
16439
16508
  ]);
16440
16509
  };
@@ -17439,14 +17508,10 @@ var Text_css_default = (layerId, props, brandKit) => {
17439
17508
  wordBreak: "break-all"
17440
17509
  }),
17441
17510
  toDynamicStyle$4(props),
17442
- ...props.responsiveSettings?.map((v) => {
17443
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$4({
17444
- ...v.props,
17445
- content: v.props.content ?? props.content
17446
- }));
17447
- else if (v.userAgentCondition) return "";
17448
- return "";
17449
- }) ?? [],
17511
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4({
17512
+ ...v.props,
17513
+ content: v.props.content ?? props.content
17514
+ }))) ?? [],
17450
17515
  props.customizeCss
17451
17516
  ]);
17452
17517
  };
@@ -17776,14 +17841,10 @@ var TextLink_css_default = (layerId, props, brandKit) => {
17776
17841
  style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
17777
17842
  style("&[aria-hidden=\"true\"]", { display: "none" }),
17778
17843
  toDynamicStyle(layerId, props, brandKit),
17779
- ...props.responsiveSettings?.map((v) => {
17780
- if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle(layerId, {
17781
- ...v.props,
17782
- label: v.props.label ?? props.label
17783
- }, brandKit));
17784
- else if (v.userAgentCondition) return "";
17785
- return "";
17786
- }) ?? [],
17844
+ ...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle(layerId, {
17845
+ ...v.props,
17846
+ label: v.props.label ?? props.label
17847
+ }, brandKit))) ?? [],
17787
17848
  props.customizeCss
17788
17849
  ]);
17789
17850
  };
@@ -20270,7 +20331,7 @@ function create_fragment$14(ctx) {
20270
20331
  }
20271
20332
  function instance$14($$self, $$props, $$invalidate) {
20272
20333
  let rProps;
20273
- let $responsiveProps;
20334
+ let $responsiveSettings;
20274
20335
  let { $$slots: slots = {}, $$scope } = $$props;
20275
20336
  let { props = {} } = $$props;
20276
20337
  let { layerId = crypto.randomUUID() } = $$props;
@@ -20278,8 +20339,8 @@ function instance$14($$self, $$props, $$invalidate) {
20278
20339
  let buttonElement;
20279
20340
  let showTooltip = false;
20280
20341
  const cssCode = ClipCopy_css_default(layerId, props);
20281
- const responsiveProps = useResponsiveProps(props);
20282
- component_subscribe($$self, responsiveProps, (value) => $$invalidate(8, $responsiveProps = value));
20342
+ const responsiveSettings = useResponsiveProps(props);
20343
+ component_subscribe($$self, responsiveSettings, (value) => $$invalidate(8, $responsiveSettings = value));
20283
20344
  const handleClick = async (e) => {
20284
20345
  e.preventDefault();
20285
20346
  const targetText = rProps.content ?? buttonElement?.innerText ?? "";
@@ -20308,7 +20369,7 @@ function instance$14($$self, $$props, $$invalidate) {
20308
20369
  if ("$$scope" in $$props$1) $$invalidate(9, $$scope = $$props$1.$$scope);
20309
20370
  };
20310
20371
  $$self.$$.update = () => {
20311
- if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $responsiveProps);
20372
+ if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $responsiveSettings);
20312
20373
  };
20313
20374
  return [
20314
20375
  layerId,
@@ -20316,10 +20377,10 @@ function instance$14($$self, $$props, $$invalidate) {
20316
20377
  showTooltip,
20317
20378
  rProps,
20318
20379
  cssCode,
20319
- responsiveProps,
20380
+ responsiveSettings,
20320
20381
  handleClick,
20321
20382
  props,
20322
- $responsiveProps,
20383
+ $responsiveSettings,
20323
20384
  $$scope,
20324
20385
  slots,
20325
20386
  button_binding
@@ -20938,8 +20999,8 @@ function create_fragment$10(ctx) {
20938
20999
  let current;
20939
21000
  let if_block = ctx[0] && create_if_block$3(ctx);
20940
21001
  header = new Header_default({});
20941
- const default_slot_template = ctx[3].default;
20942
- const default_slot = create_slot(default_slot_template, ctx, ctx[2], null);
21002
+ const default_slot_template = ctx[4].default;
21003
+ const default_slot = create_slot(default_slot_template, ctx, ctx[3], null);
20943
21004
  return {
20944
21005
  c() {
20945
21006
  if (if_block) if_block.c();
@@ -20981,7 +21042,7 @@ function create_fragment$10(ctx) {
20981
21042
  check_outros();
20982
21043
  }
20983
21044
  if (default_slot) {
20984
- if (default_slot.p && (!current || dirty & 4)) update_slot_base(default_slot, default_slot_template, ctx$1, ctx$1[2], !current ? get_all_dirty_from_scope(ctx$1[2]) : get_slot_changes(default_slot_template, ctx$1[2], dirty, null), null);
21045
+ if (default_slot.p && (!current || dirty & 8)) update_slot_base(default_slot, default_slot_template, ctx$1, ctx$1[3], !current ? get_all_dirty_from_scope(ctx$1[3]) : get_slot_changes(default_slot_template, ctx$1[3], dirty, null), null);
20985
21046
  }
20986
21047
  },
20987
21048
  i(local) {
@@ -21010,15 +21071,19 @@ function instance$10($$self, $$props, $$invalidate) {
21010
21071
  let { $$slots: slots = {}, $$scope } = $$props;
21011
21072
  let { customBrandKit = void 0 } = $$props;
21012
21073
  let { globalCssCode = void 0 } = $$props;
21074
+ let { breakpoints: breakpoints$1 = [] } = $$props;
21013
21075
  setContext("brandKit", getBrandKit(customBrandKit));
21076
+ setBreakpoints(breakpoints$1);
21014
21077
  $$self.$$set = ($$props$1) => {
21015
21078
  if ("customBrandKit" in $$props$1) $$invalidate(1, customBrandKit = $$props$1.customBrandKit);
21016
21079
  if ("globalCssCode" in $$props$1) $$invalidate(0, globalCssCode = $$props$1.globalCssCode);
21017
- if ("$$scope" in $$props$1) $$invalidate(2, $$scope = $$props$1.$$scope);
21080
+ if ("breakpoints" in $$props$1) $$invalidate(2, breakpoints$1 = $$props$1.breakpoints);
21081
+ if ("$$scope" in $$props$1) $$invalidate(3, $$scope = $$props$1.$$scope);
21018
21082
  };
21019
21083
  return [
21020
21084
  globalCssCode,
21021
21085
  customBrandKit,
21086
+ breakpoints$1,
21022
21087
  $$scope,
21023
21088
  slots
21024
21089
  ];
@@ -21028,7 +21093,8 @@ var State = class extends SvelteComponent {
21028
21093
  super();
21029
21094
  init(this, options, instance$10, create_fragment$10, safe_not_equal, {
21030
21095
  customBrandKit: 1,
21031
- globalCssCode: 0
21096
+ globalCssCode: 0,
21097
+ breakpoints: 2
21032
21098
  });
21033
21099
  }
21034
21100
  };
@@ -23317,7 +23383,6 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
23317
23383
  TEXT_THEME: () => TEXT_THEME,
23318
23384
  TEXT_VARIANTS: () => TEXT_VARIANTS,
23319
23385
  TextDirections: () => TextDirections,
23320
- USER_AGENT_VARIANT: () => USER_AGENT_VARIANT,
23321
23386
  WritingModes: () => WritingModes,
23322
23387
  addChoiceAnswer: () => addChoiceAnswer,
23323
23388
  addFreeAnswer: () => addFreeAnswer,
@@ -23368,6 +23433,7 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
23368
23433
  getVariables: () => getVariables,
23369
23434
  hideOnScroll: () => hideOnScroll,
23370
23435
  hideOnTime: () => hideOnTime,
23436
+ initPreview: () => initPreview,
23371
23437
  initialize: () => initialize,
23372
23438
  isOpened: () => isOpened,
23373
23439
  listenLogger: () => listenLogger,
@@ -23725,4 +23791,4 @@ var ThumbnailPreview = class extends SvelteComponent {
23725
23791
  var ThumbnailPreview_default = ThumbnailPreview;
23726
23792
 
23727
23793
  //#endregion
23728
- export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BACKGROUND_COLOR_VARIANT, BACKGROUND_COLOR_VARIANTS, BORDER_COLOR_VARIANT, BORDER_COLOR_VARIANTS, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_THEME, BUTTON_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, Box_default as Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement_default as CodeElement, Countdown_default as Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement_default as EmbedElement, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, FORM_FIELD_LABEL_SIZE, FORM_FIELD_LABEL_THEME, FORM_FIELD_SIZE, FORM_FIELD_TYPE, FORM_FIELD_VARIANT, FORM_FIELD_VARIANT_FOR_CHECKER, FORM_IDENTIFY_FIELD_TYPE, FORM_INPUT_TYPE, Flex_default as Flex, Avatar_default as FlexAvatar, Button_default as FlexButton, ButtonOutlined_default as FlexButtonOutlined, ButtonText_default as FlexButtonText, ClipCopy_default as FlexClipCopy, CloseButton_default as FlexCloseButton, Code_default as FlexCode, CountDown_default as FlexCountDown, CountDownValue_default as FlexCountDownValue, FlexDirections, Form_default as FlexForm, FormField_default as FlexFormField, Icon_default as FlexIcon, Image_default as FlexImage, FlexItem_default as FlexItem, Layout_default as FlexLayout, List_default as FlexList, ListItem_default as FlexListItem, Modal_default as FlexModal, MultiColumn_default as FlexMultiColumn, MultiColumnItem_default as FlexMultiColumnItem, RichText_default as FlexRichText, Slider_default as FlexSlider, SliderItem_default as FlexSliderItem, Text_default as FlexText, TextLink_default as FlexTextLink, Youtube_default as FlexYoutube, Fonts, FormCheckBoxes_default as FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices_default as FormIdentifyChoices, FormIdentifyInput_default as FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons_default as FormRadioButtons, FormRatingButtonsFace_default as FormRatingButtonsFace, FormRatingButtonsNumber_default as FormRatingButtonsNumber, FormSelect_default as FormSelect, FormTextarea_default as FormTextarea, Grid_default as Grid, GridItem_default as GridItem, GridModalState_default as GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement_default as IconElement, ImageBlock_default as ImageBlock, ImageElement_default as ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, List_default$1 as List, ListBackgroundTypes, ListDirections, ListItem_default$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal_default$1 as Modal, ModalPositions, MovieVimeoElement_default as MovieVimeoElement, MovieYouTubeElement_default as MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide_default as Slide, SlideItem_default as SlideItem, State_default as State, StateItem_default as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock_default as TextBlock, TextButtonBlock_default as TextButtonBlock, TextButtonElement_default as TextButtonElement, TextDirections, TextElement_default as TextElement, ThumbnailPreview_default as ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
23794
+ export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BACKGROUND_COLOR_VARIANT, BACKGROUND_COLOR_VARIANTS, BORDER_COLOR_VARIANT, BORDER_COLOR_VARIANTS, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_THEME, BUTTON_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, Box_default as Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement_default as CodeElement, Countdown_default as Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement_default as EmbedElement, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, FORM_FIELD_LABEL_SIZE, FORM_FIELD_LABEL_THEME, FORM_FIELD_SIZE, FORM_FIELD_TYPE, FORM_FIELD_VARIANT, FORM_FIELD_VARIANT_FOR_CHECKER, FORM_IDENTIFY_FIELD_TYPE, FORM_INPUT_TYPE, Flex_default as Flex, Avatar_default as FlexAvatar, Button_default as FlexButton, ButtonOutlined_default as FlexButtonOutlined, ButtonText_default as FlexButtonText, ClipCopy_default as FlexClipCopy, CloseButton_default as FlexCloseButton, Code_default as FlexCode, CountDown_default as FlexCountDown, CountDownValue_default as FlexCountDownValue, FlexDirections, Form_default as FlexForm, FormField_default as FlexFormField, Icon_default as FlexIcon, Image_default as FlexImage, FlexItem_default as FlexItem, Layout_default as FlexLayout, List_default as FlexList, ListItem_default as FlexListItem, Modal_default as FlexModal, MultiColumn_default as FlexMultiColumn, MultiColumnItem_default as FlexMultiColumnItem, RichText_default as FlexRichText, Slider_default as FlexSlider, SliderItem_default as FlexSliderItem, Text_default as FlexText, TextLink_default as FlexTextLink, Youtube_default as FlexYoutube, Fonts, FormCheckBoxes_default as FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices_default as FormIdentifyChoices, FormIdentifyInput_default as FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons_default as FormRadioButtons, FormRatingButtonsFace_default as FormRatingButtonsFace, FormRatingButtonsNumber_default as FormRatingButtonsNumber, FormSelect_default as FormSelect, FormTextarea_default as FormTextarea, Grid_default as Grid, GridItem_default as GridItem, GridModalState_default as GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement_default as IconElement, ImageBlock_default as ImageBlock, ImageElement_default as ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, List_default$1 as List, ListBackgroundTypes, ListDirections, ListItem_default$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal_default$1 as Modal, ModalPositions, MovieVimeoElement_default as MovieVimeoElement, MovieYouTubeElement_default as MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide_default as Slide, SlideItem_default as SlideItem, State_default as State, StateItem_default as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock_default as TextBlock, TextButtonBlock_default as TextButtonBlock, TextButtonElement_default as TextButtonElement, TextDirections, TextElement_default as TextElement, ThumbnailPreview_default as ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initPreview, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
@@ -17,12 +17,13 @@ export type { CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequ
17
17
  export { addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers } from "./form.js";
18
18
  export * as widget from "./widget.js";
19
19
  export { onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES } from "./components/index.js";
20
+ export * from "./preview.js";
20
21
  export * from "./components-flex/form.js";
21
22
  export { default as State } from "./components-flex/state/State.svelte.js";
22
23
  export { default as StateItem } from "./components-flex/state/StateItem.svelte.js";
23
24
  export * from "./components-flex/shared/types.js";
24
25
  export * from "./components-flex/props.js";
25
- export * from "./components-flex/responsive.js";
26
+ export * from "./components-flex/responsiveProp.js";
26
27
  export { default as FlexAvatar } from "./components-flex/avatar/Avatar.svelte.js";
27
28
  export * from "./components-flex/avatar/types.js";
28
29
  export * from "./components-flex/avatar/styles.js";
@@ -0,0 +1,28 @@
1
+ export type ElementInfoStyles = {
2
+ opacity: string;
3
+ rowGap: string;
4
+ columnGap: string;
5
+ direction: string;
6
+ paddingLeft: string;
7
+ paddingRight: string;
8
+ paddingTop: string;
9
+ paddingBottom: string;
10
+ zIndex: string;
11
+ position: string;
12
+ top: string;
13
+ left: string;
14
+ right: string;
15
+ bottom: string;
16
+ };
17
+ export type ElementInfo = {
18
+ top: number;
19
+ left: number;
20
+ width: number;
21
+ height: number;
22
+ layerId: string;
23
+ direction: "row" | "column" | "";
24
+ classNames: string[];
25
+ styles: ElementInfoStyles;
26
+ };
27
+ /** @internal */
28
+ export declare const initPreview: () => (() => void);
@@ -1,6 +1,6 @@
1
1
  import { get as get_ } from "svelte/store";
2
2
  import type { Writable as Writable_ } from "svelte/store";
3
- import type { ActionSetting, ActionEventHandler, ActionVariables, SystemConfig, ActionRunnerContext } from "./types.js";
3
+ import { ActionSetting, ActionEventHandler, ActionVariables, SystemConfig, ActionRunnerContext, Breakpoint } from "./types.js";
4
4
  /** @internal */
5
5
  export type Store<T> = Writable_<T>;
6
6
  /**
@@ -350,6 +350,27 @@ export declare function setDestroyed(on: boolean): void;
350
350
  *
351
351
  * @internal
352
352
  */
353
+ export declare const breakpoints: Store<Breakpoint[]>;
354
+ /**
355
+ * ブレイクポイントの一覧を取得する
356
+ *
357
+ * @returns 現在のブレイクポイントの一覧
358
+ */
359
+ export declare function getBreakpoints(): Breakpoint[];
360
+ /**
361
+ * 変数を設定する
362
+ *
363
+ * @remarks
364
+ * 設定したブレイクポイントは、ビジュアルエディタでブレイクポイントとして利用できます。
365
+ *
366
+ * @param values - ブレイクポイントの一覧
367
+ */
368
+ export declare function setBreakpoints(values: Breakpoint[]): Breakpoint[];
369
+ /**
370
+ * Store to handle variables
371
+ *
372
+ * @internal
373
+ */
353
374
  export declare const variables: Store<{
354
375
  [key: string]: any;
355
376
  }>;
@@ -18,6 +18,19 @@ export type ActionVariables = {
18
18
  [key: string]: any;
19
19
  };
20
20
  /**
21
+ * ブレイクポイント
22
+ *
23
+ * @public
24
+ */
25
+ export type Breakpoint = {
26
+ id: string;
27
+ mediaQuery?: {
28
+ minWidth?: number;
29
+ maxWidth?: number;
30
+ orientation?: "portrait" | "landscape";
31
+ };
32
+ };
33
+ /**
21
34
  * アクションの send 関数
22
35
  *
23
36
  * @public
@@ -4,6 +4,7 @@ export declare const NOOP: Function;
4
4
  /** @internal */
5
5
  export declare const isPreview: () => boolean;
6
6
  export declare const isCanvasPreview: () => boolean;
7
+ export declare const getPreviewId: () => string;
7
8
  export declare const isOnSite: () => boolean;
8
9
  export declare const isInFrame: () => boolean;
9
10
  /** @internal */
@@ -17,6 +17,7 @@ export type { CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequ
17
17
  export { addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers } from "./form.js";
18
18
  export * as widget from "./widget.js";
19
19
  export { onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES } from "./components/index.js";
20
+ export * from "./preview.js";
20
21
  export { default as State } from "./components/State.svelte.js";
21
22
  export { default as StateItem } from "./components/StateItem.svelte.js";
22
23
  export { default as Modal } from "./components/Modal.svelte.js";