@plaidev/karte-action-sdk 1.1.270-29410833.25c7eb841 → 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.
- package/dist/components-flex/css.d.ts +2 -2
- package/dist/components-flex/props.d.ts +2 -2
- package/dist/components-flex/responsiveProp.d.ts +7 -0
- package/dist/hydrate/components-flex/css.d.ts +2 -2
- package/dist/hydrate/components-flex/props.d.ts +2 -2
- package/dist/hydrate/components-flex/responsiveProp.d.ts +7 -0
- package/dist/hydrate/index.d.ts +1 -0
- package/dist/hydrate/index.es.js +260 -204
- package/dist/hydrate/index.svelte5.d.ts +2 -1
- package/dist/hydrate/preview.d.ts +28 -0
- package/dist/hydrate/stores.d.ts +22 -1
- package/dist/hydrate/types.d.ts +13 -0
- package/dist/hydrate/utils.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +260 -204
- package/dist/preview.d.ts +28 -0
- package/dist/stores.d.ts +22 -1
- package/dist/svelte5/components-flex/css.d.ts +2 -2
- package/dist/svelte5/components-flex/props.d.ts +2 -2
- package/dist/svelte5/components-flex/responsiveProp.d.ts +7 -0
- package/dist/svelte5/hydrate/components-flex/css.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/props.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/responsiveProp.d.ts +7 -0
- package/dist/svelte5/hydrate/index.es.d.ts +2 -1
- package/dist/svelte5/hydrate/index.es.js +235 -186
- package/dist/svelte5/hydrate/preview.d.ts +28 -0
- package/dist/svelte5/hydrate/stores.d.ts +22 -1
- package/dist/svelte5/hydrate/types.d.ts +13 -0
- package/dist/svelte5/hydrate/utils.d.ts +1 -0
- package/dist/svelte5/index.es.d.ts +2 -1
- package/dist/svelte5/index.es.js +235 -186
- package/dist/svelte5/index.front2.es.js +236 -188
- package/dist/svelte5/index.svelte5.d.ts +2 -1
- package/dist/svelte5/preview.d.ts +28 -0
- package/dist/svelte5/stores.d.ts +22 -1
- package/dist/svelte5/types.d.ts +13 -0
- package/dist/svelte5/utils.d.ts +1 -0
- package/dist/templates.cjs.js +3 -2
- package/dist/templates.js +3 -2
- package/dist/types.d.ts +13 -0
- package/dist/utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components-flex/responsive.d.ts +0 -26
- package/dist/hydrate/components-flex/responsive.d.ts +0 -26
- package/dist/svelte5/components-flex/responsive.d.ts +0 -26
- package/dist/svelte5/hydrate/components-flex/responsive.d.ts +0 -26
package/dist/index.es.js
CHANGED
|
@@ -5,12 +5,17 @@ import { cubicOut, elasticOut, linear } from "svelte/easing";
|
|
|
5
5
|
|
|
6
6
|
//#region rolldown:runtime
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
|
-
var __export = (all) => {
|
|
8
|
+
var __export = (all, symbols) => {
|
|
9
9
|
let target = {};
|
|
10
|
-
for (var name in all)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
for (var name in all) {
|
|
11
|
+
__defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (symbols) {
|
|
17
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
}
|
|
14
19
|
return target;
|
|
15
20
|
};
|
|
16
21
|
|
|
@@ -51,6 +56,9 @@ const NOOP = (_args) => {};
|
|
|
51
56
|
/** @internal */
|
|
52
57
|
const isPreview = () => false;
|
|
53
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
|
+
};
|
|
54
62
|
const isOnSite = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-on-site") ?? "true") === "true" : true;
|
|
55
63
|
/** @internal */
|
|
56
64
|
const setPreviousFocus = () => {
|
|
@@ -188,17 +196,13 @@ function onScroll(rate, fn) {
|
|
|
188
196
|
html.scrollHeight,
|
|
189
197
|
html.clientHeight
|
|
190
198
|
]);
|
|
191
|
-
const
|
|
192
|
-
const scrollRate = (scrollTop + viewHeight) / pageHeight;
|
|
199
|
+
const scrollRate = (scrollTop + Math.min(...[html.clientHeight, body.clientHeight])) / pageHeight;
|
|
193
200
|
contexts.forEach((ctx) => {
|
|
194
201
|
ctx.scrollRate = scrollRate;
|
|
195
202
|
ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
|
|
196
203
|
ctx.previousRate = ctx.scrollRate;
|
|
197
204
|
ctx.scrollTop = scrollTop;
|
|
198
|
-
if (canCall(ctx)) {
|
|
199
|
-
const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
|
|
200
|
-
updateStates(ctx, repeat);
|
|
201
|
-
}
|
|
205
|
+
if (canCall(ctx)) updateStates(ctx, !!_fn(Object.assign({ direction: direction(ctx) }, ctx)));
|
|
202
206
|
});
|
|
203
207
|
};
|
|
204
208
|
window.addEventListener("scroll", onScroll$1);
|
|
@@ -1143,6 +1147,33 @@ function setDestroyed(on$1) {
|
|
|
1143
1147
|
*
|
|
1144
1148
|
* @internal
|
|
1145
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
|
+
*/
|
|
1146
1177
|
const variables = writable({});
|
|
1147
1178
|
/**
|
|
1148
1179
|
* 変数の一覧を取得する
|
|
@@ -1426,6 +1457,9 @@ function dispatchDestroyEvent() {
|
|
|
1426
1457
|
|
|
1427
1458
|
//#endregion
|
|
1428
1459
|
//#region src/display-logic.ts
|
|
1460
|
+
/**
|
|
1461
|
+
* モーダル(ポップアップ)のロジックを管理する
|
|
1462
|
+
*/
|
|
1429
1463
|
function doPresent({ direction, deltaRate }, downFn, upFn, condition = false) {
|
|
1430
1464
|
if (direction === "down" && deltaRate > 0) downFn();
|
|
1431
1465
|
else if (condition && direction === "up" && deltaRate < 0) upFn();
|
|
@@ -1559,6 +1593,9 @@ function checkAndDo(checkFn, fn, ...conditionFns) {
|
|
|
1559
1593
|
|
|
1560
1594
|
//#endregion
|
|
1561
1595
|
//#region src/collection.ts
|
|
1596
|
+
/**
|
|
1597
|
+
* アクションテーブルに関連するコードの管理
|
|
1598
|
+
*/
|
|
1562
1599
|
const DEFAULT_COLLECTION_ENDPOINT = "https://action-table.karte.io/collection";
|
|
1563
1600
|
/**
|
|
1564
1601
|
* アクションテーブルを管理するメソッドを取得する
|
|
@@ -1752,6 +1789,11 @@ function initActionTable(localVariablesQuery) {
|
|
|
1752
1789
|
|
|
1753
1790
|
//#endregion
|
|
1754
1791
|
//#region src/modal.tsx
|
|
1792
|
+
/**
|
|
1793
|
+
* モーダル(ポップアップ)に関連するコードの管理
|
|
1794
|
+
*
|
|
1795
|
+
* アクションのShow, Close, ChangeStateの状態はここで管理する。
|
|
1796
|
+
*/
|
|
1755
1797
|
/** @internal */
|
|
1756
1798
|
const handleState = (event) => {
|
|
1757
1799
|
if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
|
|
@@ -1970,8 +2012,7 @@ function createModal(App, options = {
|
|
|
1970
2012
|
return NOOP;
|
|
1971
2013
|
};
|
|
1972
2014
|
const handleClose = (event) => {
|
|
1973
|
-
|
|
1974
|
-
close$2(trigger);
|
|
2015
|
+
close$2(event?.detail?.trigger ? event.detail.trigger : "none");
|
|
1975
2016
|
};
|
|
1976
2017
|
const show$2 = async (trigger = "none") => {
|
|
1977
2018
|
if (app) return;
|
|
@@ -1992,21 +2033,21 @@ function createModal(App, options = {
|
|
|
1992
2033
|
setOpened(true);
|
|
1993
2034
|
setClosed(false);
|
|
1994
2035
|
if (app) return;
|
|
1995
|
-
|
|
2036
|
+
app = new App({
|
|
1996
2037
|
target: ensureActionRoot$1(true),
|
|
1997
2038
|
hydrate: false,
|
|
1998
2039
|
props: {
|
|
1999
2040
|
send: options.send,
|
|
2000
2041
|
publish: options.publish,
|
|
2001
2042
|
data,
|
|
2002
|
-
onShow: (props
|
|
2043
|
+
onShow: (props) => {
|
|
2003
2044
|
const { onShowHandlers } = getInternalHandlers();
|
|
2004
2045
|
if (onShowHandlers) onShowHandlers.forEach((h$1) => {
|
|
2005
2046
|
console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify({ name: "onShow" })}`);
|
|
2006
|
-
h$1(props
|
|
2047
|
+
h$1(props);
|
|
2007
2048
|
});
|
|
2008
2049
|
},
|
|
2009
|
-
onChangeState: (props
|
|
2050
|
+
onChangeState: (props, newState) => {
|
|
2010
2051
|
const { onChangeStateHandlers } = getInternalHandlers();
|
|
2011
2052
|
if (onChangeStateHandlers) onChangeStateHandlers.forEach((h$1) => {
|
|
2012
2053
|
const actionHookLog = {
|
|
@@ -2014,18 +2055,16 @@ function createModal(App, options = {
|
|
|
2014
2055
|
values: { newState }
|
|
2015
2056
|
};
|
|
2016
2057
|
console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify(actionHookLog)}`);
|
|
2017
|
-
h$1(props
|
|
2058
|
+
h$1(props, newState);
|
|
2018
2059
|
});
|
|
2019
2060
|
const { onChangeStateHandlers: onChangeWidgetStateHandlers } = getWidgetHandlers();
|
|
2020
|
-
if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props
|
|
2061
|
+
if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props, newState));
|
|
2021
2062
|
}
|
|
2022
2063
|
}
|
|
2023
|
-
};
|
|
2024
|
-
app = new App(props);
|
|
2064
|
+
});
|
|
2025
2065
|
};
|
|
2026
2066
|
const handleShow = (event) => {
|
|
2027
|
-
|
|
2028
|
-
show$2(trigger);
|
|
2067
|
+
show$2(event?.detail?.trigger ? event.detail.trigger : "none");
|
|
2029
2068
|
};
|
|
2030
2069
|
const currying = (conditionFn, options$1) => (fn) => conditionFn(options$1.props, fn);
|
|
2031
2070
|
const autoShow = () => {
|
|
@@ -2208,6 +2247,11 @@ function createFog({ color = "#000", opacity = "50%", zIndex = 999, onclick }) {
|
|
|
2208
2247
|
//#endregion
|
|
2209
2248
|
//#region src/modal.svelte5.tsx
|
|
2210
2249
|
/**
|
|
2250
|
+
* モーダル(ポップアップ)に関連するコードの管理
|
|
2251
|
+
*
|
|
2252
|
+
* アクションのShow, Close, ChangeStateの状態はここで管理する。
|
|
2253
|
+
*/
|
|
2254
|
+
/**
|
|
2211
2255
|
* アクションが表示 (show) された後にフックする関数
|
|
2212
2256
|
*
|
|
2213
2257
|
* @param fn - 呼び出されるフック関数
|
|
@@ -2476,6 +2520,9 @@ function createFog$1({ color = "#000", opacity = "50%", zIndex = 999, onclick })
|
|
|
2476
2520
|
|
|
2477
2521
|
//#endregion
|
|
2478
2522
|
//#region src/script.ts
|
|
2523
|
+
/**
|
|
2524
|
+
* スクリプト接客が利用するコードの管理
|
|
2525
|
+
*/
|
|
2479
2526
|
/** @internal */
|
|
2480
2527
|
async function runScript$1(options = {
|
|
2481
2528
|
send: () => {},
|
|
@@ -2577,8 +2624,100 @@ async function loadGlobalStyle(href) {
|
|
|
2577
2624
|
});
|
|
2578
2625
|
}
|
|
2579
2626
|
|
|
2627
|
+
//#endregion
|
|
2628
|
+
//#region src/preview.ts
|
|
2629
|
+
/** @internal */
|
|
2630
|
+
const initPreview = () => {
|
|
2631
|
+
if (!isPreview()) return () => {};
|
|
2632
|
+
let root;
|
|
2633
|
+
let timer = null;
|
|
2634
|
+
const previewId = getPreviewId();
|
|
2635
|
+
const LAYER_ID_ATTR_KEY = "data-layer-id";
|
|
2636
|
+
const toInfo = (element$1) => {
|
|
2637
|
+
if (!element$1) return null;
|
|
2638
|
+
const rect = element$1.getBoundingClientRect();
|
|
2639
|
+
const styles = window.getComputedStyle(element$1);
|
|
2640
|
+
return {
|
|
2641
|
+
layerId: element$1.getAttribute(LAYER_ID_ATTR_KEY),
|
|
2642
|
+
top: rect.top,
|
|
2643
|
+
left: rect.left,
|
|
2644
|
+
width: rect.width,
|
|
2645
|
+
height: rect.height,
|
|
2646
|
+
direction: styles?.flexDirection === "row" || styles?.flexDirection === "row-reverse" ? "row" : "column",
|
|
2647
|
+
classNames: Array.from(element$1.classList.values()),
|
|
2648
|
+
styles: {
|
|
2649
|
+
direction: styles.flexDirection,
|
|
2650
|
+
opacity: styles.opacity,
|
|
2651
|
+
rowGap: styles.rowGap,
|
|
2652
|
+
columnGap: styles.columnGap,
|
|
2653
|
+
paddingLeft: styles.paddingLeft,
|
|
2654
|
+
paddingRight: styles.paddingRight,
|
|
2655
|
+
paddingTop: styles.paddingTop,
|
|
2656
|
+
paddingBottom: styles.paddingBottom,
|
|
2657
|
+
zIndex: styles.zIndex,
|
|
2658
|
+
position: styles.position,
|
|
2659
|
+
top: styles.top,
|
|
2660
|
+
left: styles.left,
|
|
2661
|
+
right: styles.right,
|
|
2662
|
+
bottom: styles.bottom
|
|
2663
|
+
}
|
|
2664
|
+
};
|
|
2665
|
+
};
|
|
2666
|
+
const w$1 = (w$2) => w$2.parent === w$2 ? w$2 : w$2.parent;
|
|
2667
|
+
const postUpdateLayers = () => {
|
|
2668
|
+
const layerElements = Array.from(root.querySelectorAll(`[${LAYER_ID_ATTR_KEY}]`)).map((el) => toInfo(el));
|
|
2669
|
+
if (layerElements.length === 0) return;
|
|
2670
|
+
w$1(window).postMessage({
|
|
2671
|
+
type: "KARTE-ACTION-PREVIEW-UPDATE-LAYERS",
|
|
2672
|
+
detail: {
|
|
2673
|
+
previewId,
|
|
2674
|
+
layerElements
|
|
2675
|
+
}
|
|
2676
|
+
}, "*");
|
|
2677
|
+
};
|
|
2678
|
+
const rootObserver = new MutationObserver(postUpdateLayers);
|
|
2679
|
+
const handleMessage = (e) => {
|
|
2680
|
+
console.log("message", e);
|
|
2681
|
+
const data = e.data;
|
|
2682
|
+
if (data.event_name === "OVERRIDE_LAYER_STYLE") {
|
|
2683
|
+
const { layerId = "", styles = [] } = data.detail || {};
|
|
2684
|
+
const layerElement = root.querySelector(`[${LAYER_ID_ATTR_KEY}="${layerId}"]`);
|
|
2685
|
+
if (!layerElement) return;
|
|
2686
|
+
styles.forEach(({ key, value }) => {
|
|
2687
|
+
layerElement.style.setProperty(key, value);
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
};
|
|
2691
|
+
(() => {
|
|
2692
|
+
const init$1 = () => {
|
|
2693
|
+
root = getActionRoot$1();
|
|
2694
|
+
if (root) {
|
|
2695
|
+
rootObserver.observe(root, {
|
|
2696
|
+
childList: true,
|
|
2697
|
+
subtree: true,
|
|
2698
|
+
characterData: true,
|
|
2699
|
+
attributes: true
|
|
2700
|
+
});
|
|
2701
|
+
timer = setInterval(postUpdateLayers, 1e3);
|
|
2702
|
+
window.addEventListener("message", handleMessage);
|
|
2703
|
+
} else setTimeout(init$1, 30);
|
|
2704
|
+
};
|
|
2705
|
+
init$1();
|
|
2706
|
+
})();
|
|
2707
|
+
return () => {
|
|
2708
|
+
if (timer) clearInterval(timer);
|
|
2709
|
+
rootObserver.disconnect();
|
|
2710
|
+
window.removeEventListener("message", handleMessage);
|
|
2711
|
+
};
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2580
2714
|
//#endregion
|
|
2581
2715
|
//#region src/action.ts
|
|
2716
|
+
/**
|
|
2717
|
+
* Edgeが起動するアクションに関連するコードを管理する
|
|
2718
|
+
*
|
|
2719
|
+
* アクションのCreate, Destroyの状態はここで管理する。
|
|
2720
|
+
*/
|
|
2582
2721
|
const emptyOptions = {
|
|
2583
2722
|
send: () => {},
|
|
2584
2723
|
publish: () => {},
|
|
@@ -2616,6 +2755,7 @@ function create(App, options) {
|
|
|
2616
2755
|
publish: options.publish,
|
|
2617
2756
|
data
|
|
2618
2757
|
};
|
|
2758
|
+
const destroyPreview = initPreview();
|
|
2619
2759
|
const handleDestroy = () => {
|
|
2620
2760
|
const { onDestroyHandlers } = getInternalHandlers();
|
|
2621
2761
|
onDestroyHandlers?.forEach((h$1) => {
|
|
@@ -2624,6 +2764,7 @@ function create(App, options) {
|
|
|
2624
2764
|
});
|
|
2625
2765
|
const { onDestroyHandlers: onDestroyWidgetHandlers } = getWidgetHandlers();
|
|
2626
2766
|
if (onDestroyWidgetHandlers) onDestroyWidgetHandlers.forEach((h$1) => h$1(actionProps));
|
|
2767
|
+
destroyPreview();
|
|
2627
2768
|
};
|
|
2628
2769
|
setSystem({
|
|
2629
2770
|
apiKey: data.api_key || null,
|
|
@@ -2765,8 +2906,7 @@ function validateFormData(formData$1, statePath) {
|
|
|
2765
2906
|
/** @internal */
|
|
2766
2907
|
const getValuesAreValidReadable = (statePath) => ({ subscribe(callback$5) {
|
|
2767
2908
|
return formData.subscribe((formData$1) => identifyFormData.subscribe((identifyFormData$1) => {
|
|
2768
|
-
|
|
2769
|
-
callback$5(valuesAreValid);
|
|
2909
|
+
callback$5(validateFormData(formData$1, statePath) && validateFormData(identifyFormData$1, statePath));
|
|
2770
2910
|
}));
|
|
2771
2911
|
} });
|
|
2772
2912
|
function createAnswerValue$1(value) {
|
|
@@ -2789,8 +2929,7 @@ function formDataToEventValues$1(campaignId, formData$1) {
|
|
|
2789
2929
|
}
|
|
2790
2930
|
function formDataToIdentifyEventValues$1(formData$1) {
|
|
2791
2931
|
return Object.fromEntries(Object.entries(formData$1).map(([name, dataItem]) => {
|
|
2792
|
-
|
|
2793
|
-
return [name, value];
|
|
2932
|
+
return [name, dataItem.value];
|
|
2794
2933
|
}));
|
|
2795
2934
|
}
|
|
2796
2935
|
/** @internal */
|
|
@@ -2911,6 +3050,9 @@ function sendAnswers() {
|
|
|
2911
3050
|
|
|
2912
3051
|
//#endregion
|
|
2913
3052
|
//#region src/widget.ts
|
|
3053
|
+
/**
|
|
3054
|
+
* エディタv1のWidget API 互換のインターフェース
|
|
3055
|
+
*/
|
|
2914
3056
|
var widget_exports = /* @__PURE__ */ __export({
|
|
2915
3057
|
collection: () => collection$1,
|
|
2916
3058
|
getState: () => getState$1,
|
|
@@ -3841,10 +3983,12 @@ function onSubmitForm(fn) {
|
|
|
3841
3983
|
|
|
3842
3984
|
//#endregion
|
|
3843
3985
|
//#region src/functions.ts
|
|
3986
|
+
/**
|
|
3987
|
+
* モーダル(ポップアップ)のコンポーネントが利用するコードの管理
|
|
3988
|
+
*/
|
|
3844
3989
|
function _moveTo(to) {
|
|
3845
|
-
const currentState = getState();
|
|
3846
3990
|
dispatchActionEvent(ACTION_CHANGE_STATE_EVENT, { detail: {
|
|
3847
|
-
from:
|
|
3991
|
+
from: getState(),
|
|
3848
3992
|
to,
|
|
3849
3993
|
actionId
|
|
3850
3994
|
} });
|
|
@@ -4013,36 +4157,12 @@ const haveFunction = (onClickOperation) => {
|
|
|
4013
4157
|
function getAnimation(animation) {
|
|
4014
4158
|
switch (animation.type) {
|
|
4015
4159
|
case "fade": return `opacity: ${animation.progress}`;
|
|
4016
|
-
case "bounce": {
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
}
|
|
4021
|
-
case "
|
|
4022
|
-
const translateX = animation.x;
|
|
4023
|
-
const translateY = animation.y - 100 * (1 - animation.progress);
|
|
4024
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4025
|
-
}
|
|
4026
|
-
case "slide-up": {
|
|
4027
|
-
const translateX = animation.x;
|
|
4028
|
-
const translateY = animation.y + 100 * (1 - animation.progress);
|
|
4029
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4030
|
-
}
|
|
4031
|
-
case "slide-left": {
|
|
4032
|
-
const translateX = animation.x + 100 * (1 - animation.progress);
|
|
4033
|
-
const translateY = animation.y;
|
|
4034
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4035
|
-
}
|
|
4036
|
-
case "slide-right": {
|
|
4037
|
-
const translateX = animation.x - 100 * (1 - animation.progress);
|
|
4038
|
-
const translateY = animation.y;
|
|
4039
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4040
|
-
}
|
|
4041
|
-
case "none": {
|
|
4042
|
-
const translateX = animation.x;
|
|
4043
|
-
const translateY = animation.y;
|
|
4044
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4045
|
-
}
|
|
4160
|
+
case "bounce": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0) scale(${animation.progress});`;
|
|
4161
|
+
case "slide-down": return `transform: translate3d(${animation.x}%, ${animation.y - 100 * (1 - animation.progress)}%, 0);`;
|
|
4162
|
+
case "slide-up": return `transform: translate3d(${animation.x}%, ${animation.y + 100 * (1 - animation.progress)}%, 0);`;
|
|
4163
|
+
case "slide-left": return `transform: translate3d(${animation.x + 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
|
|
4164
|
+
case "slide-right": return `transform: translate3d(${animation.x - 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
|
|
4165
|
+
case "none": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0);`;
|
|
4046
4166
|
default:
|
|
4047
4167
|
console.warn(`[action-sdk] invalid '${animation}', so we use 'transform: none' instead`);
|
|
4048
4168
|
return "transform: none";
|
|
@@ -4181,6 +4301,10 @@ var BackgroundOverlay_default$1 = BackgroundOverlay$1;
|
|
|
4181
4301
|
|
|
4182
4302
|
//#endregion
|
|
4183
4303
|
//#region src/enhancedStopPropagation.ts
|
|
4304
|
+
/**
|
|
4305
|
+
* data属性とカスタムのイベントハンドラによるstopPropagation。
|
|
4306
|
+
* デフォルトのstopPropagationだと伝播先のpreventDefaultも無効化されてしまうため、それの対策。
|
|
4307
|
+
*/
|
|
4184
4308
|
function createDataAttrKey(eventName) {
|
|
4185
4309
|
return `data-stop-propagation-${eventName}-${actionId}`;
|
|
4186
4310
|
}
|
|
@@ -5112,10 +5236,7 @@ function instance$103($$self, $$props, $$invalidate) {
|
|
|
5112
5236
|
let elasticStyle = ElasticityStyle[isPreview() ? "none" : elasticity];
|
|
5113
5237
|
if (!useBreakPoint) modalStyles.add(elasticStyle);
|
|
5114
5238
|
DEVICE_IDS.forEach((deviceId) => {
|
|
5115
|
-
if (!isPreview() && useBreakPoint)
|
|
5116
|
-
const elasticityWithBp = breakPoint[deviceId]?.elasticity;
|
|
5117
|
-
elasticStyle = ElasticityStyle[elasticityWithBp];
|
|
5118
|
-
}
|
|
5239
|
+
if (!isPreview() && useBreakPoint) elasticStyle = ElasticityStyle[breakPoint[deviceId]?.elasticity];
|
|
5119
5240
|
const elasticityVariables = stringifyStyleObj(formatObjectKey({
|
|
5120
5241
|
obj: parseStyle(elasticStyle),
|
|
5121
5242
|
prefix: "--modal-bp-",
|
|
@@ -6475,12 +6596,11 @@ function instance$93($$self, $$props, $$invalidate) {
|
|
|
6475
6596
|
let domRef = null;
|
|
6476
6597
|
function sendMovieEvent(event_name, values = {}) {
|
|
6477
6598
|
if (!sendEvent) return;
|
|
6478
|
-
|
|
6599
|
+
send_event(event_name, {
|
|
6479
6600
|
campaign_id: $system.campaignId,
|
|
6480
6601
|
shorten_id: $system.shortenId,
|
|
6481
6602
|
...values
|
|
6482
|
-
};
|
|
6483
|
-
send_event(event_name, sentValues);
|
|
6603
|
+
});
|
|
6484
6604
|
}
|
|
6485
6605
|
function sendPlaytime() {
|
|
6486
6606
|
if (!startDate) return;
|
|
@@ -6729,12 +6849,11 @@ function instance$92($$self, $$props, $$invalidate) {
|
|
|
6729
6849
|
let domRef = null;
|
|
6730
6850
|
function sendMovieEvent(event_name, values = {}) {
|
|
6731
6851
|
if (!sendEvent) return;
|
|
6732
|
-
|
|
6852
|
+
send_event(event_name, {
|
|
6733
6853
|
campaign_id: $system.campaignId,
|
|
6734
6854
|
shorten_id: $system.shortenId,
|
|
6735
6855
|
...values
|
|
6736
|
-
};
|
|
6737
|
-
send_event(event_name, sentValues);
|
|
6856
|
+
});
|
|
6738
6857
|
}
|
|
6739
6858
|
function sendPlaytime() {
|
|
6740
6859
|
if (!startDate) return;
|
|
@@ -8723,8 +8842,7 @@ function instance$83($$self, $$props, $$invalidate) {
|
|
|
8723
8842
|
if (!moving) return;
|
|
8724
8843
|
if (previousMove) {
|
|
8725
8844
|
const dx = clientX - previousMove.clientX;
|
|
8726
|
-
|
|
8727
|
-
moveSpeed = dx / dt;
|
|
8845
|
+
moveSpeed = dx / (timeStamp - previousMove.timeStamp);
|
|
8728
8846
|
const updatedSlidePosition = slidePosition + dx;
|
|
8729
8847
|
window.requestAnimationFrame(() => {
|
|
8730
8848
|
$$invalidate(28, slidePosition = updatedSlidePosition);
|
|
@@ -10648,29 +10766,25 @@ const toCssOverflow = (p) => {
|
|
|
10648
10766
|
function createComponentRawCss(layerId, define) {
|
|
10649
10767
|
const rootSelector = `[data-layer-id="${layerId}"]`;
|
|
10650
10768
|
const gen = (selector, styles) => {
|
|
10651
|
-
|
|
10652
|
-
const body = Object.entries(styles).map(([k, v]) => {
|
|
10769
|
+
return `${rootSelector}${selector.startsWith("&") ? selector.slice(1) : ` ${selector}`} {\n${Object.entries(styles).map(([k, v]) => {
|
|
10653
10770
|
if (!v) return "";
|
|
10654
10771
|
return `${k.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase())}: ${v};`;
|
|
10655
|
-
}).filter((v) => v !== "").join("\n")
|
|
10656
|
-
return `${rootSelector}${childSelector} {\n${body}\n}`;
|
|
10772
|
+
}).filter((v) => v !== "").join("\n")}\n}`;
|
|
10657
10773
|
};
|
|
10658
10774
|
return define(gen).join("\n");
|
|
10659
10775
|
}
|
|
10660
10776
|
function toResponsiveSelector(responsiveSetting, body) {
|
|
10661
|
-
const {
|
|
10662
|
-
|
|
10663
|
-
|
|
10777
|
+
const { breakpointId } = responsiveSetting;
|
|
10778
|
+
const breakpoint = getBreakpoints().find((v) => v.id === breakpointId);
|
|
10779
|
+
if (breakpoint && breakpoint.mediaQuery) {
|
|
10780
|
+
const { maxWidth, minWidth, orientation } = breakpoint.mediaQuery;
|
|
10664
10781
|
const prefix = `@media screen and`;
|
|
10665
|
-
if (raw) return `${prefix} (${raw}) {\n${body}\n}`;
|
|
10666
10782
|
const orientationStyle = orientation ? ` and (orientation: ${orientation})` : "";
|
|
10667
|
-
if (
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
else if (range.min) return `${prefix} (min-width: ${range.min}px)${orientationStyle} {\n${body}\n}`;
|
|
10671
|
-
}
|
|
10783
|
+
if (minWidth && maxWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} and (max-width: ${maxWidth}px) {\n${body}\n}`;
|
|
10784
|
+
else if (maxWidth) return `${prefix} (max-width: ${maxWidth}px)${orientationStyle} {\n${body}\n}`;
|
|
10785
|
+
else if (minWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} {\n${body}\n}`;
|
|
10672
10786
|
return "";
|
|
10673
|
-
}
|
|
10787
|
+
}
|
|
10674
10788
|
return "";
|
|
10675
10789
|
}
|
|
10676
10790
|
function toStyleTag(css) {
|
|
@@ -10720,11 +10834,7 @@ var Avatar_css_default = (layerId, props) => {
|
|
|
10720
10834
|
appearance: "none"
|
|
10721
10835
|
}),
|
|
10722
10836
|
toDynamicStyle$3(layerId, props),
|
|
10723
|
-
...props.responsiveSettings?.map((v) =>
|
|
10724
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props));
|
|
10725
|
-
else if (v.userAgentCondition) return "";
|
|
10726
|
-
return "";
|
|
10727
|
-
}) ?? [],
|
|
10837
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props))) ?? [],
|
|
10728
10838
|
props.customizeCss
|
|
10729
10839
|
]);
|
|
10730
10840
|
};
|
|
@@ -10838,57 +10948,25 @@ var StylePortal = class extends SvelteComponent {
|
|
|
10838
10948
|
var StylePortal_default = StylePortal;
|
|
10839
10949
|
|
|
10840
10950
|
//#endregion
|
|
10841
|
-
//#region src/components-flex/
|
|
10842
|
-
const USER_AGENT_VARIANT = {
|
|
10843
|
-
smartphone: { regex: /iPhone|Android.*Mobile/i },
|
|
10844
|
-
tablet: { regex: /iPad|Android(?!.*Mobile)/i },
|
|
10845
|
-
pc: { regex: /Windows NT|Macintosh|Linux x86_64/i },
|
|
10846
|
-
windows: { regex: /Windows NT/i },
|
|
10847
|
-
mac: { regex: /Macintosh|Mac OS X/i },
|
|
10848
|
-
ios: { regex: /iPhone|iPad|iPod/i },
|
|
10849
|
-
android: { regex: /Android/i },
|
|
10850
|
-
safari: { regex: /Safari/i },
|
|
10851
|
-
chrome: { regex: /Chrome|CriOS/i },
|
|
10852
|
-
firefox: { regex: /Firefox/i },
|
|
10853
|
-
ios_webview: { regex: /iPhone|iPad|iPod/i },
|
|
10854
|
-
android_webview: { regex: /; wv\)/i }
|
|
10855
|
-
};
|
|
10951
|
+
//#region src/components-flex/responsiveProp.ts
|
|
10856
10952
|
const isMatchMediaQueryCondition = (condition) => {
|
|
10857
|
-
const {
|
|
10953
|
+
const { minWidth, maxWidth, orientation } = condition;
|
|
10858
10954
|
if (orientation) return window.matchMedia(`(orientation: ${condition.orientation})`).matches;
|
|
10859
|
-
if (
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
else if (typeof min === "number") return window.matchMedia(`(min-width: ${min}px)`).matches;
|
|
10863
|
-
else if (typeof max === "number") return window.matchMedia(`(max-width: ${max}px)`).matches;
|
|
10864
|
-
}
|
|
10865
|
-
if (raw) return window.matchMedia(raw).matches;
|
|
10866
|
-
return false;
|
|
10867
|
-
};
|
|
10868
|
-
const isMatchUserAgentCondition = (condition) => {
|
|
10869
|
-
const { variants, regex } = condition;
|
|
10870
|
-
if (variants) return variants.some((variant) => {
|
|
10871
|
-
const regex$1 = USER_AGENT_VARIANT[variant]?.regex;
|
|
10872
|
-
if (!regex$1) return false;
|
|
10873
|
-
return new RegExp(regex$1).test(navigator.userAgent);
|
|
10874
|
-
});
|
|
10875
|
-
else if (regex) return new RegExp(regex).test(navigator.userAgent);
|
|
10955
|
+
if (typeof minWidth === "number" && typeof maxWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px) and (max-width: ${maxWidth}px)`).matches;
|
|
10956
|
+
else if (typeof minWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px)`).matches;
|
|
10957
|
+
else if (typeof maxWidth === "number") return window.matchMedia(`(max-width: ${maxWidth}px)`).matches;
|
|
10876
10958
|
return false;
|
|
10877
10959
|
};
|
|
10878
|
-
const isMatchResponsiveSetting = (setting) => {
|
|
10879
|
-
const { mediaQueryCondition, userAgentCondition } = setting;
|
|
10880
|
-
if (mediaQueryCondition) return isMatchMediaQueryCondition(mediaQueryCondition);
|
|
10881
|
-
else if (userAgentCondition) return isMatchUserAgentCondition(userAgentCondition);
|
|
10882
|
-
else return false;
|
|
10883
|
-
};
|
|
10884
10960
|
function useResponsiveProps(props) {
|
|
10885
10961
|
return readable(props, (set) => {
|
|
10886
10962
|
if (!props.responsiveSettings) {
|
|
10887
10963
|
set(props);
|
|
10888
10964
|
return () => {};
|
|
10889
10965
|
}
|
|
10966
|
+
const breakpoints$1 = getBreakpoints();
|
|
10890
10967
|
const update = () => {
|
|
10891
|
-
const
|
|
10968
|
+
const breakpoint = breakpoints$1.find((v) => v.mediaQuery && isMatchMediaQueryCondition(v.mediaQuery));
|
|
10969
|
+
const matchedSetting = props.responsiveSettings.find((v) => v.breakpointId === breakpoint?.id);
|
|
10892
10970
|
if (matchedSetting) set(Object.assign({}, props, matchedSetting.props ?? {}));
|
|
10893
10971
|
else set(props);
|
|
10894
10972
|
};
|
|
@@ -12692,14 +12770,10 @@ var Icon_css_default = (layerId, props, _brandKit) => {
|
|
|
12692
12770
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
12693
12771
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
12694
12772
|
toDynamicStyle$2(layerId, props),
|
|
12695
|
-
...props.responsiveSettings?.map((v) => {
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
}));
|
|
12700
|
-
else if (v.userAgentCondition) return "";
|
|
12701
|
-
return "";
|
|
12702
|
-
}) ?? [],
|
|
12773
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$2(layerId, {
|
|
12774
|
+
variant: v.props.variant ?? props.variant,
|
|
12775
|
+
...v.props
|
|
12776
|
+
}))) ?? [],
|
|
12703
12777
|
props.customizeCss
|
|
12704
12778
|
]);
|
|
12705
12779
|
};
|
|
@@ -12902,8 +12976,7 @@ var Icon_default = Icon;
|
|
|
12902
12976
|
//#region src/components-flex/styles.ts
|
|
12903
12977
|
const getPropStyles = (callback$5) => {
|
|
12904
12978
|
return (customBrandKit) => {
|
|
12905
|
-
|
|
12906
|
-
return callback$5({ brandKit });
|
|
12979
|
+
return callback$5({ brandKit: getBrandKit(customBrandKit) });
|
|
12907
12980
|
};
|
|
12908
12981
|
};
|
|
12909
12982
|
|
|
@@ -13095,11 +13168,7 @@ var Button_css_default = (layerId, props, brandKit) => {
|
|
|
13095
13168
|
marginRight: "-0.2em"
|
|
13096
13169
|
}),
|
|
13097
13170
|
toDynamicStyle$1(layerId, props, brandKit),
|
|
13098
|
-
...props.responsiveSettings?.map((v) =>
|
|
13099
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit));
|
|
13100
|
-
else if (v.userAgentCondition) return "";
|
|
13101
|
-
return "";
|
|
13102
|
-
}) ?? [],
|
|
13171
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit))) ?? [],
|
|
13103
13172
|
props.customizeCss
|
|
13104
13173
|
]);
|
|
13105
13174
|
};
|
|
@@ -14711,11 +14780,7 @@ var Layout_css_default = (layerId, props, brandKit) => {
|
|
|
14711
14780
|
style("&[data-clickable=\"true\"]", { cursor: "pointer" }),
|
|
14712
14781
|
style("&[data-clickable=\"true\"]:hover", { opacity: .8 }),
|
|
14713
14782
|
toDynamicStyle$4(props),
|
|
14714
|
-
...props.responsiveSettings?.map((v) =>
|
|
14715
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$4(v.props));
|
|
14716
|
-
else if (v.userAgentCondition) return "";
|
|
14717
|
-
return "";
|
|
14718
|
-
}) ?? [],
|
|
14783
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4(v.props))) ?? [],
|
|
14719
14784
|
props.customizeCss
|
|
14720
14785
|
]);
|
|
14721
14786
|
};
|
|
@@ -15625,14 +15690,10 @@ var Text_css_default = (layerId, props, brandKit) => {
|
|
|
15625
15690
|
wordBreak: "break-all"
|
|
15626
15691
|
}),
|
|
15627
15692
|
toDynamicStyle$4(props),
|
|
15628
|
-
...props.responsiveSettings?.map((v) => {
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
}));
|
|
15633
|
-
else if (v.userAgentCondition) return "";
|
|
15634
|
-
return "";
|
|
15635
|
-
}) ?? [],
|
|
15693
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4({
|
|
15694
|
+
...v.props,
|
|
15695
|
+
content: v.props.content ?? props.content
|
|
15696
|
+
}))) ?? [],
|
|
15636
15697
|
props.customizeCss
|
|
15637
15698
|
]);
|
|
15638
15699
|
};
|
|
@@ -15931,14 +15992,10 @@ var TextLink_css_default = (layerId, props, brandKit) => {
|
|
|
15931
15992
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
15932
15993
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
15933
15994
|
toDynamicStyle(layerId, props, brandKit),
|
|
15934
|
-
...props.responsiveSettings?.map((v) => {
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
}, brandKit));
|
|
15939
|
-
else if (v.userAgentCondition) return "";
|
|
15940
|
-
return "";
|
|
15941
|
-
}) ?? [],
|
|
15995
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle(layerId, {
|
|
15996
|
+
...v.props,
|
|
15997
|
+
label: v.props.label ?? props.label
|
|
15998
|
+
}, brandKit))) ?? [],
|
|
15942
15999
|
props.customizeCss
|
|
15943
16000
|
]);
|
|
15944
16001
|
};
|
|
@@ -17788,15 +17845,11 @@ function calcRemainingTime(limit) {
|
|
|
17788
17845
|
return limit - (/* @__PURE__ */ new Date()).getTime();
|
|
17789
17846
|
}
|
|
17790
17847
|
function formatTimeDiff(ms) {
|
|
17791
|
-
const diffDay = Math.floor(ms / 1e3 / 60 / 60 / 24);
|
|
17792
|
-
const diffHour = Math.floor(ms / 1e3 / 60 / 60) % 24;
|
|
17793
|
-
const diffMin = Math.floor(ms / 1e3 / 60) % 60;
|
|
17794
|
-
const diffSec = Math.floor(ms / 1e3) % 60;
|
|
17795
17848
|
return {
|
|
17796
|
-
day:
|
|
17797
|
-
hour:
|
|
17798
|
-
min:
|
|
17799
|
-
sec:
|
|
17849
|
+
day: Math.floor(ms / 1e3 / 60 / 60 / 24),
|
|
17850
|
+
hour: Math.floor(ms / 1e3 / 60 / 60) % 24,
|
|
17851
|
+
min: Math.floor(ms / 1e3 / 60) % 60,
|
|
17852
|
+
sec: Math.floor(ms / 1e3) % 60
|
|
17800
17853
|
};
|
|
17801
17854
|
}
|
|
17802
17855
|
function instance$16($$self, $$props, $$invalidate) {
|
|
@@ -17893,24 +17946,22 @@ const useText = (props, layerId) => {
|
|
|
17893
17946
|
fontWeight: getFontWeight()
|
|
17894
17947
|
};
|
|
17895
17948
|
};
|
|
17896
|
-
const escapedHTML = props.content.replace(/&/g, "<").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, "<br />");
|
|
17897
|
-
const style = objToStyle({
|
|
17898
|
-
position: props?.position ?? "static",
|
|
17899
|
-
textAlign: props.align,
|
|
17900
|
-
width: props.width,
|
|
17901
|
-
fontFamily: `"${fontFamily}"`,
|
|
17902
|
-
color: getColor(),
|
|
17903
|
-
...getCssSize(),
|
|
17904
|
-
...toCssRadius(props),
|
|
17905
|
-
...toCssBackground(props),
|
|
17906
|
-
...toCssCommon(props),
|
|
17907
|
-
...toCssPosition(props),
|
|
17908
|
-
...toCssPadding(props),
|
|
17909
|
-
...toCssBorder(props)
|
|
17910
|
-
});
|
|
17911
17949
|
return {
|
|
17912
|
-
escapedHTML,
|
|
17913
|
-
style
|
|
17950
|
+
escapedHTML: props.content.replace(/&/g, "<").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, "<br />"),
|
|
17951
|
+
style: objToStyle({
|
|
17952
|
+
position: props?.position ?? "static",
|
|
17953
|
+
textAlign: props.align,
|
|
17954
|
+
width: props.width,
|
|
17955
|
+
fontFamily: `"${fontFamily}"`,
|
|
17956
|
+
color: getColor(),
|
|
17957
|
+
...getCssSize(),
|
|
17958
|
+
...toCssRadius(props),
|
|
17959
|
+
...toCssBackground(props),
|
|
17960
|
+
...toCssCommon(props),
|
|
17961
|
+
...toCssPosition(props),
|
|
17962
|
+
...toCssPadding(props),
|
|
17963
|
+
...toCssBorder(props)
|
|
17964
|
+
})
|
|
17914
17965
|
};
|
|
17915
17966
|
};
|
|
17916
17967
|
|
|
@@ -18179,7 +18230,7 @@ function create_fragment$14(ctx) {
|
|
|
18179
18230
|
}
|
|
18180
18231
|
function instance$14($$self, $$props, $$invalidate) {
|
|
18181
18232
|
let rProps;
|
|
18182
|
-
let $
|
|
18233
|
+
let $responsiveSettings;
|
|
18183
18234
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
18184
18235
|
let { props = {} } = $$props;
|
|
18185
18236
|
let { layerId = crypto.randomUUID() } = $$props;
|
|
@@ -18187,8 +18238,8 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18187
18238
|
let buttonElement;
|
|
18188
18239
|
let showTooltip = false;
|
|
18189
18240
|
const cssCode = ClipCopy_css_default(layerId, props);
|
|
18190
|
-
const
|
|
18191
|
-
component_subscribe($$self,
|
|
18241
|
+
const responsiveSettings = useResponsiveProps(props);
|
|
18242
|
+
component_subscribe($$self, responsiveSettings, (value) => $$invalidate(8, $responsiveSettings = value));
|
|
18192
18243
|
const handleClick = async (e) => {
|
|
18193
18244
|
e.preventDefault();
|
|
18194
18245
|
const targetText = rProps.content ?? buttonElement?.innerText ?? "";
|
|
@@ -18217,7 +18268,7 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18217
18268
|
if ("$$scope" in $$props$1) $$invalidate(9, $$scope = $$props$1.$$scope);
|
|
18218
18269
|
};
|
|
18219
18270
|
$$self.$$.update = () => {
|
|
18220
|
-
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $
|
|
18271
|
+
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $responsiveSettings);
|
|
18221
18272
|
};
|
|
18222
18273
|
return [
|
|
18223
18274
|
layerId,
|
|
@@ -18225,10 +18276,10 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18225
18276
|
showTooltip,
|
|
18226
18277
|
rProps,
|
|
18227
18278
|
cssCode,
|
|
18228
|
-
|
|
18279
|
+
responsiveSettings,
|
|
18229
18280
|
handleClick,
|
|
18230
18281
|
props,
|
|
18231
|
-
$
|
|
18282
|
+
$responsiveSettings,
|
|
18232
18283
|
$$scope,
|
|
18233
18284
|
slots,
|
|
18234
18285
|
button_binding
|
|
@@ -18754,8 +18805,8 @@ function create_fragment$10(ctx) {
|
|
|
18754
18805
|
let current;
|
|
18755
18806
|
let if_block = ctx[0] && create_if_block$3(ctx);
|
|
18756
18807
|
header = new Header_default({});
|
|
18757
|
-
const default_slot_template = ctx[
|
|
18758
|
-
const default_slot = create_slot(default_slot_template, ctx, ctx[
|
|
18808
|
+
const default_slot_template = ctx[4].default;
|
|
18809
|
+
const default_slot = create_slot(default_slot_template, ctx, ctx[3], null);
|
|
18759
18810
|
return {
|
|
18760
18811
|
c() {
|
|
18761
18812
|
if (if_block) if_block.c();
|
|
@@ -18790,7 +18841,7 @@ function create_fragment$10(ctx) {
|
|
|
18790
18841
|
check_outros();
|
|
18791
18842
|
}
|
|
18792
18843
|
if (default_slot) {
|
|
18793
|
-
if (default_slot.p && (!current || dirty &
|
|
18844
|
+
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);
|
|
18794
18845
|
}
|
|
18795
18846
|
},
|
|
18796
18847
|
i(local) {
|
|
@@ -18819,15 +18870,19 @@ function instance$10($$self, $$props, $$invalidate) {
|
|
|
18819
18870
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
18820
18871
|
let { customBrandKit = void 0 } = $$props;
|
|
18821
18872
|
let { globalCssCode = void 0 } = $$props;
|
|
18873
|
+
let { breakpoints: breakpoints$1 = [] } = $$props;
|
|
18822
18874
|
setContext("brandKit", getBrandKit(customBrandKit));
|
|
18875
|
+
setBreakpoints(breakpoints$1);
|
|
18823
18876
|
$$self.$$set = ($$props$1) => {
|
|
18824
18877
|
if ("customBrandKit" in $$props$1) $$invalidate(1, customBrandKit = $$props$1.customBrandKit);
|
|
18825
18878
|
if ("globalCssCode" in $$props$1) $$invalidate(0, globalCssCode = $$props$1.globalCssCode);
|
|
18826
|
-
if ("
|
|
18879
|
+
if ("breakpoints" in $$props$1) $$invalidate(2, breakpoints$1 = $$props$1.breakpoints);
|
|
18880
|
+
if ("$$scope" in $$props$1) $$invalidate(3, $$scope = $$props$1.$$scope);
|
|
18827
18881
|
};
|
|
18828
18882
|
return [
|
|
18829
18883
|
globalCssCode,
|
|
18830
18884
|
customBrandKit,
|
|
18885
|
+
breakpoints$1,
|
|
18831
18886
|
$$scope,
|
|
18832
18887
|
slots
|
|
18833
18888
|
];
|
|
@@ -18837,7 +18892,8 @@ var State = class extends SvelteComponent {
|
|
|
18837
18892
|
super();
|
|
18838
18893
|
init(this, options, instance$10, create_fragment$10, safe_not_equal, {
|
|
18839
18894
|
customBrandKit: 1,
|
|
18840
|
-
globalCssCode: 0
|
|
18895
|
+
globalCssCode: 0,
|
|
18896
|
+
breakpoints: 2
|
|
18841
18897
|
});
|
|
18842
18898
|
}
|
|
18843
18899
|
};
|
|
@@ -20917,7 +20973,6 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
20917
20973
|
TEXT_THEME: () => TEXT_THEME,
|
|
20918
20974
|
TEXT_VARIANTS: () => TEXT_VARIANTS,
|
|
20919
20975
|
TextDirections: () => TextDirections,
|
|
20920
|
-
USER_AGENT_VARIANT: () => USER_AGENT_VARIANT,
|
|
20921
20976
|
WritingModes: () => WritingModes,
|
|
20922
20977
|
addChoiceAnswer: () => addChoiceAnswer,
|
|
20923
20978
|
addFreeAnswer: () => addFreeAnswer,
|
|
@@ -20968,6 +21023,7 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
20968
21023
|
getVariables: () => getVariables,
|
|
20969
21024
|
hideOnScroll: () => hideOnScroll,
|
|
20970
21025
|
hideOnTime: () => hideOnTime,
|
|
21026
|
+
initPreview: () => initPreview,
|
|
20971
21027
|
initialize: () => initialize,
|
|
20972
21028
|
isOpened: () => isOpened,
|
|
20973
21029
|
listenLogger: () => listenLogger,
|
|
@@ -21306,4 +21362,4 @@ var ThumbnailPreview = class extends SvelteComponent {
|
|
|
21306
21362
|
var ThumbnailPreview_default = ThumbnailPreview;
|
|
21307
21363
|
|
|
21308
21364
|
//#endregion
|
|
21309
|
-
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 };
|
|
21365
|
+
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 };
|