@plaidev/karte-action-sdk 1.1.264-29052187.465265af → 1.1.265-29058826.de4fe889

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.
@@ -17,6 +17,11 @@ const ALL_ACTION_ID = 'KARTE_ALL_ACTION_ID';
17
17
  const ALL_ACTION_SHORTEN_ID = 'KARTE_ALL_ACTION_SHORTEN_ID';
18
18
  /** @internal */
19
19
  const DEVICE_IDS = ['PC', 'SP'];
20
+ /** @internal */
21
+ const DEVICE_QUERIES = {
22
+ PC: 'screen and (min-width: 641px)',
23
+ SP: 'screen and (max-width: 640px)',
24
+ };
20
25
  // -------- The following codes are deprecated --------
21
26
  /**
22
27
  * 非推奨
@@ -1617,7 +1622,7 @@ const handleState = (event) => {
1617
1622
  *
1618
1623
  * @public
1619
1624
  */
1620
- function onShow(fn) {
1625
+ function onShow$1(fn) {
1621
1626
  let { onShowHandlers } = getInternalHandlers();
1622
1627
  if (!onShowHandlers) {
1623
1628
  onShowHandlers = [];
@@ -1632,7 +1637,7 @@ function onShow(fn) {
1632
1637
  *
1633
1638
  * @public
1634
1639
  */
1635
- function onClose(fn) {
1640
+ function onClose$1(fn) {
1636
1641
  let { onCloseHandlers } = getInternalHandlers();
1637
1642
  if (!onCloseHandlers) {
1638
1643
  onCloseHandlers = [];
@@ -1647,7 +1652,7 @@ function onClose(fn) {
1647
1652
  *
1648
1653
  * @public
1649
1654
  */
1650
- function onChangeState(fn) {
1655
+ function onChangeState$1(fn) {
1651
1656
  let { onChangeStateHandlers } = getInternalHandlers();
1652
1657
  if (!onChangeStateHandlers) {
1653
1658
  onChangeStateHandlers = [];
@@ -1660,7 +1665,7 @@ function onChangeState(fn) {
1660
1665
  *
1661
1666
  * @public
1662
1667
  */
1663
- function showAction() {
1668
+ function showAction$1() {
1664
1669
  const event = new CustomEvent(ACTION_SHOW_EVENT, { detail: { trigger: 'custom' } });
1665
1670
  window.dispatchEvent(event);
1666
1671
  }
@@ -1671,7 +1676,7 @@ function showAction() {
1671
1676
  *
1672
1677
  * @public
1673
1678
  */
1674
- function closeAction(trigger = 'none') {
1679
+ function closeAction$1(trigger = 'none') {
1675
1680
  const event = new CustomEvent(ACTION_CLOSE_EVENT, { detail: { trigger } });
1676
1681
  window.dispatchEvent(event);
1677
1682
  }
@@ -1684,11 +1689,11 @@ function closeAction(trigger = 'none') {
1684
1689
  *
1685
1690
  * @public
1686
1691
  */
1687
- async function applyCss(css) {
1692
+ async function applyCss$1(css) {
1688
1693
  return new Promise((resolve, reject) => {
1689
1694
  const style = document.createElement('style');
1690
1695
  style.textContent = css;
1691
- const shadowRoot = getActionRoot();
1696
+ const shadowRoot = getActionRoot$1();
1692
1697
  if (!shadowRoot)
1693
1698
  return;
1694
1699
  shadowRoot.append(style);
@@ -1696,7 +1701,7 @@ async function applyCss(css) {
1696
1701
  style.addEventListener('error', () => reject(style));
1697
1702
  });
1698
1703
  }
1699
- async function fixFontFaceIssue(href, cssRules) {
1704
+ async function fixFontFaceIssue$1(href, cssRules) {
1700
1705
  const css = new CSSStyleSheet();
1701
1706
  // @ts-ignore
1702
1707
  await css.replace(cssRules);
@@ -1726,8 +1731,8 @@ async function fixFontFaceIssue(href, cssRules) {
1726
1731
  *
1727
1732
  * @public
1728
1733
  */
1729
- async function loadStyle(href) {
1730
- const sr = getActionRoot();
1734
+ async function loadStyle$1(href) {
1735
+ const sr = getActionRoot$1();
1731
1736
  if (!sr)
1732
1737
  return;
1733
1738
  let cssRules = '';
@@ -1742,7 +1747,7 @@ async function loadStyle(href) {
1742
1747
  return;
1743
1748
  // Chromeのバグで、Shadow Rootの@font-faceを絶対パスで指定する必要がある
1744
1749
  // @see https://stackoverflow.com/a/63717709
1745
- const [rules, fontFaceRules] = await fixFontFaceIssue(href, cssRules);
1750
+ const [rules, fontFaceRules] = await fixFontFaceIssue$1(href, cssRules);
1746
1751
  const css = new CSSStyleSheet();
1747
1752
  // @ts-ignore
1748
1753
  await css.replace(rules);
@@ -1757,7 +1762,7 @@ async function loadStyle(href) {
1757
1762
  document.adoptedStyleSheets = [...document.adoptedStyleSheets, css, fontFaceCss];
1758
1763
  }
1759
1764
  // @internal
1760
- function getCssVariables(data) {
1765
+ function getCssVariables$1(data) {
1761
1766
  return Object.entries(data)
1762
1767
  .filter(([key, value]) => {
1763
1768
  return ['string', 'number'].includes(typeof value) && key.startsWith('--');
@@ -1772,7 +1777,7 @@ function getCssVariables(data) {
1772
1777
  *
1773
1778
  * @public
1774
1779
  */
1775
- function getActionRoot() {
1780
+ function getActionRoot$1() {
1776
1781
  const root = document.querySelector(`.${KARTE_ACTION_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`);
1777
1782
  if (!root?.shadowRoot) {
1778
1783
  return null;
@@ -1874,7 +1879,7 @@ function createModal(App, options = {
1874
1879
  return;
1875
1880
  }
1876
1881
  const props = {
1877
- target: ensureActionRoot(!true),
1882
+ target: ensureActionRoot$1(!true),
1878
1883
  hydrate: true,
1879
1884
  props: {
1880
1885
  send: options.send,
@@ -1965,7 +1970,7 @@ function createModal(App, options = {
1965
1970
  return appCleanup;
1966
1971
  }
1967
1972
  /** @internal */
1968
- function ensureActionRoot(useShadow = true) {
1973
+ function ensureActionRoot$1(useShadow = true) {
1969
1974
  const systemConfig = getSystem();
1970
1975
  const rootAttrs = {
1971
1976
  class: `${KARTE_ACTION_ROOT} ${KARTE_MODAL_ROOT}`,
@@ -1995,7 +2000,7 @@ function ensureActionRoot(useShadow = true) {
1995
2000
  *
1996
2001
  * @internal
1997
2002
  */
1998
- const show = showAction;
2003
+ const show$1 = showAction$1;
1999
2004
  /**
2000
2005
  * 非推奨
2001
2006
  *
@@ -2003,7 +2008,7 @@ const show = showAction;
2003
2008
  *
2004
2009
  * @internal
2005
2010
  */
2006
- const close = closeAction;
2011
+ const close$1 = closeAction$1;
2007
2012
  /**
2008
2013
  * 非推奨
2009
2014
  *
@@ -2011,7 +2016,7 @@ const close = closeAction;
2011
2016
  *
2012
2017
  * @internal
2013
2018
  */
2014
- const ensureModalRoot = ensureActionRoot;
2019
+ const ensureModalRoot$1 = ensureActionRoot$1;
2015
2020
  /**
2016
2021
  * 非推奨
2017
2022
  *
@@ -2019,7 +2024,7 @@ const ensureModalRoot = ensureActionRoot;
2019
2024
  *
2020
2025
  * @internal
2021
2026
  */
2022
- function createApp(App, options = {
2027
+ function createApp$1(App, options = {
2023
2028
  send: () => { },
2024
2029
  publish: () => { },
2025
2030
  props: {},
@@ -2050,7 +2055,7 @@ function createApp(App, options = {
2050
2055
  },
2051
2056
  };
2052
2057
  {
2053
- const win = ensureModalRoot(false);
2058
+ const win = ensureModalRoot$1(false);
2054
2059
  appArgs.target = win;
2055
2060
  appArgs.hydrate = true;
2056
2061
  }
@@ -2073,8 +2078,8 @@ function createApp(App, options = {
2073
2078
  *
2074
2079
  * @internal
2075
2080
  */
2076
- function createFog({ color = '#000', opacity = '50%', zIndex = 999, onclick, }) {
2077
- const root = ensureModalRoot(false);
2081
+ function createFog$1({ color = '#000', opacity = '50%', zIndex = 999, onclick, }) {
2082
+ const root = ensureModalRoot$1(false);
2078
2083
  if (root.querySelector('.__krt-fog')) {
2079
2084
  return { fog: null, close: () => { } };
2080
2085
  }
@@ -2820,13 +2825,13 @@ var widget = /*#__PURE__*/Object.freeze({
2820
2825
  collection: collection,
2821
2826
  getState: getState,
2822
2827
  getVal: getVal,
2823
- hide: closeAction,
2828
+ hide: closeAction$1,
2824
2829
  method: method,
2825
2830
  on: on,
2826
2831
  onChangeVal: onChangeVal,
2827
2832
  setState: setState,
2828
2833
  setVal: setVal,
2829
- show: showAction,
2834
+ show: showAction$1,
2830
2835
  storage: storage
2831
2836
  });
2832
2837
 
@@ -17038,8 +17043,8 @@ function instance$k($$self, $$props, $$invalidate) {
17038
17043
  flexDirection: props.direction,
17039
17044
  alignItems: props.align,
17040
17045
  justifyContent: props.justify,
17041
- rowGap: props.rowGap,
17042
- columnGap: props.columnGap,
17046
+ rowGap: props.rowGap ?? props.gap,
17047
+ columnGap: props.columnGap ?? props.gap,
17043
17048
  width: props.width,
17044
17049
  ...toCssOverflow(props),
17045
17050
  ...toCssShadow(props),
@@ -18644,7 +18649,7 @@ function add_css$9(target) {
18644
18649
  append_styles(target, "svelte-45ue06", "*{box-sizing:border-box}.modal.svelte-45ue06{position:fixed;z-index:2147483647;display:flex}.modal.svelte-45ue06 > .button{flex:auto;display:flex}@media screen and (min-width: 641px){.modal-bp.svelte-45ue06{height:var(--modal-bp-height-pc) !important;width:var(--modal-bp-width-pc) !important;top:var(--modal-bp-top-pc) !important;left:var(--modal-bp-left-pc) !important;bottom:var(--modal-bp-bottom-pc) !important;right:var(--modal-bp-right-pc) !important;transform:var(--modal-bp-transform-pc);margin:var(--modal-bp-margin-pc) !important}.background-bp-pc{display:block}.background-bp-sp{display:none}}@media screen and (max-width: 640px){.modal-bp.svelte-45ue06{height:var(--modal-bp-height-sp) !important;width:var(--modal-bp-width-sp) !important;top:var(--modal-bp-top-sp) !important;left:var(--modal-bp-left-sp) !important;bottom:var(--modal-bp-bottom-sp) !important;right:var(--modal-bp-right-sp) !important;transform:var(--modal-bp-transform-sp);margin:var(--modal-bp-margin-sp) !important}.background-bp-pc{display:none}.background-bp-sp{display:block}}");
18645
18650
  }
18646
18651
 
18647
- // (237:0) {:else}
18652
+ // (220:0) {:else}
18648
18653
  function create_else_block(ctx) {
18649
18654
  let backgroundoverlay;
18650
18655
  let current;
@@ -18691,7 +18696,7 @@ function create_else_block(ctx) {
18691
18696
  };
18692
18697
  }
18693
18698
 
18694
- // (226:24)
18699
+ // (209:24)
18695
18700
  function create_if_block_2(ctx) {
18696
18701
  let backgroundoverlay0;
18697
18702
  let t;
@@ -18765,7 +18770,7 @@ function create_if_block_2(ctx) {
18765
18770
  };
18766
18771
  }
18767
18772
 
18768
- // (224:0) {#if isPreview()}
18773
+ // (207:0) {#if !isOnSite}
18769
18774
  function create_if_block_1$1(ctx) {
18770
18775
  return {
18771
18776
  c: noop,
@@ -18778,15 +18783,15 @@ function create_if_block_1$1(ctx) {
18778
18783
  };
18779
18784
  }
18780
18785
 
18781
- // (240:0) {#if visible}
18786
+ // (223:0) {#if visible}
18782
18787
  function create_if_block$3(ctx) {
18783
18788
  let div;
18784
18789
  let div_class_value;
18785
18790
  let div_style_value;
18786
18791
  let div_intro;
18787
18792
  let current;
18788
- const default_slot_template = /*#slots*/ ctx[26].default;
18789
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[25], null);
18793
+ const default_slot_template = /*#slots*/ ctx[27].default;
18794
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[26], null);
18790
18795
 
18791
18796
  return {
18792
18797
  c() {
@@ -18813,7 +18818,7 @@ function create_if_block$3(ctx) {
18813
18818
  attr(div, "role", "dialog");
18814
18819
  attr(div, "aria-modal", "true");
18815
18820
  attr(div, "data-layer-id", /*layerId*/ ctx[2]);
18816
- attr(div, "style", div_style_value = [Array.from(/*modalStyles*/ ctx[14]).join(';'), /*style*/ ctx[9]].join(' '));
18821
+ attr(div, "style", div_style_value = [Array.from(/*modalStyles*/ ctx[15]).join(';'), /*style*/ ctx[9]].join(' '));
18817
18822
  },
18818
18823
  m(target, anchor) {
18819
18824
  insert_hydration(target, div, anchor);
@@ -18822,22 +18827,22 @@ function create_if_block$3(ctx) {
18822
18827
  default_slot.m(div, null);
18823
18828
  }
18824
18829
 
18825
- /*div_binding*/ ctx[27](div);
18830
+ /*div_binding*/ ctx[28](div);
18826
18831
  current = true;
18827
18832
  },
18828
18833
  p(new_ctx, dirty) {
18829
18834
  ctx = new_ctx;
18830
18835
 
18831
18836
  if (default_slot) {
18832
- if (default_slot.p && (!current || dirty & /*$$scope*/ 33554432)) {
18837
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 67108864)) {
18833
18838
  update_slot_base(
18834
18839
  default_slot,
18835
18840
  default_slot_template,
18836
18841
  ctx,
18837
- /*$$scope*/ ctx[25],
18842
+ /*$$scope*/ ctx[26],
18838
18843
  !current
18839
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[25])
18840
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[25], dirty, null),
18844
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[26])
18845
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[26], dirty, null),
18841
18846
  null
18842
18847
  );
18843
18848
  }
@@ -18851,7 +18856,7 @@ function create_if_block$3(ctx) {
18851
18856
  attr(div, "data-layer-id", /*layerId*/ ctx[2]);
18852
18857
  }
18853
18858
 
18854
- if (!current || dirty & /*style*/ 512 && div_style_value !== (div_style_value = [Array.from(/*modalStyles*/ ctx[14]).join(';'), /*style*/ ctx[9]].join(' '))) {
18859
+ if (!current || dirty & /*style*/ 512 && div_style_value !== (div_style_value = [Array.from(/*modalStyles*/ ctx[15]).join(';'), /*style*/ ctx[9]].join(' '))) {
18855
18860
  attr(div, "style", div_style_value);
18856
18861
  }
18857
18862
  },
@@ -18879,13 +18884,12 @@ function create_if_block$3(ctx) {
18879
18884
  d(detaching) {
18880
18885
  if (detaching) detach(div);
18881
18886
  if (default_slot) default_slot.d(detaching);
18882
- /*div_binding*/ ctx[27](null);
18887
+ /*div_binding*/ ctx[28](null);
18883
18888
  }
18884
18889
  };
18885
18890
  }
18886
18891
 
18887
18892
  function create_fragment$d(ctx) {
18888
- let show_if;
18889
18893
  let current_block_type_index;
18890
18894
  let if_block0;
18891
18895
  let t;
@@ -18897,8 +18901,7 @@ function create_fragment$d(ctx) {
18897
18901
  const if_blocks = [];
18898
18902
 
18899
18903
  function select_block_type(ctx, dirty) {
18900
- if (show_if == null) show_if = !!isPreview();
18901
- if (show_if) return 0;
18904
+ if (!/*isOnSite*/ ctx[14]) return 0;
18902
18905
  if (/*useBreakPoint*/ ctx[0]) return 1;
18903
18906
  return 2;
18904
18907
  }
@@ -19028,8 +19031,11 @@ function instance$d($$self, $$props, $$invalidate) {
19028
19031
  let { layerId = '' } = $$props;
19029
19032
  const { brandKit } = useBrandKit();
19030
19033
 
19034
+ // falseが明示的に指定されている場合以外はtrueにする
19035
+ const isOnSite = (document.querySelector('#preview')?.getAttribute('data-on-site') ?? 'true') !== 'false';
19036
+
19031
19037
  // モーダル背景の設定
19032
- placement && placement.backgroundOverlay !== undefined;
19038
+ const isExistBackgroundOverlayValue = placement && placement.backgroundOverlay !== undefined;
19033
19039
 
19034
19040
  let backgroundOverlay = DefaultModalPlacement.backgroundOverlay;
19035
19041
  let backgroundOverlayPC = DefaultModalPlacement.backgroundOverlay;
@@ -19059,20 +19065,20 @@ function instance$d($$self, $$props, $$invalidate) {
19059
19065
 
19060
19066
  $$self.$$set = $$props => {
19061
19067
  if ('useBreakPoint' in $$props) $$invalidate(0, useBreakPoint = $$props.useBreakPoint);
19062
- if ('placement' in $$props) $$invalidate(15, placement = $$props.placement);
19063
- if ('breakPoint' in $$props) $$invalidate(16, breakPoint = $$props.breakPoint);
19064
- if ('elasticity' in $$props) $$invalidate(17, elasticity = $$props.elasticity);
19068
+ if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
19069
+ if ('breakPoint' in $$props) $$invalidate(17, breakPoint = $$props.breakPoint);
19070
+ if ('elasticity' in $$props) $$invalidate(18, elasticity = $$props.elasticity);
19065
19071
  if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
19066
- if ('props' in $$props) $$invalidate(18, props = $$props.props);
19067
- if ('closeEventName' in $$props) $$invalidate(19, closeEventName = $$props.closeEventName);
19068
- if ('closeEventValue' in $$props) $$invalidate(20, closeEventValue = $$props.closeEventValue);
19072
+ if ('props' in $$props) $$invalidate(19, props = $$props.props);
19073
+ if ('closeEventName' in $$props) $$invalidate(20, closeEventName = $$props.closeEventName);
19074
+ if ('closeEventValue' in $$props) $$invalidate(21, closeEventValue = $$props.closeEventValue);
19069
19075
  if ('layerId' in $$props) $$invalidate(2, layerId = $$props.layerId);
19070
- if ('$$scope' in $$props) $$invalidate(25, $$scope = $$props.$$scope);
19076
+ if ('$$scope' in $$props) $$invalidate(26, $$scope = $$props.$$scope);
19071
19077
  };
19072
19078
 
19073
19079
  $$self.$$.update = () => {
19074
- if ($$self.$$.dirty & /*closeEventName, closeEventValue*/ 1572864) {
19075
- $$invalidate(24, close = () => {
19080
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue*/ 3145728) {
19081
+ $$invalidate(25, close = () => {
19076
19082
  const onClose = { operation: 'closeApp', args: ['button'] };
19077
19083
 
19078
19084
  if (closeEventName) {
@@ -19083,8 +19089,11 @@ function instance$d($$self, $$props, $$invalidate) {
19083
19089
  });
19084
19090
  }
19085
19091
 
19086
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 98305) {
19092
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
19087
19093
  {
19094
+ if (isOnSite && isExistBackgroundOverlayValue) {
19095
+ $$invalidate(4, backgroundOverlay = placement.backgroundOverlay);
19096
+ }
19088
19097
 
19089
19098
  if (useBreakPoint) {
19090
19099
  const pc = breakPoint?.PC?.placement?.backgroundOverlay;
@@ -19095,29 +19104,29 @@ function instance$d($$self, $$props, $$invalidate) {
19095
19104
  }
19096
19105
  }
19097
19106
 
19098
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 98305) {
19107
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
19099
19108
  {
19100
19109
  if (placement && placement.backgroundClick) {
19101
- $$invalidate(21, backgroundClickFunction = placement.backgroundClick);
19110
+ $$invalidate(22, backgroundClickFunction = placement.backgroundClick);
19102
19111
  }
19103
19112
 
19104
19113
  if (useBreakPoint) {
19105
19114
  const pc = breakPoint?.PC?.placement?.backgroundClick;
19106
19115
 
19107
19116
  if (pc) {
19108
- $$invalidate(22, backgroundClickFunctionPC = pc);
19117
+ $$invalidate(23, backgroundClickFunctionPC = pc);
19109
19118
  }
19110
19119
 
19111
19120
  const sp = breakPoint?.SP?.placement?.backgroundClick;
19112
19121
 
19113
19122
  if (sp) {
19114
- $$invalidate(23, backgroundClickFunctionSP = sp);
19123
+ $$invalidate(24, backgroundClickFunctionSP = sp);
19115
19124
  }
19116
19125
  }
19117
19126
  }
19118
19127
  }
19119
19128
 
19120
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 3670016) {
19129
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 7340032) {
19121
19130
  $$invalidate(13, backgroundClick = () => {
19122
19131
  if (closeEventName) {
19123
19132
  send_event(closeEventName, closeEventValue);
@@ -19127,7 +19136,7 @@ function instance$d($$self, $$props, $$invalidate) {
19127
19136
  });
19128
19137
  }
19129
19138
 
19130
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionPC*/ 5767168) {
19139
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionPC*/ 11534336) {
19131
19140
  $$invalidate(12, backgroundClickPC = () => {
19132
19141
  if (closeEventName) {
19133
19142
  send_event(closeEventName, closeEventValue);
@@ -19137,7 +19146,7 @@ function instance$d($$self, $$props, $$invalidate) {
19137
19146
  });
19138
19147
  }
19139
19148
 
19140
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionSP*/ 9961472) {
19149
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionSP*/ 19922944) {
19141
19150
  $$invalidate(11, backgroundClickSP = () => {
19142
19151
  if (closeEventName) {
19143
19152
  send_event(closeEventName, closeEventValue);
@@ -19147,12 +19156,16 @@ function instance$d($$self, $$props, $$invalidate) {
19147
19156
  });
19148
19157
  }
19149
19158
 
19150
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint, transforms*/ 98313) {
19159
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint, transforms*/ 196617) {
19151
19160
  // 表示位置のスタイルとアニメーションの動きを設定
19152
19161
  {
19153
19162
  // 表示位置のスタイルの設定
19154
19163
  let position = DefaultModalPlacement.position;
19155
19164
 
19165
+ if (isOnSite && placement && placement.position !== null) {
19166
+ position = placement.position;
19167
+ }
19168
+
19156
19169
  let positionStyle = getPositionStyle(position);
19157
19170
 
19158
19171
  if (!useBreakPoint) {
@@ -19166,6 +19179,16 @@ function instance$d($$self, $$props, $$invalidate) {
19166
19179
  $$invalidate(3, transforms = []);
19167
19180
 
19168
19181
  DEVICE_IDS.forEach(deviceId => {
19182
+ if (isOnSite && useBreakPoint) {
19183
+ const positionWithBp = breakPoint[deviceId]?.placement?.position;
19184
+
19185
+ transforms.push({
19186
+ query: DEVICE_QUERIES[deviceId],
19187
+ ...getTransform(positionWithBp)
19188
+ });
19189
+
19190
+ positionStyle = getPositionStyle(positionWithBp);
19191
+ }
19169
19192
 
19170
19193
  const positionVariables = stringifyStyleObj(formatObjectKey({
19171
19194
  obj: parseStyle(positionStyle),
@@ -19181,11 +19204,15 @@ function instance$d($$self, $$props, $$invalidate) {
19181
19204
  }
19182
19205
  }
19183
19206
 
19184
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 98305) {
19207
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
19185
19208
  // 表示位置の調整のスタイルを設定
19186
19209
  {
19187
19210
  let margin = DefaultModalPlacement.margin;
19188
19211
 
19212
+ if (isOnSite && placement && placement.margin !== null) {
19213
+ margin = placement.margin;
19214
+ }
19215
+
19189
19216
  let marginStyle = getMarginStyle(margin);
19190
19217
 
19191
19218
  if (!useBreakPoint) {
@@ -19193,6 +19220,10 @@ function instance$d($$self, $$props, $$invalidate) {
19193
19220
  }
19194
19221
 
19195
19222
  DEVICE_IDS.forEach(deviceId => {
19223
+ if (isOnSite && useBreakPoint) {
19224
+ const marginWithBp = breakPoint[deviceId]?.placement?.margin;
19225
+ marginStyle = getMarginStyle(marginWithBp);
19226
+ }
19196
19227
 
19197
19228
  const marginVariables = stringifyStyleObj(formatObjectKey({
19198
19229
  obj: parseStyle(marginStyle),
@@ -19205,33 +19236,11 @@ function instance$d($$self, $$props, $$invalidate) {
19205
19236
  }
19206
19237
  }
19207
19238
 
19208
- if ($$self.$$.dirty & /*elasticity, useBreakPoint, breakPoint*/ 196609) {
19209
- // 拡大方法のスタイルを設定
19210
- {
19211
- let elasticStyle = ElasticityStyle['none' ];
19212
-
19213
- if (!useBreakPoint) {
19214
- modalStyles.add(elasticStyle);
19215
- }
19216
-
19217
- DEVICE_IDS.forEach(deviceId => {
19218
-
19219
- const elasticityVariables = stringifyStyleObj(formatObjectKey({
19220
- obj: parseStyle(elasticStyle),
19221
- prefix: '--modal-bp-',
19222
- suffix: `-${deviceId.toLowerCase()}`
19223
- }));
19224
-
19225
- modalStyles.add(elasticityVariables);
19226
- });
19227
- }
19228
- }
19229
-
19230
- if ($$self.$$.dirty & /*close*/ 16777216) {
19239
+ if ($$self.$$.dirty & /*close*/ 33554432) {
19231
19240
  $$invalidate(10, handle_keydown = handleKeydown({ Escape: close }));
19232
19241
  }
19233
19242
 
19234
- if ($$self.$$.dirty & /*props*/ 262144) {
19243
+ if ($$self.$$.dirty & /*props*/ 524288) {
19235
19244
  $$invalidate(9, style = objToStyle({
19236
19245
  width: props.width,
19237
19246
  ...toCssOverflow(props),
@@ -19264,6 +19273,7 @@ function instance$d($$self, $$props, $$invalidate) {
19264
19273
  backgroundClickSP,
19265
19274
  backgroundClickPC,
19266
19275
  backgroundClick,
19276
+ isOnSite,
19267
19277
  modalStyles,
19268
19278
  placement,
19269
19279
  breakPoint,
@@ -19293,13 +19303,13 @@ class Modal extends SvelteComponent {
19293
19303
  safe_not_equal,
19294
19304
  {
19295
19305
  useBreakPoint: 0,
19296
- placement: 15,
19297
- breakPoint: 16,
19298
- elasticity: 17,
19306
+ placement: 16,
19307
+ breakPoint: 17,
19308
+ elasticity: 18,
19299
19309
  animation: 1,
19300
- props: 18,
19301
- closeEventName: 19,
19302
- closeEventValue: 20,
19310
+ props: 19,
19311
+ closeEventName: 20,
19312
+ closeEventValue: 21,
19303
19313
  layerId: 2
19304
19314
  },
19305
19315
  add_css$9
@@ -20913,6 +20923,312 @@ class ClipCopy extends SvelteComponent {
20913
20923
  }
20914
20924
  }
20915
20925
 
20926
+ /**
20927
+ * モーダル(ポップアップ)に関連するコードの管理
20928
+ *
20929
+ * アクションのShow, Close, ChangeStateの状態はここで管理する。
20930
+ */
20931
+ /**
20932
+ * アクションが表示 (show) された後にフックする関数
20933
+ *
20934
+ * @param fn - 呼び出されるフック関数
20935
+ *
20936
+ * @public
20937
+ */
20938
+ function onShow(fn) {
20939
+ let { onShowHandlers } = getInternalHandlers();
20940
+ if (!onShowHandlers) {
20941
+ onShowHandlers = [];
20942
+ }
20943
+ onShowHandlers.push(fn);
20944
+ setInternalHandlers({ onShowHandlers });
20945
+ }
20946
+ /**
20947
+ * アクションがクローズ (close) される前にフックする関数
20948
+ *
20949
+ * @param fn - 呼び出されるフック関数
20950
+ *
20951
+ * @public
20952
+ */
20953
+ function onClose(fn) {
20954
+ let { onCloseHandlers } = getInternalHandlers();
20955
+ if (!onCloseHandlers) {
20956
+ onCloseHandlers = [];
20957
+ }
20958
+ onCloseHandlers.push(fn);
20959
+ setInternalHandlers({ onCloseHandlers });
20960
+ }
20961
+ /**
20962
+ * アクションのステートが変更された (changeState) 後にフックする関数
20963
+ *
20964
+ * @param fn - 呼び出されるフック関数
20965
+ *
20966
+ * @public
20967
+ */
20968
+ function onChangeState(fn) {
20969
+ let { onChangeStateHandlers } = getInternalHandlers();
20970
+ if (!onChangeStateHandlers) {
20971
+ onChangeStateHandlers = [];
20972
+ }
20973
+ onChangeStateHandlers.push(fn);
20974
+ setInternalHandlers({ onChangeStateHandlers });
20975
+ }
20976
+ /**
20977
+ * アクションを表示する
20978
+ *
20979
+ * @public
20980
+ */
20981
+ function showAction() {
20982
+ const event = new CustomEvent(ACTION_SHOW_EVENT, { detail: { trigger: 'custom' } });
20983
+ window.dispatchEvent(event);
20984
+ }
20985
+ /**
20986
+ * アクションを閉じる
20987
+ *
20988
+ * @param trigger - 閉じた時のトリガー。デフォルト `'none'`
20989
+ *
20990
+ * @public
20991
+ */
20992
+ function closeAction(trigger = 'none') {
20993
+ const event = new CustomEvent(ACTION_CLOSE_EVENT, { detail: { trigger } });
20994
+ window.dispatchEvent(event);
20995
+ }
20996
+ /**
20997
+ * アクションに CSS を適用する
20998
+ *
20999
+ * @param css - 適用する CSS
21000
+ *
21001
+ * @returns 適用された style 要素を返す Promise
21002
+ *
21003
+ * @public
21004
+ */
21005
+ async function applyCss(css) {
21006
+ return new Promise((resolve, reject) => {
21007
+ const style = document.createElement('style');
21008
+ style.textContent = css;
21009
+ const shadowRoot = getActionRoot();
21010
+ if (!shadowRoot)
21011
+ return;
21012
+ shadowRoot.append(style);
21013
+ style.addEventListener('load', () => resolve(style));
21014
+ style.addEventListener('error', () => reject(style));
21015
+ });
21016
+ }
21017
+ async function fixFontFaceIssue(href, cssRules) {
21018
+ const css = new CSSStyleSheet();
21019
+ // @ts-ignore
21020
+ await css.replace(cssRules);
21021
+ const rules = [];
21022
+ const fixedRules = [];
21023
+ Array.from(css.cssRules).forEach(cssRule => {
21024
+ if (cssRule.type !== 5) {
21025
+ rules.push(cssRule.cssText);
21026
+ }
21027
+ // type 5 is @font-face
21028
+ const split = href.split('/');
21029
+ const stylePath = split.slice(0, split.length - 1).join('/');
21030
+ const cssText = cssRule.cssText;
21031
+ const newCssText = cssText.replace(
21032
+ // relative paths
21033
+ /url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g, `url("${stylePath}/$4")`);
21034
+ if (cssText === newCssText)
21035
+ return;
21036
+ fixedRules.push(newCssText);
21037
+ });
21038
+ return [rules.join('\n'), fixedRules.join('\n')];
21039
+ }
21040
+ /**
21041
+ * アクションにグローバルなスタイルを読み込む
21042
+ *
21043
+ * @param href - style ファイルのリンク URL
21044
+ *
21045
+ * @public
21046
+ */
21047
+ async function loadStyle(href) {
21048
+ const sr = getActionRoot();
21049
+ if (!sr)
21050
+ return;
21051
+ let cssRules = '';
21052
+ try {
21053
+ const res = await fetch(href);
21054
+ cssRules = await res.text();
21055
+ }
21056
+ catch (_) {
21057
+ // pass
21058
+ }
21059
+ if (!cssRules)
21060
+ return;
21061
+ // Chromeのバグで、Shadow Rootの@font-faceを絶対パスで指定する必要がある
21062
+ // @see https://stackoverflow.com/a/63717709
21063
+ const [rules, fontFaceRules] = await fixFontFaceIssue(href, cssRules);
21064
+ const css = new CSSStyleSheet();
21065
+ // @ts-ignore
21066
+ await css.replace(rules);
21067
+ const fontFaceCss = new CSSStyleSheet();
21068
+ // @ts-ignore
21069
+ await fontFaceCss.replace(fontFaceRules);
21070
+ // @ts-ignore
21071
+ sr.adoptedStyleSheets = [...sr.adoptedStyleSheets, css, fontFaceCss];
21072
+ // Chromeのバグで、ページとShadow Rootの両方に、@font-faceを設定する必要がある
21073
+ // @see https://stackoverflow.com/a/63717709
21074
+ // @ts-ignore
21075
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, css, fontFaceCss];
21076
+ }
21077
+ // @internal
21078
+ function getCssVariables(data) {
21079
+ return Object.entries(data)
21080
+ .filter(([key, value]) => {
21081
+ return ['string', 'number'].includes(typeof value) && key.startsWith('--');
21082
+ })
21083
+ .map(([key, value]) => `${key}:${value}`)
21084
+ .join(';');
21085
+ }
21086
+ /**
21087
+ * アクションのルートの DOM 要素を取得する
21088
+ *
21089
+ * @returns アクションがルートの DOM 要素 を持つ場合は DOM 要素を返します。ない場合は `null` を返します
21090
+ *
21091
+ * @public
21092
+ */
21093
+ function getActionRoot() {
21094
+ const root = document.querySelector(`.${KARTE_ACTION_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`);
21095
+ if (!root?.shadowRoot) {
21096
+ return null;
21097
+ }
21098
+ return root.shadowRoot;
21099
+ }
21100
+ /** @internal */
21101
+ function ensureActionRoot() {
21102
+ const systemConfig = getSystem();
21103
+ const rootAttrs = {
21104
+ class: `${KARTE_ACTION_ROOT} ${KARTE_MODAL_ROOT}`,
21105
+ [`data-${KARTE_ACTION_RID}`]: actionId,
21106
+ [`data-${KARTE_ACTION_SHORTEN_ID}`]: systemConfig.shortenId
21107
+ ? systemConfig.shortenId
21108
+ : ALL_ACTION_SHORTEN_ID,
21109
+ style: { display: 'block' },
21110
+ };
21111
+ let el = document.querySelector(`.${KARTE_MODAL_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`);
21112
+ if (el == null) {
21113
+ el = h('div', rootAttrs);
21114
+ document.body.appendChild(el);
21115
+ }
21116
+ const isShadow = !!document.body.attachShadow;
21117
+ if (isShadow) {
21118
+ return el.shadowRoot ?? el.attachShadow({ mode: 'open' });
21119
+ }
21120
+ else {
21121
+ return el;
21122
+ }
21123
+ }
21124
+ /**
21125
+ * 非推奨
21126
+ *
21127
+ * @deprecated 非推奨
21128
+ *
21129
+ * @internal
21130
+ */
21131
+ const show = showAction;
21132
+ /**
21133
+ * 非推奨
21134
+ *
21135
+ * @deprecated 非推奨
21136
+ *
21137
+ * @internal
21138
+ */
21139
+ const close = closeAction;
21140
+ /**
21141
+ * 非推奨
21142
+ *
21143
+ * @deprecated 非推奨
21144
+ *
21145
+ * @internal
21146
+ */
21147
+ const ensureModalRoot = ensureActionRoot;
21148
+ /**
21149
+ * 非推奨
21150
+ *
21151
+ * @deprecated 非推奨
21152
+ *
21153
+ * @internal
21154
+ */
21155
+ function createApp(App, options = {
21156
+ send: () => { },
21157
+ publish: () => { },
21158
+ props: {},
21159
+ variables: {},
21160
+ localVariablesQuery: undefined,
21161
+ context: { api_key: '' },
21162
+ }) {
21163
+ let app = null;
21164
+ const close = () => {
21165
+ if (app) {
21166
+ {
21167
+ // @ts-ignore -- Svelte5 では $destroy は存在しない
21168
+ app.$destroy();
21169
+ }
21170
+ app = null;
21171
+ }
21172
+ };
21173
+ const appArgs = {
21174
+ target: null,
21175
+ props: {
21176
+ send: options.send,
21177
+ publish: options.publish,
21178
+ close,
21179
+ data: {
21180
+ ...options.props,
21181
+ ...options.variables,
21182
+ },
21183
+ },
21184
+ };
21185
+ const win = ensureModalRoot();
21186
+ appArgs.target = win;
21187
+ return {
21188
+ close,
21189
+ show: () => {
21190
+ if (app) {
21191
+ return;
21192
+ }
21193
+ options.send('message_open');
21194
+ app = // @ts-ignore -- Svelte5 では `App` はクラスではない
21195
+ new App(appArgs);
21196
+ },
21197
+ };
21198
+ }
21199
+ /**
21200
+ * 非推奨
21201
+ *
21202
+ * @deprecated 非推奨
21203
+ *
21204
+ * @internal
21205
+ */
21206
+ function createFog({ color = '#000', opacity = '50%', zIndex = 999, onclick, }) {
21207
+ const root = ensureModalRoot();
21208
+ if (root.querySelector('.__krt-fog')) {
21209
+ return { fog: null, close: () => { } };
21210
+ }
21211
+ const fog = document.createElement('div');
21212
+ fog.className = '__krt-fog';
21213
+ Object.assign(fog.style, {
21214
+ position: 'fixed',
21215
+ left: 0,
21216
+ top: 0,
21217
+ width: '100%',
21218
+ height: '100%',
21219
+ 'z-index': zIndex,
21220
+ 'background-color': color,
21221
+ opacity,
21222
+ });
21223
+ const close = () => {
21224
+ onclick();
21225
+ fog.remove();
21226
+ };
21227
+ fog.onclick = close;
21228
+ root.appendChild(fog);
21229
+ return { fog, close };
21230
+ }
21231
+
20916
21232
  /* src/components-flex/state/Header.svelte generated by Svelte v3.53.1 */
20917
21233
 
20918
21234
  function create_if_block$2(ctx) {
@@ -21317,6 +21633,184 @@ const ROUND_STYLES = {
21317
21633
  },
21318
21634
  };
21319
21635
 
21636
+ const createProp = (key, type, suggestions = [], priority = 0, defaultValue = undefined) => {
21637
+ return {
21638
+ key,
21639
+ type,
21640
+ priority,
21641
+ suggestions: suggestions,
21642
+ default: defaultValue,
21643
+ };
21644
+ };
21645
+ const byObj = (obj) => {
21646
+ return Object.keys(obj);
21647
+ };
21648
+ const overflowProps = [
21649
+ createProp('overflow', 'string', ['hidden', 'visible', 'scroll', 'auto']),
21650
+ ];
21651
+ const borderProps = [
21652
+ createProp('borderTopWidth', 'string'),
21653
+ createProp('borderLeftWidth', 'string'),
21654
+ createProp('borderRightWidth', 'string'),
21655
+ createProp('borderBottomWidth', 'string'),
21656
+ createProp('borderColor', 'color'),
21657
+ ];
21658
+ const radiusProps = [
21659
+ createProp('borderTopLeftRadius', 'string'),
21660
+ createProp('borderTopRightRadius', 'string'),
21661
+ createProp('borderBottomLeftRadius', 'string'),
21662
+ createProp('borderBottomRightRadius', 'string'),
21663
+ ];
21664
+ const paddingProps = [
21665
+ createProp('paddingTop', 'string'),
21666
+ createProp('paddingLeft', 'string'),
21667
+ createProp('paddingRight', 'string'),
21668
+ createProp('paddingBottom', 'string'),
21669
+ ];
21670
+ const backgroundColorProps = [
21671
+ createProp('backgroundColor', 'string'),
21672
+ ];
21673
+ const backgroundImageProps = [
21674
+ createProp('backgroundImageUrl', 'url'),
21675
+ ];
21676
+ const flexComponentSchemes = {
21677
+ FlexAvatar: {
21678
+ props: [
21679
+ createProp('size', 'string', byObj(AVATAR_SIZE), 10),
21680
+ createProp('width', 'string', [], 5),
21681
+ createProp('height', 'string', [], 5),
21682
+ createProp('shape', 'string', byObj(AVATAR_SHAPE), 10),
21683
+ createProp('image', 'url', [], 99),
21684
+ // createProp('caption', 'string'),
21685
+ createProp('alt', 'string', [], 50),
21686
+ // TODO: clickable
21687
+ ...borderProps,
21688
+ ],
21689
+ },
21690
+ FlexButton: {
21691
+ props: [
21692
+ createProp('size', 'string', byObj(BUTTON_SIZE), 50),
21693
+ createProp('label', 'string', [], 99),
21694
+ createProp('paddingLeft', 'string'),
21695
+ createProp('paddingRight', 'string'),
21696
+ createProp('fontSize', 'string'),
21697
+ createProp('theme', 'string', byObj(BUTTON_THEME), 50),
21698
+ createProp('variant', 'string', byObj(BUTTON_VARIANT)),
21699
+ createProp('color', 'color', [], 5),
21700
+ createProp('backgroundColor', 'string', [], 5),
21701
+ createProp('borderColor', 'string', [], 5),
21702
+ createProp('fontWeight', 'string', ['normal', 'bold']),
21703
+ createProp('round', 'string', byObj(BUTTON_ROUND)),
21704
+ createProp('width', 'string', [], 10),
21705
+ createProp('wrap', 'string', ['wrap', 'nowrap']),
21706
+ // TODO: clickable
21707
+ ...radiusProps,
21708
+ ],
21709
+ },
21710
+ FlexClipCopy: {
21711
+ props: [
21712
+ createProp('content', 'string'),
21713
+ createProp('copiedEventName', 'string'),
21714
+ createProp('noneTooltip', 'boolean'),
21715
+ ],
21716
+ },
21717
+ FlexCloseButton: {
21718
+ props: [
21719
+ createProp('size', 'number'),
21720
+ createProp('placement', 'string', byObj(CLOSE_BUTTON_PLACEMENT), 99),
21721
+ createProp('round', 'string', byObj(CLOSE_BUTTON_ROUND)),
21722
+ createProp('bordered', 'boolean'),
21723
+ createProp('color', 'color'),
21724
+ createProp('backgroundColor', 'color'),
21725
+ createProp('label', 'string'),
21726
+ createProp('labelColor', 'color'),
21727
+ createProp('labelPlacement', 'string', byObj(CLOSE_BUTTON_LABEL_PLACEMENT)),
21728
+ createProp('top', 'string'),
21729
+ createProp('left', 'string'),
21730
+ createProp('right', 'string'),
21731
+ createProp('bottom', 'string'),
21732
+ ],
21733
+ },
21734
+ FlexCountDown: {
21735
+ props: [
21736
+ createProp('timeLimit', 'date_string', [], 99),
21737
+ // createProp('timeLimit', 'date_string'),
21738
+ ],
21739
+ },
21740
+ FlexIcon: {
21741
+ props: [
21742
+ createProp('variant', 'string', byObj(ICON_VARIANTS), 99),
21743
+ createProp('size', 'string', byObj(ICON_SIZE), 50),
21744
+ createProp('color', 'color', [], 5),
21745
+ createProp('width', 'string', [], 10),
21746
+ createProp('height', 'string', [], 10),
21747
+ ],
21748
+ },
21749
+ FlexImage: {
21750
+ props: [
21751
+ createProp('image', 'url', [], 99),
21752
+ createProp('aspect', 'string', Object.keys(ASPECT_VARIANT).map(key => ASPECT_VARIANT[key].getProps().aspect), 98),
21753
+ createProp('width', 'string', [], 5),
21754
+ createProp('height', 'string', [], 5),
21755
+ createProp('shape', 'string', byObj(IMAGE_ROUND_SHAPE), 10),
21756
+ ],
21757
+ },
21758
+ FlexLayout: {
21759
+ props: [
21760
+ createProp('display', 'string', ['flex', 'inline-flex', 'block']),
21761
+ createProp('direction', 'string', ['row', 'column', 'row-reverse', 'column-reverse'], 10),
21762
+ createProp('align', 'string', ['center', 'stretch', 'flex-start', 'flex-end'], 10),
21763
+ createProp('justify', 'string', ['center', 'flex-start', 'flex-end', 'space-between'], 10),
21764
+ createProp('gap', 'string', [], 10),
21765
+ createProp('rowGap', 'string', [], 10),
21766
+ createProp('columnGap', 'string', [], 10),
21767
+ createProp('width', 'string', [], 5),
21768
+ ...overflowProps,
21769
+ ...borderProps,
21770
+ ...radiusProps,
21771
+ ...backgroundColorProps,
21772
+ ...backgroundImageProps,
21773
+ ...paddingProps,
21774
+ ],
21775
+ },
21776
+ FlexList: {
21777
+ props: [
21778
+ createProp('gap', 'string', [], 10),
21779
+ createProp('borderWidth', 'string', [], 10),
21780
+ createProp('borderStyle', 'string', [], 10),
21781
+ createProp('borderColor', 'string', [], 10),
21782
+ createProp('itemPaddingTop', 'string', [], 5),
21783
+ createProp('itemPaddingLeft', 'string', [], 5),
21784
+ createProp('itemPaddingRight', 'string', [], 5),
21785
+ createProp('itemPaddingBottom', 'string', [], 5),
21786
+ createProp('itemGap', 'string', [], 5),
21787
+ ],
21788
+ },
21789
+ FlexListItem: {
21790
+ props: [
21791
+ createProp('gap', 'number', [], 10),
21792
+ // TODO: clickable
21793
+ ],
21794
+ },
21795
+ FlexText: {
21796
+ props: [
21797
+ createProp('content', 'string', [], 99),
21798
+ createProp('theme', 'string', byObj(TEXT_THEME), 50),
21799
+ createProp('size', 'string', byObj(LAYER_TEXT_SIZE), 50),
21800
+ createProp('align', 'string', [], 5),
21801
+ createProp('fontStyle', 'string', [], 5),
21802
+ createProp('fontSize', 'string', [], 5),
21803
+ createProp('fontWeight', 'string', [], 5),
21804
+ createProp('lineHeight', 'string', [], 5),
21805
+ createProp('color', 'string', [], 5),
21806
+ createProp('width', 'string', [], 10),
21807
+ createProp('fontFamilyVariant', 'string', byObj(FONT_FAMILY_VARIANT), 10),
21808
+ createProp('fontFamily', 'string', []),
21809
+ // TODO: clickable
21810
+ ],
21811
+ },
21812
+ };
21813
+
21320
21814
  var sdk = /*#__PURE__*/Object.freeze({
21321
21815
  __proto__: null,
21322
21816
  ACTION_HOOK_LABEL: ACTION_HOOK_LABEL,
@@ -21457,11 +21951,13 @@ var sdk = /*#__PURE__*/Object.freeze({
21457
21951
  create: create,
21458
21952
  createApp: createApp,
21459
21953
  createFog: createFog,
21954
+ createProp: createProp,
21460
21955
  destroy: destroy,
21461
21956
  destroyAction: destroyAction,
21462
21957
  ensureModalRoot: ensureModalRoot,
21463
21958
  eventHandlers: eventHandlers,
21464
21959
  finalize: finalize,
21960
+ flexComponentSchemes: flexComponentSchemes,
21465
21961
  formData: formData,
21466
21962
  getActionRoot: getActionRoot,
21467
21963
  getAnsweredQuestion: getAnsweredQuestion,
@@ -21531,7 +22027,7 @@ function get_each_context(ctx, list, i) {
21531
22027
  return child_ctx;
21532
22028
  }
21533
22029
 
21534
- // (12:0) {#if component}
22030
+ // (13:0) {#if component}
21535
22031
  function create_if_block(ctx) {
21536
22032
  let switch_instance;
21537
22033
  let switch_instance_anchor;
@@ -21619,7 +22115,7 @@ function create_if_block(ctx) {
21619
22115
  };
21620
22116
  }
21621
22117
 
21622
- // (19:4) {#if option.children}
22118
+ // (20:4) {#if option.children}
21623
22119
  function create_if_block_1(ctx) {
21624
22120
  let each_1_anchor;
21625
22121
  let current;
@@ -21710,7 +22206,7 @@ function create_if_block_1(ctx) {
21710
22206
  };
21711
22207
  }
21712
22208
 
21713
- // (20:6) {#each option.children as child}
22209
+ // (21:6) {#each option.children as child}
21714
22210
  function create_each_block(ctx) {
21715
22211
  let thumbnailpreview;
21716
22212
  let current;
@@ -21747,7 +22243,7 @@ function create_each_block(ctx) {
21747
22243
  };
21748
22244
  }
21749
22245
 
21750
- // (13:2) <svelte:component this={component} props={'previewProps' in option && typeof option.previewProps !== 'undefined' ? option.previewProps : option.props} >
22246
+ // (14:2) <svelte:component this={component} props={'previewProps' in option && typeof option.previewProps !== 'undefined' ? option.previewProps : option.props} >
21751
22247
  function create_default_slot(ctx) {
21752
22248
  let if_block_anchor;
21753
22249
  let current;
@@ -21868,8 +22364,9 @@ function create_fragment(ctx) {
21868
22364
 
21869
22365
  function instance($$self, $$props, $$invalidate) {
21870
22366
  let component;
21871
- let { option } = $$props;
22367
+ let { option = {} } = $$props;
21872
22368
  let { customBrandKit = undefined } = $$props;
22369
+ console.log('option', option);
21873
22370
 
21874
22371
  const getComponent = key => {
21875
22372
  return key in sdk ? sdk[key] : null;
@@ -21898,4 +22395,4 @@ class ThumbnailPreview extends SvelteComponent {
21898
22395
  }
21899
22396
  }
21900
22397
 
21901
- export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, 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, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement, Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, Flex, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Icon as FlexIcon, Image as FlexImage, FlexItem, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices, FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons, FormRatingButtonsFace, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement, ImageBlock, 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$1 as List, ListBackgroundTypes, ListDirections, ListItem$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal$1 as Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide, SlideItem, State$1 as State, StateItem$1 as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection$1 as collection, create, createApp, createFog, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, getState$1 as 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$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget };
22398
+ export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, 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, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement, Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, Flex, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Icon as FlexIcon, Image as FlexImage, FlexItem, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices, FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons, FormRatingButtonsFace, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement, ImageBlock, 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$1 as List, ListBackgroundTypes, ListDirections, ListItem$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal$1 as Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide, SlideItem, State$1 as State, StateItem$1 as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss$1 as applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close$1 as close, closeAction$1 as closeAction, collection$1 as collection, create, createApp$1 as createApp, createFog$1 as createFog, createProp, destroy, destroyAction, ensureModalRoot$1 as ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot$1 as getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables$1 as getCssVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle$1 as loadStyle, logger, onChangeState$1 as onChangeState, onClose$1 as onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow$1 as onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState$1 as setState, setVariables, show$1 as show, showAction$1 as showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget };