pds-dev-kit-web-test 0.2.53 → 0.2.54

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.
@@ -270,7 +270,7 @@ exports.pages0803PreviewSections = [
270
270
  'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:HOVER': 16,
271
271
  'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:MOBILE': null,
272
272
  'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:MOBILE:HOVER': null,
273
- CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE: 'PRETENDARD',
273
+ CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE: 'GOOGLE:Cherry Bomb One',
274
274
  'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:HOVER': 'PRETENDARD',
275
275
  'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE': null,
276
276
  'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE:HOVER': null,
@@ -30,6 +30,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
30
30
  var react_1 = require("react");
31
31
  var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
32
32
  var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
33
+ var useGoogleFonts_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks/useGoogleFonts");
33
34
  var newUtils_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils");
34
35
  var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
35
36
  var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
@@ -50,6 +51,8 @@ function Button(props) {
50
51
  var _e = getBTNColorStyles(CB_STYLE_PROP_BTNCOLOR, device), btnColorStyle = _e.style, btnColorHoverStyle = _e.hoverStyle;
51
52
  var _f = (0, util_1.parseProperties)(props, device), propsStyle = _f.style, propsHoverStyle = _f.hoverStyle, _g = _f.layout, paddingLeft = _g.paddingLeft, paddingRight = _g.paddingRight, paddingTop = _g.paddingTop, paddingBottom = _g.paddingBottom, layoutStyle = __rest(_g, ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"]), effect = _f.effect;
52
53
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
54
+ var googleFonts = (0, useGoogleFonts_1.getGoogleFontsFromBtnCB)(props.CB_STYLE_PROP_BTNTEXT, device === 'MOBILE');
55
+ (0, useGoogleFonts_1.useGoogleFonts)({ fonts: googleFonts });
53
56
  if (mode === 'EDIT') {
54
57
  propsStyle.visibility = 'visible';
55
58
  }
@@ -19,14 +19,14 @@ var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var react_1 = require("react");
20
20
  var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
21
21
  var hooks_1 = require("../../../../hooks");
22
+ var getGoogleFonts_1 = require("../../../../hooks/useGoogleFonts/getGoogleFonts");
23
+ var useGoogleFonts_1 = __importDefault(require("../../../../hooks/useGoogleFonts/useGoogleFonts"));
22
24
  var textUtil_1 = require("../../../../newUtils/textUtil");
23
25
  var util_1 = require("../../../../util");
24
26
  var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
25
27
  var S_CB_Box_1 = require("../components/S_CB_Box");
26
28
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
27
29
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
28
- var getGoogleFonts_1 = __importDefault(require("./getGoogleFonts"));
29
- var useGoogleFonts_1 = __importDefault(require("./useGoogleFonts"));
30
30
  function Text(props) {
31
31
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
32
32
  var _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
@@ -39,7 +39,7 @@ function Text(props) {
39
39
  var _d = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _d.style, textHoverStyle = _d.hoverStyle;
40
40
  var _e = (0, util_1.parseProperties)(props, device), propsStyle = _e.style, propsHoverStyle = _e.hoverStyle, layoutStyle = _e.layout, effect = _e.effect;
41
41
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
42
- var googleFonts = (0, getGoogleFonts_1.default)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
42
+ var googleFonts = (0, getGoogleFonts_1.getGoogleFontsFromTextCB)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
43
43
  (0, useGoogleFonts_1.default)({ fonts: googleFonts });
44
44
  if (mode === 'EDIT') {
45
45
  propsStyle.visibility = 'visible';
@@ -0,0 +1,4 @@
1
+ import type { CB_BTNTEXT_STYLE_PROPS } from '../../components/ComponentBlock/componentBlocks/Button/btnTypes';
2
+ import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/Text/types';
3
+ export declare function getGoogleFontsFromTextCB(props: CB_STYLE_PROP_TEXT_SPECS, isMobile: boolean): string[];
4
+ export declare function getGoogleFontsFromBtnCB(props: CB_BTNTEXT_STYLE_PROPS, isMobile: boolean): string[];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGoogleFontsFromBtnCB = exports.getGoogleFontsFromTextCB = void 0;
4
+ function getGoogleFontsFromTextCB(props, isMobile) {
5
+ var typeface = props.CB_STYLE_PROP_TEXT_SPEC_TYPEFACE;
6
+ var typefaceHover = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER'];
7
+ var typefaceMobile = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE'];
8
+ var typefaceMobileHover = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE:HOVER'];
9
+ if (isMobile) {
10
+ return [typefaceMobile, typefaceMobileHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
11
+ }
12
+ return [typeface, typefaceHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
13
+ }
14
+ exports.getGoogleFontsFromTextCB = getGoogleFontsFromTextCB;
15
+ function getGoogleFontsFromBtnCB(props, isMobile) {
16
+ var typeface = props.CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE;
17
+ var typefaceHover = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:HOVER'];
18
+ var typefaceMobile = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE'];
19
+ var typefaceMobileHover = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE:HOVER'];
20
+ if (isMobile) {
21
+ return [typefaceMobile, typefaceMobileHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
22
+ }
23
+ return [typeface, typefaceHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
24
+ }
25
+ exports.getGoogleFontsFromBtnCB = getGoogleFontsFromBtnCB;
@@ -0,0 +1,2 @@
1
+ export { getGoogleFontsFromBtnCB, getGoogleFontsFromTextCB } from './getGoogleFonts';
2
+ export { default as useGoogleFonts } from './useGoogleFonts';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useGoogleFonts = exports.getGoogleFontsFromTextCB = exports.getGoogleFontsFromBtnCB = void 0;
7
+ var getGoogleFonts_1 = require("./getGoogleFonts");
8
+ Object.defineProperty(exports, "getGoogleFontsFromBtnCB", { enumerable: true, get: function () { return getGoogleFonts_1.getGoogleFontsFromBtnCB; } });
9
+ Object.defineProperty(exports, "getGoogleFontsFromTextCB", { enumerable: true, get: function () { return getGoogleFonts_1.getGoogleFontsFromTextCB; } });
10
+ var useGoogleFonts_1 = require("./useGoogleFonts");
11
+ Object.defineProperty(exports, "useGoogleFonts", { enumerable: true, get: function () { return __importDefault(useGoogleFonts_1).default; } });
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = require("react");
7
- var callGoogleFontCSSAndApply_1 = __importDefault(require("../../../../../../../GoogleFontkit/utils/callGoogleFontCSSAndApply"));
7
+ var callGoogleFontCSSAndApply_1 = __importDefault(require("../../../../../GoogleFontkit/utils/callGoogleFontCSSAndApply"));
8
8
  function useGoogleFonts(_a) {
9
9
  var fonts = _a.fonts;
10
10
  (0, react_1.useEffect)(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.2.53",
3
+ "version": "0.2.54",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # pds-dev-kit-web-test Release Notes
2
- ## [v0.2.53]
2
+ ## [v0.2.54]
3
3
  ## 기준 pds-dev-kit-web 버전 @2.2.10
4
4
  ### sub
5
- * GoogleFontKit
6
- * font weight 400 추가
7
- * 성능 개선 시도
5
+ * DynamicLayout
6
+ * Button CB에도 google font적용
@@ -1,2 +0,0 @@
1
- import type { CB_STYLE_PROP_TEXT_SPECS } from './types';
2
- export default function getGoogleFonts(props: CB_STYLE_PROP_TEXT_SPECS, isMobile: boolean): string[];
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function getGoogleFonts(props, isMobile) {
4
- var typeface = props.CB_STYLE_PROP_TEXT_SPEC_TYPEFACE;
5
- var typefaceHover = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER'];
6
- var typefaceMobile = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE'];
7
- var typefaceMobileHover = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE:HOVER'];
8
- if (isMobile) {
9
- return [typefaceMobile, typefaceMobileHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
10
- }
11
- return [typeface, typefaceHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
12
- }
13
- exports.default = getGoogleFonts;