pds-dev-kit-web-test 2.7.623 → 2.7.625

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.
@@ -1059,7 +1059,6 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
1059
1059
  }
1060
1060
  var editableCBIDs = (0, group_1.findDirectChildrenCbIds)(newblock, editingGroupBlock);
1061
1061
  var i18n = (0, react_i18next_1.useTranslation)('translation').i18n;
1062
- console.log('selectedBlockId', selectedBlockId);
1063
1062
  return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
1064
1063
  device: device,
1065
1064
  mode: mode,
@@ -53,6 +53,7 @@ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverB
53
53
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
54
54
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
55
55
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
56
+ var Shape_1 = __importDefault(require("./Shape"));
56
57
  function Image(props) {
57
58
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
58
59
  var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
@@ -133,7 +134,7 @@ function Image(props) {
133
134
  }
134
135
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
135
136
  };
136
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ style: __assign({}, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), { overflow: 'hidden' }), boxStyle.normal), { cursor: CLINKCursor }), hoverStyle: __assign({}, boxStyle.hover), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: [(0, jsx_runtime_1.jsx)(S_Image, { src: imgSrc() === 'ERROR'
137
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ style: __assign({}, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), { overflow: 'hidden' }), boxStyle.normal), { cursor: CLINKCursor }), hoverStyle: __assign({}, boxStyle.hover), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: [(0, jsx_runtime_1.jsx)(Shape_1.default, { shape: "TRIANGLE", src: imgSrc() === 'ERROR'
137
138
  ? 'https://static.publ.site/pages-sample/img_cb_style_prop_bgmedia_spec_imageselector_01.png'
138
139
  : imgSrc(), normalStyle: __assign({}, imgStyle.normal), hoverStyle: __assign({}, imgStyle.hover) }), showDataNotFound()] })) })) }))] }));
