@wordpress/block-editor
Version:
245 lines (243 loc) • 8.78 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// packages/block-editor/src/store/defaults.js
var defaults_exports = {};
__export(defaults_exports, {
PREFERENCES_DEFAULTS: () => PREFERENCES_DEFAULTS,
SETTINGS_DEFAULTS: () => SETTINGS_DEFAULTS
});
module.exports = __toCommonJS(defaults_exports);
var import_i18n = require("@wordpress/i18n");
var PREFERENCES_DEFAULTS = {
insertUsage: {}
};
var SETTINGS_DEFAULTS = {
alignWide: false,
supportsLayout: true,
// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
// The setting is only kept for backward compatibility purposes.
colors: [
{
name: (0, import_i18n.__)("Black"),
slug: "black",
color: "#000000"
},
{
name: (0, import_i18n.__)("Cyan bluish gray"),
slug: "cyan-bluish-gray",
color: "#abb8c3"
},
{
name: (0, import_i18n.__)("White"),
slug: "white",
color: "#ffffff"
},
{
name: (0, import_i18n.__)("Pale pink"),
slug: "pale-pink",
color: "#f78da7"
},
{ name: (0, import_i18n.__)("Vivid red"), slug: "vivid-red", color: "#cf2e2e" },
{
name: (0, import_i18n.__)("Luminous vivid orange"),
slug: "luminous-vivid-orange",
color: "#ff6900"
},
{
name: (0, import_i18n.__)("Luminous vivid amber"),
slug: "luminous-vivid-amber",
color: "#fcb900"
},
{
name: (0, import_i18n.__)("Light green cyan"),
slug: "light-green-cyan",
color: "#7bdcb5"
},
{
name: (0, import_i18n.__)("Vivid green cyan"),
slug: "vivid-green-cyan",
color: "#00d084"
},
{
name: (0, import_i18n.__)("Pale cyan blue"),
slug: "pale-cyan-blue",
color: "#8ed1fc"
},
{
name: (0, import_i18n.__)("Vivid cyan blue"),
slug: "vivid-cyan-blue",
color: "#0693e3"
},
{
name: (0, import_i18n.__)("Vivid purple"),
slug: "vivid-purple",
color: "#9b51e0"
}
],
// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
// The setting is only kept for backward compatibility purposes.
fontSizes: [
{
name: (0, import_i18n._x)("Small", "font size name"),
size: 13,
slug: "small"
},
{
name: (0, import_i18n._x)("Normal", "font size name"),
size: 16,
slug: "normal"
},
{
name: (0, import_i18n._x)("Medium", "font size name"),
size: 20,
slug: "medium"
},
{
name: (0, import_i18n._x)("Large", "font size name"),
size: 36,
slug: "large"
},
{
name: (0, import_i18n._x)("Huge", "font size name"),
size: 42,
slug: "huge"
}
],
// Image default size slug.
imageDefaultSize: "large",
imageSizes: [
{ slug: "thumbnail", name: (0, import_i18n.__)("Thumbnail") },
{ slug: "medium", name: (0, import_i18n.__)("Medium") },
{ slug: "large", name: (0, import_i18n.__)("Large") },
{ slug: "full", name: (0, import_i18n.__)("Full Size") }
],
// Allow plugin to disable Image Editor if need be.
imageEditing: true,
// This is current max width of the block inner area
// It's used to constraint image resizing and this value could be overridden later by themes
maxWidth: 580,
// Allowed block types for the editor, defaulting to true (all supported).
allowedBlockTypes: true,
// Maximum upload size in bytes allowed for the site.
maxUploadFileSize: 0,
// List of allowed mime types and file extensions.
allowedMimeTypes: null,
// Allows to disable block locking interface.
canLockBlocks: true,
// Allows to disable Openverse media category in the inserter.
enableOpenverseMediaCategory: true,
clearBlockSelection: true,
__experimentalCanUserUseUnfilteredHTML: false,
__experimentalBlockDirectory: false,
__mobileEnablePageTemplates: false,
__experimentalBlockPatterns: [],
__experimentalBlockPatternCategories: [],
isPreviewMode: false,
// These settings will be completely revamped in the future.
// The goal is to evolve this into an API which will instruct
// the block inspector to animate transitions between what it
// displays based on the relationship between the selected block
// and its parent, and only enable it if the parent is controlling
// its children blocks.
blockInspectorAnimation: {
animationParent: "core/navigation",
"core/navigation": { enterDirection: "leftToRight" },
"core/navigation-submenu": { enterDirection: "rightToLeft" },
"core/navigation-link": { enterDirection: "rightToLeft" },
"core/search": { enterDirection: "rightToLeft" },
"core/social-links": { enterDirection: "rightToLeft" },
"core/page-list": { enterDirection: "rightToLeft" },
"core/spacer": { enterDirection: "rightToLeft" },
"core/home-link": { enterDirection: "rightToLeft" },
"core/site-title": { enterDirection: "rightToLeft" },
"core/site-logo": { enterDirection: "rightToLeft" }
},
generateAnchors: false,
// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
// The setting is only kept for backward compatibility purposes.
gradients: [
{
name: (0, import_i18n.__)("Vivid cyan blue to vivid purple"),
gradient: "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
slug: "vivid-cyan-blue-to-vivid-purple"
},
{
name: (0, import_i18n.__)("Light green cyan to vivid green cyan"),
gradient: "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",
slug: "light-green-cyan-to-vivid-green-cyan"
},
{
name: (0, import_i18n.__)("Luminous vivid amber to luminous vivid orange"),
gradient: "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
slug: "luminous-vivid-amber-to-luminous-vivid-orange"
},
{
name: (0, import_i18n.__)("Luminous vivid orange to vivid red"),
gradient: "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
slug: "luminous-vivid-orange-to-vivid-red"
},
{
name: (0, import_i18n.__)("Very light gray to cyan bluish gray"),
gradient: "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",
slug: "very-light-gray-to-cyan-bluish-gray"
},
{
name: (0, import_i18n.__)("Cool to warm spectrum"),
gradient: "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",
slug: "cool-to-warm-spectrum"
},
{
name: (0, import_i18n.__)("Blush light purple"),
gradient: "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",
slug: "blush-light-purple"
},
{
name: (0, import_i18n.__)("Blush bordeaux"),
gradient: "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",
slug: "blush-bordeaux"
},
{
name: (0, import_i18n.__)("Luminous dusk"),
gradient: "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
slug: "luminous-dusk"
},
{
name: (0, import_i18n.__)("Pale ocean"),
gradient: "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",
slug: "pale-ocean"
},
{
name: (0, import_i18n.__)("Electric grass"),
gradient: "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",
slug: "electric-grass"
},
{
name: (0, import_i18n.__)("Midnight"),
gradient: "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",
slug: "midnight"
}
],
__unstableResolvedAssets: { styles: [], scripts: [] }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PREFERENCES_DEFAULTS,
SETTINGS_DEFAULTS
});
//# sourceMappingURL=defaults.js.map