@plaidev/karte-action-sdk 1.1.270-29419384.246a50882 → 1.1.270-29420750.2ec690591
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +168 -102
- 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 +168 -102
- 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 +157 -94
- 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 +157 -94
- package/dist/svelte5/index.front2.es.js +157 -94
- 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 +1 -1
- 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
|
@@ -56,6 +56,9 @@ const NOOP = (_args) => {};
|
|
|
56
56
|
/** @internal */
|
|
57
57
|
const isPreview = () => false;
|
|
58
58
|
const isCanvasPreview = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-canvas-preview") ?? "false") === "true" : false;
|
|
59
|
+
const getPreviewId = () => {
|
|
60
|
+
return typeof document !== "undefined" ? document.documentElement.getAttribute("data-krt-preview-id") ?? "" : "";
|
|
61
|
+
};
|
|
59
62
|
const isOnSite = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-on-site") ?? "true") === "true" : true;
|
|
60
63
|
/** @internal */
|
|
61
64
|
const setPreviousFocus = () => {
|
|
@@ -1144,6 +1147,33 @@ function setDestroyed(on$1) {
|
|
|
1144
1147
|
*
|
|
1145
1148
|
* @internal
|
|
1146
1149
|
*/
|
|
1150
|
+
const breakpoints = writable([]);
|
|
1151
|
+
/**
|
|
1152
|
+
* ブレイクポイントの一覧を取得する
|
|
1153
|
+
*
|
|
1154
|
+
* @returns 現在のブレイクポイントの一覧
|
|
1155
|
+
*/
|
|
1156
|
+
function getBreakpoints() {
|
|
1157
|
+
return get(breakpoints);
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* 変数を設定する
|
|
1161
|
+
*
|
|
1162
|
+
* @remarks
|
|
1163
|
+
* 設定したブレイクポイントは、ビジュアルエディタでブレイクポイントとして利用できます。
|
|
1164
|
+
*
|
|
1165
|
+
* @param values - ブレイクポイントの一覧
|
|
1166
|
+
*/
|
|
1167
|
+
function setBreakpoints(values) {
|
|
1168
|
+
if (!get(breakpoints)) breakpoints.set([]);
|
|
1169
|
+
breakpoints.update(() => values);
|
|
1170
|
+
return getBreakpoints();
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Store to handle variables
|
|
1174
|
+
*
|
|
1175
|
+
* @internal
|
|
1176
|
+
*/
|
|
1147
1177
|
const variables = writable({});
|
|
1148
1178
|
/**
|
|
1149
1179
|
* 変数の一覧を取得する
|
|
@@ -2594,6 +2624,93 @@ async function loadGlobalStyle(href) {
|
|
|
2594
2624
|
});
|
|
2595
2625
|
}
|
|
2596
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
|
+
|
|
2597
2714
|
//#endregion
|
|
2598
2715
|
//#region src/action.ts
|
|
2599
2716
|
/**
|
|
@@ -2638,6 +2755,7 @@ function create(App, options) {
|
|
|
2638
2755
|
publish: options.publish,
|
|
2639
2756
|
data
|
|
2640
2757
|
};
|
|
2758
|
+
const destroyPreview = initPreview();
|
|
2641
2759
|
const handleDestroy = () => {
|
|
2642
2760
|
const { onDestroyHandlers } = getInternalHandlers();
|
|
2643
2761
|
onDestroyHandlers?.forEach((h$1) => {
|
|
@@ -2646,6 +2764,7 @@ function create(App, options) {
|
|
|
2646
2764
|
});
|
|
2647
2765
|
const { onDestroyHandlers: onDestroyWidgetHandlers } = getWidgetHandlers();
|
|
2648
2766
|
if (onDestroyWidgetHandlers) onDestroyWidgetHandlers.forEach((h$1) => h$1(actionProps));
|
|
2767
|
+
destroyPreview();
|
|
2649
2768
|
};
|
|
2650
2769
|
setSystem({
|
|
2651
2770
|
apiKey: data.api_key || null,
|
|
@@ -10655,19 +10774,17 @@ function createComponentRawCss(layerId, define) {
|
|
|
10655
10774
|
return define(gen).join("\n");
|
|
10656
10775
|
}
|
|
10657
10776
|
function toResponsiveSelector(responsiveSetting, body) {
|
|
10658
|
-
const {
|
|
10659
|
-
|
|
10660
|
-
|
|
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;
|
|
10661
10781
|
const prefix = `@media screen and`;
|
|
10662
|
-
if (raw) return `${prefix} (${raw}) {\n${body}\n}`;
|
|
10663
10782
|
const orientationStyle = orientation ? ` and (orientation: ${orientation})` : "";
|
|
10664
|
-
if (
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
else if (range.min) return `${prefix} (min-width: ${range.min}px)${orientationStyle} {\n${body}\n}`;
|
|
10668
|
-
}
|
|
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}`;
|
|
10669
10786
|
return "";
|
|
10670
|
-
}
|
|
10787
|
+
}
|
|
10671
10788
|
return "";
|
|
10672
10789
|
}
|
|
10673
10790
|
function toStyleTag(css) {
|
|
@@ -10717,11 +10834,7 @@ var Avatar_css_default = (layerId, props) => {
|
|
|
10717
10834
|
appearance: "none"
|
|
10718
10835
|
}),
|
|
10719
10836
|
toDynamicStyle$3(layerId, props),
|
|
10720
|
-
...props.responsiveSettings?.map((v) =>
|
|
10721
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props));
|
|
10722
|
-
else if (v.userAgentCondition) return "";
|
|
10723
|
-
return "";
|
|
10724
|
-
}) ?? [],
|
|
10837
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props))) ?? [],
|
|
10725
10838
|
props.customizeCss
|
|
10726
10839
|
]);
|
|
10727
10840
|
};
|
|
@@ -10835,57 +10948,25 @@ var StylePortal = class extends SvelteComponent {
|
|
|
10835
10948
|
var StylePortal_default = StylePortal;
|
|
10836
10949
|
|
|
10837
10950
|
//#endregion
|
|
10838
|
-
//#region src/components-flex/
|
|
10839
|
-
const USER_AGENT_VARIANT = {
|
|
10840
|
-
smartphone: { regex: /iPhone|Android.*Mobile/i },
|
|
10841
|
-
tablet: { regex: /iPad|Android(?!.*Mobile)/i },
|
|
10842
|
-
pc: { regex: /Windows NT|Macintosh|Linux x86_64/i },
|
|
10843
|
-
windows: { regex: /Windows NT/i },
|
|
10844
|
-
mac: { regex: /Macintosh|Mac OS X/i },
|
|
10845
|
-
ios: { regex: /iPhone|iPad|iPod/i },
|
|
10846
|
-
android: { regex: /Android/i },
|
|
10847
|
-
safari: { regex: /Safari/i },
|
|
10848
|
-
chrome: { regex: /Chrome|CriOS/i },
|
|
10849
|
-
firefox: { regex: /Firefox/i },
|
|
10850
|
-
ios_webview: { regex: /iPhone|iPad|iPod/i },
|
|
10851
|
-
android_webview: { regex: /; wv\)/i }
|
|
10852
|
-
};
|
|
10951
|
+
//#region src/components-flex/responsiveProp.ts
|
|
10853
10952
|
const isMatchMediaQueryCondition = (condition) => {
|
|
10854
|
-
const {
|
|
10953
|
+
const { minWidth, maxWidth, orientation } = condition;
|
|
10855
10954
|
if (orientation) return window.matchMedia(`(orientation: ${condition.orientation})`).matches;
|
|
10856
|
-
if (
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
else if (typeof min === "number") return window.matchMedia(`(min-width: ${min}px)`).matches;
|
|
10860
|
-
else if (typeof max === "number") return window.matchMedia(`(max-width: ${max}px)`).matches;
|
|
10861
|
-
}
|
|
10862
|
-
if (raw) return window.matchMedia(raw).matches;
|
|
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;
|
|
10863
10958
|
return false;
|
|
10864
10959
|
};
|
|
10865
|
-
const isMatchUserAgentCondition = (condition) => {
|
|
10866
|
-
const { variants, regex } = condition;
|
|
10867
|
-
if (variants) return variants.some((variant) => {
|
|
10868
|
-
const regex$1 = USER_AGENT_VARIANT[variant]?.regex;
|
|
10869
|
-
if (!regex$1) return false;
|
|
10870
|
-
return new RegExp(regex$1).test(navigator.userAgent);
|
|
10871
|
-
});
|
|
10872
|
-
else if (regex) return new RegExp(regex).test(navigator.userAgent);
|
|
10873
|
-
return false;
|
|
10874
|
-
};
|
|
10875
|
-
const isMatchResponsiveSetting = (setting) => {
|
|
10876
|
-
const { mediaQueryCondition, userAgentCondition } = setting;
|
|
10877
|
-
if (mediaQueryCondition) return isMatchMediaQueryCondition(mediaQueryCondition);
|
|
10878
|
-
else if (userAgentCondition) return isMatchUserAgentCondition(userAgentCondition);
|
|
10879
|
-
else return false;
|
|
10880
|
-
};
|
|
10881
10960
|
function useResponsiveProps(props) {
|
|
10882
10961
|
return readable(props, (set) => {
|
|
10883
10962
|
if (!props.responsiveSettings) {
|
|
10884
10963
|
set(props);
|
|
10885
10964
|
return () => {};
|
|
10886
10965
|
}
|
|
10966
|
+
const breakpoints$1 = getBreakpoints();
|
|
10887
10967
|
const update = () => {
|
|
10888
|
-
const
|
|
10968
|
+
const breakpoint = breakpoints$1.find((v) => v.mediaQuery && isMatchMediaQueryCondition(v.mediaQuery));
|
|
10969
|
+
const matchedSetting = props.responsiveSettings.find((v) => v.breakpointId === breakpoint?.id);
|
|
10889
10970
|
if (matchedSetting) set(Object.assign({}, props, matchedSetting.props ?? {}));
|
|
10890
10971
|
else set(props);
|
|
10891
10972
|
};
|
|
@@ -12689,14 +12770,10 @@ var Icon_css_default = (layerId, props, _brandKit) => {
|
|
|
12689
12770
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
12690
12771
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
12691
12772
|
toDynamicStyle$2(layerId, props),
|
|
12692
|
-
...props.responsiveSettings?.map((v) => {
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
}));
|
|
12697
|
-
else if (v.userAgentCondition) return "";
|
|
12698
|
-
return "";
|
|
12699
|
-
}) ?? [],
|
|
12773
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$2(layerId, {
|
|
12774
|
+
variant: v.props.variant ?? props.variant,
|
|
12775
|
+
...v.props
|
|
12776
|
+
}))) ?? [],
|
|
12700
12777
|
props.customizeCss
|
|
12701
12778
|
]);
|
|
12702
12779
|
};
|
|
@@ -13091,11 +13168,7 @@ var Button_css_default = (layerId, props, brandKit) => {
|
|
|
13091
13168
|
marginRight: "-0.2em"
|
|
13092
13169
|
}),
|
|
13093
13170
|
toDynamicStyle$1(layerId, props, brandKit),
|
|
13094
|
-
...props.responsiveSettings?.map((v) =>
|
|
13095
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit));
|
|
13096
|
-
else if (v.userAgentCondition) return "";
|
|
13097
|
-
return "";
|
|
13098
|
-
}) ?? [],
|
|
13171
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit))) ?? [],
|
|
13099
13172
|
props.customizeCss
|
|
13100
13173
|
]);
|
|
13101
13174
|
};
|
|
@@ -14707,11 +14780,7 @@ var Layout_css_default = (layerId, props, brandKit) => {
|
|
|
14707
14780
|
style("&[data-clickable=\"true\"]", { cursor: "pointer" }),
|
|
14708
14781
|
style("&[data-clickable=\"true\"]:hover", { opacity: .8 }),
|
|
14709
14782
|
toDynamicStyle$4(props),
|
|
14710
|
-
...props.responsiveSettings?.map((v) =>
|
|
14711
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$4(v.props));
|
|
14712
|
-
else if (v.userAgentCondition) return "";
|
|
14713
|
-
return "";
|
|
14714
|
-
}) ?? [],
|
|
14783
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4(v.props))) ?? [],
|
|
14715
14784
|
props.customizeCss
|
|
14716
14785
|
]);
|
|
14717
14786
|
};
|
|
@@ -15621,14 +15690,10 @@ var Text_css_default = (layerId, props, brandKit) => {
|
|
|
15621
15690
|
wordBreak: "break-all"
|
|
15622
15691
|
}),
|
|
15623
15692
|
toDynamicStyle$4(props),
|
|
15624
|
-
...props.responsiveSettings?.map((v) => {
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
}));
|
|
15629
|
-
else if (v.userAgentCondition) return "";
|
|
15630
|
-
return "";
|
|
15631
|
-
}) ?? [],
|
|
15693
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4({
|
|
15694
|
+
...v.props,
|
|
15695
|
+
content: v.props.content ?? props.content
|
|
15696
|
+
}))) ?? [],
|
|
15632
15697
|
props.customizeCss
|
|
15633
15698
|
]);
|
|
15634
15699
|
};
|
|
@@ -15927,14 +15992,10 @@ var TextLink_css_default = (layerId, props, brandKit) => {
|
|
|
15927
15992
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
15928
15993
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
15929
15994
|
toDynamicStyle(layerId, props, brandKit),
|
|
15930
|
-
...props.responsiveSettings?.map((v) => {
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
}, brandKit));
|
|
15935
|
-
else if (v.userAgentCondition) return "";
|
|
15936
|
-
return "";
|
|
15937
|
-
}) ?? [],
|
|
15995
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle(layerId, {
|
|
15996
|
+
...v.props,
|
|
15997
|
+
label: v.props.label ?? props.label
|
|
15998
|
+
}, brandKit))) ?? [],
|
|
15938
15999
|
props.customizeCss
|
|
15939
16000
|
]);
|
|
15940
16001
|
};
|
|
@@ -18169,7 +18230,7 @@ function create_fragment$14(ctx) {
|
|
|
18169
18230
|
}
|
|
18170
18231
|
function instance$14($$self, $$props, $$invalidate) {
|
|
18171
18232
|
let rProps;
|
|
18172
|
-
let $
|
|
18233
|
+
let $responsiveSettings;
|
|
18173
18234
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
18174
18235
|
let { props = {} } = $$props;
|
|
18175
18236
|
let { layerId = crypto.randomUUID() } = $$props;
|
|
@@ -18177,8 +18238,8 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18177
18238
|
let buttonElement;
|
|
18178
18239
|
let showTooltip = false;
|
|
18179
18240
|
const cssCode = ClipCopy_css_default(layerId, props);
|
|
18180
|
-
const
|
|
18181
|
-
component_subscribe($$self,
|
|
18241
|
+
const responsiveSettings = useResponsiveProps(props);
|
|
18242
|
+
component_subscribe($$self, responsiveSettings, (value) => $$invalidate(8, $responsiveSettings = value));
|
|
18182
18243
|
const handleClick = async (e) => {
|
|
18183
18244
|
e.preventDefault();
|
|
18184
18245
|
const targetText = rProps.content ?? buttonElement?.innerText ?? "";
|
|
@@ -18207,7 +18268,7 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18207
18268
|
if ("$$scope" in $$props$1) $$invalidate(9, $$scope = $$props$1.$$scope);
|
|
18208
18269
|
};
|
|
18209
18270
|
$$self.$$.update = () => {
|
|
18210
|
-
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $
|
|
18271
|
+
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $responsiveSettings);
|
|
18211
18272
|
};
|
|
18212
18273
|
return [
|
|
18213
18274
|
layerId,
|
|
@@ -18215,10 +18276,10 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
18215
18276
|
showTooltip,
|
|
18216
18277
|
rProps,
|
|
18217
18278
|
cssCode,
|
|
18218
|
-
|
|
18279
|
+
responsiveSettings,
|
|
18219
18280
|
handleClick,
|
|
18220
18281
|
props,
|
|
18221
|
-
$
|
|
18282
|
+
$responsiveSettings,
|
|
18222
18283
|
$$scope,
|
|
18223
18284
|
slots,
|
|
18224
18285
|
button_binding
|
|
@@ -18744,8 +18805,8 @@ function create_fragment$10(ctx) {
|
|
|
18744
18805
|
let current;
|
|
18745
18806
|
let if_block = ctx[0] && create_if_block$3(ctx);
|
|
18746
18807
|
header = new Header_default({});
|
|
18747
|
-
const default_slot_template = ctx[
|
|
18748
|
-
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);
|
|
18749
18810
|
return {
|
|
18750
18811
|
c() {
|
|
18751
18812
|
if (if_block) if_block.c();
|
|
@@ -18780,7 +18841,7 @@ function create_fragment$10(ctx) {
|
|
|
18780
18841
|
check_outros();
|
|
18781
18842
|
}
|
|
18782
18843
|
if (default_slot) {
|
|
18783
|
-
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);
|
|
18784
18845
|
}
|
|
18785
18846
|
},
|
|
18786
18847
|
i(local) {
|
|
@@ -18809,15 +18870,19 @@ function instance$10($$self, $$props, $$invalidate) {
|
|
|
18809
18870
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
18810
18871
|
let { customBrandKit = void 0 } = $$props;
|
|
18811
18872
|
let { globalCssCode = void 0 } = $$props;
|
|
18873
|
+
let { breakpoints: breakpoints$1 = [] } = $$props;
|
|
18812
18874
|
setContext("brandKit", getBrandKit(customBrandKit));
|
|
18875
|
+
setBreakpoints(breakpoints$1);
|
|
18813
18876
|
$$self.$$set = ($$props$1) => {
|
|
18814
18877
|
if ("customBrandKit" in $$props$1) $$invalidate(1, customBrandKit = $$props$1.customBrandKit);
|
|
18815
18878
|
if ("globalCssCode" in $$props$1) $$invalidate(0, globalCssCode = $$props$1.globalCssCode);
|
|
18816
|
-
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);
|
|
18817
18881
|
};
|
|
18818
18882
|
return [
|
|
18819
18883
|
globalCssCode,
|
|
18820
18884
|
customBrandKit,
|
|
18885
|
+
breakpoints$1,
|
|
18821
18886
|
$$scope,
|
|
18822
18887
|
slots
|
|
18823
18888
|
];
|
|
@@ -18827,7 +18892,8 @@ var State = class extends SvelteComponent {
|
|
|
18827
18892
|
super();
|
|
18828
18893
|
init(this, options, instance$10, create_fragment$10, safe_not_equal, {
|
|
18829
18894
|
customBrandKit: 1,
|
|
18830
|
-
globalCssCode: 0
|
|
18895
|
+
globalCssCode: 0,
|
|
18896
|
+
breakpoints: 2
|
|
18831
18897
|
});
|
|
18832
18898
|
}
|
|
18833
18899
|
};
|
|
@@ -20907,7 +20973,6 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
20907
20973
|
TEXT_THEME: () => TEXT_THEME,
|
|
20908
20974
|
TEXT_VARIANTS: () => TEXT_VARIANTS,
|
|
20909
20975
|
TextDirections: () => TextDirections,
|
|
20910
|
-
USER_AGENT_VARIANT: () => USER_AGENT_VARIANT,
|
|
20911
20976
|
WritingModes: () => WritingModes,
|
|
20912
20977
|
addChoiceAnswer: () => addChoiceAnswer,
|
|
20913
20978
|
addFreeAnswer: () => addFreeAnswer,
|
|
@@ -20958,6 +21023,7 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
20958
21023
|
getVariables: () => getVariables,
|
|
20959
21024
|
hideOnScroll: () => hideOnScroll,
|
|
20960
21025
|
hideOnTime: () => hideOnTime,
|
|
21026
|
+
initPreview: () => initPreview,
|
|
20961
21027
|
initialize: () => initialize,
|
|
20962
21028
|
isOpened: () => isOpened,
|
|
20963
21029
|
listenLogger: () => listenLogger,
|
|
@@ -21296,4 +21362,4 @@ var ThumbnailPreview = class extends SvelteComponent {
|
|
|
21296
21362
|
var ThumbnailPreview_default = ThumbnailPreview;
|
|
21297
21363
|
|
|
21298
21364
|
//#endregion
|
|
21299
|
-
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 };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ElementInfoStyles = {
|
|
2
|
+
opacity: string;
|
|
3
|
+
rowGap: string;
|
|
4
|
+
columnGap: string;
|
|
5
|
+
direction: string;
|
|
6
|
+
paddingLeft: string;
|
|
7
|
+
paddingRight: string;
|
|
8
|
+
paddingTop: string;
|
|
9
|
+
paddingBottom: string;
|
|
10
|
+
zIndex: string;
|
|
11
|
+
position: string;
|
|
12
|
+
top: string;
|
|
13
|
+
left: string;
|
|
14
|
+
right: string;
|
|
15
|
+
bottom: string;
|
|
16
|
+
};
|
|
17
|
+
export type ElementInfo = {
|
|
18
|
+
top: number;
|
|
19
|
+
left: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
layerId: string;
|
|
23
|
+
direction: "row" | "column" | "";
|
|
24
|
+
classNames: string[];
|
|
25
|
+
styles: ElementInfoStyles;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const initPreview: () => (() => void);
|
package/dist/stores.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { get as get_ } from "svelte/store";
|
|
2
2
|
import type { Writable as Writable_ } from "svelte/store";
|
|
3
|
-
import
|
|
3
|
+
import { ActionSetting, ActionEventHandler, ActionVariables, SystemConfig, ActionRunnerContext, Breakpoint } from "./types.js";
|
|
4
4
|
/** @internal */
|
|
5
5
|
export type Store<T> = Writable_<T>;
|
|
6
6
|
/**
|
|
@@ -350,6 +350,27 @@ export declare function setDestroyed(on: boolean): void;
|
|
|
350
350
|
*
|
|
351
351
|
* @internal
|
|
352
352
|
*/
|
|
353
|
+
export declare const breakpoints: Store<Breakpoint[]>;
|
|
354
|
+
/**
|
|
355
|
+
* ブレイクポイントの一覧を取得する
|
|
356
|
+
*
|
|
357
|
+
* @returns 現在のブレイクポイントの一覧
|
|
358
|
+
*/
|
|
359
|
+
export declare function getBreakpoints(): Breakpoint[];
|
|
360
|
+
/**
|
|
361
|
+
* 変数を設定する
|
|
362
|
+
*
|
|
363
|
+
* @remarks
|
|
364
|
+
* 設定したブレイクポイントは、ビジュアルエディタでブレイクポイントとして利用できます。
|
|
365
|
+
*
|
|
366
|
+
* @param values - ブレイクポイントの一覧
|
|
367
|
+
*/
|
|
368
|
+
export declare function setBreakpoints(values: Breakpoint[]): Breakpoint[];
|
|
369
|
+
/**
|
|
370
|
+
* Store to handle variables
|
|
371
|
+
*
|
|
372
|
+
* @internal
|
|
373
|
+
*/
|
|
353
374
|
export declare const variables: Store<{
|
|
354
375
|
[key: string]: any;
|
|
355
376
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Properties } from "csstype";
|
|
2
|
-
import {
|
|
2
|
+
import { ResponsiveProp } from "./responsiveProp.js";
|
|
3
3
|
export declare function createComponentRawCss(layerId: string, define: (style: (selector: string, styles: Properties) => string) => string[]): string;
|
|
4
|
-
export declare function toResponsiveSelector(responsiveSetting:
|
|
4
|
+
export declare function toResponsiveSelector(responsiveSetting: ResponsiveProp<any>, body: string): string;
|
|
5
5
|
export declare function toStyleTag(css: string): string;
|
|
@@ -4,9 +4,9 @@ import type { BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET } from "./button/types.js";
|
|
|
4
4
|
import type { BrandKit } from "./brand-kit.js";
|
|
5
5
|
import type { AspectVariantCode, FontFamilyVariantCode, ShadowVariantCode, BackgroundColorVariantCode } from "./variants.js";
|
|
6
6
|
import type { TEXT_THEME } from "./text/types.js";
|
|
7
|
-
import { type
|
|
7
|
+
import { type ResponsiveProp } from "./responsiveProp.js";
|
|
8
8
|
export type FlexComponentProps<T extends object> = T & {
|
|
9
|
-
responsiveSettings?:
|
|
9
|
+
responsiveSettings?: ResponsiveProp<T>[];
|
|
10
10
|
};
|
|
11
11
|
type PositionPlaceProps = {
|
|
12
12
|
top?: Properties["top"];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FlexComponentProps } from "./props.js";
|
|
2
|
+
import { Readable } from "svelte/store";
|
|
3
|
+
export type ResponsiveProp<T extends object> = {
|
|
4
|
+
breakpointId?: string;
|
|
5
|
+
props: Partial<T>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useResponsiveProps<T extends object>(props: FlexComponentProps<T>): Readable<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Properties } from "csstype";
|
|
2
|
-
import {
|
|
2
|
+
import { ResponsiveProp } from "./responsiveProp.js";
|
|
3
3
|
export declare function createComponentRawCss(layerId: string, define: (style: (selector: string, styles: Properties) => string) => string[]): string;
|
|
4
|
-
export declare function toResponsiveSelector(responsiveSetting:
|
|
4
|
+
export declare function toResponsiveSelector(responsiveSetting: ResponsiveProp<any>, body: string): string;
|
|
5
5
|
export declare function toStyleTag(css: string): string;
|
|
@@ -4,9 +4,9 @@ import type { BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET } from "./button/types.js";
|
|
|
4
4
|
import type { BrandKit } from "./brand-kit.js";
|
|
5
5
|
import type { AspectVariantCode, FontFamilyVariantCode, ShadowVariantCode, BackgroundColorVariantCode } from "./variants.js";
|
|
6
6
|
import type { TEXT_THEME } from "./text/types.js";
|
|
7
|
-
import { type
|
|
7
|
+
import { type ResponsiveProp } from "./responsiveProp.js";
|
|
8
8
|
export type FlexComponentProps<T extends object> = T & {
|
|
9
|
-
responsiveSettings?:
|
|
9
|
+
responsiveSettings?: ResponsiveProp<T>[];
|
|
10
10
|
};
|
|
11
11
|
type PositionPlaceProps = {
|
|
12
12
|
top?: Properties["top"];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FlexComponentProps } from "./props.js";
|
|
2
|
+
import { Readable } from "svelte/store";
|
|
3
|
+
export type ResponsiveProp<T extends object> = {
|
|
4
|
+
breakpointId?: string;
|
|
5
|
+
props: Partial<T>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useResponsiveProps<T extends object>(props: FlexComponentProps<T>): Readable<T>;
|
|
@@ -17,12 +17,13 @@ export type { CollectionConfig, ActionTableRowRequestConfig, ActionTableRowsRequ
|
|
|
17
17
|
export { addChoiceAnswer, addFreeAnswer, removeAnswer, getAnsweredQuestion, getAnsweredQuestionIds, sendAnswer, sendAnswers } from "./form.js";
|
|
18
18
|
export * as widget from "./widget.js";
|
|
19
19
|
export { onMount, onDestory, beforeUpdate, afterUpdate, tick, LAYOUT_COMPONENT_NAMES } from "./components/index.js";
|
|
20
|
+
export * from "./preview.js";
|
|
20
21
|
export * from "./components-flex/form.js";
|
|
21
22
|
export { default as State } from "./components-flex/state/State.svelte.js";
|
|
22
23
|
export { default as StateItem } from "./components-flex/state/StateItem.svelte.js";
|
|
23
24
|
export * from "./components-flex/shared/types.js";
|
|
24
25
|
export * from "./components-flex/props.js";
|
|
25
|
-
export * from "./components-flex/
|
|
26
|
+
export * from "./components-flex/responsiveProp.js";
|
|
26
27
|
export { default as FlexAvatar } from "./components-flex/avatar/Avatar.svelte.js";
|
|
27
28
|
export * from "./components-flex/avatar/types.js";
|
|
28
29
|
export * from "./components-flex/avatar/styles.js";
|