139
140
  }
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { CSSProperties } from 'styled-components';
3
+ declare const ALL_SQS_SHAPES: {
4
+ SQUARE: string;
5
+ CIRCLE: string;
6
+ ROUNDED_SQUARE: string;
7
+ OVAL: string;
8
+ PILL: string;
9
+ ARCH: string;
10
+ UPSIDE_DOWN_ARCH: string;
11
+ SIDEWAYS_ARCH_LEFT: string;
12
+ SIDEWAYS_ARCH_RIGHT: string;
13
+ DOUBLE_ARCH: string;
14
+ TRIANGLE: string;
15
+ DIAMOND: string;
16
+ PENTAGON: string;
17
+ HEXAGON: string;
18
+ OCTAGON: string;
19
+ TRAPEZOID: string;
20
+ PARALLELOGRAM: string;
21
+ RHOMBUS: string;
22
+ STAR_4: string;
23
+ STAR_5: string;
24
+ STAR_8: string;
25
+ STAR_12: string;
26
+ BURST_1: string;
27
+ BURST_2: string;
28
+ LEAF_1: string;
29
+ LEAF_2: string;
30
+ BLOB_1: string;
31
+ BLOB_2: string;
32
+ BLOB_3: string;
33
+ WAVE: string;
34
+ TICKET: string;
35
+ SHIELD: string;
36
+ TV: string;
37
+ CROSS: string;
38
+ HEART: string;
39
+ };
40
+ export type ShapeType = keyof typeof ALL_SQS_SHAPES;
41
+ interface ShapeImageProps {
42
+ src: string;
43
+ shape?: ShapeType;
44
+ normalStyle: CSSProperties;
45
+ hoverStyle: CSSProperties;
46
+ focalPoint?: {
47
+ x: number;
48
+ y: number;
49
+ };
50
+ className?: string;
51
+ }
52
+ declare const ShapeImage: React.FC<ShapeImageProps>;
53
+ export default ShapeImage;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ var jsx_runtime_1 = require("react/jsx-runtime");
42
+ var react_1 = require("react");
43
+ var styled_components_1 = __importStar(require("styled-components"));
44
+ // 1. Squarespace Fluid Engine의 모든 핵심 Shape Paths
45
+ var ALL_SQS_SHAPES = {
46
+ // --- BASIC ---
47
+ SQUARE: 'M0,0 L100,0 L100,100 L0,100 Z',
48
+ CIRCLE: 'M50,0A50,50,0,1,1,50,100A50,50,0,1,1,50,0',
49
+ ROUNDED_SQUARE: 'M0,20 Q0,0 20,0 L80,0 Q100,0 100,20 L100,80 Q100,100 80,100 L20,100 Q0,100 0,80 Z',
50
+ OVAL: 'M50,0C22.4,0,0,22.4,0,50s22.4,50,50,50s50-22.4,50-50S77.6,0,50,0z',
51
+ PILL: 'M0,50 C0,22.4 22.4,0 50,0 L50,0 C77.6,0 100,22.4 100,50 L100,50 C100,77.6 77.6,100 50,100 L50,100 C22.4,100 0,77.6 0,50 Z',
52
+ // --- ARCHES & CURVES ---
53
+ ARCH: 'M0,100 L0,50 C0,22.4 22.4,0 50,0 C77.6,0 100,22.4 100,50 L100,100 Z',
54
+ UPSIDE_DOWN_ARCH: 'M100,0 L100,50 C100,77.6 77.6,100 50,100 C22.4,100 0,77.6 0,50 L0,0 Z',
55
+ SIDEWAYS_ARCH_LEFT: 'M100,0 L50,0 C22.4,0 0,22.4 0,50 C0,77.6 22.4,100 50,100 L100,100 Z',
56
+ SIDEWAYS_ARCH_RIGHT: 'M0,0 L50,0 C77.6,0 100,22.4 100,50 C100,77.6 77.6,100 50,100 L0,100 Z',
57
+ DOUBLE_ARCH: 'M0,50 C0,22.4 22.4,0 50,0 S100,22.4 100,50 S77.6,100 50,100 S0,77.6 0,50 Z',
58
+ // --- POLYGONS ---
59
+ TRIANGLE: 'M50,0 L100,100 L0,100 Z',
60
+ DIAMOND: 'M50,0 L100,50 L50,100 L0,50 Z',
61
+ PENTAGON: 'M50,0 L100,38 L81,100 L19,100 L0,38 Z',
62
+ HEXAGON: 'M25,0 L75,0 L100,50 L75,100 L25,100 L0,50 Z',
63
+ OCTAGON: 'M30,0 L70,0 L100,30 L100,70 L70,100 L30,100 L0,70 L0,30 Z',
64
+ TRAPEZOID: 'M20,0 L80,0 L100,100 L0,100 Z',
65
+ PARALLELOGRAM: 'M20,0 L100,0 L80,100 L0,100 Z',
66
+ RHOMBUS: 'M30,0 L100,0 L70,100 L0,100 Z',
67
+ // --- STARS & BURSTS ---
68
+ STAR_4: 'M50,0 L60,40 L100,50 L60,60 L50,100 L40,60 L0,50 L40,40 Z',
69
+ STAR_5: 'M50,0 L61,35 L98,35 L68,57 L79,91 L50,70 L21,91 L32,57 L2,35 L39,35 Z',
70
+ STAR_8: 'M50,0 L58,33 L85,15 L75,45 L100,50 L75,55 L85,85 L58,67 L50,100 L42,67 L15,85 L25,55 L0,50 L25,45 L15,15 L42,33 Z',
71
+ STAR_12: 'M50,0 L54,20 L73,12 L65,30 L85,30 L72,43 L85,57 L65,57 L73,75 L54,67 L50,85 L46,67 L27,75 L35,57 L15,57 L28,43 L15,30 L35,30 L27,12 L46,20 Z',
72
+ BURST_1: 'M50,0 L60,10 L80,0 L80,20 L100,20 L90,40 L100,60 L80,60 L80,80 L60,70 L50,80 L40,70 L20,80 L20,60 L0,60 L10,40 L0,20 L20,20 L20,0 L40,10 Z',
73
+ BURST_2: 'M50,5 L65,0 L75,15 L95,10 L90,30 L100,50 L90,70 L100,90 L75,85 L65,100 L50,95 L35,100 L25,85 L5,90 L10,70 L0,50 L10,30 L5,10 L25,15 L35,0 Z',
74
+ // --- ORGANIC & ABSTRACT ---
75
+ LEAF_1: 'M0,100 C0,100 0,0 100,0 C100,0 100,100 0,100 Z',
76
+ LEAF_2: 'M50,0 C100,0 100,50 100,100 C100,100 50,100 0,100 C0,50 0,0 50,0 Z',
77
+ BLOB_1: 'M85,30 C95,50 85,80 60,90 C35,100 10,80 5,50 C0,20 30,0 60,5 C80,10 75,10 85,30 Z',
78
+ BLOB_2: 'M90,40 C100,60 80,90 50,95 C20,100 0,80 0,50 C0,20 30,0 60,0 C80,0 80,20 90,40 Z',
79
+ BLOB_3: 'M50,0 C80,0 100,20 100,50 S80,100 50,100 S0,80 0,50 S20,0 50,0',
80
+ WAVE: 'M0,20 Q25,0 50,20 T100,20 L100,100 L0,100 Z',
81
+ // --- SPECIAL FRAMES ---
82
+ TICKET: 'M0,20 Q0,0 20,0 L80,0 Q100,0 100,20 L100,40 Q85,50 100,60 L100,80 Q100,100 80,100 L20,100 Q0,100 0,80 L0,60 Q15,50 0,40 Z',
83
+ SHIELD: 'M0,0 L100,0 L100,60 C100,85 50,100 50,100 C50,100 0,85 0,60 Z',
84
+ TV: 'M10,0 Q0,0 0,10 L0,90 Q0,100 10,100 L90,100 Q100,100 100,90 L100,10 Q100,0 90,0 Z M15,15 L85,15 L85,85 L15,85 Z',
85
+ CROSS: 'M35,0 L65,0 L65,35 L100,35 L100,65 L65,65 L65,100 L35,100 L35,65 L0,65 L0,35 L35,35 Z',
86
+ HEART: 'M50,30 C50,10 20,10 20,40 C20,70 50,90 50,90 C50,90 80,70 80,40 C80,10 50,10 50,30 Z'
87
+ };
88
+ // 기존 스타일드 컴포넌트 로직 유지
89
+ var S_ImageContainer = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n width: 100%;\n overflow: hidden;\n\n ", ";\n\n & img {\n width: 100%;\n height: 100%;\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n\n // \uC170\uC774\uD504\uAC00 \uC788\uC744 \uB54C\uB9CC clip-path \uC801\uC6A9\n ", "\n\n ", ";\n }\n\n &:hover {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"], ["\n position: relative;\n height: 100%;\n width: 100%;\n overflow: hidden;\n\n ", ";\n\n & img {\n width: 100%;\n height: 100%;\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n\n // \uC170\uC774\uD504\uAC00 \uC788\uC744 \uB54C\uB9CC clip-path \uC801\uC6A9\n ", "\n\n ", ";\n }\n\n &:hover {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"])), function (_a) {
90
+ var normalStyle = _a.normalStyle;
91
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), normalStyle);
92
+ }, function (_a) {
93
+ var hasShape = _a.hasShape, maskId = _a.maskId;
94
+ return hasShape && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n -webkit-clip-path: url(#", ");\n clip-path: url(#", ");\n "], ["\n -webkit-clip-path: url(#", ");\n clip-path: url(#", ");\n "])), maskId, maskId);
95
+ }, function (_a) {
96
+ var normalStyle = _a.normalStyle;
97
+ var isContain = normalStyle.backgroundSize === 'contain';
98
+ return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
99
+ }, function (_a) {
100
+ var hoverStyle = _a.hoverStyle;
101
+ return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), hoverStyle);
102
+ }, function (_a) {
103
+ var hoverStyle = _a.hoverStyle, normalStyle = _a.normalStyle;
104
+ var isContain = hoverStyle.backgroundSize
105
+ ? hoverStyle.backgroundSize === 'contain'
106
+ : normalStyle.backgroundSize === 'contain';
107
+ return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
108
+ });
109
+ var S_ShapeSelect = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n right: 8px;\n top: 8px;\n z-index: 2;\n\n select {\n appearance: none;\n background: rgba(0, 0, 0, 0.6);\n border: 1px solid rgba(255, 255, 255, 0.4);\n border-radius: 6px;\n color: #fff;\n font-size: 12px;\n outline: none;\n padding: 4px 8px;\n }\n"], ["\n position: absolute;\n right: 8px;\n top: 8px;\n z-index: 2;\n\n select {\n appearance: none;\n background: rgba(0, 0, 0, 0.6);\n border: 1px solid rgba(255, 255, 255, 0.4);\n border-radius: 6px;\n color: #fff;\n font-size: 12px;\n outline: none;\n padding: 4px 8px;\n }\n"])));
110
+ var ShapeImage = function (_a) {
111
+ var src = _a.src, shape = _a.shape, normalStyle = _a.normalStyle, hoverStyle = _a.hoverStyle, _b = _a.focalPoint, focalPoint = _b === void 0 ? { x: 0.5, y: 0.5 } : _b, className = _a.className;
112
+ // 컴포넌트 인스턴스마다 고유한 마스크 ID 생성
113
+ var maskId = (0, react_1.useMemo)(function () { return "sqs-mask-".concat(Math.random().toString(36).substr(2, 9)); }, []);
114
+ var _c = (0, react_1.useState)(shape !== null && shape !== void 0 ? shape : ''), selectedShape = _c[0], setSelectedShape = _c[1];
115
+ (0, react_1.useEffect)(function () {
116
+ setSelectedShape(shape !== null && shape !== void 0 ? shape : '');
117
+ }, [shape]);
118
+ var effectiveShape = selectedShape || undefined;
119
+ var shapeOptions = Object.keys(ALL_SQS_SHAPES);
120
+ return ((0, jsx_runtime_1.jsxs)(S_ImageContainer, __assign({ normalStyle: normalStyle, hoverStyle: hoverStyle, maskId: maskId, hasShape: !!effectiveShape, className: className }, { children: [(0, jsx_runtime_1.jsx)(S_ShapeSelect, { children: (0, jsx_runtime_1.jsxs)("select", __assign({ value: selectedShape, onChange: function (event) { return setSelectedShape(event.target.value); } }, { children: [(0, jsx_runtime_1.jsx)("option", __assign({ value: "" }, { children: "None" })), shapeOptions.map(function (option) { return ((0, jsx_runtime_1.jsx)("option", __assign({ value: option }, { children: option }), option)); })] })) }), effectiveShape && ((0, jsx_runtime_1.jsx)("svg", __assign({ width: "0", height: "0", style: { position: 'absolute' } }, { children: (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", __assign({ id: maskId, clipPathUnits: "objectBoundingBox" }, { children: (0, jsx_runtime_1.jsx)("path", { d: ALL_SQS_SHAPES[effectiveShape], transform: "scale(0.01)" }) })) }) }))), (0, jsx_runtime_1.jsx)("img", { src: src, alt: "content", style: {
121
+ objectPosition: "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%")
122
+ } })] })));
123
+ };
124
+ exports.default = ShapeImage;
125
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.623",
3
+ "version": "2.7.625",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.306]
2
+ ## [v2.2.309]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
- * [PDS-1420] CCB 이펙트에 따라 전환링크가 해당 항목으로 이동하지 않는 이슈
6
+ * [PDS-1421] 다양한 BULK케이스 대응