@plaidev/karte-action-sdk 1.1.270-29410070.b86a3f94e → 1.1.270-29419384.246a50882

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.
@@ -7,12 +7,17 @@ import { cubicOut, elasticOut, linear } from "svelte/easing";
7
7
 
8
8
  //#region rolldown:runtime
9
9
  var __defProp = Object.defineProperty;
10
- var __export = (all) => {
10
+ var __export = (all, symbols) => {
11
11
  let target = {};
12
- for (var name in all) __defProp(target, name, {
13
- get: all[name],
14
- enumerable: true
15
- });
12
+ for (var name in all) {
13
+ __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ }
18
+ if (symbols) {
19
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
20
+ }
16
21
  return target;
17
22
  };
18
23
 
@@ -191,17 +196,13 @@ function onScroll(rate, fn) {
191
196
  html.scrollHeight,
192
197
  html.clientHeight
193
198
  ]);
194
- const viewHeight = Math.min(...[html.clientHeight, body.clientHeight]);
195
- const scrollRate = (scrollTop + viewHeight) / pageHeight;
199
+ const scrollRate = (scrollTop + Math.min(...[html.clientHeight, body.clientHeight])) / pageHeight;
196
200
  contexts.forEach((ctx) => {
197
201
  ctx.scrollRate = scrollRate;
198
202
  ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
199
203
  ctx.previousRate = ctx.scrollRate;
200
204
  ctx.scrollTop = scrollTop;
201
- if (canCall(ctx)) {
202
- const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
203
- updateStates(ctx, repeat);
204
- }
205
+ if (canCall(ctx)) updateStates(ctx, !!_fn(Object.assign({ direction: direction(ctx) }, ctx)));
205
206
  });
206
207
  };
207
208
  window.addEventListener("scroll", onScroll$1);
@@ -1476,6 +1477,9 @@ function dispatchDestroyEvent() {
1476
1477
 
1477
1478
  //#endregion
1478
1479
  //#region src/display-logic.ts
1480
+ /**
1481
+ * モーダル(ポップアップ)のロジックを管理する
1482
+ */
1479
1483
  function doPresent({ direction, deltaRate }, downFn, upFn, condition = false) {
1480
1484
  if (direction === "down" && deltaRate > 0) downFn();
1481
1485
  else if (condition && direction === "up" && deltaRate < 0) upFn();
@@ -1609,6 +1613,9 @@ function checkAndDo(checkFn, fn, ...conditionFns) {
1609
1613
 
1610
1614
  //#endregion
1611
1615
  //#region src/collection.ts
1616
+ /**
1617
+ * アクションテーブルに関連するコードの管理
1618
+ */
1612
1619
  const DEFAULT_COLLECTION_ENDPOINT = "https://action-table.karte.io/collection";
1613
1620
  /**
1614
1621
  * アクションテーブルを管理するメソッドを取得する
@@ -1825,12 +1832,16 @@ function closeAction$1(trigger = "none") {
1825
1832
 
1826
1833
  //#endregion
1827
1834
  //#region src/modal.svelte5.tsx
1835
+ /**
1836
+ * モーダル(ポップアップ)に関連するコードの管理
1837
+ *
1838
+ * アクションのShow, Close, ChangeStateの状態はここで管理する。
1839
+ */
1828
1840
  /** @internal */
1829
1841
  const handleState = (event) => {
1830
1842
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
1831
1843
  const nextState = event.detail.to;
1832
- const currentState = getState();
1833
- send_event("_message_state_changed", toStateChangedData(nextState, currentState));
1844
+ send_event("_message_state_changed", toStateChangedData(nextState, getState()));
1834
1845
  setState(event.detail.to, { disableInPreview: event.detail.disableInPreview });
1835
1846
  }
1836
1847
  };
@@ -2042,8 +2053,7 @@ function createModal(App, options = {
2042
2053
  return NOOP;
2043
2054
  };
2044
2055
  const handleClose = (event) => {
2045
- const trigger = event?.detail?.trigger ? event.detail.trigger : "none";
2046
- close$1(trigger);
2056
+ close$1(event?.detail?.trigger ? event.detail.trigger : "none");
2047
2057
  };
2048
2058
  const show$1 = async (trigger = "none") => {
2049
2059
  if (app) return;
@@ -2064,20 +2074,20 @@ function createModal(App, options = {
2064
2074
  setOpened(true);
2065
2075
  setClosed(false);
2066
2076
  if (app) return;
2067
- const props = {
2077
+ app = mount(App, {
2068
2078
  target: ensureActionRoot(isOnSite()),
2069
2079
  props: {
2070
2080
  send: options.send,
2071
2081
  publish: options.publish,
2072
2082
  data,
2073
- onShow: (props$1) => {
2083
+ onShow: (props) => {
2074
2084
  const { onShowHandlers } = getInternalHandlers();
2075
2085
  if (onShowHandlers) onShowHandlers.forEach((h$1) => {
2076
2086
  console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify({ name: "onShow" })}`);
2077
- h$1(props$1);
2087
+ h$1(props);
2078
2088
  });
2079
2089
  },
2080
- onChangeState: (props$1, newState) => {
2090
+ onChangeState: (props, newState) => {
2081
2091
  const { onChangeStateHandlers } = getInternalHandlers();
2082
2092
  if (onChangeStateHandlers) onChangeStateHandlers.forEach((h$1) => {
2083
2093
  const actionHookLog = {
@@ -2085,18 +2095,16 @@ function createModal(App, options = {
2085
2095
  values: { newState }
2086
2096
  };
2087
2097
  console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify(actionHookLog)}`);
2088
- h$1(props$1, newState);
2098
+ h$1(props, newState);
2089
2099
  });
2090
2100
  const { onChangeStateHandlers: onChangeWidgetStateHandlers } = getWidgetHandlers();
2091
- if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props$1, newState));
2101
+ if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props, newState));
2092
2102
  }
2093
2103
  }
2094
- };
2095
- app = mount(App, props);
2104
+ });
2096
2105
  };
