/******/ (function() { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "compileCSS": function() { return /* binding */ compileCSS; }, "getCSSRules": function() { return /* binding */ getCSSRules; } }); ;// CONCATENATED MODULE: external "lodash" var external_lodash_namespaceObject = window["lodash"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/constants.js const VARIABLE_REFERENCE_PREFIX = 'var:'; const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|'; const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--'; ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/utils.js /** * External dependencies */ /** * Internal dependencies */ /** * Returns a JSON representation of the generated CSS rules. * * @param style Style object. * @param options Options object with settings to adjust how the styles are generated. * @param path An array of strings representing the path to the style value in the style object. * @param ruleKey A CSS property key. * * @return GeneratedCSSRule[] CSS rules. */ function generateRule(style, options, path, ruleKey) { const styleValue = (0,external_lodash_namespaceObject.get)(style, path); return styleValue ? [{ selector: options?.selector, key: ruleKey, value: getCSSVarFromStyleValue(styleValue) }] : []; } /** * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left. * * @param style Style object. * @param options Options object with settings to adjust how the styles are generated. * @param path An array of strings representing the path to the style value in the style object. * @param ruleKeys An array of CSS property keys and patterns. * @param individualProperties The "sides" or individual properties for which to generate rules. * * @return GeneratedCSSRule[] CSS rules. */ function generateBoxRules(style, options, path, ruleKeys, individualProperties = ['top', 'right', 'bottom', 'left']) { const boxStyle = (0,external_lodash_namespaceObject.get)(style, path); if (!boxStyle) { return []; } const rules = []; if (typeof boxStyle === 'string') { rules.push({ selector: options?.selector, key: ruleKeys.default, value: boxStyle }); } else { const sideRules = individualProperties.reduce((acc, side) => { const value = getCSSVarFromStyleValue((0,external_lodash_namespaceObject.get)(boxStyle, [side])); if (value) { acc.push({ selector: options?.selector, key: ruleKeys?.individual.replace('%s', upperFirst(side)), value }); } return acc; }, []); rules.push(...sideRules); } return rules; } /** * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`. * * @param styleValue A raw style value. * * @return string A CSS var value. */ function getCSSVarFromStyleValue(styleValue) { if (typeof styleValue === 'string' && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) { const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(presetVariable => (0,external_lodash_namespaceObject.kebabCase)(presetVariable)).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE); return `var(--wp--${variable})`; } return styleValue; } /** * Capitalizes the first letter in a string. * * @param string The string whose first letter the function will capitalize. * * @return String with the first letter capitalized. */ function upperFirst(string) { const [firstLetter, ...rest] = string; return firstLetter.toUpperCase() + rest.join(''); } /** * Converts an array of strings into a camelCase string. * * @param strings The strings to join into a camelCase string. * * @return camelCase string. */ function camelCaseJoin(strings) { const [firstItem, ...rest] = strings; return firstItem.toLowerCase() + rest.map(upperFirst).join(''); } ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/border/index.js /** * Internal dependencies */ /** * Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React. * * @param path An array of strings representing the path to the style value in the style object. * * @return A function that generates CSS rules. */ function createBorderGenerateFunction(path) { return (style, options) => generateRule(style, options, path, camelCaseJoin(path)); } /** * Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules. * * @param edge The edge to create CSS rules for. * * @return A function that generates CSS rules. */ function createBorderEdgeGenerateFunction(edge) { return (style, options) => { return ['color', 'style', 'width'].flatMap(key => { const path = ['border', edge, key]; return createBorderGenerateFunction(path)(style, options); }); }; } const color = { name: 'color', generate: createBorderGenerateFunction(['border', 'color']) }; const radius = { name: 'radius', generate: (style, options) => { return generateBoxRules(style, options, ['border', 'radius'], { default: 'borderRadius', individual: 'border%sRadius' }, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']); } }; const borderStyle = { name: 'style', generate: createBorderGenerateFunction(['border', 'style']) }; const width = { name: 'width', generate: createBorderGenerateFunction(['border', 'width']) }; const borderTop = { name: 'borderTop', generate: createBorderEdgeGenerateFunction('top') }; const borderRight = { name: 'borderRight', generate: createBorderEdgeGenerateFunction('right') }; const borderBottom = { name: 'borderBottom', generate: createBorderEdgeGenerateFunction('bottom') }; const borderLeft = { name: 'borderLeft', generate: createBorderEdgeGenerateFunction('left') }; /* harmony default export */ var border = ([color, borderStyle, width, radius, borderTop, borderRight, borderBottom, borderLeft]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/background.js /** * Internal dependencies */ const background = { name: 'background', generate: (style, options) => { return generateRule(style, options, ['color', 'background'], 'backgroundColor'); } }; /* harmony default export */ var color_background = (background); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/gradient.js /** * Internal dependencies */ const gradient = { name: 'gradient', generate: (style, options) => { return generateRule(style, options, ['color', 'gradient'], 'background'); } }; /* harmony default export */ var color_gradient = (gradient); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/text.js /** * Internal dependencies */ const text_text = { name: 'text', generate: (style, options) => { return generateRule(style, options, ['color', 'text'], 'color'); } }; /* harmony default export */ var color_text = (text_text); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/color/index.js /** * Internal dependencies */ /* harmony default export */ var styles_color = ([color_text, color_gradient, color_background]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/dimensions/index.js /** * Internal dependencies */ const minHeight = { name: 'minHeight', generate: (style, options) => { return generateRule(style, options, ['dimensions', 'minHeight'], 'minHeight'); } }; /* harmony default export */ var dimensions = ([minHeight]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/shadow/index.js /** * Internal dependencies */ const shadow = { name: 'shadow', generate: (style, options) => { return generateRule(style, options, ['shadow'], 'boxShadow'); } }; /* harmony default export */ var styles_shadow = ([shadow]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/outline/index.js /** * Internal dependencies */ const outline_color = { name: 'color', generate: (style, options, path = ['outline', 'color'], ruleKey = 'outlineColor') => { return generateRule(style, options, path, ruleKey); } }; const offset = { name: 'offset', generate: (style, options, path = ['outline', 'offset'], ruleKey = 'outlineOffset') => { return generateRule(style, options, path, ruleKey); } }; const outlineStyle = { name: 'style', generate: (style, options, path = ['outline', 'style'], ruleKey = 'outlineStyle') => { return generateRule(style, options, path, ruleKey); } }; const outline_width = { name: 'width', generate: (style, options, path = ['outline', 'width'], ruleKey = 'outlineWidth') => { return generateRule(style, options, path, ruleKey); } }; /* harmony default export */ var outline = ([outline_color, outlineStyle, offset, outline_width]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/padding.js /** * Internal dependencies */ const padding = { name: 'padding', generate: (style, options) => { return generateBoxRules(style, options, ['spacing', 'padding'], { default: 'padding', individual: 'padding%s' }); } }; /* harmony default export */ var spacing_padding = (padding); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/margin.js /** * Internal dependencies */ const margin = { name: 'margin', generate: (style, options) => { return generateBoxRules(style, options, ['spacing', 'margin'], { default: 'margin', individual: 'margin%s' }); } }; /* harmony default export */ var spacing_margin = (margin); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/spacing/index.js /** * Internal dependencies */ /* harmony default export */ var spacing = ([spacing_margin, spacing_padding]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/typography/index.js /** * Internal dependencies */ const fontSize = { name: 'fontSize', generate: (style, options) => { return generateRule(style, options, ['typography', 'fontSize'], 'fontSize'); } }; const fontStyle = { name: 'fontStyle', generate: (style, options) => { return generateRule(style, options, ['typography', 'fontStyle'], 'fontStyle'); } }; const fontWeight = { name: 'fontWeight', generate: (style, options) => { return generateRule(style, options, ['typography', 'fontWeight'], 'fontWeight'); } }; const fontFamily = { name: 'fontFamily', generate: (style, options) => { return generateRule(style, options, ['typography', 'fontFamily'], 'fontFamily'); } }; const letterSpacing = { name: 'letterSpacing', generate: (style, options) => { return generateRule(style, options, ['typography', 'letterSpacing'], 'letterSpacing'); } }; const lineHeight = { name: 'lineHeight', generate: (style, options) => { return generateRule(style, options, ['typography', 'lineHeight'], 'lineHeight'); } }; const textColumns = { name: 'textColumns', generate: (style, options) => { return generateRule(style, options, ['typography', 'textColumns'], 'columnCount'); } }; const textDecoration = { name: 'textDecoration', generate: (style, options) => { return generateRule(style, options, ['typography', 'textDecoration'], 'textDecoration'); } }; const textTransform = { name: 'textTransform', generate: (style, options) => { return generateRule(style, options, ['typography', 'textTransform'], 'textTransform'); } }; /* harmony default export */ var typography = ([fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textColumns, textDecoration, textTransform]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/styles/index.js /** * Internal dependencies */ const styleDefinitions = [...border, ...styles_color, ...dimensions, ...outline, ...spacing, ...typography, ...styles_shadow]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/style-engine/build-module/index.js /** * External dependencies */ /** * Internal dependencies */ /** * Generates a stylesheet for a given style object and selector. * * @since 6.1.0 Introduced in WordPress core. * * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json * @param options Options object with settings to adjust how the styles are generated. * * @return A generated stylesheet or inline style declarations. */ function compileCSS(style, options = {}) { const rules = getCSSRules(style, options); // If no selector is provided, treat generated rules as inline styles to be returned as a single string. if (!options?.selector) { const inlineRules = []; rules.forEach(rule => { inlineRules.push(`${(0,external_lodash_namespaceObject.kebabCase)(rule.key)}: ${rule.value};`); }); return inlineRules.join(' '); } const groupedRules = rules.reduce((acc, rule) => { const { selector } = rule; if (!selector) { return acc; } if (!acc[selector]) { acc[selector] = []; } acc[selector].push(rule); return acc; }, {}); const selectorRules = Object.keys(groupedRules).reduce((acc, subSelector) => { acc.push(`${subSelector} { ${groupedRules[subSelector].map(rule => `${(0,external_lodash_namespaceObject.kebabCase)(rule.key)}: ${rule.value};`).join(' ')} }`); return acc; }, []); return selectorRules.join('\n'); } /** * Returns a JSON representation of the generated CSS rules. * * @since 6.1.0 Introduced in WordPress core. * * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json * @param options Options object with settings to adjust how the styles are generated. * * @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value. */ function getCSSRules(style, options = {}) { const rules = []; styleDefinitions.forEach(definition => { if (typeof definition.generate === 'function') { rules.push(...definition.generate(style, options)); } }); return rules; } (window.wp = window.wp || {}).styleEngine = __webpack_exports__; /******/ })() ;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
development | Folder | 0755 |
|
|
vendor | Folder | 0755 |
|
|
a11y.js | File | 8.48 KB | 0644 |
|
a11y.min.js | File | 2.39 KB | 0644 |
|
annotations.js | File | 31.05 KB | 0644 |
|
annotations.min.js | File | 6.8 KB | 0644 |
|
api-fetch.js | File | 22.27 KB | 0644 |
|
api-fetch.min.js | File | 5.27 KB | 0644 |
|
autop.js | File | 15.82 KB | 0644 |
|
autop.min.js | File | 5.54 KB | 0644 |
|
blob.js | File | 3.63 KB | 0644 |
|
blob.min.js | File | 917 B | 0644 |
|
block-directory.js | File | 75.69 KB | 0644 |
|
block-directory.min.js | File | 20.58 KB | 0644 |
|
block-editor.js | File | 2.11 MB | 0644 |
|
block-editor.min.js | File | 686.5 KB | 0644 |
|
block-library.js | File | 1.83 MB | 0644 |
|
block-library.min.js | File | 780.38 KB | 0644 |
|
block-serialization-default-parser.js | File | 14.94 KB | 0644 |
|
block-serialization-default-parser.min.js | File | 2.39 KB | 0644 |
|
blocks.js | File | 538.37 KB | 0644 |
|
blocks.min.js | File | 166.44 KB | 0644 |
|
commands.js | File | 175.76 KB | 0644 |
|
commands.min.js | File | 45.17 KB | 0644 |
|
components.js | File | 2.52 MB | 0644 |
|
components.min.js | File | 746.5 KB | 0644 |
|
compose.js | File | 186.45 KB | 0644 |
|
compose.min.js | File | 34.79 KB | 0644 |
|
core-commands.js | File | 16.33 KB | 0644 |
|
core-commands.min.js | File | 6.32 KB | 0644 |
|
core-data.js | File | 221.86 KB | 0644 |
|
core-data.min.js | File | 52.94 KB | 0644 |
|
customize-widgets.js | File | 109.45 KB | 0644 |
|
customize-widgets.min.js | File | 39.7 KB | 0644 |
|
data-controls.js | File | 7.32 KB | 0644 |
|
data-controls.min.js | File | 1.59 KB | 0644 |
|
data.js | File | 142.95 KB | 0644 |
|
data.min.js | File | 25.37 KB | 0644 |
|
date.js | File | 803.19 KB | 0644 |
|
date.min.js | File | 770.81 KB | 0644 |
|
deprecated.js | File | 4.67 KB | 0644 |
|
deprecated.min.js | File | 729 B | 0644 |
|
dom-ready.js | File | 2.45 KB | 0644 |
|
dom-ready.min.js | File | 498 B | 0644 |
|
dom.js | File | 61.62 KB | 0644 |
|
dom.min.js | File | 12.71 KB | 0644 |
|
edit-post.js | File | 352.48 KB | 0644 |
|
edit-post.min.js | File | 124.28 KB | 0644 |
|
edit-site.js | File | 835.65 KB | 0644 |
|
edit-site.min.js | File | 311.34 KB | 0644 |
|
edit-widgets.js | File | 163.31 KB | 0644 |
|
edit-widgets.min.js | File | 57.49 KB | 0644 |
|
editor.js | File | 428.15 KB | 0644 |
|
editor.min.js | File | 148.53 KB | 0644 |
|
element.js | File | 66.26 KB | 0644 |
|
element.min.js | File | 12.35 KB | 0644 |
|
escape-html.js | File | 6.22 KB | 0644 |
|
escape-html.min.js | File | 1.11 KB | 0644 |
|
format-library.js | File | 63.14 KB | 0644 |
|
format-library.min.js | File | 21.97 KB | 0644 |
|
hooks.js | File | 19.6 KB | 0644 |
|
hooks.min.js | File | 4.52 KB | 0644 |
|
html-entities.js | File | 3.63 KB | 0644 |
|
html-entities.min.js | File | 837 B | 0644 |
|
i18n.js | File | 49.17 KB | 0644 |
|
i18n.min.js | File | 9.22 KB | 0644 |
|
is-shallow-equal.js | File | 4.34 KB | 0644 |
|
is-shallow-equal.min.js | File | 1.07 KB | 0644 |
|
keyboard-shortcuts.js | File | 21.58 KB | 0644 |
|
keyboard-shortcuts.min.js | File | 3.88 KB | 0644 |
|
keycodes.js | File | 33.45 KB | 0644 |
|
keycodes.min.js | File | 3.94 KB | 0644 |
|
list-reusable-blocks.js | File | 30.16 KB | 0644 |
|
list-reusable-blocks.min.js | File | 4.97 KB | 0644 |
|
media-utils.js | File | 21.94 KB | 0644 |
|
media-utils.min.js | File | 7.27 KB | 0644 |
|
notices.js | File | 21.84 KB | 0644 |
|
notices.min.js | File | 2.21 KB | 0644 |
|
nux.js | File | 20.61 KB | 0644 |
|
nux.min.js | File | 4.51 KB | 0644 |
|
plugins.js | File | 17.25 KB | 0644 |
|
plugins.min.js | File | 4.16 KB | 0644 |
|
preferences-persistence.js | File | 27.97 KB | 0644 |
|
preferences-persistence.min.js | File | 4.85 KB | 0644 |
|
preferences.js | File | 11.43 KB | 0644 |
|
preferences.min.js | File | 2.58 KB | 0644 |
|
primitives.js | File | 9.35 KB | 0644 |
|
primitives.min.js | File | 2.41 KB | 0644 |
|
priority-queue.js | File | 13.99 KB | 0644 |
|
priority-queue.min.js | File | 3.36 KB | 0644 |
|
private-apis.js | File | 8.56 KB | 0644 |
|
private-apis.min.js | File | 2.61 KB | 0644 |
|
redux-routine.js | File | 23.53 KB | 0644 |
|
redux-routine.min.js | File | 8.79 KB | 0644 |
|
reusable-blocks.js | File | 20.33 KB | 0644 |
|
reusable-blocks.min.js | File | 6.49 KB | 0644 |
|
rich-text.js | File | 131.02 KB | 0644 |
|
rich-text.min.js | File | 33 KB | 0644 |
|
router.js | File | 25.91 KB | 0644 |
|
router.min.js | File | 4.25 KB | 0644 |
|
server-side-render.js | File | 14.41 KB | 0644 |
|
server-side-render.min.js | File | 4.4 KB | 0644 |
|
shortcode.js | File | 14.94 KB | 0644 |
|
shortcode.min.js | File | 2.87 KB | 0644 |
|
style-engine.js | File | 15.92 KB | 0644 |
|
style-engine.min.js | File | 4.05 KB | 0644 |
|
token-list.js | File | 6.5 KB | 0644 |
|
token-list.min.js | File | 1.27 KB | 0644 |
|
url.js | File | 33.21 KB | 0644 |
|
url.min.js | File | 8.87 KB | 0644 |
|
viewport.js | File | 10.54 KB | 0644 |
|
viewport.min.js | File | 1.94 KB | 0644 |
|
warning.js | File | 2.51 KB | 0644 |
|
warning.min.js | File | 392 B | 0644 |
|
widgets.js | File | 53.61 KB | 0644 |
|
widgets.min.js | File | 20.71 KB | 0644 |
|
wordcount.js | File | 14.7 KB | 0644 |
|
wordcount.min.js | File | 2.47 KB | 0644 |
|