pds-dev-kit-web 2.2.15 → 2.2.16
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/src/sub/DynamicLayout/mock_samplePage.js +1 -1
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.js +25 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.js +11 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/useGoogleFonts.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/useGoogleFonts.js +17 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +3 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +5 -2
- package/dist/src/sub/GoogleFontkit/GoogleFontApplyExample.d.ts +3 -0
- package/dist/src/sub/GoogleFontkit/GoogleFontApplyExample.js +92 -0
- package/dist/src/sub/GoogleFontkit/GoogleFontsListExample.d.ts +3 -0
- package/dist/src/sub/GoogleFontkit/GoogleFontsListExample.js +57 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleFontCss.d.ts +10 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleFontCss.js +53 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleFontDefaultText.d.ts +2 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleFontDefaultText.js +55 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleWebFonts.d.ts +10 -0
- package/dist/src/sub/GoogleFontkit/api/getGoogleWebFonts.js +53 -0
- package/dist/src/sub/GoogleFontkit/constants.d.ts +7 -0
- package/dist/src/sub/GoogleFontkit/constants.js +44 -0
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontItem.d.ts +15 -0
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontItem.js +126 -0
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontsList.d.ts +17 -0
- package/dist/src/sub/GoogleFontkit/headless/GoogleFontsList.js +144 -0
- package/dist/src/sub/GoogleFontkit/hooks/useDebounce.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/hooks/useDebounce.js +14 -0
- package/dist/src/sub/GoogleFontkit/hooks/useIntersectionObserver.d.ts +6 -0
- package/dist/src/sub/GoogleFontkit/hooks/useIntersectionObserver.js +29 -0
- package/dist/src/sub/GoogleFontkit/index.d.ts +7 -0
- package/dist/src/sub/GoogleFontkit/index.js +32 -0
- package/dist/src/sub/GoogleFontkit/types.d.ts +44 -0
- package/dist/src/sub/GoogleFontkit/types.js +14 -0
- package/dist/src/sub/GoogleFontkit/utils/applyActiveFont.d.ts +2 -0
- package/dist/src/sub/GoogleFontkit/utils/applyActiveFont.js +12 -0
- package/dist/src/sub/GoogleFontkit/utils/callGoogleFontCSSAndApply.d.ts +2 -0
- package/dist/src/sub/GoogleFontkit/utils/callGoogleFontCSSAndApply.js +72 -0
- package/dist/src/sub/GoogleFontkit/utils/createStyleSheet.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/createStyleSheet.js +10 -0
- package/dist/src/sub/GoogleFontkit/utils/extractFontStyles.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/extractFontStyles.js +22 -0
- package/dist/src/sub/GoogleFontkit/utils/fillStyleSheet.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/fillStyleSheet.js +13 -0
- package/dist/src/sub/GoogleFontkit/utils/getActiveFontStylesheet.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/getActiveFontStylesheet.js +13 -0
- package/dist/src/sub/GoogleFontkit/utils/getFontId.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/getFontId.js +6 -0
- package/dist/src/sub/GoogleFontkit/utils/getMatches.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/getMatches.js +14 -0
- package/dist/src/sub/GoogleFontkit/utils/isStyleSheetExists.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/isStyleSheetExists.js +12 -0
- package/dist/src/sub/GoogleFontkit/utils/parseFontVariants.d.ts +4 -0
- package/dist/src/sub/GoogleFontkit/utils/parseFontVariants.js +18 -0
- package/dist/src/sub/GoogleFontkit/utils/setStyleSheetType.d.ts +1 -0
- package/dist/src/sub/GoogleFontkit/utils/setStyleSheetType.js +15 -0
- package/package.json +1 -1
- package/release-note.md +4 -15
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function getMatches(regex, str) {
|
|
4
|
+
var matches = [];
|
|
5
|
+
var match;
|
|
6
|
+
do {
|
|
7
|
+
match = regex.exec(str);
|
|
8
|
+
if (match) {
|
|
9
|
+
matches.push(match[1]);
|
|
10
|
+
}
|
|
11
|
+
} while (match);
|
|
12
|
+
return matches;
|
|
13
|
+
}
|
|
14
|
+
exports.default = getMatches;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isStylesheetExists(fontId: string, isPreview?: boolean): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var constants_1 = require("../constants");
|
|
4
|
+
function isStylesheetExists(fontId, isPreview) {
|
|
5
|
+
var stylesheetNode = document.getElementById(fontId);
|
|
6
|
+
if (isPreview === null || isPreview === undefined) {
|
|
7
|
+
return stylesheetNode !== null;
|
|
8
|
+
}
|
|
9
|
+
return (stylesheetNode !== null &&
|
|
10
|
+
stylesheetNode.getAttribute(constants_1.PREVIEW_ATTRIBUTE_NAME) === isPreview.toString());
|
|
11
|
+
}
|
|
12
|
+
exports.default = isStylesheetExists;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function parseVariants(variant, _a) {
|
|
4
|
+
var prefix = _a.prefix, separator = _a.separator;
|
|
5
|
+
var initialAcc = '';
|
|
6
|
+
var fontWeights = variant.reduce(function (acc, cur) {
|
|
7
|
+
var conditionalPrefix = acc === '' ? '' : separator;
|
|
8
|
+
if (cur === 'regular') {
|
|
9
|
+
return "".concat(acc + conditionalPrefix).concat(400);
|
|
10
|
+
}
|
|
11
|
+
if (Number.isNaN(Number(cur))) {
|
|
12
|
+
return acc;
|
|
13
|
+
}
|
|
14
|
+
return "".concat(acc + conditionalPrefix).concat(cur);
|
|
15
|
+
}, initialAcc);
|
|
16
|
+
return "".concat(prefix).concat(fontWeights);
|
|
17
|
+
}
|
|
18
|
+
exports.default = parseVariants;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function setStylesheetType(fontId: string, isPreview: boolean): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var constants_1 = require("../constants");
|
|
4
|
+
function setStylesheetType(fontId, isPreview) {
|
|
5
|
+
var stylesheetId = fontId;
|
|
6
|
+
var stylesheetNode = document.getElementById(stylesheetId);
|
|
7
|
+
if (stylesheetNode) {
|
|
8
|
+
stylesheetNode.setAttribute(constants_1.PREVIEW_ATTRIBUTE_NAME, isPreview.toString());
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.error("Could not change stylesheet type: Stylesheet with ID \"".concat(stylesheetId, "\" not found"));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = setStylesheetType;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
# PDS-DEV-KIT-WEB Release Notes
|
|
2
|
-
## [v2.2.
|
|
2
|
+
## [v2.2.16]
|
|
3
3
|
## daily|https://design.storybook.publ.biz/
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
* ic_typeface_serif_20
|
|
9
|
-
* ic_typeface_sanserif_20
|
|
10
|
-
* ic_typeface_display_20
|
|
11
|
-
* ic_typeface_hand_20
|
|
12
|
-
* ic_typeface_monospace_20
|
|
13
|
-
* line icon 삭제
|
|
14
|
-
* ic_typeface_serif_24
|
|
15
|
-
* ic_typeface_sanserif_24
|
|
16
|
-
* ic_typeface_display_24
|
|
17
|
-
* ic_typeface_hand_24
|
|
18
|
-
* ic_typeface_monospace_24
|
|
5
|
+
### sub
|
|
6
|
+
* GoogleFontsKit 추가
|
|
7
|
+
* DynamicLayout에 GoogleFontsKit 적용
|