2097
2106
  const handleShow = (event) => {
2098
- const trigger = event?.detail?.trigger ? event.detail.trigger : "none";
2099
- show$1(trigger);
2107
+ show$1(event?.detail?.trigger ? event.detail.trigger : "none");
2100
2108
  };
2101
2109
  const currying = (conditionFn, options$1) => (fn) => conditionFn(options$1.props, fn);
2102
2110
  const autoShow = () => {
@@ -2282,6 +2290,9 @@ function createFog({ color = "#000", opacity = "50%", zIndex = 999, onclick }) {
2282
2290
 
2283
2291
  //#endregion
2284
2292
  //#region src/script.ts
2293
+ /**
2294
+ * スクリプト接客が利用するコードの管理
2295
+ */
2285
2296
  /** @internal */
2286
2297
  async function runScript$1(options = {
2287
2298
  send: () => {},
@@ -2385,6 +2396,11 @@ async function loadGlobalStyle(href) {
2385
2396
 
2386
2397
  //#endregion
2387
2398
  //#region src/action.ts
2399
+ /**
2400
+ * Edgeが起動するアクションに関連するコードを管理する
2401
+ *
2402
+ * アクションのCreate, Destroyの状態はここで管理する。
2403
+ */
2388
2404
  const emptyOptions = {
2389
2405
  send: () => {},
2390
2406
  publish: () => {},
@@ -2585,8 +2601,7 @@ function formDataToEventValues$1(campaignId, formData$1) {
2585
2601
  }
2586
2602
  function formDataToIdentifyEventValues$1(formData$1) {
2587
2603
  return Object.fromEntries(Object.entries(formData$1).map(([name, dataItem]) => {
2588
- const value = dataItem.value;
2589
- return [name, value];
2604
+ return [name, dataItem.value];
2590
2605
  }));
2591
2606
  }
2592
2607
  /** @internal */
@@ -2707,6 +2722,9 @@ function sendAnswers() {
2707
2722
 
2708
2723
  //#endregion
2709
2724
  //#region src/widget.ts
2725
+ /**
2726
+ * エディタv1のWidget API 互換のインターフェース
2727
+ */
2710
2728
  var widget_exports = /* @__PURE__ */ __export({
2711
2729
  collection: () => collection$1,
2712
2730
  getState: () => getState$1,
@@ -3405,12 +3423,10 @@ const useBrandKit = () => {
3405
3423
  function createComponentRawCss(layerId, define) {
3406
3424
  const rootSelector = `[data-layer-id="${layerId}"]`;
3407
3425
  const gen = (selector, styles) => {
3408
- const childSelector = selector.startsWith("&") ? selector.slice(1) : ` ${selector}`;
3409
- const body = Object.entries(styles).map(([k, v]) => {
3426
+ return `${rootSelector}${selector.startsWith("&") ? selector.slice(1) : ` ${selector}`} {\n${Object.entries(styles).map(([k, v]) => {
3410
3427
  if (!v) return "";
3411
3428
  return `${k.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase())}: ${v};`;
3412
- }).filter((v) => v !== "").join("\n");
3413
- return `${rootSelector}${childSelector} {\n${body}\n}`;
3429
+ }).filter((v) => v !== "").join("\n")}\n}`;
3414
3430
  };
3415
3431
  return define(gen).join("\n");
3416
3432
  }
@@ -3609,10 +3625,12 @@ function useResponsiveProps(props) {
3609
3625
 
3610
3626
  //#endregion
3611
3627
  //#region src/functions.ts
3628
+ /**
3629
+ * モーダル(ポップアップ)のコンポーネントが利用するコードの管理
3630
+ */
3612
3631
  function _moveTo(to) {
3613
- const currentState = getState();
3614
3632
  dispatchActionEvent(ACTION_CHANGE_STATE_EVENT, { detail: {
3615
- from: currentState,
3633
+ from: getState(),
3616
3634
  to,
3617
3635
  actionId
3618
3636
  } });
@@ -3777,36 +3795,12 @@ const execOnClickOperation = (onClickOperation) => {
3777
3795
  function getAnimation(animation) {
3778
3796
  switch (animation.type) {
3779
3797
  case "fade": return `opacity: ${animation.progress}`;
3780
- case "bounce": {
3781
- const translateX = animation.x;
3782
- const translateY = animation.y;
3783
- return `transform: translate3d(${translateX}%, ${translateY}%, 0) scale(${animation.progress});`;
3784
- }
3785
- case "slide-down": {
3786
- const translateX = animation.x;
3787
- const translateY = animation.y - 100 * (1 - animation.progress);
3788
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3789
- }
3790
- case "slide-up": {
3791
- const translateX = animation.x;
3792
- const translateY = animation.y + 100 * (1 - animation.progress);
3793
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3794
- }
3795
- case "slide-left": {
3796
- const translateX = animation.x + 100 * (1 - animation.progress);
3797
- const translateY = animation.y;
3798
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3799
- }
3800
- case "slide-right": {
3801
- const translateX = animation.x - 100 * (1 - animation.progress);
3802
- const translateY = animation.y;
3803
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3804
- }
3805
- case "none": {
3806
- const translateX = animation.x;
3807
- const translateY = animation.y;
3808
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3809
- }
3798
+ case "bounce": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0) scale(${animation.progress});`;
3799
+ case "slide-down": return `transform: translate3d(${animation.x}%, ${animation.y - 100 * (1 - animation.progress)}%, 0);`;
3800
+ case "slide-up": return `transform: translate3d(${animation.x}%, ${animation.y + 100 * (1 - animation.progress)}%, 0);`;
3801
+ case "slide-left": return `transform: translate3d(${animation.x + 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
3802
+ case "slide-right": return `transform: translate3d(${animation.x - 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
3803
+ case "none": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0);`;
3810
3804
  default:
3811
3805
  console.warn(`[action-sdk] invalid '${animation}', so we use 'transform: none' instead`);
3812
3806
  return "transform: none";
@@ -4935,8 +4929,7 @@ function Icon($$anchor, $$props) {
4935
4929
  //#region src/components-flex/styles.ts
4936
4930
  const getPropStyles = (callback$5) => {
4937
4931
  return (customBrandKit) => {
4938
- const brandKit = getBrandKit(customBrandKit);
4939
- return callback$5({ brandKit });
4932
+ return callback$5({ brandKit: getBrandKit(customBrandKit) });
4940
4933
  };
4941
4934
  };
4942
4935
 
@@ -7090,8 +7083,7 @@ function Modal($$anchor, $$props) {
7090
7083
  $.get(backgroundClickPC)?.apply(this, $$args);
7091
7084
  } }
7092
7085
  });
7093
- var node_2 = $.sibling(node_1, 2);
7094
- BackgroundOverlay(node_2, {
7086
+ BackgroundOverlay($.sibling(node_1, 2), {
7095
7087
  class: "background-bp-sp ",
7096
7088
  get zIndex() {
7097
7089
  return props().zIndex;
@@ -7627,15 +7619,11 @@ function CountDown($$anchor, $$props) {
7627
7619
  return limit - (/* @__PURE__ */ new Date()).getTime();
7628
7620
  }
7629
7621
  function formatTimeDiff(ms) {
7630
- const diffDay = Math.floor(ms / 1e3 / 60 / 60 / 24);
7631
- const diffHour = Math.floor(ms / 1e3 / 60 / 60) % 24;
7632
- const diffMin = Math.floor(ms / 1e3 / 60) % 60;
7633
- const diffSec = Math.floor(ms / 1e3) % 60;
7634
7622
  return {
7635
- day: diffDay,
7636
- hour: diffHour,
7637
- min: diffMin,
7638
- sec: diffSec
7623
+ day: Math.floor(ms / 1e3 / 60 / 60 / 24),
7624
+ hour: Math.floor(ms / 1e3 / 60 / 60) % 24,
7625
+ min: Math.floor(ms / 1e3 / 60) % 60,
7626
+ sec: Math.floor(ms / 1e3) % 60
7639
7627
  };
7640
7628
  }
7641
7629
  function onEachSecond() {
@@ -7727,24 +7715,22 @@ const useText = (props, layerId) => {
7727
7715
  fontWeight: getFontWeight()
7728
7716
  };
7729
7717
  };
7730
- const escapedHTML = props.content.replace(/&/g, "&lt;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\n/g, "<br />");
7731
- const style = objToStyle({
7732
- position: props?.position ?? "static",
7733
- textAlign: props.align,
7734
- width: props.width,
7735
- fontFamily: `"${fontFamily}"`,
7736
- color: getColor(),
7737
- ...getCssSize(),
7738
- ...toCssRadius(props),
7739
- ...toCssBackground(props),
7740
- ...toCssCommon(props),
7741
- ...toCssPosition(props),
7742
- ...toCssPadding(props),
7743
- ...toCssBorder(props)
7744
- });
7745
7718
  return {
7746
- escapedHTML,
7747
- style
7719
+ escapedHTML: props.content.replace(/&/g, "&lt;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\n/g, "<br />"),
7720
+ style: objToStyle({
7721
+ position: props?.position ?? "static",
7722
+ textAlign: props.align,
7723
+ width: props.width,
7724
+ fontFamily: `"${fontFamily}"`,
7725
+ color: getColor(),
7726
+ ...getCssSize(),
7727
+ ...toCssRadius(props),
7728
+ ...toCssBackground(props),
7729
+ ...toCssCommon(props),
7730
+ ...toCssPosition(props),
7731
+ ...toCssPadding(props),
7732
+ ...toCssBorder(props)
7733
+ })
7748
7734
  };
7749
7735
  };
7750
7736
 
@@ -7,12 +7,17 @@ import { cubicOut, elasticOut, linear } from "svelte/easing";
7
7
 
8
8
  //#region rolldown:runtime
9
9
  var __defProp = Object.defineProperty;
10
- var __export = (all) => {
10
+ var __export = (all, symbols) => {
11
11
  let target = {};
12
- for (var name in all) __defProp(target, name, {
13
- get: all[name],
14
- enumerable: true
15
- });
12
+ for (var name in all) {
13
+ __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ }
18
+ if (symbols) {
19
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
20
+ }
16
21
  return target;
17
22
  };
18
23
 
@@ -191,17 +196,13 @@ function onScroll(rate, fn) {
191
196
  html.scrollHeight,
192
197
  html.clientHeight
193
198
  ]);
194
- const viewHeight = Math.min(...[html.clientHeight, body.clientHeight]);
195
- const scrollRate = (scrollTop + viewHeight) / pageHeight;
199
+ const scrollRate = (scrollTop + Math.min(...[html.clientHeight, body.clientHeight])) / pageHeight;
196
200
  contexts.forEach((ctx) => {
197
201
  ctx.scrollRate = scrollRate;
198
202
  ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
199
203
  ctx.previousRate = ctx.scrollRate;
200
204
  ctx.scrollTop = scrollTop;
201
- if (canCall(ctx)) {
202
- const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
203
- updateStates(ctx, repeat);
204
- }
205
+ if (canCall(ctx)) updateStates(ctx, !!_fn(Object.assign({ direction: direction(ctx) }, ctx)));
205
206
  });
206
207
  };
207
208
  window.addEventListener("scroll", onScroll$1);
@@ -1445,6 +1446,9 @@ function dispatchDestroyEvent() {
1445
1446
 
1446
1447
  //#endregion
1447
1448
  //#region src/display-logic.ts
1449
+ /**
1450
+ * モーダル(ポップアップ)のロジックを管理する
1451
+ */
1448
1452
  function doPresent({ direction, deltaRate }, downFn, upFn, condition = false) {
1449
1453
  if (direction === "down" && deltaRate > 0) downFn();
1450
1454
  else if (condition && direction === "up" && deltaRate < 0) upFn();
@@ -1578,6 +1582,9 @@ function checkAndDo(checkFn, fn, ...conditionFns) {
1578
1582
 
1579
1583
  //#endregion
1580
1584
  //#region src/collection.ts
1585
+ /**
1586
+ * アクションテーブルに関連するコードの管理
1587
+ */
1581
1588
  const DEFAULT_COLLECTION_ENDPOINT = "https://action-table.karte.io/collection";
1582
1589
  /**
1583
1590
  * アクションテーブルを管理するメソッドを取得する
@@ -1794,12 +1801,16 @@ function closeAction$1(trigger = "none") {
1794
1801
 
1795
1802
  //#endregion
1796
1803
  //#region src/modal.svelte5.tsx
1804
+ /**
1805
+ * モーダル(ポップアップ)に関連するコードの管理
1806
+ *
1807
+ * アクションのShow, Close, ChangeStateの状態はここで管理する。
1808
+ */
1797
1809
  /** @internal */
1798
1810
  const handleState = (event) => {
1799
1811
  if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
1800
1812
  const nextState = event.detail.to;
1801
- const currentState = getState();
1802
- send_event("_message_state_changed", toStateChangedData(nextState, currentState));
1813
+ send_event("_message_state_changed", toStateChangedData(nextState, getState()));
1803
1814
  setState(event.detail.to, { disableInPreview: event.detail.disableInPreview });
1804
1815
  }
1805
1816
  };
@@ -2011,8 +2022,7 @@ function createModal(App, options = {
2011
2022
  return NOOP;
2012
2023
  };
2013
2024
  const handleClose = (event) => {
2014
- const trigger = event?.detail?.trigger ? event.detail.trigger : "none";
2015
- close$1(trigger);
2025
+ close$1(event?.detail?.trigger ? event.detail.trigger : "none");
2016
2026
  };
2017
2027
  const show$1 = async (trigger = "none") => {
2018
2028
  if (app) return;
@@ -2033,20 +2043,20 @@ function createModal(App, options = {
2033
2043
  setOpened(true);
2034
2044
  setClosed(false);
2035
2045
  if (app) return;
2036
- const props = {
2046
+ app = mount(App, {
2037
2047
  target: ensureActionRoot(isOnSite()),
2038
2048
  props: {
2039
2049
  send: options.send,
2040
2050
  publish: options.publish,
2041
2051
  data,
2042
- onShow: (props$1) => {
2052
+ onShow: (props) => {
2043
2053
  const { onShowHandlers } = getInternalHandlers();
2044
2054
  if (onShowHandlers) onShowHandlers.forEach((h$1) => {
2045
2055
  console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify({ name: "onShow" })}`);
2046
- h$1(props$1);
2056
+ h$1(props);
2047
2057
  });
2048
2058
  },
2049
- onChangeState: (props$1, newState) => {
2059
+ onChangeState: (props, newState) => {
2050
2060
  const { onChangeStateHandlers } = getInternalHandlers();
2051
2061
  if (onChangeStateHandlers) onChangeStateHandlers.forEach((h$1) => {
2052
2062
  const actionHookLog = {
@@ -2054,18 +2064,16 @@ function createModal(App, options = {
2054
2064
  values: { newState }
2055
2065
  };
2056
2066
  console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify(actionHookLog)}`);
2057
- h$1(props$1, newState);
2067
+ h$1(props, newState);
2058
2068
  });
2059
2069
  const { onChangeStateHandlers: onChangeWidgetStateHandlers } = getWidgetHandlers();
2060
- if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props$1, newState));
2070
+ if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props, newState));
2061
2071
  }
2062
2072
  }
2063
- };
2064
- app = mount(App, props);
2073
+ });
2065
2074
  };
2066
2075
  const handleShow = (event) => {
2067
- const trigger = event?.detail?.trigger ? event.detail.trigger : "none";
2068
- show$1(trigger);
2076
+ show$1(event?.detail?.trigger ? event.detail.trigger : "none");
2069
2077
  };
2070
2078
  const currying = (conditionFn, options$1) => (fn) => conditionFn(options$1.props, fn);
2071
2079
  const autoShow = () => {
@@ -2251,6 +2259,9 @@ function createFog({ color = "#000", opacity = "50%", zIndex = 999, onclick }) {
2251
2259
 
2252
2260
  //#endregion
2253
2261
  //#region src/script.ts
2262
+ /**
2263
+ * スクリプト接客が利用するコードの管理
2264
+ */
2254
2265
  /** @internal */
2255
2266
  async function runScript$1(options = {
2256
2267
  send: () => {},
@@ -2354,6 +2365,11 @@ async function loadGlobalStyle(href) {
2354
2365
 
2355
2366
  //#endregion
2356
2367
  //#region src/action.ts
2368
+ /**
2369
+ * Edgeが起動するアクションに関連するコードを管理する
2370
+ *
2371
+ * アクションのCreate, Destroyの状態はここで管理する。
2372
+ */
2357
2373
  const emptyOptions = {
2358
2374
  send: () => {},
2359
2375
  publish: () => {},
@@ -2554,8 +2570,7 @@ function formDataToEventValues$1(campaignId, formData$1) {
2554
2570
  }
2555
2571
  function formDataToIdentifyEventValues$1(formData$1) {
2556
2572
  return Object.fromEntries(Object.entries(formData$1).map(([name, dataItem]) => {
2557
- const value = dataItem.value;
2558
- return [name, value];
2573
+ return [name, dataItem.value];
2559
2574
  }));
2560
2575
  }
2561
2576
  /** @internal */
@@ -2676,6 +2691,9 @@ function sendAnswers() {
2676
2691
 
2677
2692
  //#endregion
2678
2693
  //#region src/widget.ts
2694
+ /**
2695
+ * エディタv1のWidget API 互換のインターフェース
2696
+ */
2679
2697
  var widget_exports = /* @__PURE__ */ __export({
2680
2698
  collection: () => collection$1,
2681
2699
  getState: () => getState$1,
@@ -3374,12 +3392,10 @@ const useBrandKit = () => {
3374
3392
  function createComponentRawCss(layerId, define) {
3375
3393
  const rootSelector = `[data-layer-id="${layerId}"]`;
3376
3394
  const gen = (selector, styles) => {
3377
- const childSelector = selector.startsWith("&") ? selector.slice(1) : ` ${selector}`;
3378
- const body = Object.entries(styles).map(([k, v]) => {
3395
+ return `${rootSelector}${selector.startsWith("&") ? selector.slice(1) : ` ${selector}`} {\n${Object.entries(styles).map(([k, v]) => {
3379
3396
  if (!v) return "";
3380
3397
  return `${k.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase())}: ${v};`;
3381
- }).filter((v) => v !== "").join("\n");
3382
- return `${rootSelector}${childSelector} {\n${body}\n}`;
3398
+ }).filter((v) => v !== "").join("\n")}\n}`;
3383
3399
  };
3384
3400
  return define(gen).join("\n");
3385
3401
  }
@@ -3578,10 +3594,12 @@ function useResponsiveProps(props) {
3578
3594
 
3579
3595
  //#endregion
3580
3596
  //#region src/functions.ts
3597
+ /**
3598
+ * モーダル(ポップアップ)のコンポーネントが利用するコードの管理
3599
+ */
3581
3600
  function _moveTo(to) {
3582
- const currentState = getState();
3583
3601
  dispatchActionEvent(ACTION_CHANGE_STATE_EVENT, { detail: {
3584
- from: currentState,
3602
+ from: getState(),
3585
3603
  to,
3586
3604
  actionId
3587
3605
  } });
@@ -3746,36 +3764,12 @@ const execOnClickOperation = (onClickOperation) => {
3746
3764
  function getAnimation(animation) {
3747
3765
  switch (animation.type) {
3748
3766
  case "fade": return `opacity: ${animation.progress}`;
3749
- case "bounce": {
3750
- const translateX = animation.x;
3751
- const translateY = animation.y;
3752
- return `transform: translate3d(${translateX}%, ${translateY}%, 0) scale(${animation.progress});`;
3753
- }
3754
- case "slide-down": {
3755
- const translateX = animation.x;
3756
- const translateY = animation.y - 100 * (1 - animation.progress);
3757
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3758
- }
3759
- case "slide-up": {
3760
- const translateX = animation.x;
3761
- const translateY = animation.y + 100 * (1 - animation.progress);
3762
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3763
- }
3764
- case "slide-left": {
3765
- const translateX = animation.x + 100 * (1 - animation.progress);
3766
- const translateY = animation.y;
3767
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3768
- }
3769
- case "slide-right": {
3770
- const translateX = animation.x - 100 * (1 - animation.progress);
3771
- const translateY = animation.y;
3772
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3773
- }
3774
- case "none": {
3775
- const translateX = animation.x;
3776
- const translateY = animation.y;
3777
- return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
3778
- }
3767
+ case "bounce": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0) scale(${animation.progress});`;
3768
+ case "slide-down": return `transform: translate3d(${animation.x}%, ${animation.y - 100 * (1 - animation.progress)}%, 0);`;
3769
+ case "slide-up": return `transform: translate3d(${animation.x}%, ${animation.y + 100 * (1 - animation.progress)}%, 0);`;
3770
+ case "slide-left": return `transform: translate3d(${animation.x + 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
3771
+ case "slide-right": return `transform: translate3d(${animation.x - 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
3772
+ case "none": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0);`;
3779
3773
  default:
3780
3774
  console.warn(`[action-sdk] invalid '${animation}', so we use 'transform: none' instead`);
3781
3775
  return "transform: none";
@@ -4904,8 +4898,7 @@ function Icon($$anchor, $$props) {
4904
4898
  //#region src/components-flex/styles.ts
4905
4899
  const getPropStyles = (callback$5) => {
4906
4900
  return (customBrandKit) => {
4907
- const brandKit = getBrandKit(customBrandKit);
4908
- return callback$5({ brandKit });
4901
+ return callback$5({ brandKit: getBrandKit(customBrandKit) });
4909
4902
  };
4910
4903
  };
4911
4904
 
@@ -7059,8 +7052,7 @@ function Modal($$anchor, $$props) {
7059
7052
  $.get(backgroundClickPC)?.apply(this, $$args);
7060
7053
  } }
7061
7054
  });
7062
- var node_2 = $.sibling(node_1, 2);
7063
- BackgroundOverlay(node_2, {
7055
+ BackgroundOverlay($.sibling(node_1, 2), {
7064
7056
  class: "background-bp-sp ",
7065
7057
  get zIndex() {
7066
7058
  return props().zIndex;
@@ -7596,15 +7588,11 @@ function CountDown($$anchor, $$props) {
7596
7588
  return limit - (/* @__PURE__ */ new Date()).getTime();
7597
7589
  }
7598
7590
  function formatTimeDiff(ms) {
7599
- const diffDay = Math.floor(ms / 1e3 / 60 / 60 / 24);
7600
- const diffHour = Math.floor(ms / 1e3 / 60 / 60) % 24;
7601
- const diffMin = Math.floor(ms / 1e3 / 60) % 60;
7602
- const diffSec = Math.floor(ms / 1e3) % 60;
7603
7591
  return {
7604
- day: diffDay,
7605
- hour: diffHour,
7606
- min: diffMin,
7607
- sec: diffSec
7592
+ day: Math.floor(ms / 1e3 / 60 / 60 / 24),
7593
+ hour: Math.floor(ms / 1e3 / 60 / 60) % 24,
7594
+ min: Math.floor(ms / 1e3 / 60) % 60,
7595
+ sec: Math.floor(ms / 1e3) % 60
7608
7596
  };
7609
7597
  }
7610
7598
  function onEachSecond() {
@@ -7696,24 +7684,22 @@ const useText = (props, layerId) => {
7696
7684
  fontWeight: getFontWeight()
7697
7685
  };
7698
7686
  };
7699
- const escapedHTML = props.content.replace(/&/g, "&lt;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\n/g, "<br />");
7700
- const style = objToStyle({
7701
- position: props?.position ?? "static",
7702
- textAlign: props.align,
7703
- width: props.width,
7704
- fontFamily: `"${fontFamily}"`,
7705
- color: getColor(),
7706
- ...getCssSize(),
7707
- ...toCssRadius(props),
7708
- ...toCssBackground(props),
7709
- ...toCssCommon(props),
7710
- ...toCssPosition(props),
7711
- ...toCssPadding(props),
7712
- ...toCssBorder(props)
7713
- });
7714
7687
  return {
7715
- escapedHTML,
7716
- style
7688
+ escapedHTML: props.content.replace(/&/g, "&lt;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\n/g, "<br />"),
7689
+ style: objToStyle({
7690
+ position: props?.position ?? "static",
7691
+ textAlign: props.align,
7692
+ width: props.width,
7693
+ fontFamily: `"${fontFamily}"`,
7694
+ color: getColor(),
7695
+ ...getCssSize(),
7696
+ ...toCssRadius(props),
7697
+ ...toCssBackground(props),
7698
+ ...toCssCommon(props),
7699
+ ...toCssPosition(props),
7700
+ ...toCssPadding(props),
7701
+ ...toCssBorder(props)
7702
+ })
7717
7703
  };
7718
7704
  };
7719
7705