@themarioga/grid-editor 8.5.0 → 8.7.0
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/CHANGELOG.md +46 -0
- package/README.md +78 -4
- package/dist/grideditor.bundle.min.js +3 -3
- package/dist/grideditor.css +15 -4
- package/dist/grideditor.d.ts +59 -3
- package/dist/grideditor.esm.js +226 -38
- package/dist/grideditor.js +226 -38
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +2 -2
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +4 -0
- package/dist/locales/grideditor.es.js +4 -0
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.accordion.esm.js +7 -0
- package/dist/plugins/grideditor.accordion.js +7 -0
- package/dist/plugins/grideditor.accordion.min.js +1 -1
- package/dist/plugins/grideditor.accordion.min.js.map +3 -3
- package/dist/plugins/grideditor.autosave.esm.js +309 -0
- package/dist/plugins/grideditor.autosave.js +316 -0
- package/dist/plugins/grideditor.autosave.min.js +1 -0
- package/dist/plugins/grideditor.autosave.min.js.map +7 -0
- package/dist/plugins/grideditor.card.esm.js +10 -0
- package/dist/plugins/grideditor.card.js +10 -0
- package/dist/plugins/grideditor.card.min.js +1 -1
- package/dist/plugins/grideditor.card.min.js.map +3 -3
- package/dist/plugins/grideditor.ckeditor.esm.js +29 -0
- package/dist/plugins/grideditor.ckeditor.js +29 -0
- package/dist/plugins/grideditor.ckeditor.min.js +1 -1
- package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
- package/dist/plugins/grideditor.clipboard.esm.js +3 -0
- package/dist/plugins/grideditor.clipboard.js +3 -0
- package/dist/plugins/grideditor.clipboard.min.js +1 -1
- package/dist/plugins/grideditor.clipboard.min.js.map +2 -2
- package/dist/plugins/grideditor.codemirror-inline.esm.js +11 -0
- package/dist/plugins/grideditor.codemirror-inline.js +11 -0
- package/dist/plugins/grideditor.codemirror-inline.min.js +1 -1
- package/dist/plugins/grideditor.codemirror-inline.min.js.map +3 -3
- package/dist/plugins/grideditor.elements.esm.js +6 -3
- package/dist/plugins/grideditor.elements.js +6 -3
- package/dist/plugins/grideditor.elements.min.js +1 -1
- package/dist/plugins/grideditor.elements.min.js.map +3 -3
- package/dist/plugins/grideditor.gutters.esm.js +5 -0
- package/dist/plugins/grideditor.gutters.js +5 -0
- package/dist/plugins/grideditor.gutters.min.js +1 -1
- package/dist/plugins/grideditor.gutters.min.js.map +3 -3
- package/dist/plugins/grideditor.inline-style.esm.js +18 -10
- package/dist/plugins/grideditor.inline-style.js +18 -10
- package/dist/plugins/grideditor.inline-style.min.js +3 -3
- package/dist/plugins/grideditor.inline-style.min.js.map +3 -3
- package/dist/plugins/grideditor.order.esm.js +5 -0
- package/dist/plugins/grideditor.order.js +5 -0
- package/dist/plugins/grideditor.order.min.js +1 -1
- package/dist/plugins/grideditor.order.min.js.map +3 -3
- package/dist/plugins/grideditor.popup.esm.js +17 -6
- package/dist/plugins/grideditor.popup.js +17 -6
- package/dist/plugins/grideditor.popup.min.js +1 -1
- package/dist/plugins/grideditor.popup.min.js.map +3 -3
- package/dist/plugins/grideditor.sections.esm.js +6 -3
- package/dist/plugins/grideditor.sections.js +6 -3
- package/dist/plugins/grideditor.sections.min.js +1 -1
- package/dist/plugins/grideditor.sections.min.js.map +3 -3
- package/dist/plugins/grideditor.summernote.esm.js +39 -0
- package/dist/plugins/grideditor.summernote.js +39 -0
- package/dist/plugins/grideditor.summernote.min.js +1 -1
- package/dist/plugins/grideditor.summernote.min.js.map +3 -3
- package/dist/plugins/grideditor.tabs.esm.js +7 -0
- package/dist/plugins/grideditor.tabs.js +7 -0
- package/dist/plugins/grideditor.tabs.min.js +1 -1
- package/dist/plugins/grideditor.tabs.min.js.map +3 -3
- package/dist/plugins/grideditor.tinymce.esm.js +31 -0
- package/dist/plugins/grideditor.tinymce.js +31 -0
- package/dist/plugins/grideditor.tinymce.min.js +1 -1
- package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
- package/docs/events.md +8 -0
- package/docs/locale-keys.md +14 -0
- package/docs/plugins.md +86 -2
- package/example/autosave.html +39 -22
- package/example/index.html +1 -1
- package/example/plugins.html +10 -0
- package/package.json +1 -3
- package/src/js/grideditor.js +280 -30
- package/src/js/inline-style/display.js +4 -3
- package/src/js/inline-style/drawerflow.js +10 -5
- package/src/js/locales/grideditor.es.js +4 -0
- package/src/js/plugins/grideditor.accordion.js +6 -0
- package/src/js/plugins/grideditor.autosave.js +349 -0
- package/src/js/plugins/grideditor.card.js +6 -0
- package/src/js/plugins/grideditor.ckeditor.js +6 -0
- package/src/js/plugins/grideditor.clipboard.js +3 -0
- package/src/js/plugins/grideditor.codemirror-inline.js +7 -0
- package/src/js/plugins/grideditor.elements.js +4 -3
- package/src/js/plugins/grideditor.gutters.js +4 -0
- package/src/js/plugins/grideditor.inline-style.js +2 -0
- package/src/js/plugins/grideditor.order.js +4 -0
- package/src/js/plugins/grideditor.popup.js +15 -6
- package/src/js/plugins/grideditor.sections.js +4 -3
- package/src/js/plugins/grideditor.summernote.js +14 -0
- package/src/js/plugins/grideditor.tabs.js +6 -0
- package/src/js/plugins/grideditor.tinymce.js +8 -0
- package/src/js/text/grideditor.text.js +26 -0
- package/src/less/grideditor.less +16 -8
- package/types/grideditor.d.ts +59 -3
- package/AUTO_SAVE.md +0 -30
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/js/register.js", "../../src/js/dom.js", "../../src/js/inline-style/spacing.js", "../../src/js/inline-style/textalign.js", "../../src/js/inline-style/display.js", "../../src/js/inline-style/flex.js", "../../src/js/inline-style/float.js", "../../src/js/inline-style/sticky.js", "../../src/js/inline-style/drawerflow.js", "../../src/js/inline-style/sections.js", "../../src/js/inline-style/options.js", "../../src/js/inline-style/fields.js", "../../src/js/inline-style/catalog.js", "../../src/js/inline-style/custom.js", "../../src/js/inline-style/accordion.js", "../../src/js/plugins/grideditor.inline-style.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The DOM, the way grid-editor uses it.\n *\n * Small helpers over the browser's own API, for the core and the shipped\n * plugins. Not a public API: a plugin of a host's own is free to write its\n * DOM code however it likes, and this file makes no promise to it.\n *\n * Stateless on purpose. The build puts a copy of this file in each plugin's\n * classic script, so anything kept here would be kept once per copy; a\n * module that needs to remember something about a node keeps its own\n * WeakMap.\n */\n\n/** Every element under `root` matching `selector`, as an array. */\nexport function all(root, selector) {\n return root ? Array.prototype.slice.call(root.querySelectorAll(selector)) : [];\n}\n\n/** The first element under `root` matching `selector`, or null. */\nexport function one(root, selector) {\n return root ? root.querySelector(selector) : null;\n}\n\n/** `root` itself when it matches, then every element under it that does. */\nexport function selfAndAll(root, selector) {\n if (!root) { return []; }\n\n var found = all(root, selector);\n if (root.nodeType === 1 && root.matches(selector)) { found.unshift(root); }\n return found;\n}\n\n/** The element children of `node`, those matching `selector` if one is given. */\nexport function children(node, selector) {\n if (!node) { return []; }\n\n return Array.prototype.filter.call(node.children, function(each) {\n return !selector || each.matches(selector);\n });\n}\n\n/** The first element child matching `selector`, or null. */\nexport function child(node, selector) {\n return children(node, selector)[0] || null;\n}\n\n/** The nearest ancestor-or-self matching `selector` below `stopAt`, or null. */\nexport function closest(node, selector, stopAt) {\n var found = node && node.nodeType === 1 ? node.closest(selector) : null;\n\n if (found && stopAt && found !== stopAt && !stopAt.contains(found)) { return null; }\n return found;\n}\n\n/** Whether `node` is an element matching `selector`. */\nexport function is(node, selector) {\n return !!node && node.nodeType === 1 && node.matches(selector);\n}\n\n/** Whether `node` is in the document. */\nexport function attached(node) {\n return !!node && document.documentElement.contains(node);\n}\n\n/** The element siblings after `node` that match `selector`. */\nexport function nextAll(node, selector) {\n var found = [];\n\n for (var next = node.nextElementSibling; next; next = next.nextElementSibling) {\n if (!selector || next.matches(selector)) { found.push(next); }\n }\n return found;\n}\n\n/** The ancestors of `node` up to, and not including, `stop`, nearest first. */\nexport function parentsUntil(node, stop) {\n var found = [];\n\n for (var parent = node.parentElement; parent && parent !== stop; parent = parent.parentElement) {\n found.push(parent);\n }\n return found;\n}\n\n/**\n * The nodes the html parses into, detached. Parsed the way innerHTML parses,\n * so a <script> in it never runs, here or once it is in the page.\n */\nexport function parse(html) {\n var template = document.createElement('template');\n template.innerHTML = html;\n return Array.prototype.slice.call(template.content.childNodes);\n}\n\n/** The one element the html is, detached. */\nexport function create(html) {\n var nodes = parse(html.trim());\n\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].nodeType === 1) { return nodes[i]; }\n }\n return null;\n}\n\n/** An element of `tag`, with `attributes` and `text`. */\nexport function element(tag, attributes, text) {\n var node = document.createElement(tag);\n\n Object.keys(attributes || {}).forEach(function(name) {\n var value = attributes[name];\n if (value !== null && value !== undefined && value !== false) { node.setAttribute(name, value); }\n });\n if (text !== undefined && text !== null) { node.textContent = text; }\n\n return node;\n}\n\n/** Replace what `node` holds with `html`. A <script> in it does not run. */\nexport function setHtml(node, html) {\n node.innerHTML = html === undefined || html === null ? '' : String(html);\n return node;\n}\n\n/** Add one or several space separated classes. */\nexport function addClass(node, names) {\n split(names).forEach(function(name) { node.classList.add(name); });\n return node;\n}\n\nexport function removeClass(node, names) {\n split(names).forEach(function(name) { node.classList.remove(name); });\n return node;\n}\n\n/** Each class on, or off, or flipped when `on` is not given. */\nexport function toggleClass(node, names, state) {\n split(names).forEach(function(name) {\n if (state === undefined) {\n node.classList.toggle(name);\n } else {\n node.classList.toggle(name, !!state);\n }\n });\n return node;\n}\n\nexport function hasClass(node, name) {\n return !!node && node.nodeType === 1 && node.classList.contains(name);\n}\n\nfunction split(names) {\n return String(names || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Take the class attribute off when there is nothing left in it. */\nexport function dropEmptyClass(node) {\n if (!node.getAttribute('class')) { node.removeAttribute('class'); }\n return node;\n}\n\n/** Take the style attribute off when there is nothing left in it. */\nexport function dropEmptyStyle(node) {\n if (!node.getAttribute('style')) { node.removeAttribute('style'); }\n return node;\n}\n\n/** Set attributes; a null or undefined value takes the attribute off. */\nexport function attr(node, attributes) {\n Object.keys(attributes).forEach(function(name) {\n var value = attributes[name];\n\n if (value === null || value === undefined) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, value);\n }\n });\n return node;\n}\n\n/**\n * Inline styles, by css property name. A number is pixels for the properties\n * that take a length, as jQuery had it; an empty string takes one off.\n */\nexport function css(node, styles) {\n Object.keys(styles).forEach(function(property) {\n var value = styles[property];\n\n if (typeof value === 'number' && !UNITLESS[property]) { value = value + 'px'; }\n node.style.setProperty(property, value === null || value === undefined ? '' : String(value));\n });\n return node;\n}\n\nvar UNITLESS = { opacity: true, 'z-index': true, 'flex-grow': true, 'flex-shrink': true, order: true };\n\n/** What an element of this tag shows as when nothing hides it. */\nvar defaultDisplays = {};\n\nfunction defaultDisplay(node) {\n var tag = node.nodeName;\n\n if (!defaultDisplays[tag]) {\n var probe = document.body.appendChild(document.createElement(tag));\n defaultDisplays[tag] = getComputedStyle(probe).display;\n probe.remove();\n if (defaultDisplays[tag] === 'none') { defaultDisplays[tag] = 'block'; }\n }\n return defaultDisplays[tag];\n}\n\n/** Show a node: its inline display:none off, and a display of its own if a stylesheet hides it. */\nexport function show(node) {\n node.style.removeProperty('display');\n if (getComputedStyle(node).display === 'none') { node.style.display = defaultDisplay(node); }\n return node;\n}\n\nexport function hide(node) {\n node.style.display = 'none';\n return node;\n}\n\n/** Show or hide; flip when `on` is not given. */\nexport function toggle(node, state) {\n if (state === undefined) { state = !visible(node); }\n return state ? show(node) : hide(node);\n}\n\n/** Whether a node takes up room: what jQuery's :visible meant. */\nexport function visible(node) {\n return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);\n}\n\n/** The border box's width, fractions included. */\nexport function outerWidth(node) {\n return node.getBoundingClientRect().width;\n}\n\nexport function outerHeight(node) {\n return node.getBoundingClientRect().height;\n}\n\n/** The content box's height, which is what jQuery's height() gave. */\nexport function contentHeight(node) {\n var style = getComputedStyle(node);\n return node.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);\n}\n\n/** Where a node is on the page, not in the window. */\nexport function offset(node) {\n var box = node.getBoundingClientRect();\n return { top: box.top + window.pageYOffset, left: box.left + window.pageXOffset };\n}\n\n/** Its index among its parent's element children, those matching `selector` if given. */\nexport function indexIn(node, selector) {\n return children(node.parentElement, selector).indexOf(node);\n}\n\n/** Put `node` right after `reference`. */\nexport function insertAfter(node, reference) {\n reference.parentNode.insertBefore(node, reference.nextSibling);\n return node;\n}\n\n/** Replace `node` with what it holds. */\nexport function unwrap(node) {\n var parent = node.parentNode;\n\n while (node.firstChild) { parent.insertBefore(node.firstChild, node); }\n node.remove();\n}\n\n/** Put `node` inside `wrapper`, where `node` was. */\nexport function wrap(node, wrapper) {\n node.parentNode.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n return wrapper;\n}\n\n/**\n * Listen on `root` for `types` (space separated) on descendants that match\n * `selector`, with `this` the matched element, as jQuery's delegated\n * handlers had it. Hands back the listener, for removeEventListener; a\n * signal in `options` removes it too.\n */\nexport function delegate(root, types, selector, handler, options) {\n var listener = function(event) {\n var match = closest(event.target, selector, root);\n if (match && root.contains(match)) { return handler.call(match, event); }\n return undefined;\n };\n\n split(types).forEach(function(type) { root.addEventListener(type, listener, options); });\n return listener;\n}\n\n/** Listen for several space separated event types with one handler. */\nexport function on(target, types, handler, options) {\n split(types).forEach(function(type) { target.addEventListener(type, handler, options); });\n return handler;\n}\n\nexport function off(target, types, handler, options) {\n split(types).forEach(function(type) { target.removeEventListener(type, handler, options); });\n}\n\n/** A mouse event of `type` sent to `node`, the way a pointer would. */\nexport function fire(node, type) {\n node.dispatchEvent(new MouseEvent(type, { bubbles: type !== 'mouseenter' && type !== 'mouseleave' }));\n}\n\n/* ------------------------------------------------------------------\n * Taking a node away, visibly.\n *\n * The durations are jQuery's: 400 ms unless the caller says otherwise. `done` runs once the node is out of sight, which is\n * when the caller removes it; a node that is already out of sight is done at\n * once, on the next task, as jQuery had it.\n * ------------------------------------------------------------------ */\n\nvar DEFAULT_DURATION = 400;\n\nfunction animateAway(node, frames, duration, done) {\n duration = duration === undefined ? DEFAULT_DURATION : duration;\n\n var finish = function() {\n hide(node);\n if (done) { done(); }\n };\n\n if (!visible(node) || !node.animate || duration <= 0) {\n window.setTimeout(finish, 0);\n return;\n }\n\n var animation = node.animate(frames(getComputedStyle(node)), {\n duration: duration,\n easing: 'ease-in-out',\n });\n var called = false;\n var once = function() {\n if (called) { return; }\n called = true;\n finish();\n };\n\n animation.onfinish = once;\n animation.oncancel = once;\n}\n\n/** Fold a node up to nothing, then hide it. */\nexport function slideUp(node, duration, done) {\n if (typeof duration === 'function') {\n done = duration;\n duration = undefined;\n }\n\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n return [\n {\n height: style.height,\n paddingTop: style.paddingTop,\n paddingBottom: style.paddingBottom,\n marginTop: style.marginTop,\n marginBottom: style.marginBottom,\n },\n { height: '0px', paddingTop: '0px', paddingBottom: '0px', marginTop: '0px', marginBottom: '0px' },\n ];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n\n/** Fade a node out, then hide it. */\nexport function fadeOut(node, duration, done) {\n animateAway(node, function(style) {\n return [{ opacity: style.opacity }, { opacity: 0 }];\n }, duration, done);\n}\n\n/** Fade and fold a node, in height and, with `width`, sideways too, then hide it. */\nexport function shrinkAway(node, duration, done, width) {\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n var from = { opacity: style.opacity, height: style.height };\n var to = { opacity: 0, height: '0px' };\n\n if (width) {\n from.width = style.width;\n to.width = '0px';\n }\n return [from, to];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n", "/**\n * Spacing, a part of the inline-style plugin: padding and margin per breakpoint, with Bootstrap's p-{breakpoint}-*,\n * pt-, px- \u2026 and m-{breakpoint}-*, mt-, mx- \u2026 classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and its options: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.padding': 'Padding',\n 'utility.margin': 'Margin',\n 'utility.side_all': 'All sides',\n 'utility.side_x': 'Left and right',\n 'utility.side_y': 'Top and bottom',\n 'utility.side_t': 'Top',\n 'utility.side_b': 'Bottom',\n 'utility.side_s': 'Start',\n 'utility.side_e': 'End',\n 'utility.spacing_gutter': 'A column\\'s side padding is its gutter: changing it changes the gutter',\n});\n\nvar VALUES = ['0', '1', '2', '3', '4', '5'];\n\n/** Bootstrap's $spacers. */\nvar SCALE = ['0', '.25rem', '.5rem', '1rem', '1.5rem', '3rem'];\n\n/**\n * The sides, in the order Bootstrap's css writes their rules: within one\n * breakpoint a later rule wins, so p-3 pt-1 has a top of .25rem.\n */\nvar SIDES = ['', 'x', 'y', 't', 'e', 'b', 's'];\n\n/** What each side sets. Start and end are left and right: Bootstrap's css is left to right. */\nvar SET = {\n '': ['top', 'right', 'bottom', 'left'],\n x: ['left', 'right'],\n y: ['top', 'bottom'],\n t: ['top'],\n e: ['right'],\n b: ['bottom'],\n s: ['left'],\n};\n\nvar INFIXES = ['', 'sm', 'md', 'lg', 'xl', 'xxl'];\n\nvar PROPERTIES = { p: 'padding', m: 'margin' };\n\n/** Every class of the plugin's, padding or margin. */\nfunction pattern(key) {\n return new RegExp('^' + key + '[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$');\n}\n\nexport function spacingPart(ge, given) {\n\n var options = Object.assign({ values: VALUES, scale: SCALE }, given);\n var patterns = { p: pattern('p'), m: pattern('m') };\n\n function applies(node, kind) {\n return kind === 'row' || kind === 'column' || kind === 'element' ||\n dom.is(node, '[data-ge-container]');\n }\n\n function classes(node) {\n return (node.getAttribute('class') || '').split(/\\s+/);\n }\n\n function carries(node, key) {\n return classes(node).some(function(name) { return patterns[key].test(name); });\n }\n\n /**\n * The class of one family that decides a side at a breakpoint: the\n * widest breakpoint up to it that has one, as { tier, value }.\n */\n function source(node, family, tier) {\n var names = classes(node);\n var values = family.charAt(0) === 'm' ? VALUES.concat(['auto']) : VALUES;\n\n for (var i = tier; i >= 0; i--) {\n for (var v = 0; v < values.length; v++) {\n var name = family + (INFIXES[i] ? '-' + INFIXES[i] : '') + '-' + values[v];\n if (names.indexOf(name) !== -1) { return { tier: i, value: values[v] }; }\n }\n }\n\n return null;\n }\n\n /**\n * What padding or margin is on each side with none of the plugin's\n * classes: the editor's frame for a row or a column, the host's css\n * for anything else. Read by taking the classes off for a moment,\n * since that is the only way to ask the browser.\n */\n function without(node, key) {\n var original = node.getAttribute('class');\n var style;\n var bare = {};\n\n node.setAttribute('class', classes(node).filter(function(name) { return !patterns[key].test(name); }).join(' '));\n style = getComputedStyle(node);\n ['top', 'right', 'bottom', 'left'].forEach(function(side) {\n bare[side] = style.getPropertyValue(PROPERTIES[key] + '-' + side);\n });\n if (original === null) { node.removeAttribute('class'); } else { node.setAttribute('class', original); }\n\n return bare;\n }\n\n /**\n * Each side the way Bootstrap's css settles it: the class from the\n * widest breakpoint wins, and within one breakpoint the side written\n * later in the css. A side no class reaches shows what it is without\n * any, over a wider breakpoint's class that is live in a wide window.\n */\n function sides(node, key, breakpoint) {\n var tier = ge.breakpoints.indexOf(breakpoint);\n var winners = {};\n var styles = {};\n var neutral = null;\n\n SIDES.forEach(function(side, order) {\n var found = source(node, key + side, tier);\n if (!found) { return; }\n\n SET[side].forEach(function(set) {\n var current = winners[set];\n if (!current || found.tier > current.tier || (found.tier === current.tier && order > current.order)) {\n winners[set] = { tier: found.tier, order: order, value: found.value };\n }\n });\n });\n\n ['top', 'right', 'bottom', 'left'].forEach(function(set) {\n var winner = winners[set];\n\n if (!winner) {\n neutral = neutral || without(node, key);\n styles[PROPERTIES[key] + '-' + set] = neutral[set];\n } else {\n styles[PROPERTIES[key] + '-' + set] = winner.value === 'auto' ? 'auto' : options.scale[winner.value];\n }\n });\n\n return styles;\n }\n\n /** The side a group's select starts on: the first that has a class, or all. */\n function startingSide(node, key) {\n var names = classes(node).filter(function(name) { return patterns[key].test(name); });\n var found = SIDES.filter(function(side) {\n return names.some(function(name) { return name.indexOf(key + side + '-') === 0; });\n });\n\n return found.length ? found[0] : '';\n }\n\n function sideLabel(side) {\n switch (side) {\n case 'x': return ge.t('utility.side_x');\n case 'y': return ge.t('utility.side_y');\n case 't': return ge.t('utility.side_t');\n case 'b': return ge.t('utility.side_b');\n case 's': return ge.t('utility.side_s');\n case 'e': return ge.t('utility.side_e');\n default: return ge.t('utility.side_all');\n }\n }\n\n /** A padding or margin group: its name, the side, and the field of that side's family. */\n function group(node, key, labelText) {\n var box = dom.element('div', { 'class': 'ge-spacing-group', 'data-ge-spacing': key });\n var side = dom.element('select', { 'class': 'ge-spacing-side form-select form-select-sm' });\n\n box.appendChild(dom.element('span', { 'class': 'ge-utility-label' }, labelText));\n\n SIDES.forEach(function(value) {\n side.appendChild(dom.element('option', { value: value }, sideLabel(value)));\n });\n\n var field = ge.utilityField(node, key + startingSide(node, key));\n\n side.value = field.getAttribute('data-ge-family').slice(1);\n side.addEventListener('change', function() {\n var next = ge.utilityField(node, key + this.value);\n field.replaceWith(next);\n field = next;\n });\n box.appendChild(side);\n box.appendChild(field);\n\n return box;\n }\n\n var NODES = '.row, .column, .ge-element, [data-ge-container]';\n\n /**\n * Keep each drawer on its node's edges. A drawer is pulled out over the\n * editor's frame by as much as the frame pads the node, and a padding\n * class replaces the frame, so a padded node's drawer is pulled out by\n * its real padding instead. And a column padded at the sides gets a word\n * about what that does to its gutter.\n */\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var drawer = dom.child(node, '.ge-tools-drawer');\n\n if (!drawer || !applies(node, ge.kindOf(node))) { return; }\n\n if (carries(node, 'p')) {\n var style = getComputedStyle(node);\n\n dom.css(drawer, {\n 'margin-top': '-' + style.paddingTop,\n 'margin-left': '-' + style.paddingLeft,\n 'margin-right': '-' + style.paddingRight,\n width: 'calc(100% + ' + style.paddingLeft + ' + ' + style.paddingRight + ')',\n });\n } else {\n dom.css(drawer, { 'margin-top': '', 'margin-left': '', 'margin-right': '', width: '' });\n }\n\n if (dom.hasClass(node, 'column')) {\n var padded = classes(node).some(function(name) {\n return /^p[xse]?-/.test(name) && patterns.p.test(name);\n });\n dom.all(drawer, '.ge-spacing-gutter').forEach(function(note) { dom.toggle(note, padded); });\n }\n });\n }\n\n function families(key, labelKey) {\n var values = key === 'm' ? VALUES.concat(['auto']) : VALUES;\n var offered = options.values.concat(key === 'm' ? ['auto'] : []);\n\n return SIDES.map(function(side) {\n return {\n name: key + side,\n prefix: key + side,\n values: values,\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: labelKey,\n panel: false,\n choices: function() {\n return values.filter(function(value) { return offered.indexOf(value) !== -1; });\n },\n };\n });\n }\n\n return {\n families: families('p', 'utility.padding').concat(families('m', 'utility.margin')),\n\n panel: function(node, kind) {\n if (!applies(node, kind)) { return null; }\n\n var box = dom.element('div', { 'class': 'ge-spacing' });\n box.appendChild(group(node, 'p', ge.t('utility.padding')));\n box.appendChild(group(node, 'm', ge.t('utility.margin')));\n\n if (kind === 'column') {\n box.appendChild(dom.element('small', { 'class': 'ge-spacing-gutter' }, ge.t('utility.spacing_gutter')));\n }\n\n return box;\n },\n\n preview: function(node, kind, breakpoint) {\n if (!applies(node, kind)) { return {}; }\n\n var styles = {};\n\n ['p', 'm'].forEach(function(key) {\n if (carries(node, key)) { Object.assign(styles, sides(node, key, breakpoint)); }\n });\n\n return styles;\n },\n\n onRefresh: mark,\n };\n}\n", "/**\n * Text alignment, a part of the inline-style plugin: text alignment per breakpoint, with Bootstrap's text-{breakpoint}-start,\n * -center and -end classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.text_align': 'Text alignment',\n 'utility.text_start': 'Start',\n 'utility.text_center': 'Center',\n 'utility.text_end': 'End',\n});\n\n/** Start and end are left and right: Bootstrap's css is left to right. */\nvar CSS = { start: 'left', center: 'center', end: 'right' };\n\nexport function textalignPart(ge) {\n\n function label(value) {\n if (value === 'start') { return ge.t('utility.text_start'); }\n if (value === 'center') { return ge.t('utility.text_center'); }\n\n return ge.t('utility.text_end');\n }\n\n return {\n families: [{\n name: 'text-align',\n prefix: 'text',\n values: ['start', 'center', 'end'],\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: 'utility.text_align',\n label: label,\n\n /**\n * With no class applying here, the node aligns as its parent\n * does - or as the host's css says - which only the browser can\n * tell, so it is asked with the classes out of the way. Parents\n * are previewed before their children, so the parent's answer is\n * already the view's.\n */\n preview: function(value, node) {\n return { 'text-align': value === null ? ge.bareStyle(node, 'text-align', 'text-align') : CSS[value] };\n },\n }],\n };\n}\n", "/**\n * Display, a part of the inline-style plugin: how a node is displayed per\n * breakpoint, hidden included, with Bootstrap's d-{breakpoint}-* classes,\n * and the eye in the drawers that hides and shows it.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and its options: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.display': 'Display',\n 'utility.visibility_hidden': 'Hidden',\n 'tool.hide_in_view': 'Hide in this view',\n 'tool.show_in_view': 'Show in this view',\n 'badge.hidden_in': 'Hidden at {breakpoints}',\n});\n\n/** Bootstrap's display values, less its table ones. */\nvar VALUES = ['none', 'inline', 'inline-block', 'block', 'grid', 'inline-grid', 'flex', 'inline-flex'];\n\n/** A node that carries any class of the family, at any breakpoint. */\nvar CLASS_PATTERN = new RegExp('(?:^|\\\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:' + VALUES.join('|') + ')(?:\\\\s|$)');\nvar NONE_PATTERN = /^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/;\n\nvar NODES = '.row, .column, .ge-content, .ge-element, [data-ge-container]';\n\n/** What the canvas shows a hidden node as, in a view where Bootstrap hides it. */\nvar SHOWN_ATTR = 'data-ge-display';\n\nexport function displayPart(ge, given) {\n\n var options = Object.assign({ drawer: true }, given);\n\n /**\n * What a kind of node is offered: a row is a flex container or it is no\n * grid, and a text is a block of text.\n */\n function choices(kind) {\n if (kind === 'row') { return ['none', 'flex']; }\n if (kind === 'text' || kind === 'plain') { return ['none', 'block']; }\n\n return VALUES;\n }\n\n /** What \"shown\" is written as on this kind of node, when nothing below says. */\n function shownByDefault(kind) {\n return kind === 'row' ? 'flex' : 'block';\n }\n\n function applies(node, kind) {\n return kind === 'row' || kind === 'column' || kind === 'element' || kind === 'text' || kind === 'plain' ||\n dom.is(node, '[data-ge-container]');\n }\n\n function hiddenAt(node, view) {\n return ge.getUtility(node, 'display', view) === 'none';\n }\n\n /** The breakpoints at which the node is hidden, smallest first. */\n function hiddenTiers(node) {\n return ge.breakpoints.filter(function(key) { return hiddenAt(node, key); });\n }\n\n /**\n * Whether the node is hidden in the view being edited. In the all view\n * that means hidden at every breakpoint, since \"hidden at some\" is what\n * the badge is for.\n */\n function hiddenHere(node) {\n return ge.view() === 'all'\n ? hiddenTiers(node).length === ge.breakpoints.length\n : hiddenAt(node, ge.view());\n }\n\n /** What the breakpoint below the view shows, which an inherit falls back to. */\n function hiddenBelow(node) {\n var index = ge.breakpoints.indexOf(ge.view());\n\n return index > 0 && hiddenAt(node, ge.breakpoints[index - 1]);\n }\n\n /**\n * How the nearest breakpoint below this one that shows the node shows\n * it, or null when none below does.\n */\n function shownBelow(node, view) {\n for (var i = ge.breakpoints.indexOf(view) - 1; i >= 0; i--) {\n var value = ge.getUtility(node, 'display', ge.breakpoints[i]);\n\n if (value === null) { return null; }\n if (value !== 'none') { return value; }\n }\n\n return null;\n }\n\n /**\n * Hide or show the node in the view being edited, with as few classes as\n * that takes. In a breakpoint view that is often none at all: showing a\n * node the breakpoint below shows removes this breakpoint's d-*-none\n * rather than writing another class on top of it. Showing one that the\n * breakpoint below hides writes the display it had further down, so a\n * flex column comes back flex. In the all view a node is hidden\n * everywhere or shown everywhere, and shown is no class.\n */\n function toggle(node, kind) {\n var hide = !hiddenHere(node);\n var value;\n\n if (ge.view() === 'all') {\n value = hide ? 'none' : null;\n } else if (hide) {\n value = hiddenBelow(node) ? null : 'none';\n } else {\n value = hiddenBelow(node) ? (shownBelow(node, ge.view()) || shownByDefault(kind)) : null;\n }\n\n ge.setUtility(node, 'display', value, { source: 'tool' });\n }\n\n /**\n * A node Bootstrap hides in this view stays on the canvas, shown as it\n * would be if it were not hidden: with its classes' none taken off for\n * the moment it takes to ask the browser.\n */\n function shownAs(node) {\n var original = node.getAttribute('class');\n\n node.setAttribute('class', original.split(/\\s+/).filter(function(name) {\n return !NONE_PATTERN.test(name);\n }).join(' '));\n\n var display = getComputedStyle(node).display;\n node.setAttribute('class', original);\n\n // The canvas has a rule for each of Bootstrap's values, and a block for anything else\n return display !== 'none' && VALUES.indexOf(display) !== -1 ? display : 'block';\n }\n\n /**\n * The canvas shows each node as the view sees it. A node Bootstrap would\n * hide is kept on the canvas with the display it would have, and\n * ge-hidden-in-view fades it; data-ge-hidden-in carries the badge text\n * for the all view.\n */\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var kind = ge.kindOf(node);\n var carries = applies(node, kind) && CLASS_PATTERN.test(node.getAttribute('class') || '');\n var tiers = carries ? hiddenTiers(node) : [];\n var here = carries && hiddenHere(node);\n var partly = carries && ge.view() === 'all' && tiers.length > 0 && !here;\n\n node.removeAttribute(SHOWN_ATTR);\n if (carries && getComputedStyle(node).display === 'none') {\n node.setAttribute(SHOWN_ATTR, shownAs(node));\n }\n\n dom.toggleClass(node, 'ge-hidden-in-view', here);\n\n if (partly) {\n node.setAttribute('data-ge-hidden-in', ge.t('badge.hidden_in', { breakpoints: tiers.join(', ') }));\n } else {\n node.removeAttribute('data-ge-hidden-in');\n }\n\n dom.children(node, '.ge-tools-drawer').forEach(function(drawer) {\n dom.children(drawer, '.ge-visibility-tool').forEach(function(tool) {\n tool.setAttribute('title', here ? ge.t('tool.show_in_view') : ge.t('tool.hide_in_view'));\n dom.all(tool, 'i').forEach(function(icon) {\n icon.setAttribute('class', here ? 'bi bi-eye-slash' : 'bi bi-eye');\n });\n });\n });\n });\n }\n\n function unmark() {\n dom.all(ge.canvas, '.ge-hidden-in-view, [data-ge-hidden-in], [' + SHOWN_ATTR + ']').forEach(function(node) {\n dom.removeClass(node, 'ge-hidden-in-view');\n node.removeAttribute('data-ge-hidden-in');\n node.removeAttribute(SHOWN_ATTR);\n dom.dropEmptyClass(node);\n });\n }\n\n return {\n families: [{\n name: 'display',\n prefix: 'd',\n values: VALUES,\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: 'utility.display',\n\n choices: function(node, kind) {\n return choices(kind);\n },\n\n label: function(value) {\n return value === 'none' ? ge.t('utility.visibility_hidden') : value;\n },\n\n /**\n * What the view being edited displays the node as. Hidden is\n * shown the way the breakpoints below show it, since the canvas\n * keeps a hidden node, faded; with no class applying, it is what\n * the node is without any.\n */\n preview: function(value, node) {\n if (value === 'none') { value = shownBelow(node, ge.view()); }\n\n return { display: value === null ? ge.bareStyle(node, 'display', 'display') : value };\n },\n }],\n\n drawerTools: function(drawer, node, kind) {\n if (!options.drawer || !applies(node, kind)) { return; }\n\n ge.createTool(drawer, ge.t('tool.hide_in_view'), 'ge-visibility-tool', 'bi bi-eye', function() {\n toggle(node, kind);\n });\n },\n\n onRefresh: mark,\n onDeinit: unmark,\n };\n}\n", "/**\n * Flex, a part of the inline-style plugin: a flex container's direction, wrap,\n * alignment and gaps, and how its children grow, shrink and fill, per\n * breakpoint, with Bootstrap's flex-{breakpoint}-*, justify-content-*,\n * align-items-*, align-content-*, gap-* and row-/column-gap-* classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and the spacing options, whose scale the gaps share:\n * grideditor.inline-style.js puts them in its Flex section.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.flex_direction': 'Direction',\n 'utility.flex_wrap': 'Wrap',\n 'utility.justify_content': 'Justify columns',\n 'utility.align_items': 'Align columns',\n 'utility.align_content': 'Align lines',\n 'utility.gap': 'Gap',\n 'utility.row_gap': 'Row gap',\n 'utility.column_gap': 'Column gap',\n 'utility.flex_fill': 'Fill',\n 'utility.flex_grow': 'Grow',\n 'utility.flex_shrink': 'Shrink',\n});\n\n/** What Bootstrap's value names come to in css. */\nvar FLEX = {\n start: 'flex-start',\n end: 'flex-end',\n center: 'center',\n between: 'space-between',\n around: 'space-around',\n evenly: 'space-evenly',\n baseline: 'baseline',\n stretch: 'stretch',\n};\n\nvar GAPS = ['0', '1', '2', '3', '4', '5'];\n\n/** Bootstrap's $spacers. */\nvar SCALE = ['0', '.25rem', '.5rem', '1rem', '1.5rem', '3rem'];\n\n/** A flex container: a row is one already, and has its gutters for gaps. */\nvar CONTAINERS = ['row', 'column', 'element', 'container'];\n\n/** What sits in a flex container and can grow, shrink or fill it. */\nvar ITEMS = ['column', 'element', 'container'];\n\nexport function flexPart(ge, spacing) {\n\n var scale = (spacing && spacing.scale) || SCALE;\n\n /** A family whose preview is its one css property, the node's own without a class. */\n function family(definition) {\n var property = definition.property || definition.name;\n\n return Object.assign({\n prefix: definition.name,\n panel: false,\n preview: function(value, node) {\n var styles = {};\n styles[property] = value === null ? ge.bareStyle(node, definition.name, property) : definition.css(value);\n return styles;\n },\n }, definition);\n }\n\n /** An alignment family: its values are Bootstrap's names, and without a class it is normal. */\n function alignment(definition) {\n return family(Object.assign({\n appliesTo: CONTAINERS,\n preview: function(value) {\n var styles = {};\n styles[definition.name] = value === null ? 'normal' : FLEX[value];\n return styles;\n },\n }, definition));\n }\n\n function gap(definition) {\n return family(Object.assign({\n values: GAPS,\n appliesTo: ITEMS,\n css: function(value) { return scale[value]; },\n }, definition));\n }\n\n function same(value) {\n return value;\n }\n\n return {\n families: [\n family({\n name: 'flex-direction',\n prefix: 'flex',\n labelKey: 'utility.flex_direction',\n values: ['row', 'row-reverse', 'column', 'column-reverse'],\n appliesTo: CONTAINERS,\n css: same,\n }),\n family({\n name: 'flex-wrap',\n prefix: 'flex',\n labelKey: 'utility.flex_wrap',\n values: ['wrap', 'nowrap', 'wrap-reverse'],\n appliesTo: CONTAINERS,\n css: same,\n }),\n alignment({\n name: 'justify-content',\n labelKey: 'utility.justify_content',\n values: ['start', 'center', 'end', 'between', 'around', 'evenly'],\n }),\n alignment({\n name: 'align-items',\n labelKey: 'utility.align_items',\n values: ['start', 'center', 'end', 'baseline', 'stretch'],\n }),\n alignment({\n name: 'align-content',\n labelKey: 'utility.align_content',\n values: ['start', 'center', 'end', 'between', 'around', 'stretch'],\n }),\n gap({ name: 'gap', labelKey: 'utility.gap' }),\n gap({ name: 'row-gap', labelKey: 'utility.row_gap' }),\n gap({ name: 'column-gap', labelKey: 'utility.column_gap' }),\n family({\n name: 'flex-fill',\n prefix: 'flex',\n property: 'flex',\n labelKey: 'utility.flex_fill',\n values: ['fill'],\n appliesTo: ITEMS,\n css: function() { return '1 1 auto'; },\n }),\n family({\n name: 'flex-grow',\n prefix: 'flex',\n labelKey: 'utility.flex_grow',\n values: ['grow-0', 'grow-1'],\n appliesTo: ITEMS,\n css: function(value) { return value.slice(-1); },\n }),\n family({\n name: 'flex-shrink',\n prefix: 'flex',\n labelKey: 'utility.flex_shrink',\n values: ['shrink-0', 'shrink-1'],\n appliesTo: ITEMS,\n css: function(value) { return value.slice(-1); },\n }),\n ],\n };\n}\n", "/**\n * Float, a part of the inline-style plugin: floating an element per breakpoint, with Bootstrap's\n * float-{breakpoint}-start, -end and -none classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.float': 'Float',\n 'utility.float_start': 'Start',\n 'utility.float_end': 'End',\n 'utility.float_none': 'None',\n});\n\n/** Start and end are left and right: Bootstrap's css is left to right. */\nvar CSS = { start: 'left', end: 'right', none: 'none' };\n\nexport function floatPart(ge) {\n\n function label(value) {\n if (value === 'start') { return ge.t('utility.float_start'); }\n if (value === 'end') { return ge.t('utility.float_end'); }\n\n return ge.t('utility.float_none');\n }\n\n return {\n families: [{\n name: 'float',\n prefix: 'float',\n values: ['start', 'end', 'none'],\n appliesTo: ['element'],\n labelKey: 'utility.float',\n label: label,\n\n /** With no class applying here, whatever the host's css floats it as. */\n preview: function(value, node) {\n return { float: value === null ? ge.bareStyle(node, 'float', 'float') : CSS[value] };\n },\n }],\n };\n}\n", "/**\n * Sticky, a part of the inline-style plugin: sticking a node to the top or the\n * bottom of the page as it scrolls, per breakpoint, with Bootstrap's\n * sticky-{breakpoint}-top and -bottom classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.sticky': 'Sticky',\n});\n\n/** What Bootstrap's sticky-top and sticky-bottom are. */\nvar STUCK = {\n top: { position: 'sticky', top: '0', 'z-index': '1020' },\n bottom: { position: 'sticky', bottom: '0', 'z-index': '1020' },\n};\n\nexport function stickyPart(ge) {\n return {\n families: [{\n name: 'sticky',\n prefix: 'sticky',\n values: ['top', 'bottom'],\n appliesTo: ['row', 'column', 'element', 'container'],\n labelKey: 'utility.sticky',\n panel: false,\n\n /** With no class applying here, where the node is without one. */\n preview: function(value, node) {\n if (value !== null) { return STUCK[value]; }\n\n return { position: ge.bareStyle(node, 'sticky', 'position') };\n },\n }],\n };\n}\n", "/**\n * The drawer of a flex or grid node, a part of the inline-style plugin.\n *\n * A drawer is its node's first child, in the flow: in a row, which wraps,\n * it is a line of its own above the columns, but in anything else that\n * lays its children out - a column made flex, a row that does not wrap, a\n * grid - it would be one of the items, beside the content or in a cell of\n * its own. So on such a node the drawer leaves the flow: it sits on top, as\n * wide as the node, over a transparent top border as tall as it is, and\n * the content is laid out below as the page would lay it out.\n *\n * The node's own style is the host's, so what is written on it is an\n * attribute, and the border comes from a rule per height, here.\n */\nimport * as dom from '../dom.js';\n\nvar NODES = '.row, .column, .ge-element, [data-ge-container]';\nvar OUT_CLASS = 'ge-drawer-out';\nvar OUT_ATTR = 'data-ge-drawer-out';\n\n/** The space left between the drawer and the content, as the editor's frame leaves it. */\nvar GAP = 5;\n\nvar LAYS_OUT = /^(?:inline-)?(?:flex|grid)$/;\n\nexport function drawerflowPart(ge) {\n\n var sheet = null;\n var heights = {};\n var observer = null;\n\n /** The rule for a node whose drawer takes this much room. */\n function rule(room) {\n if (heights[room]) { return; }\n heights[room] = true;\n\n if (!sheet) {\n sheet = document.head.appendChild(dom.element('style', { 'data-ge-drawer-flow': '' }));\n }\n\n var node = '.ge-canvas.ge-editing [' + OUT_ATTR + '=\"' + room + '\"]';\n sheet.appendChild(document.createTextNode(\n node + ' { border-top-width: ' + room + 'px !important; }\\n' +\n node + ' > .ge-tools-drawer { top: -' + room + 'px; }\\n'\n ));\n }\n\n /** Whether the node lays its drawer out as an item of its own. */\n function laysOut(node) {\n var style = getComputedStyle(node);\n\n if (!LAYS_OUT.test(style.display)) { return false; }\n\n // A row as the grid has it: its drawer is a line of its own already\n return !(dom.hasClass(node, 'row') && style.flexDirection === 'row' && style.flexWrap === 'wrap');\n }\n\n function measure(node, drawer) {\n var room = Math.ceil(drawer.offsetHeight) + GAP;\n\n rule(room);\n node.setAttribute(OUT_ATTR, String(room));\n }\n\n /** A drawer that grows - its tools wrap, its settings unfold - takes more room. */\n function watch(drawer) {\n if (typeof ResizeObserver === 'undefined') { return; }\n\n if (!observer) {\n observer = new ResizeObserver(function(entries) {\n entries.forEach(function(entry) {\n var node = entry.target.parentNode;\n if (node && dom.hasClass(node, OUT_CLASS)) { measure(node, entry.target); }\n });\n });\n }\n observer.observe(drawer);\n }\n\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var drawer = dom.child(node, '.ge-tools-drawer');\n if (!drawer) { return; }\n\n if (laysOut(node)) {\n dom.addClass(node, OUT_CLASS);\n measure(node, drawer);\n watch(drawer);\n } else if (dom.hasClass(node, OUT_CLASS)) {\n dom.removeClass(node, OUT_CLASS);\n node.removeAttribute(OUT_ATTR);\n dom.dropEmptyClass(node);\n if (observer) { observer.unobserve(drawer); }\n }\n });\n }\n\n function unmark() {\n if (observer) { observer.disconnect(); }\n observer = null;\n\n dom.all(ge.canvas, '.' + OUT_CLASS).forEach(function(node) {\n dom.removeClass(node, OUT_CLASS);\n node.removeAttribute(OUT_ATTR);\n dom.dropEmptyClass(node);\n });\n\n if (sheet) { sheet.remove(); }\n sheet = null;\n heights = {};\n }\n\n return {\n families: [],\n onRefresh: mark,\n onDeinit: unmark,\n };\n}\n", "/**\n * What the inline-style plugin's sections are made of: for each, its inline\n * properties and the field each one gets, the Bootstrap 5.3 classes its\n * catalog offers, and which of the merged utility parts it shows.\n *\n * Data, and the few questions asked of it: which classes set a property,\n * which properties a kind of node is offered.\n */\n\nvar COLORS = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];\nvar SIDES = ['top', 'end', 'bottom', 'start'];\nvar OPACITIES = ['10', '25', '50', '75', '100'];\n\nfunction each(prefix, values, suffix) {\n return values.map(function(value) { return prefix + value + (suffix || ''); });\n}\n\n/**\n * A catalog group: the classes it offers and whether they exclude each\n * other, so choosing one takes the others off. `notOn` names the kinds of\n * node it is never offered on, `onlyOn` the only ones it is.\n */\nfunction group(classes, exclusive, notOn, onlyOn) {\n return { classes: classes, exclusive: exclusive !== false, notOn: notOn || [], onlyOn: onlyOn || null };\n}\n\n/**\n * A property's field. `type` is the widget: text for any css value, select\n * for a fixed list, color, url for background-image, shadow for\n * box-shadow and text-shadow. `notOn` names the kinds of node it is never\n * offered on.\n */\nfunction prop(name, options) {\n return {\n name: name,\n labelKey: options.labelKey,\n type: options.type || 'text',\n values: options.values || null,\n notOn: options.notOn || [],\n };\n}\n\nvar NOT_ON_COLUMN = ['column'];\n\n/** The image classes are for the markup an element holds. */\nvar ONLY_ON_ELEMENT = ['element'];\n\nexport var SECTIONS = [\n {\n key: 'size',\n labelKey: 'inline_style.section_size',\n properties: [\n prop('width', { labelKey: 'inline_style.prop_width', notOn: NOT_ON_COLUMN }),\n prop('height', { labelKey: 'inline_style.prop_height', notOn: NOT_ON_COLUMN }),\n prop('min-width', { labelKey: 'inline_style.prop_min_width' }),\n prop('min-height', { labelKey: 'inline_style.prop_min_height' }),\n prop('max-width', { labelKey: 'inline_style.prop_max_width' }),\n prop('max-height', { labelKey: 'inline_style.prop_max_height' }),\n ],\n catalog: [\n group(each('w-', ['25', '50', '75', '100', 'auto']), true, NOT_ON_COLUMN),\n group(each('h-', ['25', '50', '75', '100', 'auto']), true, NOT_ON_COLUMN),\n group(['mw-100', 'mh-100', 'vw-100', 'vh-100', 'min-vw-100', 'min-vh-100'], false, NOT_ON_COLUMN),\n group(['img-fluid', 'img-thumbnail'], false, [], ONLY_ON_ELEMENT),\n group(each('object-fit-', ['contain', 'cover', 'fill', 'scale', 'none']), true, [], ONLY_ON_ELEMENT),\n ],\n parts: [],\n },\n {\n key: 'spacing',\n labelKey: 'inline_style.section_spacing',\n properties: [\n prop('margin-top', { labelKey: 'inline_style.prop_margin_top' }), prop('margin-right', { labelKey: 'inline_style.prop_margin_right' }), prop('margin-bottom', { labelKey: 'inline_style.prop_margin_bottom' }), prop('margin-left', { labelKey: 'inline_style.prop_margin_left' }),\n prop('padding-top', { labelKey: 'inline_style.prop_padding_top' }), prop('padding-right', { labelKey: 'inline_style.prop_padding_right' }), prop('padding-bottom', { labelKey: 'inline_style.prop_padding_bottom' }), prop('padding-left', { labelKey: 'inline_style.prop_padding_left' }),\n ],\n catalog: [],\n parts: ['spacing'],\n },\n {\n key: 'border',\n labelKey: 'inline_style.section_border',\n properties: [\n prop('border-width', { labelKey: 'inline_style.prop_border_width' }),\n prop('border-style', { labelKey: 'inline_style.prop_border_style', type: 'select', values: ['none', 'solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset'] }),\n prop('border-color', { labelKey: 'inline_style.prop_border_color', type: 'color' }),\n prop('border-radius', { labelKey: 'inline_style.prop_border_radius' }),\n prop('box-shadow', { labelKey: 'inline_style.prop_box_shadow', type: 'shadow' }),\n ],\n catalog: [\n group(['border', 'border-0'].concat(each('border-', SIDES), each('border-', SIDES, '-0')), false),\n group(each('border-', ['1', '2', '3', '4', '5'])),\n group(each('border-', COLORS.concat(['black', 'white'])).concat(each('border-', COLORS, '-subtle'))),\n group(each('border-opacity-', OPACITIES)),\n group(['rounded'].concat(each('rounded-', ['0', '1', '2', '3', '4', '5', 'circle', 'pill']))),\n group(each('rounded-', SIDES), false),\n group(['shadow-none', 'shadow-sm', 'shadow', 'shadow-lg']),\n ],\n parts: [],\n },\n {\n key: 'background',\n labelKey: 'inline_style.section_background',\n properties: [\n prop('background-color', { labelKey: 'inline_style.prop_background_color', type: 'color' }),\n prop('background-image', { labelKey: 'inline_style.prop_background_image', type: 'url' }),\n prop('background-size', { labelKey: 'inline_style.prop_background_size' }),\n prop('background-position', { labelKey: 'inline_style.prop_background_position' }),\n prop('background-repeat', { labelKey: 'inline_style.prop_background_repeat', type: 'select', values: ['repeat', 'no-repeat', 'repeat-x', 'repeat-y', 'space', 'round'] }),\n ],\n catalog: [\n group(each('bg-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black', 'transparent']))\n .concat(each('bg-', COLORS, '-subtle'), each('text-bg-', COLORS))),\n group(['bg-gradient'], false),\n group(each('bg-opacity-', OPACITIES)),\n ],\n parts: [],\n },\n {\n key: 'text',\n labelKey: 'inline_style.section_text',\n properties: [\n prop('color', { labelKey: 'inline_style.prop_color', type: 'color' }),\n prop('font-size', { labelKey: 'inline_style.prop_font_size' }),\n prop('text-align', { labelKey: 'inline_style.prop_text_align', type: 'select', values: ['start', 'center', 'end', 'left', 'right', 'justify'] }),\n prop('text-shadow', { labelKey: 'inline_style.prop_text_shadow', type: 'shadow' }),\n ],\n catalog: [\n group(each('text-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black']))\n .concat(each('text-', COLORS, '-emphasis'), ['text-body-emphasis'])),\n group(each('text-opacity-', ['25', '50', '75', '100'])),\n group(each('fs-', ['1', '2', '3', '4', '5', '6'])),\n group(each('text-decoration-', ['none', 'underline', 'line-through'])),\n ],\n parts: ['textalign'],\n },\n {\n key: 'typography',\n labelKey: 'inline_style.section_typography',\n properties: [\n prop('font-family', { labelKey: 'inline_style.prop_font_family' }),\n prop('font-weight', { labelKey: 'inline_style.prop_font_weight', type: 'select', values: ['100', '200', '300', '400', '500', '600', '700', '800', '900', 'normal', 'bold', 'lighter', 'bolder'] }),\n prop('font-style', { labelKey: 'inline_style.prop_font_style', type: 'select', values: ['normal', 'italic', 'oblique'] }),\n prop('line-height', { labelKey: 'inline_style.prop_line_height' }),\n prop('letter-spacing', { labelKey: 'inline_style.prop_letter_spacing' }),\n prop('text-transform', { labelKey: 'inline_style.prop_text_transform', type: 'select', values: ['none', 'uppercase', 'lowercase', 'capitalize'] }),\n prop('text-decoration', { labelKey: 'inline_style.prop_text_decoration', type: 'select', values: ['none', 'underline', 'line-through', 'overline'] }),\n ],\n catalog: [\n group(each('fw-', ['lighter', 'light', 'normal', 'medium', 'semibold', 'bold', 'bolder'])),\n group(each('fst-', ['italic', 'normal'])),\n group(each('lh-', ['1', 'sm', 'base', 'lg'])),\n group(each('text-', ['lowercase', 'uppercase', 'capitalize'])),\n group(['font-monospace'], false),\n group(['text-wrap', 'text-nowrap']),\n group(['text-break'], false),\n ],\n parts: [],\n },\n {\n key: 'display',\n labelKey: 'inline_style.section_display',\n properties: [\n prop('display', { labelKey: 'inline_style.prop_display', type: 'select', values: ['none', 'block', 'inline', 'inline-block', 'flex', 'inline-flex', 'grid', 'inline-grid'] }),\n prop('opacity', { labelKey: 'inline_style.prop_opacity' }),\n prop('overflow', { labelKey: 'inline_style.prop_overflow', type: 'select', values: ['visible', 'hidden', 'auto', 'scroll', 'clip'] }),\n prop('visibility', { labelKey: 'inline_style.prop_visibility', type: 'select', values: ['visible', 'hidden'] }),\n ],\n catalog: [\n group(each('opacity-', ['0', '25', '50', '75', '100'])),\n group(each('overflow-', ['auto', 'hidden', 'visible', 'scroll'])),\n group(['visible', 'invisible']),\n ],\n parts: ['display'],\n },\n {\n key: 'flex',\n labelKey: 'inline_style.section_flex',\n properties: [],\n catalog: [\n group(['vstack', 'hstack'], true, ['row']),\n ],\n parts: ['flex'],\n },\n {\n key: 'position',\n labelKey: 'inline_style.section_position',\n properties: [\n prop('position', { labelKey: 'inline_style.prop_position', type: 'select', values: ['static', 'relative', 'absolute', 'fixed', 'sticky'] }),\n prop('top', { labelKey: 'inline_style.prop_top', notOn: NOT_ON_COLUMN }),\n prop('right', { labelKey: 'inline_style.prop_right', notOn: NOT_ON_COLUMN }),\n prop('bottom', { labelKey: 'inline_style.prop_bottom', notOn: NOT_ON_COLUMN }),\n prop('left', { labelKey: 'inline_style.prop_left', notOn: NOT_ON_COLUMN }),\n prop('z-index', { labelKey: 'inline_style.prop_z_index' }),\n ],\n catalog: [\n group(each('position-', ['static', 'relative', 'absolute', 'fixed', 'sticky'])),\n group(each('top-', ['0', '50', '100'])),\n group(each('bottom-', ['0', '50', '100'])),\n group(each('start-', ['0', '50', '100'])),\n group(each('end-', ['0', '50', '100'])),\n group(['translate-middle', 'translate-middle-x', 'translate-middle-y']),\n group(['z-n1', 'z-0', 'z-1', 'z-2', 'z-3']),\n group(['fixed-top', 'fixed-bottom']),\n ],\n parts: ['float', 'sticky'],\n },\n {\n key: 'custom',\n labelKey: 'inline_style.section_custom',\n properties: [],\n catalog: [],\n parts: [],\n custom: true,\n },\n];\n\nexport function section(key) {\n return SECTIONS.filter(function(each_) { return each_.key === key; })[0] || null;\n}\n\n/** Whether a property or a catalog group is offered on this kind of node. */\nexport function offeredOn(item, kind) {\n if (item.onlyOn && item.onlyOn.indexOf(kind) === -1) { return false; }\n\n return item.notOn.indexOf(kind) === -1;\n}\n\nvar BREAKPOINT = '(?:(?:sm|md|lg|xl|xxl)-)?';\nvar SPACER = '(?:[0-5]|auto)';\nvar COLOR = '(?:' + COLORS.join('|') + '|black|white)';\nvar BG = '(?:' + COLORS.join('|') + '|body|body-secondary|body-tertiary|white|black|transparent)';\nvar TEXT_COLOR = '(?:' + COLORS.join('|') + '|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)';\nvar BORDER = 'border(?:-(?:top|end|bottom|start))?(?:-0)?';\nvar SUBTLE = '(?:' + COLORS.join('|') + ')-subtle';\nvar EMPHASIS = '(?:' + COLORS.join('|') + '|body)-emphasis';\nvar TEXT_BG = 'text-bg-(?:' + COLORS.join('|') + ')';\nvar STICKY = 'sticky-' + BREAKPOINT;\n\nfunction spacing(key, side) {\n var sides = { top: '[ty]?', bottom: '[by]?', left: '[sx]?', right: '[ex]?' }[side];\n return new RegExp('^' + key + sides + '-' + BREAKPOINT + SPACER + '$');\n}\n\n/**\n * The Bootstrap classes that set each property. Every one of Bootstrap's\n * utilities is !important, so a node that carries one of them for a\n * property shows the class, whatever its inline style says.\n */\nvar SETS = {\n 'width': /^(?:w-(?:25|50|75|100|auto)|vw-100)$/,\n 'height': /^(?:h-(?:25|50|75|100|auto)|vh-100)$/,\n 'max-width': /^mw-100$/,\n 'max-height': /^mh-100$/,\n 'min-width': /^min-vw-100$/,\n 'min-height': /^min-vh-100$/,\n 'margin-top': spacing('m', 'top'),\n 'margin-right': spacing('m', 'right'),\n 'margin-bottom': spacing('m', 'bottom'),\n 'margin-left': spacing('m', 'left'),\n 'padding-top': spacing('p', 'top'),\n 'padding-right': spacing('p', 'right'),\n 'padding-bottom': spacing('p', 'bottom'),\n 'padding-left': spacing('p', 'left'),\n 'border-width': new RegExp('^(?:' + BORDER + '|border-[1-5])$'),\n 'border-style': new RegExp('^' + BORDER + '$'),\n 'border-color': new RegExp('^(?:' + BORDER + '|border-' + COLOR + '|border-' + SUBTLE + ')$'),\n 'border-radius': /^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,\n 'box-shadow': /^shadow(?:-(?:none|sm|lg))?$/,\n 'background-color': new RegExp('^(?:bg-' + BG + '|bg-' + SUBTLE + '|' + TEXT_BG + ')$'),\n 'background-image': /^bg-gradient$/,\n 'color': new RegExp('^(?:text-' + TEXT_COLOR + '|text-' + EMPHASIS + '|' + TEXT_BG + ')$'),\n 'font-size': /^fs-[1-6]$/,\n 'text-align': new RegExp('^text-' + BREAKPOINT + '(?:start|center|end)$'),\n 'text-decoration': /^text-decoration-(?:none|underline|line-through)$/,\n 'font-family': /^font-monospace$/,\n 'font-weight': /^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,\n 'font-style': /^fst-(?:italic|normal)$/,\n 'line-height': /^lh-(?:1|sm|base|lg)$/,\n 'text-transform': /^text-(?:lowercase|uppercase|capitalize)$/,\n 'display': new RegExp('^(?:d-' + BREAKPOINT + '(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$'),\n 'opacity': /^opacity-(?:0|25|50|75|100)$/,\n 'overflow': /^overflow-(?:auto|hidden|visible|scroll)$/,\n 'visibility': /^(?:visible|invisible)$/,\n 'position': new RegExp('^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|' + STICKY + '(?:top|bottom))$'),\n 'top': new RegExp('^(?:top-(?:0|50|100)|fixed-top|' + STICKY + 'top)$'),\n 'bottom': new RegExp('^(?:bottom-(?:0|50|100)|fixed-bottom|' + STICKY + 'bottom)$'),\n 'left': /^start-(?:0|50|100)$/,\n 'right': /^end-(?:0|50|100)$/,\n 'z-index': /^z-(?:n1|[0-3])$/,\n};\n\n/** The first of these classes that sets the property, or null. */\nexport function overriding(property, classes) {\n var pattern = SETS[property];\n if (!pattern) { return null; }\n\n return classes.filter(function(name) { return pattern.test(name); })[0] || null;\n}\n", "/**\n * The inline-style plugin's settings, `inline_style` in the editor's options:\n *\n * inline_style: {\n * sections: { border: { properties: [...], catalog: false }, position: false, \u2026 },\n * spacing: { values, scale }, // the values offered, and what 0 to 5 come to\n * visibility: { drawer }, // false leaves the eye out of the drawers\n * }\n *\n * Every section is on unless it is turned off.\n */\nimport { SECTIONS, section } from './sections.js';\n\n/**\n * What each section shows: { key: { properties, catalog } } for the ones\n * that are on, in the sections' own order.\n */\nfunction resolveSections(ge, given) {\n var resolved = {};\n\n Object.keys(given || {}).forEach(function(key) {\n if (!section(key)) { ge.warn('inline_style.sections: there is no \"' + key + '\" section: ignored'); }\n });\n\n SECTIONS.forEach(function(each) {\n var option = given && given[each.key] !== undefined ? given[each.key] : true;\n if (option === false) { return; }\n\n var own = each.properties.map(function(property) { return property.name; });\n var properties = each.properties;\n var catalog = true;\n\n if (option && typeof option === 'object') {\n if (Array.isArray(option.properties)) {\n option.properties.forEach(function(name) {\n if (own.indexOf(name) === -1) {\n ge.warn('inline_style.sections.' + each.key + ': \"' + name + '\" is not one of its properties: ignored');\n }\n });\n properties = option.properties.filter(function(name) { return own.indexOf(name) !== -1; })\n .map(function(name) { return each.properties[own.indexOf(name)]; });\n }\n if (option.catalog === false) { catalog = false; }\n }\n\n resolved[each.key] = { section: each, properties: properties, catalog: catalog };\n });\n\n return resolved;\n}\n\nexport function resolveOptions(ge) {\n var style = ge.settings.inline_style || {};\n\n return {\n sections: resolveSections(ge, style.sections),\n spacing: style.spacing,\n visibility: style.visibility,\n };\n}\n", "/**\n * The inline-style plugin's inline fields: one per css property, each writing the\n * node's own style through ge.setHostStyle, never by hand, so the preview\n * of a breakpoint view neither shows in them nor eats what they write.\n *\n * A field is filled from the node by renderStyleField, again whenever the\n * plugin asks: after a write elsewhere, after the classes change. A value\n * the browser refused stays in its field, marked invalid, until it is put\n * right or emptied; nothing is written meanwhile.\n */\nimport * as dom from '../dom.js';\nimport { overriding } from './sections.js';\n\nvar renderers = new WeakMap(); // field -> what fills it from the node\nvar fieldCounter = 0;\n\nfunction classesOf(node) {\n return (node.getAttribute('class') || '').split(/\\s+/).filter(Boolean);\n}\n\n/**\n * Write what the user typed: trimmed, with a trailing !important taken as\n * the priority. Without one, the property keeps the priority it had.\n */\nfunction write(ge, node, property, raw) {\n var text = String(raw === null || raw === undefined ? '' : raw).trim();\n var important = /\\s*!\\s*important\\s*$/i.exec(text);\n var priority;\n\n if (important) {\n text = text.slice(0, important.index).trim();\n priority = 'important';\n }\n\n return ge.setHostStyle(node, property, text, priority);\n}\n\nfunction mark(input, ok, ge) {\n dom.toggleClass(input, 'is-invalid', !ok);\n if (ok) {\n input.removeAttribute('title');\n } else {\n input.setAttribute('title', ge.t('inline_style.invalid'));\n }\n}\n\n/** Put a value in an input, unless it holds something refused that is still being put right. */\nfunction fill(input, value) {\n if (!dom.hasClass(input, 'is-invalid')) { input.value = value; }\n}\n\nfunction textInput(className) {\n return dom.element('input', { type: 'text', 'class': 'form-control form-control-sm ' + (className || '') });\n}\n\n/* Colors */\n\nvar HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/** What a color picker can show of a value: a six digit hex, or nothing. */\nfunction pickable(value) {\n var match = HEX.exec(value.trim());\n if (!match) { return null; }\n\n var hex = match[1];\n if (hex.length === 3) { hex = hex.split('').map(function(c) { return c + c; }).join(''); }\n\n return '#' + hex.toLowerCase();\n}\n\n/** A picker and a text beside it, which takes what a picker cannot: rgba, var(), transparent. */\nfunction colorControl(onValue) {\n var box = dom.element('div', { 'class': 'input-group input-group-sm ge-inline-style-color' });\n var picker = box.appendChild(dom.element('input', { type: 'color', 'class': 'form-control form-control-color' }));\n var text = box.appendChild(textInput());\n\n picker.addEventListener('input', function() {\n dom.removeClass(text, 'is-invalid');\n text.value = picker.value;\n onValue(picker.value, text);\n });\n text.addEventListener('change', function() {\n var hex = pickable(text.value);\n if (hex) { picker.value = hex; }\n onValue(text.value, text);\n });\n\n return {\n element: box,\n set: function(value) {\n fill(text, value);\n var hex = pickable(value);\n if (hex) { picker.value = hex; }\n },\n };\n}\n\n/* Background images */\n\nvar URL_VALUE = /^url\\(\\s*([\"']?)(.*)\\1\\s*\\)$/i;\n\n/** What the field shows of a background-image: the url itself, or the value as it is. */\nfunction shownUrl(value) {\n var match = URL_VALUE.exec(value.trim());\n if (!match) { return value; }\n\n return match[1] ? match[2].replace(/\\\\([\"\\\\])/g, '$1') : match[2];\n}\n\n/** A url becomes url(\"\u2026\"); a gradient, none or any other css function goes as it is. */\nfunction urlValue(text) {\n text = text.trim();\n if (text === '' || /^(?:none|inherit|initial|unset|revert)$/i.test(text) || /^[a-z-]+\\(/i.test(text)) { return text; }\n\n return 'url(\"' + text.replace(/([\"\\\\])/g, '\\\\$1') + '\")';\n}\n\n/* Shadows */\n\n/** Split at spaces and commas outside parentheses. */\nfunction tokens(value) {\n var list = [];\n var depth = 0;\n var current = '';\n\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n\n if (c === '(') { depth++; }\n if (c === ')') { depth--; }\n\n if (depth === 0 && (c === ' ' || c === ',')) {\n if (current) { list.push(current); }\n if (c === ',') { list.push(','); }\n current = '';\n } else {\n current += c;\n }\n }\n if (current) { list.push(current); }\n\n return list;\n}\n\nvar LENGTH = /^-?(?:\\d*\\.)?\\d+(?:[a-z%]+)?$/i;\n\n/** The lengths of a shadow, in the order css writes them; a text shadow has no spread. */\nvar SHADOW_PARTS = [\n { name: 'x', labelKey: 'inline_style.shadow_x' },\n { name: 'y', labelKey: 'inline_style.shadow_y' },\n { name: 'blur', labelKey: 'inline_style.shadow_blur' },\n { name: 'spread', labelKey: 'inline_style.shadow_spread' },\n];\n\n/**\n * One shadow as the builder's parts, or null when the value is something\n * the builder cannot hold: several shadows, var(), a keyword.\n */\nfunction parseShadow(value, box) {\n value = value.trim();\n if (value === '') { return { inset: false, lengths: [], color: '' }; }\n if (/var\\(/i.test(value)) { return null; }\n\n var list = tokens(value);\n if (list.indexOf(',') !== -1) { return null; }\n\n var inset = false;\n var lengths = [];\n var colors = [];\n\n list.forEach(function(token) {\n if (box && token.toLowerCase() === 'inset') {\n inset = true;\n } else if (LENGTH.test(token)) {\n lengths.push(token);\n } else {\n colors.push(token);\n }\n });\n\n if (colors.length > 1 || lengths.length < 2 || lengths.length > (box ? 4 : 3)) { return null; }\n if (colors.length && /^(?:none|inherit|initial|unset|revert)$/i.test(colors[0])) { return null; }\n\n return { inset: inset, lengths: lengths, color: colors[0] || '' };\n}\n\nfunction composeShadow(parts, box) {\n var lengths = parts.lengths.slice();\n\n // A later length needs the earlier ones: a spread needs a blur\n for (var i = lengths.length - 1; i >= 0; i--) {\n if (lengths[i] === '' && lengths.slice(i + 1).some(Boolean)) { lengths[i] = '0'; }\n }\n lengths = lengths.filter(Boolean);\n\n if (!lengths.length && !parts.color && !parts.inset) { return ''; }\n while (lengths.length < 2) { lengths.push('0'); }\n\n return (box && parts.inset ? 'inset ' : '') + lengths.join(' ') + (parts.color ? ' ' + parts.color : '');\n}\n\n/**\n * The shadow field: a builder for one shadow - x, y, blur, the spread and\n * inset for a box - and the value as text when it is more than the\n * builder holds, or when the user asks for the text.\n */\nfunction shadowControl(ge, node, property, changed) {\n var box = property === 'box-shadow';\n var holder = dom.element('div', { 'class': 'ge-inline-style-shadow' });\n var textMode = false;\n\n function writeValue(value, input) {\n var ok = write(ge, node, property, value);\n mark(input, ok, ge);\n if (ok) { changed(); }\n return ok;\n }\n\n function builder(parts) {\n holder.innerHTML = '';\n var grid = holder.appendChild(dom.element('div', { 'class': 'ge-inline-style-shadow-builder' }));\n var names = box ? SHADOW_PARTS : SHADOW_PARTS.slice(0, 3);\n var inputs = names.map(function(part, i) {\n var cell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part' }));\n cell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t(part.labelKey)));\n var input = cell.appendChild(textInput('ge-inline-style-shadow-' + part.name));\n input.value = parts.lengths[i] || '';\n return input;\n });\n\n var colorCell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part ge-inline-style-shadow-color' }));\n colorCell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t('inline_style.shadow_color')));\n var color = colorControl(function() { update(); });\n colorCell.appendChild(color.element);\n color.set(parts.color);\n\n var inset = null;\n if (box) {\n var insetCell = grid.appendChild(dom.element('label', { 'class': 'form-check ge-inline-style-shadow-inset' }));\n inset = insetCell.appendChild(dom.element('input', { type: 'checkbox', 'class': 'form-check-input' }));\n insetCell.appendChild(dom.element('span', { 'class': 'form-check-label' }, ge.t('inline_style.shadow_inset')));\n inset.checked = parts.inset;\n inset.addEventListener('change', function() { update(); });\n }\n\n inputs.forEach(function(input) { input.addEventListener('change', function() { update(); }); });\n\n var toText = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-inline-style-shadow-mode' }, ge.t('inline_style.shadow_text_mode')));\n toText.addEventListener('click', function(e) {\n e.preventDefault();\n textMode = true;\n render();\n });\n\n function update() {\n var value = composeShadow({\n inset: inset ? inset.checked : false,\n lengths: inputs.map(function(input) { return input.value.trim(); }),\n color: dom.one(color.element, 'input[type=\"text\"]').value.trim(),\n }, box);\n writeValue(value, inputs[0]);\n }\n }\n\n function text(value) {\n holder.innerHTML = '';\n var input = holder.appendChild(textInput('ge-inline-style-shadow-text'));\n input.value = value;\n input.addEventListener('change', function() {\n if (input.value.trim() === '') {\n if (writeValue('', input)) {\n textMode = false;\n render();\n }\n return;\n }\n writeValue(input.value, input);\n });\n\n // Back to the builder, when it can hold the value: one shadow, or none\n if (parseShadow(value, box)) {\n var toBuilder = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-inline-style-shadow-mode' }, ge.t('inline_style.shadow_builder_mode')));\n toBuilder.addEventListener('click', function(e) {\n e.preventDefault();\n textMode = false;\n render();\n });\n }\n }\n\n var shown = null; // The value the builder or the text was last built for\n\n function render() {\n if (holder.querySelector('.is-invalid')) { return; }\n\n var value = ge.hostStyle(node, property).value;\n var parts = parseShadow(value, box);\n\n // Built again only when the value changed under it: building takes\n // the focus from whichever of its inputs the user moved on to\n if (value === shown && holder.firstChild && textMode === !!holder.querySelector('.ge-inline-style-shadow-text')) { return; }\n shown = value;\n\n if (textMode || !parts) {\n textMode = !!value || textMode;\n text(value);\n } else {\n builder(parts);\n }\n }\n\n return { element: holder, render: render, value: function() { return ge.hostStyle(node, property).value; } };\n}\n\n/**\n * The field for one property of a node. `changed` is called after every\n * write that went through, so the plugin can bring the rest of its\n * sections up to date.\n */\nexport function createStyleField(ge, node, property, changed) {\n var field = dom.element('div', { 'class': 'ge-inline-style-field', 'data-ge-inline-style-property': property.name });\n var label = field.appendChild(dom.element('label', { 'class': 'ge-inline-style-label' }, ge.t(property.labelKey)));\n var render;\n\n function current() {\n return ge.hostStyle(node, property.name).value;\n }\n\n function commit(value, input) {\n var ok = write(ge, node, property.name, value);\n mark(input, ok, ge);\n if (ok) { changed(); }\n }\n\n if (property.type === 'select') {\n var select = field.appendChild(dom.element('select', { 'class': 'form-select form-select-sm' }));\n select.addEventListener('change', function() { commit(select.value, select); });\n render = function() {\n var value = current();\n var values = property.values.slice();\n if (value && values.indexOf(value) === -1) { values.push(value); }\n\n select.innerHTML = '';\n select.appendChild(dom.element('option', { value: '' }, ''));\n values.forEach(function(each) { select.appendChild(dom.element('option', { value: each }, each)); });\n select.value = value;\n };\n } else if (property.type === 'color') {\n var color = colorControl(function(value, input) { commit(value, input); });\n field.appendChild(color.element);\n render = function() { color.set(current()); };\n } else if (property.type === 'url') {\n var url = field.appendChild(textInput());\n url.addEventListener('change', function() { commit(urlValue(url.value), url); });\n render = function() { fill(url, shownUrl(current())); };\n } else if (property.type === 'shadow') {\n var shadow = shadowControl(ge, node, property.name, changed);\n field.appendChild(shadow.element);\n render = shadow.render;\n } else {\n var input = field.appendChild(textInput());\n input.addEventListener('change', function() { commit(input.value, input); });\n render = function() { fill(input, current()); };\n }\n\n var control = field.querySelector('input, select');\n if (control) {\n control.id = 'ge-inline-style-field-' + (++fieldCounter);\n label.setAttribute('for', control.id);\n }\n\n field.appendChild(dom.element('small', { 'class': 'ge-inline-style-note ge-inline-style-overridden' }));\n\n renderers.set(field, function() {\n render();\n\n // A Bootstrap utility on the node wins over the value: every one is !important\n var winner = current() ? overriding(property.name, classesOf(node)) : null;\n var note = dom.child(field, '.ge-inline-style-overridden');\n note.textContent = winner ? ge.t('inline_style.overridden', { 'class': winner }) : '';\n dom.toggle(note, !!winner);\n });\n renderStyleField(field);\n\n return field;\n}\n\n/** Fill a field from its node again. */\nexport function renderStyleField(field) {\n var render = renderers.get(field);\n if (render) { render(); }\n}\n", "/**\n * The inline-style plugin's catalog: Bootstrap's classes for what a section\n * styles, as chips that put a class on the node or take it off.\n *\n * A chip never touches the node itself. It writes the panel's classes\n * field and fires its change, as the user typing there would, so the\n * editor keeps the node's own classes apart from its editing ones, and the\n * Responsive section and the preview follow. Within an exclusive group,\n * choosing one class takes the others off.\n */\nimport * as dom from '../dom.js';\nimport { offeredOn } from './sections.js';\n\nfunction classesOf(node) {\n return (node.getAttribute('class') || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Put a class on or off through the node's classes field. */\nfunction choose(ge, node, group, name) {\n var details = ge.detailsOf(node);\n var input = details ? dom.one(details, '.ge-classes') : null;\n if (!input) { return; }\n\n var on = classesOf(node).indexOf(name) !== -1;\n var list = input.value.split(/\\s+/).filter(Boolean).filter(function(each) {\n if (each === name) { return false; }\n return !(group.exclusive && !on && group.classes.indexOf(each) !== -1);\n });\n\n if (!on) { list.push(name); }\n\n input.value = list.join(' ');\n input.dispatchEvent(new Event('change', { bubbles: true }));\n}\n\n/**\n * A section's catalog for a node, or null when none of its groups is\n * offered on this kind of node.\n */\nexport function createCatalog(ge, node, kind, groups) {\n var offered = groups.filter(function(group) { return offeredOn(group, kind); });\n if (!offered.length) { return null; }\n\n var box = dom.element('div', { 'class': 'ge-inline-style-catalog' });\n box.appendChild(dom.element('span', { 'class': 'ge-inline-style-label' }, ge.t('inline_style.catalog')));\n\n offered.forEach(function(group) {\n var row = box.appendChild(dom.element('div', { 'class': 'ge-inline-style-chips' }));\n\n group.classes.forEach(function(name) {\n var chip = row.appendChild(dom.element('button', {\n type: 'button',\n 'class': 'btn btn-sm btn-outline-secondary ge-inline-style-chip',\n 'data-ge-class': name,\n 'aria-pressed': 'false',\n }, name));\n\n chip.addEventListener('click', function() { choose(ge, node, group, name); });\n });\n });\n\n renderCatalog(box, node);\n\n return box;\n}\n\n/** A chip is pressed while its class is on the node. */\nexport function renderCatalog(box, node) {\n var classes = classesOf(node);\n\n dom.all(box, '.ge-inline-style-chip').forEach(function(chip) {\n var on = classes.indexOf(chip.getAttribute('data-ge-class')) !== -1;\n dom.toggleClass(chip, 'active', on);\n chip.setAttribute('aria-pressed', on ? 'true' : 'false');\n });\n}\n", "/**\n * The inline-style plugin's free css: a textarea with every declaration of the\n * node's own style that no field on show stands for - whatever the host\n * wrote that the sections have no field for, and what a section the host\n * turned off or narrowed would have shown.\n *\n * Compared longhand by longhand, which is how the browser holds a style: a\n * margin written as a shorthand is its four sides, and a field for\n * border-width stands for the four border-*-width. Editing the textarea\n * writes those declarations again; the browser drops what it cannot\n * parse, and the textarea shows what was kept.\n */\nimport * as dom from '../dom.js';\n\n/** The longhands a property sets, as the browser expands it. */\nfunction longhands(property) {\n var probe = document.createElement('div').style;\n var list = [];\n\n probe.setProperty(property, 'initial');\n for (var i = 0; i < probe.length; i++) { list.push(probe[i]); }\n\n return list.length ? list : [property];\n}\n\nfunction declaration(cssText) {\n var style = document.createElement('div').style;\n style.cssText = cssText;\n return style;\n}\n\n/** `properties` are the ones the node's fields on show stand for. */\nexport function createCustom(ge, node, properties, changed) {\n var covered = {};\n properties.forEach(function(property) {\n longhands(property).forEach(function(longhand) { covered[longhand] = true; });\n });\n\n var box = dom.element('div', { 'class': 'ge-inline-style-custom' });\n var textarea = box.appendChild(dom.element('textarea', {\n 'class': 'form-control form-control-sm font-monospace ge-inline-style-custom-css',\n rows: '4',\n spellcheck: 'false',\n 'aria-label': ge.t('inline_style.section_custom'),\n }));\n\n /** The declarations of the host's style no field stands for. */\n function free() {\n var style = declaration(ge.hostStyle(node));\n var rest = document.createElement('div').style;\n\n for (var i = 0; i < style.length; i++) {\n var name = style[i];\n if (!covered[name]) { rest.setProperty(name, style.getPropertyValue(name), style.getPropertyPriority(name)); }\n }\n\n return rest;\n }\n\n textarea.addEventListener('change', function() {\n var before = free();\n var wanted = declaration(textarea.value);\n var i;\n\n for (i = 0; i < before.length; i++) {\n if (wanted.getPropertyValue(before[i]) === '') { ge.setHostStyle(node, before[i], ''); }\n }\n for (i = 0; i < wanted.length; i++) {\n ge.setHostStyle(node, wanted[i], wanted.getPropertyValue(wanted[i]), wanted.getPropertyPriority(wanted[i]));\n }\n\n render();\n changed();\n });\n\n function render() {\n if (document.activeElement === textarea) { return; }\n textarea.value = free().cssText.replace(/; /g, ';\\n');\n }\n\n render();\n\n return { element: box, render: render };\n}\n", "/**\n * The inline-style plugin's accordion for one node: a section per group of\n * properties, each with the merged utilities' per breakpoint fields, the\n * inline fields and the catalog - as far as each applies to the node.\n *\n * Bootstrap's accordion markup, opened and closed here, so it needs none of\n * Bootstrap's javascript. One section is open at a time, and the one the\n * user opened last is open again on the next node's panel.\n */\nimport * as dom from '../dom.js';\nimport { offeredOn } from './sections.js';\nimport { createStyleField, renderStyleField } from './fields.js';\nimport { createCatalog, renderCatalog } from './catalog.js';\nimport { createCustom } from './custom.js';\n\n/** The kinds of node that take inline style: not a text, nor plain content. */\nexport function takesInlineStyle(node, kind) {\n if (kind === 'row' || kind === 'column' || kind === 'element' || kind === 'section') { return true; }\n if (dom.is(node, '[data-ge-container]')) { return true; }\n\n // A pane of a container, whatever its container calls it\n return !!dom.child(node, '.ge-tools-drawer.ge-pane-drawer');\n}\n\n/** Whether a merged family applies to the node, as the editor decides it. */\nfunction familyApplies(family, node, kind) {\n if (kind === 'plain') { kind = 'text'; }\n if (family.appliesTo.indexOf(kind) !== -1) { return true; }\n\n return family.appliesTo.indexOf('container') !== -1 && dom.is(node, '[data-ge-container]');\n}\n\n/**\n * What a merged part shows in its section for a node: the spacing part\n * its own panel, the others a field per family that applies to it - one,\n * or flex's eleven, together.\n */\nfunction partContent(ge, part, node, kind) {\n if (part.panel) { return part.panel(node, kind); }\n\n var fields = part.families.filter(function(family) {\n return familyApplies(family, node, kind);\n }).map(function(family) {\n return ge.utilityField(node, family.name);\n });\n\n if (fields.length < 2) { return fields[0] || null; }\n\n var box = dom.element('div', { 'class': 'ge-inline-style-part-fields' });\n fields.forEach(function(field) { box.appendChild(field); });\n\n return box;\n}\n\n/**\n * `context` is the plugin's: its resolved sections, its parts by name, the\n * state it keeps for the editor ({ open }) and `opened(key)`, called when\n * the user opens or closes a section.\n */\nexport function createAccordion(ge, node, kind, context) {\n var inline = takesInlineStyle(node, kind);\n var accordion = dom.element('div', { 'class': 'accordion ge-inline-style' });\n var fields = [];\n var catalogs = [];\n var notes = [];\n var custom = null;\n var customItem = null;\n var changed = function() { render(); };\n\n function item(key, labelKey) {\n var entry = accordion.appendChild(dom.element('div', { 'class': 'accordion-item', 'data-ge-inline-style-section': key }));\n var header = entry.appendChild(dom.element('h2', { 'class': 'accordion-header' }));\n var button = header.appendChild(dom.element('button', {\n type: 'button',\n 'class': 'accordion-button collapsed',\n 'aria-expanded': 'false',\n }, ge.t(labelKey)));\n var collapse = entry.appendChild(dom.element('div', { 'class': 'accordion-collapse collapse' }));\n var body = collapse.appendChild(dom.element('div', { 'class': 'accordion-body' }));\n\n button.addEventListener('click', function() {\n var opening = !dom.hasClass(collapse, 'show');\n context.state.open = opening ? key : null;\n // Every panel is built on init, so the others are told as well:\n // whoever opened Border on one node wants it on the next\n context.opened(context.state.open);\n });\n\n return { entry: entry, body: body };\n }\n\n function toggle(entry, shown) {\n dom.toggleClass(dom.one(entry, '.accordion-collapse'), 'show', shown);\n var button = dom.one(entry, '.accordion-button');\n dom.toggleClass(button, 'collapsed', !shown);\n button.setAttribute('aria-expanded', shown ? 'true' : 'false');\n }\n\n Object.keys(context.sections).forEach(function(key) {\n var resolved = context.sections[key];\n var section = resolved.section;\n\n if (section.custom) {\n if (inline) { customItem = item(key, section.labelKey); }\n return;\n }\n\n var parts = section.parts.map(function(name) {\n return context.parts[name] ? partContent(ge, context.parts[name], node, kind) : null;\n }).filter(Boolean);\n var properties = inline ? resolved.properties.filter(function(property) { return offeredOn(property, kind); }) : [];\n var catalog = inline && resolved.catalog ? createCatalog(ge, node, kind, section.catalog) : null;\n\n if (!parts.length && !properties.length && !catalog) { return; }\n\n var body = item(key, section.labelKey).body;\n parts.forEach(function(part) { body.appendChild(dom.addClass(part, 'ge-inline-style-part')); });\n\n if (properties.length) {\n var note = body.appendChild(dom.element('small', { 'class': 'ge-inline-style-note ge-inline-style-all-sizes' }, ge.t('inline_style.all_sizes')));\n notes.push(note);\n\n var grid = body.appendChild(dom.element('div', { 'class': 'ge-inline-style-fields' }));\n properties.forEach(function(property) {\n var field = createStyleField(ge, node, property, changed);\n fields.push(field);\n grid.appendChild(field);\n });\n }\n\n if (catalog) {\n catalogs.push(catalog);\n body.appendChild(catalog);\n }\n });\n\n // Last, since it shows what the fields made above do not\n if (customItem) {\n custom = createCustom(ge, node, fields.map(function(field) {\n return field.getAttribute('data-ge-inline-style-property');\n }), changed);\n customItem.body.appendChild(custom.element);\n accordion.appendChild(customItem.entry);\n }\n\n if (!accordion.children.length) { return null; }\n\n /** Open this section and no other; null closes them all. */\n function open(key) {\n dom.all(accordion, '.accordion-item').forEach(function(entry) {\n toggle(entry, entry.getAttribute('data-ge-inline-style-section') === key);\n });\n }\n\n open(context.state.open);\n\n /** Fill everything from the node again: after a write, a change of classes or view. */\n function render() {\n fields.forEach(renderStyleField);\n catalogs.forEach(function(catalog) { renderCatalog(catalog, node); });\n if (custom) { custom.render(); }\n notes.forEach(function(note) { dom.toggle(note, ge.view() !== 'all'); });\n }\n\n render();\n\n return { element: accordion, render: render, open: open };\n}\n", "/**\n * Inline style for grid-editor.\n *\n * A utility plugin: load this file after the editor and every row, column,\n * container, pane, element and section gets a Style accordion in its\n * settings panel - size, spacing, border, background, text, typography,\n * display, flex, position and free css - written to the node's own style\n * attribute, with Bootstrap's classes for each section as chips that put\n * them in the classes field. What it can ask the editor for is the handle\n * its factory is called with, described in docs/plugins.md.\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.inline-style.min.js\"></script>\n *\n * It also edits spacing, text alignment, display, flex, sticky and float,\n * Bootstrap's responsive classes, per breakpoint in its sections. On a node\n * that is flex or grid, the drawer leaves the flow, so the canvas lays the\n * content out as the page will.\n *\n * Where the settings panel has no room for it - a popover, inline in the\n * drawer - the accordion opens in a dialog, from a Style button.\n *\n * inline_style.sections chooses the sections, and in each the properties and\n * whether it has a catalog; inline_style.spacing is the options of spacing, whose\n * scale the gaps share, and inline_style.visibility those of the eye.\n */\nimport { GridEditor } from '../grideditor.js';\nimport { spacingPart } from '../inline-style/spacing.js';\nimport { textalignPart } from '../inline-style/textalign.js';\nimport { displayPart } from '../inline-style/display.js';\nimport { flexPart } from '../inline-style/flex.js';\nimport { floatPart } from '../inline-style/float.js';\nimport { stickyPart } from '../inline-style/sticky.js';\nimport { drawerflowPart } from '../inline-style/drawerflow.js';\nimport { resolveOptions } from '../inline-style/options.js';\nimport { createAccordion } from '../inline-style/accordion.js';\n\nObject.assign(GridEditor.locales.en, {\n 'inline_style.section_title': 'Style',\n 'inline_style.dialog_title': 'Style: {kind}',\n 'inline_style.section_size': 'Size',\n 'inline_style.section_spacing': 'Spacing',\n 'inline_style.section_border': 'Border',\n 'inline_style.section_background': 'Background',\n 'inline_style.section_text': 'Text',\n 'inline_style.section_typography': 'Typography',\n 'inline_style.section_display': 'Display',\n 'inline_style.section_flex': 'Flex',\n 'inline_style.section_position': 'Position',\n 'inline_style.section_custom': 'Custom css',\n 'inline_style.all_sizes': 'Applies to every size',\n 'inline_style.overridden': 'The class {class} takes priority over this value',\n 'inline_style.invalid': 'Not a value this property takes',\n 'inline_style.catalog': 'Bootstrap classes',\n 'inline_style.shadow_x': 'X',\n 'inline_style.shadow_y': 'Y',\n 'inline_style.shadow_blur': 'Blur',\n 'inline_style.shadow_spread': 'Spread',\n 'inline_style.shadow_color': 'Color',\n 'inline_style.shadow_inset': 'Inset',\n 'inline_style.shadow_text_mode': 'Edit as text',\n 'inline_style.shadow_builder_mode': 'Edit with the builder',\n 'inline_style.prop_width': 'Width',\n 'inline_style.prop_height': 'Height',\n 'inline_style.prop_min_width': 'Min width',\n 'inline_style.prop_min_height': 'Min height',\n 'inline_style.prop_max_width': 'Max width',\n 'inline_style.prop_max_height': 'Max height',\n 'inline_style.prop_margin_top': 'Margin top',\n 'inline_style.prop_margin_right': 'Margin right',\n 'inline_style.prop_margin_bottom': 'Margin bottom',\n 'inline_style.prop_margin_left': 'Margin left',\n 'inline_style.prop_padding_top': 'Padding top',\n 'inline_style.prop_padding_right': 'Padding right',\n 'inline_style.prop_padding_bottom': 'Padding bottom',\n 'inline_style.prop_padding_left': 'Padding left',\n 'inline_style.prop_border_width': 'Border width',\n 'inline_style.prop_border_style': 'Border style',\n 'inline_style.prop_border_color': 'Border color',\n 'inline_style.prop_border_radius': 'Border radius',\n 'inline_style.prop_box_shadow': 'Shadow',\n 'inline_style.prop_background_color': 'Background color',\n 'inline_style.prop_background_image': 'Background image',\n 'inline_style.prop_background_size': 'Background size',\n 'inline_style.prop_background_position': 'Background position',\n 'inline_style.prop_background_repeat': 'Background repeat',\n 'inline_style.prop_color': 'Color',\n 'inline_style.prop_font_size': 'Font size',\n 'inline_style.prop_text_align': 'Text align',\n 'inline_style.prop_text_shadow': 'Text shadow',\n 'inline_style.prop_font_family': 'Font family',\n 'inline_style.prop_font_weight': 'Font weight',\n 'inline_style.prop_font_style': 'Font style',\n 'inline_style.prop_line_height': 'Line height',\n 'inline_style.prop_letter_spacing': 'Letter spacing',\n 'inline_style.prop_text_transform': 'Text transform',\n 'inline_style.prop_text_decoration': 'Text decoration',\n 'inline_style.prop_display': 'Display',\n 'inline_style.prop_opacity': 'Opacity',\n 'inline_style.prop_overflow': 'Overflow',\n 'inline_style.prop_visibility': 'Visibility',\n 'inline_style.prop_position': 'Position',\n 'inline_style.prop_top': 'Top',\n 'inline_style.prop_right': 'Right',\n 'inline_style.prop_bottom': 'Bottom',\n 'inline_style.prop_left': 'Left',\n 'inline_style.prop_z_index': 'Z-index',\n});\n\n// The drawer's part last: it asks the browser how the others left the node\nvar PARTS = ['spacing', 'textalign', 'display', 'flex', 'float', 'sticky', 'drawerflow'];\n\nGridEditor.utilities['inline-style'] = function(ge) {\n\n var options = resolveOptions(ge);\n var parts = {\n spacing: spacingPart(ge, options.spacing),\n textalign: textalignPart(ge),\n display: displayPart(ge, options.visibility),\n flex: flexPart(ge, options.spacing),\n float: floatPart(ge),\n sticky: stickyPart(ge),\n drawerflow: drawerflowPart(ge),\n };\n var accordions = []; // { node, accordion } for every panel built since the last init\n var context = {\n sections: options.sections,\n parts: parts,\n state: { open: null },\n opened: function(key) {\n accordions.forEach(function(entry) { entry.accordion.open(key); });\n },\n };\n\n /** Every part's hook, called in turn. */\n function each(hook) {\n return function() {\n var args = arguments;\n PARTS.forEach(function(name) {\n if (parts[name][hook]) { parts[name][hook].apply(null, args); }\n });\n };\n }\n\n var partsRefresh = each('onRefresh');\n\n return {\n // The parts' families, edited in the sections rather than in Responsive\n families: PARTS.reduce(function(all, name) {\n return all.concat(parts[name].families.map(function(family) {\n return Object.assign({}, family, { panel: false });\n }));\n }, []),\n\n panelSection: function(node, kind) {\n var accordion = createAccordion(ge, node, kind, context);\n if (!accordion) { return null; }\n\n accordions.push({ node: node, accordion: accordion });\n\n return { labelKey: 'inline_style.section_title', titleKey: 'inline_style.dialog_title', body: accordion.element };\n },\n\n preview: function(node, kind, breakpoint) {\n return parts.spacing.preview(node, kind, breakpoint);\n },\n\n // After a write, a change of classes or of view: the accordions of\n // the nodes it touched follow\n onRefresh: function(scope) {\n partsRefresh(scope);\n\n accordions = accordions.filter(function(entry) { return entry.accordion.element.isConnected; });\n accordions.forEach(function(entry) {\n if (entry.node === scope || scope.contains(entry.node)) { entry.accordion.render(); }\n });\n },\n\n drawerTools: each('drawerTools'),\n\n onDeinit: function() {\n each('onDeinit')();\n accordions = [];\n },\n };\n};\n"],
|
|
5
|
-
"mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECCvC,SAASC,EAAIC,EAAMC,EAAU,CAChC,OAAOD,EAAO,MAAM,UAAU,MAAM,KAAKA,EAAK,iBAAiBC,CAAQ,CAAC,EAAI,CAAC,CACjF,CAGO,SAASC,EAAIF,EAAMC,EAAU,CAChC,OAAOD,EAAOA,EAAK,cAAcC,CAAQ,EAAI,IACjD,CAGO,SAASE,EAAWH,EAAMC,EAAU,CACvC,GAAI,CAACD,EAAQ,MAAO,CAAC,EAErB,IAAII,EAAQL,EAAIC,EAAMC,CAAQ,EAC9B,OAAID,EAAK,WAAa,GAAKA,EAAK,QAAQC,CAAQ,GAAKG,EAAM,QAAQJ,CAAI,EAChEI,CACX,CAGO,SAASC,EAASC,EAAML,EAAU,CACrC,OAAKK,EAEE,MAAM,UAAU,OAAO,KAAKA,EAAK,SAAU,SAASC,EAAM,CAC7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AE,SAAU,6BAA8B,SAAU,4BAA6B,KAAMA,EAAU,OAAQ,GAJvF,IAK7B,EAEA,QAAS,SAASF,EAAMC,EAAMG,EAAY,CACtC,OAAOvB,EAAM,QAAQ,QAAQmB,EAAMC,EAAMG,CAAU,CACvD,EAIA,UAAW,SAASC,EAAO,CACvBR,EAAaQ,CAAK,EAElBhB,EAAaA,EAAW,OAAO,SAASG,EAAO,CAAE,OAAOA,EAAM,UAAU,QAAQ,WAAa,CAAC,EAC9FH,EAAW,QAAQ,SAASG,EAAO,EAC3BA,EAAM,OAASa,GAASA,EAAM,SAASb,EAAM,IAAI,IAAKA,EAAM,UAAU,OAAO,CACrF,CAAC,CACL,EAEA,YAAaC,EAAK,aAAa,EAE/B,SAAU,UAAW,CACjBA,EAAK,UAAU,EAAE,EACjBJ,EAAa,CAAC,CAClB,CACJ,CACJ",
|
|
6
|
-
"names": ["GridEditor", "all", "root", "selector", "one", "selfAndAll", "found", "children", "node", "each", "child", "is", "node", "selector", "element", "tag", "attributes", "text", "node", "name", "value", "addClass", "node", "names", "split", "name", "removeClass", "toggleClass", "state", "hasClass", "dropEmptyClass", "css", "node", "styles", "property", "value", "UNITLESS", "defaultDisplays", "defaultDisplay", "tag", "probe", "show", "hide", "toggle", "state", "visible", "GridEditor", "VALUES", "SCALE", "SIDES", "SET", "INFIXES", "PROPERTIES", "pattern", "key", "spacingPart", "ge", "given", "options", "patterns", "applies", "node", "kind", "is", "classes", "carries", "name", "source", "family", "tier", "names", "values", "i", "v", "without", "original", "style", "bare", "side", "sides", "breakpoint", "winners", "styles", "neutral", "order", "found", "set", "current", "winner", "startingSide", "sideLabel", "group", "labelText", "box", "element", "value", "field", "next", "NODES", "mark", "scope", "selfAndAll", "drawer", "child", "css", "hasClass", "padded", "all", "note", "toggle", "families", "labelKey", "offered", "GridEditor", "CSS", "textalignPart", "ge", "label", "value", "node", "GridEditor", "VALUES", "CLASS_PATTERN", "NONE_PATTERN", "NODES", "SHOWN_ATTR", "displayPart", "ge", "given", "options", "choices", "kind", "shownByDefault", "applies", "node", "is", "hiddenAt", "view", "hiddenTiers", "key", "hiddenHere", "hiddenBelow", "index", "shownBelow", "i", "value", "toggle", "hide", "shownAs", "original", "name", "display", "mark", "scope", "selfAndAll", "carries", "tiers", "here", "partly", "toggleClass", "children", "drawer", "tool", "all", "icon", "unmark", "removeClass", "dropEmptyClass", "GridEditor", "FLEX", "GAPS", "SCALE", "CONTAINERS", "ITEMS", "flexPart", "ge", "spacing", "scale", "family", "definition", "property", "value", "node", "styles", "alignment", "gap", "same", "GridEditor", "CSS", "floatPart", "ge", "label", "value", "node", "GridEditor", "STUCK", "stickyPart", "ge", "value", "node", "NODES", "OUT_CLASS", "OUT_ATTR", "GAP", "LAYS_OUT", "drawerflowPart", "ge", "sheet", "heights", "observer", "rule", "room", "element", "node", "laysOut", "style", "hasClass", "measure", "drawer", "watch", "entries", "entry", "mark", "scope", "selfAndAll", "child", "addClass", "removeClass", "dropEmptyClass", "
|
|
4
|
+
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The DOM, the way grid-editor uses it.\n *\n * Small helpers over the browser's own API, for the core and the shipped\n * plugins. Not a public API: a plugin of a host's own is free to write its\n * DOM code however it likes, and this file makes no promise to it.\n *\n * Stateless on purpose. The build puts a copy of this file in each plugin's\n * classic script, so anything kept here would be kept once per copy; a\n * module that needs to remember something about a node keeps its own\n * WeakMap.\n */\n\n/** Every element under `root` matching `selector`, as an array. */\nexport function all(root, selector) {\n return root ? Array.prototype.slice.call(root.querySelectorAll(selector)) : [];\n}\n\n/** The first element under `root` matching `selector`, or null. */\nexport function one(root, selector) {\n return root ? root.querySelector(selector) : null;\n}\n\n/** `root` itself when it matches, then every element under it that does. */\nexport function selfAndAll(root, selector) {\n if (!root) { return []; }\n\n var found = all(root, selector);\n if (root.nodeType === 1 && root.matches(selector)) { found.unshift(root); }\n return found;\n}\n\n/** The element children of `node`, those matching `selector` if one is given. */\nexport function children(node, selector) {\n if (!node) { return []; }\n\n return Array.prototype.filter.call(node.children, function(each) {\n return !selector || each.matches(selector);\n });\n}\n\n/** The first element child matching `selector`, or null. */\nexport function child(node, selector) {\n return children(node, selector)[0] || null;\n}\n\n/** The nearest ancestor-or-self matching `selector` below `stopAt`, or null. */\nexport function closest(node, selector, stopAt) {\n var found = node && node.nodeType === 1 ? node.closest(selector) : null;\n\n if (found && stopAt && found !== stopAt && !stopAt.contains(found)) { return null; }\n return found;\n}\n\n/** Whether `node` is an element matching `selector`. */\nexport function is(node, selector) {\n return !!node && node.nodeType === 1 && node.matches(selector);\n}\n\n/** Whether `node` is in the document. */\nexport function attached(node) {\n return !!node && document.documentElement.contains(node);\n}\n\n/** The element siblings after `node` that match `selector`. */\nexport function nextAll(node, selector) {\n var found = [];\n\n for (var next = node.nextElementSibling; next; next = next.nextElementSibling) {\n if (!selector || next.matches(selector)) { found.push(next); }\n }\n return found;\n}\n\n/** The ancestors of `node` up to, and not including, `stop`, nearest first. */\nexport function parentsUntil(node, stop) {\n var found = [];\n\n for (var parent = node.parentElement; parent && parent !== stop; parent = parent.parentElement) {\n found.push(parent);\n }\n return found;\n}\n\n/**\n * The nodes the html parses into, detached. Parsed the way innerHTML parses,\n * so a <script> in it never runs, here or once it is in the page.\n */\nexport function parse(html) {\n var template = document.createElement('template');\n template.innerHTML = html;\n return Array.prototype.slice.call(template.content.childNodes);\n}\n\n/** The one element the html is, detached. */\nexport function create(html) {\n var nodes = parse(html.trim());\n\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].nodeType === 1) { return nodes[i]; }\n }\n return null;\n}\n\n/** An element of `tag`, with `attributes` and `text`. */\nexport function element(tag, attributes, text) {\n var node = document.createElement(tag);\n\n Object.keys(attributes || {}).forEach(function(name) {\n var value = attributes[name];\n if (value !== null && value !== undefined && value !== false) { node.setAttribute(name, value); }\n });\n if (text !== undefined && text !== null) { node.textContent = text; }\n\n return node;\n}\n\n/** Replace what `node` holds with `html`. A <script> in it does not run. */\nexport function setHtml(node, html) {\n node.innerHTML = html === undefined || html === null ? '' : String(html);\n return node;\n}\n\n/** Add one or several space separated classes. */\nexport function addClass(node, names) {\n split(names).forEach(function(name) { node.classList.add(name); });\n return node;\n}\n\nexport function removeClass(node, names) {\n split(names).forEach(function(name) { node.classList.remove(name); });\n return node;\n}\n\n/** Each class on, or off, or flipped when `on` is not given. */\nexport function toggleClass(node, names, state) {\n split(names).forEach(function(name) {\n if (state === undefined) {\n node.classList.toggle(name);\n } else {\n node.classList.toggle(name, !!state);\n }\n });\n return node;\n}\n\nexport function hasClass(node, name) {\n return !!node && node.nodeType === 1 && node.classList.contains(name);\n}\n\nfunction split(names) {\n return String(names || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Take the class attribute off when there is nothing left in it. */\nexport function dropEmptyClass(node) {\n if (!node.getAttribute('class')) { node.removeAttribute('class'); }\n return node;\n}\n\n/** Take the style attribute off when there is nothing left in it. */\nexport function dropEmptyStyle(node) {\n if (!node.getAttribute('style')) { node.removeAttribute('style'); }\n return node;\n}\n\n/** Set attributes; a null or undefined value takes the attribute off. */\nexport function attr(node, attributes) {\n Object.keys(attributes).forEach(function(name) {\n var value = attributes[name];\n\n if (value === null || value === undefined) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, value);\n }\n });\n return node;\n}\n\n/**\n * Inline styles, by css property name. A number is pixels for the properties\n * that take a length, as jQuery had it; an empty string takes one off.\n */\nexport function css(node, styles) {\n Object.keys(styles).forEach(function(property) {\n var value = styles[property];\n\n if (typeof value === 'number' && !UNITLESS[property]) { value = value + 'px'; }\n node.style.setProperty(property, value === null || value === undefined ? '' : String(value));\n });\n return node;\n}\n\nvar UNITLESS = { opacity: true, 'z-index': true, 'flex-grow': true, 'flex-shrink': true, order: true };\n\n/** What an element of this tag shows as when nothing hides it. */\nvar defaultDisplays = {};\n\nfunction defaultDisplay(node) {\n var tag = node.nodeName;\n\n if (!defaultDisplays[tag]) {\n var probe = document.body.appendChild(document.createElement(tag));\n defaultDisplays[tag] = getComputedStyle(probe).display;\n probe.remove();\n if (defaultDisplays[tag] === 'none') { defaultDisplays[tag] = 'block'; }\n }\n return defaultDisplays[tag];\n}\n\n/** Show a node: its inline display:none off, and a display of its own if a stylesheet hides it. */\nexport function show(node) {\n node.style.removeProperty('display');\n if (getComputedStyle(node).display === 'none') { node.style.display = defaultDisplay(node); }\n return node;\n}\n\nexport function hide(node) {\n node.style.display = 'none';\n return node;\n}\n\n/** Show or hide; flip when `on` is not given. */\nexport function toggle(node, state) {\n if (state === undefined) { state = !visible(node); }\n return state ? show(node) : hide(node);\n}\n\n/** Whether a node takes up room: what jQuery's :visible meant. */\nexport function visible(node) {\n return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);\n}\n\n/** The border box's width, fractions included. */\nexport function outerWidth(node) {\n return node.getBoundingClientRect().width;\n}\n\nexport function outerHeight(node) {\n return node.getBoundingClientRect().height;\n}\n\n/** The content box's height, which is what jQuery's height() gave. */\nexport function contentHeight(node) {\n var style = getComputedStyle(node);\n return node.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);\n}\n\n/** Where a node is on the page, not in the window. */\nexport function offset(node) {\n var box = node.getBoundingClientRect();\n return { top: box.top + window.pageYOffset, left: box.left + window.pageXOffset };\n}\n\n/** Its index among its parent's element children, those matching `selector` if given. */\nexport function indexIn(node, selector) {\n return children(node.parentElement, selector).indexOf(node);\n}\n\n/** Put `node` right after `reference`. */\nexport function insertAfter(node, reference) {\n reference.parentNode.insertBefore(node, reference.nextSibling);\n return node;\n}\n\n/** Replace `node` with what it holds. */\nexport function unwrap(node) {\n var parent = node.parentNode;\n\n while (node.firstChild) { parent.insertBefore(node.firstChild, node); }\n node.remove();\n}\n\n/** Put `node` inside `wrapper`, where `node` was. */\nexport function wrap(node, wrapper) {\n node.parentNode.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n return wrapper;\n}\n\n/**\n * Listen on `root` for `types` (space separated) on descendants that match\n * `selector`, with `this` the matched element, as jQuery's delegated\n * handlers had it. Hands back the listener, for removeEventListener; a\n * signal in `options` removes it too.\n */\nexport function delegate(root, types, selector, handler, options) {\n var listener = function(event) {\n var match = closest(event.target, selector, root);\n if (match && root.contains(match)) { return handler.call(match, event); }\n return undefined;\n };\n\n split(types).forEach(function(type) { root.addEventListener(type, listener, options); });\n return listener;\n}\n\n/** Listen for several space separated event types with one handler. */\nexport function on(target, types, handler, options) {\n split(types).forEach(function(type) { target.addEventListener(type, handler, options); });\n return handler;\n}\n\nexport function off(target, types, handler, options) {\n split(types).forEach(function(type) { target.removeEventListener(type, handler, options); });\n}\n\n/** A mouse event of `type` sent to `node`, the way a pointer would. */\nexport function fire(node, type) {\n node.dispatchEvent(new MouseEvent(type, { bubbles: type !== 'mouseenter' && type !== 'mouseleave' }));\n}\n\n/* ------------------------------------------------------------------\n * Taking a node away, visibly.\n *\n * The durations are jQuery's: 400 ms unless the caller says otherwise. `done` runs once the node is out of sight, which is\n * when the caller removes it; a node that is already out of sight is done at\n * once, on the next task, as jQuery had it.\n * ------------------------------------------------------------------ */\n\nvar DEFAULT_DURATION = 400;\n\nfunction animateAway(node, frames, duration, done) {\n duration = duration === undefined ? DEFAULT_DURATION : duration;\n\n var finish = function() {\n hide(node);\n if (done) { done(); }\n };\n\n if (!visible(node) || !node.animate || duration <= 0) {\n window.setTimeout(finish, 0);\n return;\n }\n\n var animation = node.animate(frames(getComputedStyle(node)), {\n duration: duration,\n easing: 'ease-in-out',\n });\n var called = false;\n var once = function() {\n if (called) { return; }\n called = true;\n finish();\n };\n\n animation.onfinish = once;\n animation.oncancel = once;\n}\n\n/** Fold a node up to nothing, then hide it. */\nexport function slideUp(node, duration, done) {\n if (typeof duration === 'function') {\n done = duration;\n duration = undefined;\n }\n\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n return [\n {\n height: style.height,\n paddingTop: style.paddingTop,\n paddingBottom: style.paddingBottom,\n marginTop: style.marginTop,\n marginBottom: style.marginBottom,\n },\n { height: '0px', paddingTop: '0px', paddingBottom: '0px', marginTop: '0px', marginBottom: '0px' },\n ];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n\n/** Fade a node out, then hide it. */\nexport function fadeOut(node, duration, done) {\n animateAway(node, function(style) {\n return [{ opacity: style.opacity }, { opacity: 0 }];\n }, duration, done);\n}\n\n/** Fade and fold a node, in height and, with `width`, sideways too, then hide it. */\nexport function shrinkAway(node, duration, done, width) {\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n var from = { opacity: style.opacity, height: style.height };\n var to = { opacity: 0, height: '0px' };\n\n if (width) {\n from.width = style.width;\n to.width = '0px';\n }\n return [from, to];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n", "/**\n * Spacing, a part of the inline-style plugin: padding and margin per breakpoint, with Bootstrap's p-{breakpoint}-*,\n * pt-, px- \u2026 and m-{breakpoint}-*, mt-, mx- \u2026 classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and its options: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.padding': 'Padding',\n 'utility.margin': 'Margin',\n 'utility.side_all': 'All sides',\n 'utility.side_x': 'Left and right',\n 'utility.side_y': 'Top and bottom',\n 'utility.side_t': 'Top',\n 'utility.side_b': 'Bottom',\n 'utility.side_s': 'Start',\n 'utility.side_e': 'End',\n 'utility.spacing_gutter': 'A column\\'s side padding is its gutter: changing it changes the gutter',\n});\n\nvar VALUES = ['0', '1', '2', '3', '4', '5'];\n\n/** Bootstrap's $spacers. */\nvar SCALE = ['0', '.25rem', '.5rem', '1rem', '1.5rem', '3rem'];\n\n/**\n * The sides, in the order Bootstrap's css writes their rules: within one\n * breakpoint a later rule wins, so p-3 pt-1 has a top of .25rem.\n */\nvar SIDES = ['', 'x', 'y', 't', 'e', 'b', 's'];\n\n/** What each side sets. Start and end are left and right: Bootstrap's css is left to right. */\nvar SET = {\n '': ['top', 'right', 'bottom', 'left'],\n x: ['left', 'right'],\n y: ['top', 'bottom'],\n t: ['top'],\n e: ['right'],\n b: ['bottom'],\n s: ['left'],\n};\n\nvar INFIXES = ['', 'sm', 'md', 'lg', 'xl', 'xxl'];\n\nvar PROPERTIES = { p: 'padding', m: 'margin' };\n\n/** Every class of the plugin's, padding or margin. */\nfunction pattern(key) {\n return new RegExp('^' + key + '[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$');\n}\n\nexport function spacingPart(ge, given) {\n\n var options = Object.assign({ values: VALUES, scale: SCALE }, given);\n var patterns = { p: pattern('p'), m: pattern('m') };\n\n function applies(node, kind) {\n return kind === 'row' || kind === 'column' || kind === 'element' ||\n dom.is(node, '[data-ge-container]');\n }\n\n function classes(node) {\n return (node.getAttribute('class') || '').split(/\\s+/);\n }\n\n function carries(node, key) {\n return classes(node).some(function(name) { return patterns[key].test(name); });\n }\n\n /**\n * The class of one family that decides a side at a breakpoint: the\n * widest breakpoint up to it that has one, as { tier, value }.\n */\n function source(node, family, tier) {\n var names = classes(node);\n var values = family.charAt(0) === 'm' ? VALUES.concat(['auto']) : VALUES;\n\n for (var i = tier; i >= 0; i--) {\n for (var v = 0; v < values.length; v++) {\n var name = family + (INFIXES[i] ? '-' + INFIXES[i] : '') + '-' + values[v];\n if (names.indexOf(name) !== -1) { return { tier: i, value: values[v] }; }\n }\n }\n\n return null;\n }\n\n /**\n * What padding or margin is on each side with none of the plugin's\n * classes: the editor's frame for a row or a column, the host's css\n * for anything else. Read by taking the classes off for a moment,\n * since that is the only way to ask the browser.\n */\n function without(node, key) {\n var original = node.getAttribute('class');\n var style;\n var bare = {};\n\n node.setAttribute('class', classes(node).filter(function(name) { return !patterns[key].test(name); }).join(' '));\n style = getComputedStyle(node);\n ['top', 'right', 'bottom', 'left'].forEach(function(side) {\n bare[side] = style.getPropertyValue(PROPERTIES[key] + '-' + side);\n });\n if (original === null) { node.removeAttribute('class'); } else { node.setAttribute('class', original); }\n\n return bare;\n }\n\n /**\n * Each side the way Bootstrap's css settles it: the class from the\n * widest breakpoint wins, and within one breakpoint the side written\n * later in the css. A side no class reaches shows what it is without\n * any, over a wider breakpoint's class that is live in a wide window.\n */\n function sides(node, key, breakpoint) {\n var tier = ge.breakpoints.indexOf(breakpoint);\n var winners = {};\n var styles = {};\n var neutral = null;\n\n SIDES.forEach(function(side, order) {\n var found = source(node, key + side, tier);\n if (!found) { return; }\n\n SET[side].forEach(function(set) {\n var current = winners[set];\n if (!current || found.tier > current.tier || (found.tier === current.tier && order > current.order)) {\n winners[set] = { tier: found.tier, order: order, value: found.value };\n }\n });\n });\n\n ['top', 'right', 'bottom', 'left'].forEach(function(set) {\n var winner = winners[set];\n\n if (!winner) {\n neutral = neutral || without(node, key);\n styles[PROPERTIES[key] + '-' + set] = neutral[set];\n } else {\n styles[PROPERTIES[key] + '-' + set] = winner.value === 'auto' ? 'auto' : options.scale[winner.value];\n }\n });\n\n return styles;\n }\n\n /** The side a group's select starts on: the first that has a class, or all. */\n function startingSide(node, key) {\n var names = classes(node).filter(function(name) { return patterns[key].test(name); });\n var found = SIDES.filter(function(side) {\n return names.some(function(name) { return name.indexOf(key + side + '-') === 0; });\n });\n\n return found.length ? found[0] : '';\n }\n\n function sideLabel(side) {\n switch (side) {\n case 'x': return ge.t('utility.side_x');\n case 'y': return ge.t('utility.side_y');\n case 't': return ge.t('utility.side_t');\n case 'b': return ge.t('utility.side_b');\n case 's': return ge.t('utility.side_s');\n case 'e': return ge.t('utility.side_e');\n default: return ge.t('utility.side_all');\n }\n }\n\n /** A padding or margin group: its name, the side, and the field of that side's family. */\n function group(node, key, labelText) {\n var box = dom.element('div', { 'class': 'ge-spacing-group', 'data-ge-spacing': key });\n var side = dom.element('select', { 'class': 'ge-spacing-side form-select form-select-sm' });\n\n box.appendChild(dom.element('span', { 'class': 'ge-utility-label' }, labelText));\n\n SIDES.forEach(function(value) {\n side.appendChild(dom.element('option', { value: value }, sideLabel(value)));\n });\n\n var field = ge.utilityField(node, key + startingSide(node, key));\n\n side.value = field.getAttribute('data-ge-family').slice(1);\n side.addEventListener('change', function() {\n var next = ge.utilityField(node, key + this.value);\n field.replaceWith(next);\n field = next;\n });\n box.appendChild(side);\n box.appendChild(field);\n\n return box;\n }\n\n var NODES = '.row, .column, .ge-element, [data-ge-container]';\n\n /**\n * Keep each drawer on its node's edges. A drawer is pulled out over the\n * editor's frame by as much as the frame pads the node, and a padding\n * class replaces the frame, so a padded node's drawer is pulled out by\n * its real padding instead. And a column padded at the sides gets a word\n * about what that does to its gutter.\n */\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var drawer = dom.child(node, '.ge-tools-drawer');\n\n if (!drawer || !applies(node, ge.kindOf(node))) { return; }\n\n if (carries(node, 'p')) {\n var style = getComputedStyle(node);\n\n dom.css(drawer, {\n 'margin-top': '-' + style.paddingTop,\n 'margin-left': '-' + style.paddingLeft,\n 'margin-right': '-' + style.paddingRight,\n width: 'calc(100% + ' + style.paddingLeft + ' + ' + style.paddingRight + ')',\n });\n } else {\n dom.css(drawer, { 'margin-top': '', 'margin-left': '', 'margin-right': '', width: '' });\n }\n\n if (dom.hasClass(node, 'column')) {\n var padded = classes(node).some(function(name) {\n return /^p[xse]?-/.test(name) && patterns.p.test(name);\n });\n dom.all(drawer, '.ge-spacing-gutter').forEach(function(note) { dom.toggle(note, padded); });\n }\n });\n }\n\n function families(key, labelKey) {\n var values = key === 'm' ? VALUES.concat(['auto']) : VALUES;\n var offered = options.values.concat(key === 'm' ? ['auto'] : []);\n\n return SIDES.map(function(side) {\n return {\n name: key + side,\n prefix: key + side,\n values: values,\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: labelKey,\n panel: false,\n choices: function() {\n return values.filter(function(value) { return offered.indexOf(value) !== -1; });\n },\n };\n });\n }\n\n return {\n families: families('p', 'utility.padding').concat(families('m', 'utility.margin')),\n\n panel: function(node, kind) {\n if (!applies(node, kind)) { return null; }\n\n var box = dom.element('div', { 'class': 'ge-spacing' });\n box.appendChild(group(node, 'p', ge.t('utility.padding')));\n box.appendChild(group(node, 'm', ge.t('utility.margin')));\n\n if (kind === 'column') {\n box.appendChild(dom.element('small', { 'class': 'ge-spacing-gutter' }, ge.t('utility.spacing_gutter')));\n }\n\n return box;\n },\n\n preview: function(node, kind, breakpoint) {\n if (!applies(node, kind)) { return {}; }\n\n var styles = {};\n\n ['p', 'm'].forEach(function(key) {\n if (carries(node, key)) { Object.assign(styles, sides(node, key, breakpoint)); }\n });\n\n return styles;\n },\n\n onRefresh: mark,\n };\n}\n", "/**\n * Text alignment, a part of the inline-style plugin: text alignment per breakpoint, with Bootstrap's text-{breakpoint}-start,\n * -center and -end classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.text_align': 'Text alignment',\n 'utility.text_start': 'Start',\n 'utility.text_center': 'Center',\n 'utility.text_end': 'End',\n});\n\n/** Start and end are left and right: Bootstrap's css is left to right. */\nvar CSS = { start: 'left', center: 'center', end: 'right' };\n\nexport function textalignPart(ge) {\n\n function label(value) {\n if (value === 'start') { return ge.t('utility.text_start'); }\n if (value === 'center') { return ge.t('utility.text_center'); }\n\n return ge.t('utility.text_end');\n }\n\n return {\n families: [{\n name: 'text-align',\n prefix: 'text',\n values: ['start', 'center', 'end'],\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: 'utility.text_align',\n label: label,\n\n /**\n * With no class applying here, the node aligns as its parent\n * does - or as the host's css says - which only the browser can\n * tell, so it is asked with the classes out of the way. Parents\n * are previewed before their children, so the parent's answer is\n * already the view's.\n */\n preview: function(value, node) {\n return { 'text-align': value === null ? ge.bareStyle(node, 'text-align', 'text-align') : CSS[value] };\n },\n }],\n };\n}\n", "/**\n * Display, a part of the inline-style plugin: how a node is displayed per\n * breakpoint, hidden included, with Bootstrap's d-{breakpoint}-* classes,\n * and the eye in the drawers that hides and shows it.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and its options: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.display': 'Display',\n 'utility.visibility_hidden': 'Hidden',\n 'tool.hide_in_view': 'Hide in this view',\n 'tool.show_in_view': 'Show in this view',\n 'badge.hidden_in': 'Hidden at {breakpoints}',\n});\n\n/** Bootstrap's display values, less its table ones. */\nvar VALUES = ['none', 'inline', 'inline-block', 'block', 'grid', 'inline-grid', 'flex', 'inline-flex'];\n\n/** A node that carries any class of the family, at any breakpoint. */\nvar CLASS_PATTERN = new RegExp('(?:^|\\\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:' + VALUES.join('|') + ')(?:\\\\s|$)');\nvar NONE_PATTERN = /^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/;\n\nvar NODES = '.row, .column, .ge-content, .ge-element, [data-ge-container]';\n\n/** What the canvas shows a hidden node as, in a view where Bootstrap hides it. */\nvar SHOWN_ATTR = 'data-ge-display';\n\nexport function displayPart(ge, given) {\n\n var options = Object.assign({ drawer: true }, given);\n\n /**\n * What a kind of node is offered: a row is a flex container or it is no\n * grid, and a text is a block of text.\n */\n function choices(kind) {\n if (kind === 'row') { return ['none', 'flex']; }\n if (kind === 'text' || kind === 'plain') { return ['none', 'block']; }\n\n return VALUES;\n }\n\n /** What \"shown\" is written as on this kind of node, when nothing below says. */\n function shownByDefault(kind) {\n return kind === 'row' ? 'flex' : 'block';\n }\n\n function applies(node, kind) {\n return kind === 'row' || kind === 'column' || kind === 'element' || kind === 'text' || kind === 'plain' ||\n dom.is(node, '[data-ge-container]');\n }\n\n function hiddenAt(node, view) {\n return ge.getUtility(node, 'display', view) === 'none';\n }\n\n /** The breakpoints at which the node is hidden, smallest first. */\n function hiddenTiers(node) {\n return ge.breakpoints.filter(function(key) { return hiddenAt(node, key); });\n }\n\n /**\n * Whether the node is hidden in the view being edited. In the all view\n * that means hidden at every breakpoint, since \"hidden at some\" is what\n * the badge is for.\n */\n function hiddenHere(node) {\n return ge.view() === 'all'\n ? hiddenTiers(node).length === ge.breakpoints.length\n : hiddenAt(node, ge.view());\n }\n\n /** What the breakpoint below the view shows, which an inherit falls back to. */\n function hiddenBelow(node) {\n var index = ge.breakpoints.indexOf(ge.view());\n\n return index > 0 && hiddenAt(node, ge.breakpoints[index - 1]);\n }\n\n /**\n * How the nearest breakpoint below this one that shows the node shows\n * it, or null when none below does.\n */\n function shownBelow(node, view) {\n for (var i = ge.breakpoints.indexOf(view) - 1; i >= 0; i--) {\n var value = ge.getUtility(node, 'display', ge.breakpoints[i]);\n\n if (value === null) { return null; }\n if (value !== 'none') { return value; }\n }\n\n return null;\n }\n\n /**\n * Hide or show the node in the view being edited, with as few classes as\n * that takes. In a breakpoint view that is often none at all: showing a\n * node the breakpoint below shows removes this breakpoint's d-*-none\n * rather than writing another class on top of it. Showing one that the\n * breakpoint below hides writes the display it had further down, so a\n * flex column comes back flex. In the all view a node is hidden\n * everywhere or shown everywhere, and shown is no class.\n */\n function toggle(node, kind) {\n var hide = !hiddenHere(node);\n var value;\n\n if (ge.view() === 'all') {\n value = hide ? 'none' : null;\n } else if (hide) {\n value = hiddenBelow(node) ? null : 'none';\n } else {\n value = hiddenBelow(node) ? (shownBelow(node, ge.view()) || shownByDefault(kind)) : null;\n }\n\n ge.setUtility(node, 'display', value, { source: 'tool' });\n }\n\n /**\n * A node Bootstrap hides in this view stays on the canvas, shown as it\n * would be if it were not hidden: with its classes' none taken off for\n * the moment it takes to ask the browser.\n */\n function shownAs(node) {\n var original = node.getAttribute('class');\n\n node.setAttribute('class', original.split(/\\s+/).filter(function(name) {\n return !NONE_PATTERN.test(name);\n }).join(' '));\n\n var display = getComputedStyle(node).display;\n node.setAttribute('class', original);\n\n // The canvas has a rule for each of Bootstrap's values, and a block for anything else\n return display !== 'none' && VALUES.indexOf(display) !== -1 ? display : 'block';\n }\n\n /**\n * The canvas shows each node as the view sees it. A node Bootstrap would\n * hide is kept on the canvas with the display it would have, and\n * ge-hidden-in-view fades it; data-ge-hidden-in carries the badge text\n * for the all view.\n */\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var kind = ge.kindOf(node);\n var carries = applies(node, kind) && CLASS_PATTERN.test(node.getAttribute('class') || '');\n var tiers = carries ? hiddenTiers(node) : [];\n var here = carries && hiddenHere(node);\n var partly = carries && ge.view() === 'all' && tiers.length > 0 && !here;\n\n node.removeAttribute(SHOWN_ATTR);\n if (carries && getComputedStyle(node).display === 'none') {\n node.setAttribute(SHOWN_ATTR, shownAs(node));\n }\n\n dom.toggleClass(node, 'ge-hidden-in-view', here);\n\n if (partly) {\n node.setAttribute('data-ge-hidden-in', ge.t('badge.hidden_in', { breakpoints: tiers.join(', ') }));\n } else {\n node.removeAttribute('data-ge-hidden-in');\n }\n\n dom.children(node, '.ge-tools-drawer').forEach(function(drawer) {\n dom.children(drawer, '.ge-visibility-tool').forEach(function(tool) {\n tool.setAttribute('title', here ? ge.t('tool.show_in_view') : ge.t('tool.hide_in_view'));\n dom.all(tool, 'i').forEach(function(icon) {\n icon.setAttribute('class', here ? 'bi bi-eye-slash' : 'bi bi-eye');\n });\n });\n });\n });\n }\n\n function unmark(root) {\n dom.all(root || ge.canvas, '.ge-hidden-in-view, [data-ge-hidden-in], [' + SHOWN_ATTR + ']').forEach(function(node) {\n dom.removeClass(node, 'ge-hidden-in-view');\n node.removeAttribute('data-ge-hidden-in');\n node.removeAttribute(SHOWN_ATTR);\n dom.dropEmptyClass(node);\n });\n }\n\n return {\n families: [{\n name: 'display',\n prefix: 'd',\n values: VALUES,\n appliesTo: ['row', 'column', 'text', 'element', 'container'],\n labelKey: 'utility.display',\n\n choices: function(node, kind) {\n return choices(kind);\n },\n\n label: function(value) {\n return value === 'none' ? ge.t('utility.visibility_hidden') : value;\n },\n\n /**\n * What the view being edited displays the node as. Hidden is\n * shown the way the breakpoints below show it, since the canvas\n * keeps a hidden node, faded; with no class applying, it is what\n * the node is without any.\n */\n preview: function(value, node) {\n if (value === 'none') { value = shownBelow(node, ge.view()); }\n\n return { display: value === null ? ge.bareStyle(node, 'display', 'display') : value };\n },\n }],\n\n drawerTools: function(drawer, node, kind) {\n if (!options.drawer || !applies(node, kind)) { return; }\n\n ge.createTool(drawer, ge.t('tool.hide_in_view'), 'ge-visibility-tool', 'bi bi-eye', function() {\n toggle(node, kind);\n });\n },\n\n onRefresh: mark,\n onDeinit: function() { unmark(); },\n cleanMarkup: unmark,\n };\n}\n", "/**\n * Flex, a part of the inline-style plugin: a flex container's direction, wrap,\n * alignment and gaps, and how its children grow, shrink and fill, per\n * breakpoint, with Bootstrap's flex-{breakpoint}-*, justify-content-*,\n * align-items-*, align-content-*, gap-* and row-/column-gap-* classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle and the spacing options, whose scale the gaps share:\n * grideditor.inline-style.js puts them in its Flex section.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.flex_direction': 'Direction',\n 'utility.flex_wrap': 'Wrap',\n 'utility.justify_content': 'Justify columns',\n 'utility.align_items': 'Align columns',\n 'utility.align_content': 'Align lines',\n 'utility.gap': 'Gap',\n 'utility.row_gap': 'Row gap',\n 'utility.column_gap': 'Column gap',\n 'utility.flex_fill': 'Fill',\n 'utility.flex_grow': 'Grow',\n 'utility.flex_shrink': 'Shrink',\n});\n\n/** What Bootstrap's value names come to in css. */\nvar FLEX = {\n start: 'flex-start',\n end: 'flex-end',\n center: 'center',\n between: 'space-between',\n around: 'space-around',\n evenly: 'space-evenly',\n baseline: 'baseline',\n stretch: 'stretch',\n};\n\nvar GAPS = ['0', '1', '2', '3', '4', '5'];\n\n/** Bootstrap's $spacers. */\nvar SCALE = ['0', '.25rem', '.5rem', '1rem', '1.5rem', '3rem'];\n\n/** A flex container: a row is one already, and has its gutters for gaps. */\nvar CONTAINERS = ['row', 'column', 'element', 'container'];\n\n/** What sits in a flex container and can grow, shrink or fill it. */\nvar ITEMS = ['column', 'element', 'container'];\n\nexport function flexPart(ge, spacing) {\n\n var scale = (spacing && spacing.scale) || SCALE;\n\n /** A family whose preview is its one css property, the node's own without a class. */\n function family(definition) {\n var property = definition.property || definition.name;\n\n return Object.assign({\n prefix: definition.name,\n panel: false,\n preview: function(value, node) {\n var styles = {};\n styles[property] = value === null ? ge.bareStyle(node, definition.name, property) : definition.css(value);\n return styles;\n },\n }, definition);\n }\n\n /** An alignment family: its values are Bootstrap's names, and without a class it is normal. */\n function alignment(definition) {\n return family(Object.assign({\n appliesTo: CONTAINERS,\n preview: function(value) {\n var styles = {};\n styles[definition.name] = value === null ? 'normal' : FLEX[value];\n return styles;\n },\n }, definition));\n }\n\n function gap(definition) {\n return family(Object.assign({\n values: GAPS,\n appliesTo: ITEMS,\n css: function(value) { return scale[value]; },\n }, definition));\n }\n\n function same(value) {\n return value;\n }\n\n return {\n families: [\n family({\n name: 'flex-direction',\n prefix: 'flex',\n labelKey: 'utility.flex_direction',\n values: ['row', 'row-reverse', 'column', 'column-reverse'],\n appliesTo: CONTAINERS,\n css: same,\n }),\n family({\n name: 'flex-wrap',\n prefix: 'flex',\n labelKey: 'utility.flex_wrap',\n values: ['wrap', 'nowrap', 'wrap-reverse'],\n appliesTo: CONTAINERS,\n css: same,\n }),\n alignment({\n name: 'justify-content',\n labelKey: 'utility.justify_content',\n values: ['start', 'center', 'end', 'between', 'around', 'evenly'],\n }),\n alignment({\n name: 'align-items',\n labelKey: 'utility.align_items',\n values: ['start', 'center', 'end', 'baseline', 'stretch'],\n }),\n alignment({\n name: 'align-content',\n labelKey: 'utility.align_content',\n values: ['start', 'center', 'end', 'between', 'around', 'stretch'],\n }),\n gap({ name: 'gap', labelKey: 'utility.gap' }),\n gap({ name: 'row-gap', labelKey: 'utility.row_gap' }),\n gap({ name: 'column-gap', labelKey: 'utility.column_gap' }),\n family({\n name: 'flex-fill',\n prefix: 'flex',\n property: 'flex',\n labelKey: 'utility.flex_fill',\n values: ['fill'],\n appliesTo: ITEMS,\n css: function() { return '1 1 auto'; },\n }),\n family({\n name: 'flex-grow',\n prefix: 'flex',\n labelKey: 'utility.flex_grow',\n values: ['grow-0', 'grow-1'],\n appliesTo: ITEMS,\n css: function(value) { return value.slice(-1); },\n }),\n family({\n name: 'flex-shrink',\n prefix: 'flex',\n labelKey: 'utility.flex_shrink',\n values: ['shrink-0', 'shrink-1'],\n appliesTo: ITEMS,\n css: function(value) { return value.slice(-1); },\n }),\n ],\n };\n}\n", "/**\n * Float, a part of the inline-style plugin: floating an element per breakpoint, with Bootstrap's\n * float-{breakpoint}-start, -end and -none classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.float': 'Float',\n 'utility.float_start': 'Start',\n 'utility.float_end': 'End',\n 'utility.float_none': 'None',\n});\n\n/** Start and end are left and right: Bootstrap's css is left to right. */\nvar CSS = { start: 'left', end: 'right', none: 'none' };\n\nexport function floatPart(ge) {\n\n function label(value) {\n if (value === 'start') { return ge.t('utility.float_start'); }\n if (value === 'end') { return ge.t('utility.float_end'); }\n\n return ge.t('utility.float_none');\n }\n\n return {\n families: [{\n name: 'float',\n prefix: 'float',\n values: ['start', 'end', 'none'],\n appliesTo: ['element'],\n labelKey: 'utility.float',\n label: label,\n\n /** With no class applying here, whatever the host's css floats it as. */\n preview: function(value, node) {\n return { float: value === null ? ge.bareStyle(node, 'float', 'float') : CSS[value] };\n },\n }],\n };\n}\n", "/**\n * Sticky, a part of the inline-style plugin: sticking a node to the top or the\n * bottom of the page as it scrolls, per breakpoint, with Bootstrap's\n * sticky-{breakpoint}-top and -bottom classes.\n *\n * Its families, and whatever it does on the canvas, as a function of the\n * handle: grideditor.inline-style.js puts them in its sections.\n */\nimport { GridEditor } from '../grideditor.js';\n\nObject.assign(GridEditor.locales.en, {\n 'utility.sticky': 'Sticky',\n});\n\n/** What Bootstrap's sticky-top and sticky-bottom are. */\nvar STUCK = {\n top: { position: 'sticky', top: '0', 'z-index': '1020' },\n bottom: { position: 'sticky', bottom: '0', 'z-index': '1020' },\n};\n\nexport function stickyPart(ge) {\n return {\n families: [{\n name: 'sticky',\n prefix: 'sticky',\n values: ['top', 'bottom'],\n appliesTo: ['row', 'column', 'element', 'container'],\n labelKey: 'utility.sticky',\n panel: false,\n\n /** With no class applying here, where the node is without one. */\n preview: function(value, node) {\n if (value !== null) { return STUCK[value]; }\n\n return { position: ge.bareStyle(node, 'sticky', 'position') };\n },\n }],\n };\n}\n", "/**\n * The drawer of a flex or grid node, a part of the inline-style plugin.\n *\n * A drawer is its node's first child, in the flow: in a row, which wraps,\n * it is a line of its own above the columns, but in anything else that\n * lays its children out - a column made flex, a row that does not wrap, a\n * grid - it would be one of the items, beside the content or in a cell of\n * its own. So on such a node the drawer leaves the flow: it sits on top, as\n * wide as the node, over a transparent top border as tall as it is, and\n * the content is laid out below as the page would lay it out.\n *\n * The node's own style is the host's, so what is written on it is an\n * attribute, and the border comes from a rule per height, here.\n */\nimport * as dom from '../dom.js';\n\nvar NODES = '.row, .column, .ge-element, [data-ge-container]';\nvar OUT_CLASS = 'ge-drawer-out';\nvar OUT_ATTR = 'data-ge-drawer-out';\n\n/** The space left between the drawer and the content, as the editor's frame leaves it. */\nvar GAP = 5;\n\nvar LAYS_OUT = /^(?:inline-)?(?:flex|grid)$/;\n\nexport function drawerflowPart(ge) {\n\n var sheet = null;\n var heights = {};\n var observer = null;\n\n /** The rule for a node whose drawer takes this much room. */\n function rule(room) {\n if (heights[room]) { return; }\n heights[room] = true;\n\n if (!sheet) {\n sheet = document.head.appendChild(dom.element('style', { 'data-ge-drawer-flow': '' }));\n }\n\n var node = '.ge-canvas.ge-editing [' + OUT_ATTR + '=\"' + room + '\"]';\n sheet.appendChild(document.createTextNode(\n node + ' { border-top-width: ' + room + 'px !important; }\\n' +\n node + ' > .ge-tools-drawer { top: -' + room + 'px; }\\n'\n ));\n }\n\n /** Whether the node lays its drawer out as an item of its own. */\n function laysOut(node) {\n var style = getComputedStyle(node);\n\n if (!LAYS_OUT.test(style.display)) { return false; }\n\n // A row as the grid has it: its drawer is a line of its own already\n return !(dom.hasClass(node, 'row') && style.flexDirection === 'row' && style.flexWrap === 'wrap');\n }\n\n function measure(node, drawer) {\n var room = Math.ceil(drawer.offsetHeight) + GAP;\n\n rule(room);\n node.setAttribute(OUT_ATTR, String(room));\n }\n\n /** A drawer that grows - its tools wrap, its settings unfold - takes more room. */\n function watch(drawer) {\n if (typeof ResizeObserver === 'undefined') { return; }\n\n if (!observer) {\n observer = new ResizeObserver(function(entries) {\n entries.forEach(function(entry) {\n var node = entry.target.parentNode;\n if (node && dom.hasClass(node, OUT_CLASS)) { measure(node, entry.target); }\n });\n });\n }\n observer.observe(drawer);\n }\n\n function mark(scope) {\n dom.selfAndAll(scope, NODES).forEach(function(node) {\n var drawer = dom.child(node, '.ge-tools-drawer');\n if (!drawer) { return; }\n\n if (laysOut(node)) {\n dom.addClass(node, OUT_CLASS);\n measure(node, drawer);\n watch(drawer);\n } else if (dom.hasClass(node, OUT_CLASS)) {\n dom.removeClass(node, OUT_CLASS);\n node.removeAttribute(OUT_ATTR);\n dom.dropEmptyClass(node);\n if (observer) { observer.unobserve(drawer); }\n }\n });\n }\n\n function unmarkNodes(root) {\n dom.all(root, '.' + OUT_CLASS).forEach(function(node) {\n dom.removeClass(node, OUT_CLASS);\n node.removeAttribute(OUT_ATTR);\n dom.dropEmptyClass(node);\n });\n }\n\n function unmark() {\n if (observer) { observer.disconnect(); }\n observer = null;\n\n unmarkNodes(ge.canvas);\n\n if (sheet) { sheet.remove(); }\n sheet = null;\n heights = {};\n }\n\n return {\n families: [],\n onRefresh: mark,\n onDeinit: unmark,\n cleanMarkup: unmarkNodes,\n };\n}\n", "/**\n * What the inline-style plugin's sections are made of: for each, its inline\n * properties and the field each one gets, the Bootstrap 5.3 classes its\n * catalog offers, and which of the merged utility parts it shows.\n *\n * Data, and the few questions asked of it: which classes set a property,\n * which properties a kind of node is offered.\n */\n\nvar COLORS = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];\nvar SIDES = ['top', 'end', 'bottom', 'start'];\nvar OPACITIES = ['10', '25', '50', '75', '100'];\n\nfunction each(prefix, values, suffix) {\n return values.map(function(value) { return prefix + value + (suffix || ''); });\n}\n\n/**\n * A catalog group: the classes it offers and whether they exclude each\n * other, so choosing one takes the others off. `notOn` names the kinds of\n * node it is never offered on, `onlyOn` the only ones it is.\n */\nfunction group(classes, exclusive, notOn, onlyOn) {\n return { classes: classes, exclusive: exclusive !== false, notOn: notOn || [], onlyOn: onlyOn || null };\n}\n\n/**\n * A property's field. `type` is the widget: text for any css value, select\n * for a fixed list, color, url for background-image, shadow for\n * box-shadow and text-shadow. `notOn` names the kinds of node it is never\n * offered on.\n */\nfunction prop(name, options) {\n return {\n name: name,\n labelKey: options.labelKey,\n type: options.type || 'text',\n values: options.values || null,\n notOn: options.notOn || [],\n };\n}\n\nvar NOT_ON_COLUMN = ['column'];\n\n/** The image classes are for the markup an element holds. */\nvar ONLY_ON_ELEMENT = ['element'];\n\nexport var SECTIONS = [\n {\n key: 'size',\n labelKey: 'inline_style.section_size',\n properties: [\n prop('width', { labelKey: 'inline_style.prop_width', notOn: NOT_ON_COLUMN }),\n prop('height', { labelKey: 'inline_style.prop_height', notOn: NOT_ON_COLUMN }),\n prop('min-width', { labelKey: 'inline_style.prop_min_width' }),\n prop('min-height', { labelKey: 'inline_style.prop_min_height' }),\n prop('max-width', { labelKey: 'inline_style.prop_max_width' }),\n prop('max-height', { labelKey: 'inline_style.prop_max_height' }),\n ],\n catalog: [\n group(each('w-', ['25', '50', '75', '100', 'auto']), true, NOT_ON_COLUMN),\n group(each('h-', ['25', '50', '75', '100', 'auto']), true, NOT_ON_COLUMN),\n group(['mw-100', 'mh-100', 'vw-100', 'vh-100', 'min-vw-100', 'min-vh-100'], false, NOT_ON_COLUMN),\n group(['img-fluid', 'img-thumbnail'], false, [], ONLY_ON_ELEMENT),\n group(each('object-fit-', ['contain', 'cover', 'fill', 'scale', 'none']), true, [], ONLY_ON_ELEMENT),\n ],\n parts: [],\n },\n {\n key: 'spacing',\n labelKey: 'inline_style.section_spacing',\n properties: [\n prop('margin-top', { labelKey: 'inline_style.prop_margin_top' }), prop('margin-right', { labelKey: 'inline_style.prop_margin_right' }), prop('margin-bottom', { labelKey: 'inline_style.prop_margin_bottom' }), prop('margin-left', { labelKey: 'inline_style.prop_margin_left' }),\n prop('padding-top', { labelKey: 'inline_style.prop_padding_top' }), prop('padding-right', { labelKey: 'inline_style.prop_padding_right' }), prop('padding-bottom', { labelKey: 'inline_style.prop_padding_bottom' }), prop('padding-left', { labelKey: 'inline_style.prop_padding_left' }),\n ],\n catalog: [],\n parts: ['spacing'],\n },\n {\n key: 'border',\n labelKey: 'inline_style.section_border',\n properties: [\n prop('border-width', { labelKey: 'inline_style.prop_border_width' }),\n prop('border-style', { labelKey: 'inline_style.prop_border_style', type: 'select', values: ['none', 'solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset'] }),\n prop('border-color', { labelKey: 'inline_style.prop_border_color', type: 'color' }),\n prop('border-radius', { labelKey: 'inline_style.prop_border_radius' }),\n prop('box-shadow', { labelKey: 'inline_style.prop_box_shadow', type: 'shadow' }),\n ],\n catalog: [\n group(['border', 'border-0'].concat(each('border-', SIDES), each('border-', SIDES, '-0')), false),\n group(each('border-', ['1', '2', '3', '4', '5'])),\n group(each('border-', COLORS.concat(['black', 'white'])).concat(each('border-', COLORS, '-subtle'))),\n group(each('border-opacity-', OPACITIES)),\n group(['rounded'].concat(each('rounded-', ['0', '1', '2', '3', '4', '5', 'circle', 'pill']))),\n group(each('rounded-', SIDES), false),\n group(['shadow-none', 'shadow-sm', 'shadow', 'shadow-lg']),\n ],\n parts: [],\n },\n {\n key: 'background',\n labelKey: 'inline_style.section_background',\n properties: [\n prop('background-color', { labelKey: 'inline_style.prop_background_color', type: 'color' }),\n prop('background-image', { labelKey: 'inline_style.prop_background_image', type: 'url' }),\n prop('background-size', { labelKey: 'inline_style.prop_background_size' }),\n prop('background-position', { labelKey: 'inline_style.prop_background_position' }),\n prop('background-repeat', { labelKey: 'inline_style.prop_background_repeat', type: 'select', values: ['repeat', 'no-repeat', 'repeat-x', 'repeat-y', 'space', 'round'] }),\n ],\n catalog: [\n group(each('bg-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black', 'transparent']))\n .concat(each('bg-', COLORS, '-subtle'), each('text-bg-', COLORS))),\n group(['bg-gradient'], false),\n group(each('bg-opacity-', OPACITIES)),\n ],\n parts: [],\n },\n {\n key: 'text',\n labelKey: 'inline_style.section_text',\n properties: [\n prop('color', { labelKey: 'inline_style.prop_color', type: 'color' }),\n prop('font-size', { labelKey: 'inline_style.prop_font_size' }),\n prop('text-align', { labelKey: 'inline_style.prop_text_align', type: 'select', values: ['start', 'center', 'end', 'left', 'right', 'justify'] }),\n prop('text-shadow', { labelKey: 'inline_style.prop_text_shadow', type: 'shadow' }),\n ],\n catalog: [\n group(each('text-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black']))\n .concat(each('text-', COLORS, '-emphasis'), ['text-body-emphasis'])),\n group(each('text-opacity-', ['25', '50', '75', '100'])),\n group(each('fs-', ['1', '2', '3', '4', '5', '6'])),\n group(each('text-decoration-', ['none', 'underline', 'line-through'])),\n ],\n parts: ['textalign'],\n },\n {\n key: 'typography',\n labelKey: 'inline_style.section_typography',\n properties: [\n prop('font-family', { labelKey: 'inline_style.prop_font_family' }),\n prop('font-weight', { labelKey: 'inline_style.prop_font_weight', type: 'select', values: ['100', '200', '300', '400', '500', '600', '700', '800', '900', 'normal', 'bold', 'lighter', 'bolder'] }),\n prop('font-style', { labelKey: 'inline_style.prop_font_style', type: 'select', values: ['normal', 'italic', 'oblique'] }),\n prop('line-height', { labelKey: 'inline_style.prop_line_height' }),\n prop('letter-spacing', { labelKey: 'inline_style.prop_letter_spacing' }),\n prop('text-transform', { labelKey: 'inline_style.prop_text_transform', type: 'select', values: ['none', 'uppercase', 'lowercase', 'capitalize'] }),\n prop('text-decoration', { labelKey: 'inline_style.prop_text_decoration', type: 'select', values: ['none', 'underline', 'line-through', 'overline'] }),\n ],\n catalog: [\n group(each('fw-', ['lighter', 'light', 'normal', 'medium', 'semibold', 'bold', 'bolder'])),\n group(each('fst-', ['italic', 'normal'])),\n group(each('lh-', ['1', 'sm', 'base', 'lg'])),\n group(each('text-', ['lowercase', 'uppercase', 'capitalize'])),\n group(['font-monospace'], false),\n group(['text-wrap', 'text-nowrap']),\n group(['text-break'], false),\n ],\n parts: [],\n },\n {\n key: 'display',\n labelKey: 'inline_style.section_display',\n properties: [\n prop('display', { labelKey: 'inline_style.prop_display', type: 'select', values: ['none', 'block', 'inline', 'inline-block', 'flex', 'inline-flex', 'grid', 'inline-grid'] }),\n prop('opacity', { labelKey: 'inline_style.prop_opacity' }),\n prop('overflow', { labelKey: 'inline_style.prop_overflow', type: 'select', values: ['visible', 'hidden', 'auto', 'scroll', 'clip'] }),\n prop('visibility', { labelKey: 'inline_style.prop_visibility', type: 'select', values: ['visible', 'hidden'] }),\n ],\n catalog: [\n group(each('opacity-', ['0', '25', '50', '75', '100'])),\n group(each('overflow-', ['auto', 'hidden', 'visible', 'scroll'])),\n group(['visible', 'invisible']),\n ],\n parts: ['display'],\n },\n {\n key: 'flex',\n labelKey: 'inline_style.section_flex',\n properties: [],\n catalog: [\n group(['vstack', 'hstack'], true, ['row']),\n ],\n parts: ['flex'],\n },\n {\n key: 'position',\n labelKey: 'inline_style.section_position',\n properties: [\n prop('position', { labelKey: 'inline_style.prop_position', type: 'select', values: ['static', 'relative', 'absolute', 'fixed', 'sticky'] }),\n prop('top', { labelKey: 'inline_style.prop_top', notOn: NOT_ON_COLUMN }),\n prop('right', { labelKey: 'inline_style.prop_right', notOn: NOT_ON_COLUMN }),\n prop('bottom', { labelKey: 'inline_style.prop_bottom', notOn: NOT_ON_COLUMN }),\n prop('left', { labelKey: 'inline_style.prop_left', notOn: NOT_ON_COLUMN }),\n prop('z-index', { labelKey: 'inline_style.prop_z_index' }),\n ],\n catalog: [\n group(each('position-', ['static', 'relative', 'absolute', 'fixed', 'sticky'])),\n group(each('top-', ['0', '50', '100'])),\n group(each('bottom-', ['0', '50', '100'])),\n group(each('start-', ['0', '50', '100'])),\n group(each('end-', ['0', '50', '100'])),\n group(['translate-middle', 'translate-middle-x', 'translate-middle-y']),\n group(['z-n1', 'z-0', 'z-1', 'z-2', 'z-3']),\n group(['fixed-top', 'fixed-bottom']),\n ],\n parts: ['float', 'sticky'],\n },\n {\n key: 'custom',\n labelKey: 'inline_style.section_custom',\n properties: [],\n catalog: [],\n parts: [],\n custom: true,\n },\n];\n\nexport function section(key) {\n return SECTIONS.filter(function(each_) { return each_.key === key; })[0] || null;\n}\n\n/** Whether a property or a catalog group is offered on this kind of node. */\nexport function offeredOn(item, kind) {\n if (item.onlyOn && item.onlyOn.indexOf(kind) === -1) { return false; }\n\n return item.notOn.indexOf(kind) === -1;\n}\n\nvar BREAKPOINT = '(?:(?:sm|md|lg|xl|xxl)-)?';\nvar SPACER = '(?:[0-5]|auto)';\nvar COLOR = '(?:' + COLORS.join('|') + '|black|white)';\nvar BG = '(?:' + COLORS.join('|') + '|body|body-secondary|body-tertiary|white|black|transparent)';\nvar TEXT_COLOR = '(?:' + COLORS.join('|') + '|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)';\nvar BORDER = 'border(?:-(?:top|end|bottom|start))?(?:-0)?';\nvar SUBTLE = '(?:' + COLORS.join('|') + ')-subtle';\nvar EMPHASIS = '(?:' + COLORS.join('|') + '|body)-emphasis';\nvar TEXT_BG = 'text-bg-(?:' + COLORS.join('|') + ')';\nvar STICKY = 'sticky-' + BREAKPOINT;\n\nfunction spacing(key, side) {\n var sides = { top: '[ty]?', bottom: '[by]?', left: '[sx]?', right: '[ex]?' }[side];\n return new RegExp('^' + key + sides + '-' + BREAKPOINT + SPACER + '$');\n}\n\n/**\n * The Bootstrap classes that set each property. Every one of Bootstrap's\n * utilities is !important, so a node that carries one of them for a\n * property shows the class, whatever its inline style says.\n */\nvar SETS = {\n 'width': /^(?:w-(?:25|50|75|100|auto)|vw-100)$/,\n 'height': /^(?:h-(?:25|50|75|100|auto)|vh-100)$/,\n 'max-width': /^mw-100$/,\n 'max-height': /^mh-100$/,\n 'min-width': /^min-vw-100$/,\n 'min-height': /^min-vh-100$/,\n 'margin-top': spacing('m', 'top'),\n 'margin-right': spacing('m', 'right'),\n 'margin-bottom': spacing('m', 'bottom'),\n 'margin-left': spacing('m', 'left'),\n 'padding-top': spacing('p', 'top'),\n 'padding-right': spacing('p', 'right'),\n 'padding-bottom': spacing('p', 'bottom'),\n 'padding-left': spacing('p', 'left'),\n 'border-width': new RegExp('^(?:' + BORDER + '|border-[1-5])$'),\n 'border-style': new RegExp('^' + BORDER + '$'),\n 'border-color': new RegExp('^(?:' + BORDER + '|border-' + COLOR + '|border-' + SUBTLE + ')$'),\n 'border-radius': /^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,\n 'box-shadow': /^shadow(?:-(?:none|sm|lg))?$/,\n 'background-color': new RegExp('^(?:bg-' + BG + '|bg-' + SUBTLE + '|' + TEXT_BG + ')$'),\n 'background-image': /^bg-gradient$/,\n 'color': new RegExp('^(?:text-' + TEXT_COLOR + '|text-' + EMPHASIS + '|' + TEXT_BG + ')$'),\n 'font-size': /^fs-[1-6]$/,\n 'text-align': new RegExp('^text-' + BREAKPOINT + '(?:start|center|end)$'),\n 'text-decoration': /^text-decoration-(?:none|underline|line-through)$/,\n 'font-family': /^font-monospace$/,\n 'font-weight': /^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,\n 'font-style': /^fst-(?:italic|normal)$/,\n 'line-height': /^lh-(?:1|sm|base|lg)$/,\n 'text-transform': /^text-(?:lowercase|uppercase|capitalize)$/,\n 'display': new RegExp('^(?:d-' + BREAKPOINT + '(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$'),\n 'opacity': /^opacity-(?:0|25|50|75|100)$/,\n 'overflow': /^overflow-(?:auto|hidden|visible|scroll)$/,\n 'visibility': /^(?:visible|invisible)$/,\n 'position': new RegExp('^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|' + STICKY + '(?:top|bottom))$'),\n 'top': new RegExp('^(?:top-(?:0|50|100)|fixed-top|' + STICKY + 'top)$'),\n 'bottom': new RegExp('^(?:bottom-(?:0|50|100)|fixed-bottom|' + STICKY + 'bottom)$'),\n 'left': /^start-(?:0|50|100)$/,\n 'right': /^end-(?:0|50|100)$/,\n 'z-index': /^z-(?:n1|[0-3])$/,\n};\n\n/** The first of these classes that sets the property, or null. */\nexport function overriding(property, classes) {\n var pattern = SETS[property];\n if (!pattern) { return null; }\n\n return classes.filter(function(name) { return pattern.test(name); })[0] || null;\n}\n", "/**\n * The inline-style plugin's settings, `inline_style` in the editor's options:\n *\n * inline_style: {\n * sections: { border: { properties: [...], catalog: false }, position: false, \u2026 },\n * spacing: { values, scale }, // the values offered, and what 0 to 5 come to\n * visibility: { drawer }, // false leaves the eye out of the drawers\n * }\n *\n * Every section is on unless it is turned off.\n */\nimport { SECTIONS, section } from './sections.js';\n\n/**\n * What each section shows: { key: { properties, catalog } } for the ones\n * that are on, in the sections' own order.\n */\nfunction resolveSections(ge, given) {\n var resolved = {};\n\n Object.keys(given || {}).forEach(function(key) {\n if (!section(key)) { ge.warn('inline_style.sections: there is no \"' + key + '\" section: ignored'); }\n });\n\n SECTIONS.forEach(function(each) {\n var option = given && given[each.key] !== undefined ? given[each.key] : true;\n if (option === false) { return; }\n\n var own = each.properties.map(function(property) { return property.name; });\n var properties = each.properties;\n var catalog = true;\n\n if (option && typeof option === 'object') {\n if (Array.isArray(option.properties)) {\n option.properties.forEach(function(name) {\n if (own.indexOf(name) === -1) {\n ge.warn('inline_style.sections.' + each.key + ': \"' + name + '\" is not one of its properties: ignored');\n }\n });\n properties = option.properties.filter(function(name) { return own.indexOf(name) !== -1; })\n .map(function(name) { return each.properties[own.indexOf(name)]; });\n }\n if (option.catalog === false) { catalog = false; }\n }\n\n resolved[each.key] = { section: each, properties: properties, catalog: catalog };\n });\n\n return resolved;\n}\n\nexport function resolveOptions(ge) {\n var style = ge.settings.inline_style || {};\n\n return {\n sections: resolveSections(ge, style.sections),\n spacing: style.spacing,\n visibility: style.visibility,\n };\n}\n", "/**\n * The inline-style plugin's inline fields: one per css property, each writing the\n * node's own style through ge.setHostStyle, never by hand, so the preview\n * of a breakpoint view neither shows in them nor eats what they write.\n *\n * A field is filled from the node by renderStyleField, again whenever the\n * plugin asks: after a write elsewhere, after the classes change. A value\n * the browser refused stays in its field, marked invalid, until it is put\n * right or emptied; nothing is written meanwhile.\n */\nimport * as dom from '../dom.js';\nimport { overriding } from './sections.js';\n\nvar renderers = new WeakMap(); // field -> what fills it from the node\nvar fieldCounter = 0;\n\nfunction classesOf(node) {\n return (node.getAttribute('class') || '').split(/\\s+/).filter(Boolean);\n}\n\n/**\n * Write what the user typed: trimmed, with a trailing !important taken as\n * the priority. Without one, the property keeps the priority it had.\n */\nfunction write(ge, node, property, raw) {\n var text = String(raw === null || raw === undefined ? '' : raw).trim();\n var important = /\\s*!\\s*important\\s*$/i.exec(text);\n var priority;\n\n if (important) {\n text = text.slice(0, important.index).trim();\n priority = 'important';\n }\n\n return ge.setHostStyle(node, property, text, priority);\n}\n\nfunction mark(input, ok, ge) {\n dom.toggleClass(input, 'is-invalid', !ok);\n if (ok) {\n input.removeAttribute('title');\n } else {\n input.setAttribute('title', ge.t('inline_style.invalid'));\n }\n}\n\n/** Put a value in an input, unless it holds something refused that is still being put right. */\nfunction fill(input, value) {\n if (!dom.hasClass(input, 'is-invalid')) { input.value = value; }\n}\n\nfunction textInput(className) {\n return dom.element('input', { type: 'text', 'class': 'form-control form-control-sm ' + (className || '') });\n}\n\n/* Colors */\n\nvar HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/** What a color picker can show of a value: a six digit hex, or nothing. */\nfunction pickable(value) {\n var match = HEX.exec(value.trim());\n if (!match) { return null; }\n\n var hex = match[1];\n if (hex.length === 3) { hex = hex.split('').map(function(c) { return c + c; }).join(''); }\n\n return '#' + hex.toLowerCase();\n}\n\n/** A picker and a text beside it, which takes what a picker cannot: rgba, var(), transparent. */\nfunction colorControl(onValue) {\n var box = dom.element('div', { 'class': 'input-group input-group-sm ge-inline-style-color' });\n var picker = box.appendChild(dom.element('input', { type: 'color', 'class': 'form-control form-control-color' }));\n var text = box.appendChild(textInput());\n\n picker.addEventListener('input', function() {\n dom.removeClass(text, 'is-invalid');\n text.value = picker.value;\n onValue(picker.value, text);\n });\n text.addEventListener('change', function() {\n var hex = pickable(text.value);\n if (hex) { picker.value = hex; }\n onValue(text.value, text);\n });\n\n return {\n element: box,\n set: function(value) {\n fill(text, value);\n var hex = pickable(value);\n if (hex) { picker.value = hex; }\n },\n };\n}\n\n/* Background images */\n\nvar URL_VALUE = /^url\\(\\s*([\"']?)(.*)\\1\\s*\\)$/i;\n\n/** What the field shows of a background-image: the url itself, or the value as it is. */\nfunction shownUrl(value) {\n var match = URL_VALUE.exec(value.trim());\n if (!match) { return value; }\n\n return match[1] ? match[2].replace(/\\\\([\"\\\\])/g, '$1') : match[2];\n}\n\n/** A url becomes url(\"\u2026\"); a gradient, none or any other css function goes as it is. */\nfunction urlValue(text) {\n text = text.trim();\n if (text === '' || /^(?:none|inherit|initial|unset|revert)$/i.test(text) || /^[a-z-]+\\(/i.test(text)) { return text; }\n\n return 'url(\"' + text.replace(/([\"\\\\])/g, '\\\\$1') + '\")';\n}\n\n/* Shadows */\n\n/** Split at spaces and commas outside parentheses. */\nfunction tokens(value) {\n var list = [];\n var depth = 0;\n var current = '';\n\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n\n if (c === '(') { depth++; }\n if (c === ')') { depth--; }\n\n if (depth === 0 && (c === ' ' || c === ',')) {\n if (current) { list.push(current); }\n if (c === ',') { list.push(','); }\n current = '';\n } else {\n current += c;\n }\n }\n if (current) { list.push(current); }\n\n return list;\n}\n\nvar LENGTH = /^-?(?:\\d*\\.)?\\d+(?:[a-z%]+)?$/i;\n\n/** The lengths of a shadow, in the order css writes them; a text shadow has no spread. */\nvar SHADOW_PARTS = [\n { name: 'x', labelKey: 'inline_style.shadow_x' },\n { name: 'y', labelKey: 'inline_style.shadow_y' },\n { name: 'blur', labelKey: 'inline_style.shadow_blur' },\n { name: 'spread', labelKey: 'inline_style.shadow_spread' },\n];\n\n/**\n * One shadow as the builder's parts, or null when the value is something\n * the builder cannot hold: several shadows, var(), a keyword.\n */\nfunction parseShadow(value, box) {\n value = value.trim();\n if (value === '') { return { inset: false, lengths: [], color: '' }; }\n if (/var\\(/i.test(value)) { return null; }\n\n var list = tokens(value);\n if (list.indexOf(',') !== -1) { return null; }\n\n var inset = false;\n var lengths = [];\n var colors = [];\n\n list.forEach(function(token) {\n if (box && token.toLowerCase() === 'inset') {\n inset = true;\n } else if (LENGTH.test(token)) {\n lengths.push(token);\n } else {\n colors.push(token);\n }\n });\n\n if (colors.length > 1 || lengths.length < 2 || lengths.length > (box ? 4 : 3)) { return null; }\n if (colors.length && /^(?:none|inherit|initial|unset|revert)$/i.test(colors[0])) { return null; }\n\n return { inset: inset, lengths: lengths, color: colors[0] || '' };\n}\n\nfunction composeShadow(parts, box) {\n var lengths = parts.lengths.slice();\n\n // A later length needs the earlier ones: a spread needs a blur\n for (var i = lengths.length - 1; i >= 0; i--) {\n if (lengths[i] === '' && lengths.slice(i + 1).some(Boolean)) { lengths[i] = '0'; }\n }\n lengths = lengths.filter(Boolean);\n\n if (!lengths.length && !parts.color && !parts.inset) { return ''; }\n while (lengths.length < 2) { lengths.push('0'); }\n\n return (box && parts.inset ? 'inset ' : '') + lengths.join(' ') + (parts.color ? ' ' + parts.color : '');\n}\n\n/**\n * The shadow field: a builder for one shadow - x, y, blur, the spread and\n * inset for a box - and the value as text when it is more than the\n * builder holds, or when the user asks for the text.\n */\nfunction shadowControl(ge, node, property, changed) {\n var box = property === 'box-shadow';\n var holder = dom.element('div', { 'class': 'ge-inline-style-shadow' });\n var textMode = false;\n\n function writeValue(value, input) {\n var ok = write(ge, node, property, value);\n mark(input, ok, ge);\n if (ok) { changed(); }\n return ok;\n }\n\n function builder(parts) {\n holder.innerHTML = '';\n var grid = holder.appendChild(dom.element('div', { 'class': 'ge-inline-style-shadow-builder' }));\n var names = box ? SHADOW_PARTS : SHADOW_PARTS.slice(0, 3);\n var inputs = names.map(function(part, i) {\n var cell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part' }));\n cell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t(part.labelKey)));\n var input = cell.appendChild(textInput('ge-inline-style-shadow-' + part.name));\n input.value = parts.lengths[i] || '';\n return input;\n });\n\n var colorCell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part ge-inline-style-shadow-color' }));\n colorCell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t('inline_style.shadow_color')));\n var color = colorControl(function() { update(); });\n colorCell.appendChild(color.element);\n color.set(parts.color);\n\n var inset = null;\n if (box) {\n var insetCell = grid.appendChild(dom.element('label', { 'class': 'form-check ge-inline-style-shadow-inset' }));\n inset = insetCell.appendChild(dom.element('input', { type: 'checkbox', 'class': 'form-check-input' }));\n insetCell.appendChild(dom.element('span', { 'class': 'form-check-label' }, ge.t('inline_style.shadow_inset')));\n inset.checked = parts.inset;\n inset.addEventListener('change', function() { update(); });\n }\n\n inputs.forEach(function(input) { input.addEventListener('change', function() { update(); }); });\n\n var toText = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-inline-style-shadow-mode' }, ge.t('inline_style.shadow_text_mode')));\n toText.addEventListener('click', function(e) {\n e.preventDefault();\n textMode = true;\n render();\n });\n\n function update() {\n var value = composeShadow({\n inset: inset ? inset.checked : false,\n lengths: inputs.map(function(input) { return input.value.trim(); }),\n color: dom.one(color.element, 'input[type=\"text\"]').value.trim(),\n }, box);\n writeValue(value, inputs[0]);\n }\n }\n\n function text(value) {\n holder.innerHTML = '';\n var input = holder.appendChild(textInput('ge-inline-style-shadow-text'));\n input.value = value;\n input.addEventListener('change', function() {\n if (input.value.trim() === '') {\n if (writeValue('', input)) {\n textMode = false;\n render();\n }\n return;\n }\n writeValue(input.value, input);\n });\n\n // Back to the builder, when it can hold the value: one shadow, or none\n if (parseShadow(value, box)) {\n var toBuilder = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-inline-style-shadow-mode' }, ge.t('inline_style.shadow_builder_mode')));\n toBuilder.addEventListener('click', function(e) {\n e.preventDefault();\n textMode = false;\n render();\n });\n }\n }\n\n var shown = null; // The value the builder or the text was last built for\n\n function render() {\n if (holder.querySelector('.is-invalid')) { return; }\n\n var value = ge.hostStyle(node, property).value;\n var parts = parseShadow(value, box);\n\n // Built again only when the value changed under it: building takes\n // the focus from whichever of its inputs the user moved on to\n if (value === shown && holder.firstChild && textMode === !!holder.querySelector('.ge-inline-style-shadow-text')) { return; }\n shown = value;\n\n if (textMode || !parts) {\n textMode = !!value || textMode;\n text(value);\n } else {\n builder(parts);\n }\n }\n\n return { element: holder, render: render, value: function() { return ge.hostStyle(node, property).value; } };\n}\n\n/**\n * The field for one property of a node. `changed` is called after every\n * write that went through, so the plugin can bring the rest of its\n * sections up to date.\n */\nexport function createStyleField(ge, node, property, changed) {\n var field = dom.element('div', { 'class': 'ge-inline-style-field', 'data-ge-inline-style-property': property.name });\n var label = field.appendChild(dom.element('label', { 'class': 'ge-inline-style-label' }, ge.t(property.labelKey)));\n var render;\n\n function current() {\n return ge.hostStyle(node, property.name).value;\n }\n\n function commit(value, input) {\n var ok = write(ge, node, property.name, value);\n mark(input, ok, ge);\n if (ok) { changed(); }\n }\n\n if (property.type === 'select') {\n var select = field.appendChild(dom.element('select', { 'class': 'form-select form-select-sm' }));\n select.addEventListener('change', function() { commit(select.value, select); });\n render = function() {\n var value = current();\n var values = property.values.slice();\n if (value && values.indexOf(value) === -1) { values.push(value); }\n\n select.innerHTML = '';\n select.appendChild(dom.element('option', { value: '' }, ''));\n values.forEach(function(each) { select.appendChild(dom.element('option', { value: each }, each)); });\n select.value = value;\n };\n } else if (property.type === 'color') {\n var color = colorControl(function(value, input) { commit(value, input); });\n field.appendChild(color.element);\n render = function() { color.set(current()); };\n } else if (property.type === 'url') {\n var url = field.appendChild(textInput());\n url.addEventListener('change', function() { commit(urlValue(url.value), url); });\n render = function() { fill(url, shownUrl(current())); };\n } else if (property.type === 'shadow') {\n var shadow = shadowControl(ge, node, property.name, changed);\n field.appendChild(shadow.element);\n render = shadow.render;\n } else {\n var input = field.appendChild(textInput());\n input.addEventListener('change', function() { commit(input.value, input); });\n render = function() { fill(input, current()); };\n }\n\n var control = field.querySelector('input, select');\n if (control) {\n control.id = 'ge-inline-style-field-' + (++fieldCounter);\n label.setAttribute('for', control.id);\n }\n\n field.appendChild(dom.element('small', { 'class': 'ge-inline-style-note ge-inline-style-overridden' }));\n\n renderers.set(field, function() {\n render();\n\n // A Bootstrap utility on the node wins over the value: every one is !important\n var winner = current() ? overriding(property.name, classesOf(node)) : null;\n var note = dom.child(field, '.ge-inline-style-overridden');\n note.textContent = winner ? ge.t('inline_style.overridden', { 'class': winner }) : '';\n dom.toggle(note, !!winner);\n });\n renderStyleField(field);\n\n return field;\n}\n\n/** Fill a field from its node again. */\nexport function renderStyleField(field) {\n var render = renderers.get(field);\n if (render) { render(); }\n}\n", "/**\n * The inline-style plugin's catalog: Bootstrap's classes for what a section\n * styles, as chips that put a class on the node or take it off.\n *\n * A chip never touches the node itself. It writes the panel's classes\n * field and fires its change, as the user typing there would, so the\n * editor keeps the node's own classes apart from its editing ones, and the\n * Responsive section and the preview follow. Within an exclusive group,\n * choosing one class takes the others off.\n */\nimport * as dom from '../dom.js';\nimport { offeredOn } from './sections.js';\n\nfunction classesOf(node) {\n return (node.getAttribute('class') || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Put a class on or off through the node's classes field. */\nfunction choose(ge, node, group, name) {\n var details = ge.detailsOf(node);\n var input = details ? dom.one(details, '.ge-classes') : null;\n if (!input) { return; }\n\n var on = classesOf(node).indexOf(name) !== -1;\n var list = input.value.split(/\\s+/).filter(Boolean).filter(function(each) {\n if (each === name) { return false; }\n return !(group.exclusive && !on && group.classes.indexOf(each) !== -1);\n });\n\n if (!on) { list.push(name); }\n\n input.value = list.join(' ');\n input.dispatchEvent(new Event('change', { bubbles: true }));\n}\n\n/**\n * A section's catalog for a node, or null when none of its groups is\n * offered on this kind of node.\n */\nexport function createCatalog(ge, node, kind, groups) {\n var offered = groups.filter(function(group) { return offeredOn(group, kind); });\n if (!offered.length) { return null; }\n\n var box = dom.element('div', { 'class': 'ge-inline-style-catalog' });\n box.appendChild(dom.element('span', { 'class': 'ge-inline-style-label' }, ge.t('inline_style.catalog')));\n\n offered.forEach(function(group) {\n var row = box.appendChild(dom.element('div', { 'class': 'ge-inline-style-chips' }));\n\n group.classes.forEach(function(name) {\n var chip = row.appendChild(dom.element('button', {\n type: 'button',\n 'class': 'btn btn-sm btn-outline-secondary ge-inline-style-chip',\n 'data-ge-class': name,\n 'aria-pressed': 'false',\n }, name));\n\n chip.addEventListener('click', function() { choose(ge, node, group, name); });\n });\n });\n\n renderCatalog(box, node);\n\n return box;\n}\n\n/** A chip is pressed while its class is on the node. */\nexport function renderCatalog(box, node) {\n var classes = classesOf(node);\n\n dom.all(box, '.ge-inline-style-chip').forEach(function(chip) {\n var on = classes.indexOf(chip.getAttribute('data-ge-class')) !== -1;\n dom.toggleClass(chip, 'active', on);\n chip.setAttribute('aria-pressed', on ? 'true' : 'false');\n });\n}\n", "/**\n * The inline-style plugin's free css: a textarea with every declaration of the\n * node's own style that no field on show stands for - whatever the host\n * wrote that the sections have no field for, and what a section the host\n * turned off or narrowed would have shown.\n *\n * Compared longhand by longhand, which is how the browser holds a style: a\n * margin written as a shorthand is its four sides, and a field for\n * border-width stands for the four border-*-width. Editing the textarea\n * writes those declarations again; the browser drops what it cannot\n * parse, and the textarea shows what was kept.\n */\nimport * as dom from '../dom.js';\n\n/** The longhands a property sets, as the browser expands it. */\nfunction longhands(property) {\n var probe = document.createElement('div').style;\n var list = [];\n\n probe.setProperty(property, 'initial');\n for (var i = 0; i < probe.length; i++) { list.push(probe[i]); }\n\n return list.length ? list : [property];\n}\n\nfunction declaration(cssText) {\n var style = document.createElement('div').style;\n style.cssText = cssText;\n return style;\n}\n\n/** `properties` are the ones the node's fields on show stand for. */\nexport function createCustom(ge, node, properties, changed) {\n var covered = {};\n properties.forEach(function(property) {\n longhands(property).forEach(function(longhand) { covered[longhand] = true; });\n });\n\n var box = dom.element('div', { 'class': 'ge-inline-style-custom' });\n var textarea = box.appendChild(dom.element('textarea', {\n 'class': 'form-control form-control-sm font-monospace ge-inline-style-custom-css',\n rows: '4',\n spellcheck: 'false',\n 'aria-label': ge.t('inline_style.section_custom'),\n }));\n\n /** The declarations of the host's style no field stands for. */\n function free() {\n var style = declaration(ge.hostStyle(node));\n var rest = document.createElement('div').style;\n\n for (var i = 0; i < style.length; i++) {\n var name = style[i];\n if (!covered[name]) { rest.setProperty(name, style.getPropertyValue(name), style.getPropertyPriority(name)); }\n }\n\n return rest;\n }\n\n textarea.addEventListener('change', function() {\n var before = free();\n var wanted = declaration(textarea.value);\n var i;\n\n for (i = 0; i < before.length; i++) {\n if (wanted.getPropertyValue(before[i]) === '') { ge.setHostStyle(node, before[i], ''); }\n }\n for (i = 0; i < wanted.length; i++) {\n ge.setHostStyle(node, wanted[i], wanted.getPropertyValue(wanted[i]), wanted.getPropertyPriority(wanted[i]));\n }\n\n render();\n changed();\n });\n\n function render() {\n if (document.activeElement === textarea) { return; }\n textarea.value = free().cssText.replace(/; /g, ';\\n');\n }\n\n render();\n\n return { element: box, render: render };\n}\n", "/**\n * The inline-style plugin's accordion for one node: a section per group of\n * properties, each with the merged utilities' per breakpoint fields, the\n * inline fields and the catalog - as far as each applies to the node.\n *\n * Bootstrap's accordion markup, opened and closed here, so it needs none of\n * Bootstrap's javascript. One section is open at a time, and the one the\n * user opened last is open again on the next node's panel.\n */\nimport * as dom from '../dom.js';\nimport { offeredOn } from './sections.js';\nimport { createStyleField, renderStyleField } from './fields.js';\nimport { createCatalog, renderCatalog } from './catalog.js';\nimport { createCustom } from './custom.js';\n\n/** The kinds of node that take inline style: not a text, nor plain content. */\nexport function takesInlineStyle(node, kind) {\n if (kind === 'row' || kind === 'column' || kind === 'element' || kind === 'section') { return true; }\n if (dom.is(node, '[data-ge-container]')) { return true; }\n\n // A pane of a container, whatever its container calls it\n return !!dom.child(node, '.ge-tools-drawer.ge-pane-drawer');\n}\n\n/** Whether a merged family applies to the node, as the editor decides it. */\nfunction familyApplies(family, node, kind) {\n if (kind === 'plain') { kind = 'text'; }\n if (family.appliesTo.indexOf(kind) !== -1) { return true; }\n\n return family.appliesTo.indexOf('container') !== -1 && dom.is(node, '[data-ge-container]');\n}\n\n/**\n * What a merged part shows in its section for a node: the spacing part\n * its own panel, the others a field per family that applies to it - one,\n * or flex's eleven, together.\n */\nfunction partContent(ge, part, node, kind) {\n if (part.panel) { return part.panel(node, kind); }\n\n var fields = part.families.filter(function(family) {\n return familyApplies(family, node, kind);\n }).map(function(family) {\n return ge.utilityField(node, family.name);\n });\n\n if (fields.length < 2) { return fields[0] || null; }\n\n var box = dom.element('div', { 'class': 'ge-inline-style-part-fields' });\n fields.forEach(function(field) { box.appendChild(field); });\n\n return box;\n}\n\n/**\n * `context` is the plugin's: its resolved sections, its parts by name, the\n * state it keeps for the editor ({ open }) and `opened(key)`, called when\n * the user opens or closes a section.\n */\nexport function createAccordion(ge, node, kind, context) {\n var inline = takesInlineStyle(node, kind);\n var accordion = dom.element('div', { 'class': 'accordion ge-inline-style' });\n var fields = [];\n var catalogs = [];\n var notes = [];\n var custom = null;\n var customItem = null;\n var changed = function() { render(); };\n\n function item(key, labelKey) {\n var entry = accordion.appendChild(dom.element('div', { 'class': 'accordion-item', 'data-ge-inline-style-section': key }));\n var header = entry.appendChild(dom.element('h2', { 'class': 'accordion-header' }));\n var button = header.appendChild(dom.element('button', {\n type: 'button',\n 'class': 'accordion-button collapsed',\n 'aria-expanded': 'false',\n }, ge.t(labelKey)));\n var collapse = entry.appendChild(dom.element('div', { 'class': 'accordion-collapse collapse' }));\n var body = collapse.appendChild(dom.element('div', { 'class': 'accordion-body' }));\n\n button.addEventListener('click', function() {\n var opening = !dom.hasClass(collapse, 'show');\n context.state.open = opening ? key : null;\n // Every panel is built on init, so the others are told as well:\n // whoever opened Border on one node wants it on the next\n context.opened(context.state.open);\n });\n\n return { entry: entry, body: body };\n }\n\n function toggle(entry, shown) {\n dom.toggleClass(dom.one(entry, '.accordion-collapse'), 'show', shown);\n var button = dom.one(entry, '.accordion-button');\n dom.toggleClass(button, 'collapsed', !shown);\n button.setAttribute('aria-expanded', shown ? 'true' : 'false');\n }\n\n Object.keys(context.sections).forEach(function(key) {\n var resolved = context.sections[key];\n var section = resolved.section;\n\n if (section.custom) {\n if (inline) { customItem = item(key, section.labelKey); }\n return;\n }\n\n var parts = section.parts.map(function(name) {\n return context.parts[name] ? partContent(ge, context.parts[name], node, kind) : null;\n }).filter(Boolean);\n var properties = inline ? resolved.properties.filter(function(property) { return offeredOn(property, kind); }) : [];\n var catalog = inline && resolved.catalog ? createCatalog(ge, node, kind, section.catalog) : null;\n\n if (!parts.length && !properties.length && !catalog) { return; }\n\n var body = item(key, section.labelKey).body;\n parts.forEach(function(part) { body.appendChild(dom.addClass(part, 'ge-inline-style-part')); });\n\n if (properties.length) {\n var note = body.appendChild(dom.element('small', { 'class': 'ge-inline-style-note ge-inline-style-all-sizes' }, ge.t('inline_style.all_sizes')));\n notes.push(note);\n\n var grid = body.appendChild(dom.element('div', { 'class': 'ge-inline-style-fields' }));\n properties.forEach(function(property) {\n var field = createStyleField(ge, node, property, changed);\n fields.push(field);\n grid.appendChild(field);\n });\n }\n\n if (catalog) {\n catalogs.push(catalog);\n body.appendChild(catalog);\n }\n });\n\n // Last, since it shows what the fields made above do not\n if (customItem) {\n custom = createCustom(ge, node, fields.map(function(field) {\n return field.getAttribute('data-ge-inline-style-property');\n }), changed);\n customItem.body.appendChild(custom.element);\n accordion.appendChild(customItem.entry);\n }\n\n if (!accordion.children.length) { return null; }\n\n /** Open this section and no other; null closes them all. */\n function open(key) {\n dom.all(accordion, '.accordion-item').forEach(function(entry) {\n toggle(entry, entry.getAttribute('data-ge-inline-style-section') === key);\n });\n }\n\n open(context.state.open);\n\n /** Fill everything from the node again: after a write, a change of classes or view. */\n function render() {\n fields.forEach(renderStyleField);\n catalogs.forEach(function(catalog) { renderCatalog(catalog, node); });\n if (custom) { custom.render(); }\n notes.forEach(function(note) { dom.toggle(note, ge.view() !== 'all'); });\n }\n\n render();\n\n return { element: accordion, render: render, open: open };\n}\n", "/**\n * Inline style for grid-editor.\n *\n * A utility plugin: load this file after the editor and every row, column,\n * container, pane, element and section gets a Style accordion in its\n * settings panel - size, spacing, border, background, text, typography,\n * display, flex, position and free css - written to the node's own style\n * attribute, with Bootstrap's classes for each section as chips that put\n * them in the classes field. What it can ask the editor for is the handle\n * its factory is called with, described in docs/plugins.md.\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.inline-style.min.js\"></script>\n *\n * It also edits spacing, text alignment, display, flex, sticky and float,\n * Bootstrap's responsive classes, per breakpoint in its sections. On a node\n * that is flex or grid, the drawer leaves the flow, so the canvas lays the\n * content out as the page will.\n *\n * Where the settings panel has no room for it - a popover, inline in the\n * drawer - the accordion opens in a dialog, from a Style button.\n *\n * inline_style.sections chooses the sections, and in each the properties and\n * whether it has a catalog; inline_style.spacing is the options of spacing, whose\n * scale the gaps share, and inline_style.visibility those of the eye.\n */\nimport { GridEditor } from '../grideditor.js';\nimport { spacingPart } from '../inline-style/spacing.js';\nimport { textalignPart } from '../inline-style/textalign.js';\nimport { displayPart } from '../inline-style/display.js';\nimport { flexPart } from '../inline-style/flex.js';\nimport { floatPart } from '../inline-style/float.js';\nimport { stickyPart } from '../inline-style/sticky.js';\nimport { drawerflowPart } from '../inline-style/drawerflow.js';\nimport { resolveOptions } from '../inline-style/options.js';\nimport { createAccordion } from '../inline-style/accordion.js';\n\nObject.assign(GridEditor.locales.en, {\n 'inline_style.section_title': 'Style',\n 'inline_style.dialog_title': 'Style: {kind}',\n 'inline_style.section_size': 'Size',\n 'inline_style.section_spacing': 'Spacing',\n 'inline_style.section_border': 'Border',\n 'inline_style.section_background': 'Background',\n 'inline_style.section_text': 'Text',\n 'inline_style.section_typography': 'Typography',\n 'inline_style.section_display': 'Display',\n 'inline_style.section_flex': 'Flex',\n 'inline_style.section_position': 'Position',\n 'inline_style.section_custom': 'Custom css',\n 'inline_style.all_sizes': 'Applies to every size',\n 'inline_style.overridden': 'The class {class} takes priority over this value',\n 'inline_style.invalid': 'Not a value this property takes',\n 'inline_style.catalog': 'Bootstrap classes',\n 'inline_style.shadow_x': 'X',\n 'inline_style.shadow_y': 'Y',\n 'inline_style.shadow_blur': 'Blur',\n 'inline_style.shadow_spread': 'Spread',\n 'inline_style.shadow_color': 'Color',\n 'inline_style.shadow_inset': 'Inset',\n 'inline_style.shadow_text_mode': 'Edit as text',\n 'inline_style.shadow_builder_mode': 'Edit with the builder',\n 'inline_style.prop_width': 'Width',\n 'inline_style.prop_height': 'Height',\n 'inline_style.prop_min_width': 'Min width',\n 'inline_style.prop_min_height': 'Min height',\n 'inline_style.prop_max_width': 'Max width',\n 'inline_style.prop_max_height': 'Max height',\n 'inline_style.prop_margin_top': 'Margin top',\n 'inline_style.prop_margin_right': 'Margin right',\n 'inline_style.prop_margin_bottom': 'Margin bottom',\n 'inline_style.prop_margin_left': 'Margin left',\n 'inline_style.prop_padding_top': 'Padding top',\n 'inline_style.prop_padding_right': 'Padding right',\n 'inline_style.prop_padding_bottom': 'Padding bottom',\n 'inline_style.prop_padding_left': 'Padding left',\n 'inline_style.prop_border_width': 'Border width',\n 'inline_style.prop_border_style': 'Border style',\n 'inline_style.prop_border_color': 'Border color',\n 'inline_style.prop_border_radius': 'Border radius',\n 'inline_style.prop_box_shadow': 'Shadow',\n 'inline_style.prop_background_color': 'Background color',\n 'inline_style.prop_background_image': 'Background image',\n 'inline_style.prop_background_size': 'Background size',\n 'inline_style.prop_background_position': 'Background position',\n 'inline_style.prop_background_repeat': 'Background repeat',\n 'inline_style.prop_color': 'Color',\n 'inline_style.prop_font_size': 'Font size',\n 'inline_style.prop_text_align': 'Text align',\n 'inline_style.prop_text_shadow': 'Text shadow',\n 'inline_style.prop_font_family': 'Font family',\n 'inline_style.prop_font_weight': 'Font weight',\n 'inline_style.prop_font_style': 'Font style',\n 'inline_style.prop_line_height': 'Line height',\n 'inline_style.prop_letter_spacing': 'Letter spacing',\n 'inline_style.prop_text_transform': 'Text transform',\n 'inline_style.prop_text_decoration': 'Text decoration',\n 'inline_style.prop_display': 'Display',\n 'inline_style.prop_opacity': 'Opacity',\n 'inline_style.prop_overflow': 'Overflow',\n 'inline_style.prop_visibility': 'Visibility',\n 'inline_style.prop_position': 'Position',\n 'inline_style.prop_top': 'Top',\n 'inline_style.prop_right': 'Right',\n 'inline_style.prop_bottom': 'Bottom',\n 'inline_style.prop_left': 'Left',\n 'inline_style.prop_z_index': 'Z-index',\n});\n\n// The drawer's part last: it asks the browser how the others left the node\nvar PARTS = ['spacing', 'textalign', 'display', 'flex', 'float', 'sticky', 'drawerflow'];\n\nGridEditor.utilities['inline-style'] = function(ge) {\n\n var options = resolveOptions(ge);\n var parts = {\n spacing: spacingPart(ge, options.spacing),\n textalign: textalignPart(ge),\n display: displayPart(ge, options.visibility),\n flex: flexPart(ge, options.spacing),\n float: floatPart(ge),\n sticky: stickyPart(ge),\n drawerflow: drawerflowPart(ge),\n };\n var accordions = []; // { node, accordion } for every panel built since the last init\n var context = {\n sections: options.sections,\n parts: parts,\n state: { open: null },\n opened: function(key) {\n accordions.forEach(function(entry) { entry.accordion.open(key); });\n },\n };\n\n /** Every part's hook, called in turn. */\n function each(hook) {\n return function() {\n var args = arguments;\n PARTS.forEach(function(name) {\n if (parts[name][hook]) { parts[name][hook].apply(null, args); }\n });\n };\n }\n\n var partsRefresh = each('onRefresh');\n\n return {\n // The parts' families, edited in the sections rather than in Responsive\n families: PARTS.reduce(function(all, name) {\n return all.concat(parts[name].families.map(function(family) {\n return Object.assign({}, family, { panel: false });\n }));\n }, []),\n\n panelSection: function(node, kind) {\n var accordion = createAccordion(ge, node, kind, context);\n if (!accordion) { return null; }\n\n accordions.push({ node: node, accordion: accordion });\n\n return { labelKey: 'inline_style.section_title', titleKey: 'inline_style.dialog_title', body: accordion.element };\n },\n\n preview: function(node, kind, breakpoint) {\n return parts.spacing.preview(node, kind, breakpoint);\n },\n\n // After a write, a change of classes or of view: the accordions of\n // the nodes it touched follow\n onRefresh: function(scope) {\n partsRefresh(scope);\n\n accordions = accordions.filter(function(entry) { return entry.accordion.element.isConnected; });\n accordions.forEach(function(entry) {\n if (entry.node === scope || scope.contains(entry.node)) { entry.accordion.render(); }\n });\n },\n\n drawerTools: each('drawerTools'),\n\n onDeinit: function() {\n each('onDeinit')();\n accordions = [];\n },\n\n cleanMarkup: each('cleanMarkup'),\n };\n};\n"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ACjBA,EAAK,UAAU,EAAE,EACjBJ,EAAa,CAAC,CAClB,EAEA,YAAaI,EAAK,aAAa,CACnC,CACJ",
|
|
6
|
+
"names": ["GridEditor", "all", "root", "selector", "one", "selfAndAll", "found", "children", "node", "each", "child", "is", "node", "selector", "element", "tag", "attributes", "text", "node", "name", "value", "addClass", "node", "names", "split", "name", "removeClass", "toggleClass", "state", "hasClass", "dropEmptyClass", "css", "node", "styles", "property", "value", "UNITLESS", "defaultDisplays", "defaultDisplay", "tag", "probe", "show", "hide", "toggle", "state", "visible", "GridEditor", "VALUES", "SCALE", "SIDES", "SET", "INFIXES", "PROPERTIES", "pattern", "key", "spacingPart", "ge", "given", "options", "patterns", "applies", "node", "kind", "is", "classes", "carries", "name", "source", "family", "tier", "names", "values", "i", "v", "without", "original", "style", "bare", "side", "sides", "breakpoint", "winners", "styles", "neutral", "order", "found", "set", "current", "winner", "startingSide", "sideLabel", "group", "labelText", "box", "element", "value", "field", "next", "NODES", "mark", "scope", "selfAndAll", "drawer", "child", "css", "hasClass", "padded", "all", "note", "toggle", "families", "labelKey", "offered", "GridEditor", "CSS", "textalignPart", "ge", "label", "value", "node", "GridEditor", "VALUES", "CLASS_PATTERN", "NONE_PATTERN", "NODES", "SHOWN_ATTR", "displayPart", "ge", "given", "options", "choices", "kind", "shownByDefault", "applies", "node", "is", "hiddenAt", "view", "hiddenTiers", "key", "hiddenHere", "hiddenBelow", "index", "shownBelow", "i", "value", "toggle", "hide", "shownAs", "original", "name", "display", "mark", "scope", "selfAndAll", "carries", "tiers", "here", "partly", "toggleClass", "children", "drawer", "tool", "all", "icon", "unmark", "root", "removeClass", "dropEmptyClass", "GridEditor", "FLEX", "GAPS", "SCALE", "CONTAINERS", "ITEMS", "flexPart", "ge", "spacing", "scale", "family", "definition", "property", "value", "node", "styles", "alignment", "gap", "same", "GridEditor", "CSS", "floatPart", "ge", "label", "value", "node", "GridEditor", "STUCK", "stickyPart", "ge", "value", "node", "NODES", "OUT_CLASS", "OUT_ATTR", "GAP", "LAYS_OUT", "drawerflowPart", "ge", "sheet", "heights", "observer", "rule", "room", "element", "node", "laysOut", "style", "hasClass", "measure", "drawer", "watch", "entries", "entry", "mark", "scope", "selfAndAll", "child", "addClass", "removeClass", "dropEmptyClass", "unmarkNodes", "root", "all", "unmark", "COLORS", "SIDES", "OPACITIES", "each", "prefix", "values", "suffix", "value", "group", "classes", "exclusive", "notOn", "onlyOn", "prop", "name", "options", "NOT_ON_COLUMN", "ONLY_ON_ELEMENT", "SECTIONS", "section", "key", "each_", "offeredOn", "item", "kind", "BREAKPOINT", "SPACER", "COLOR", "BG", "TEXT_COLOR", "BORDER", "SUBTLE", "EMPHASIS", "TEXT_BG", "STICKY", "spacing", "side", "sides", "SETS", "overriding", "property", "pattern", "resolveSections", "ge", "given", "resolved", "key", "section", "SECTIONS", "each", "option", "own", "property", "properties", "catalog", "name", "resolveOptions", "style", "renderers", "fieldCounter", "classesOf", "node", "write", "ge", "property", "raw", "text", "important", "priority", "mark", "input", "ok", "toggleClass", "fill", "value", "hasClass", "textInput", "className", "element", "HEX", "pickable", "match", "hex", "c", "colorControl", "onValue", "box", "picker", "removeClass", "URL_VALUE", "shownUrl", "urlValue", "tokens", "list", "depth", "current", "i", "LENGTH", "SHADOW_PARTS", "parseShadow", "inset", "lengths", "colors", "token", "composeShadow", "parts", "shadowControl", "changed", "holder", "textMode", "writeValue", "builder", "grid", "names", "inputs", "part", "cell", "colorCell", "color", "update", "insetCell", "toText", "e", "render", "one", "toBuilder", "shown", "createStyleField", "field", "label", "commit", "select", "values", "each", "url", "shadow", "control", "winner", "overriding", "note", "child", "toggle", "renderStyleField", "classesOf", "node", "choose", "ge", "group", "name", "details", "input", "one", "on", "list", "each", "createCatalog", "kind", "groups", "offered", "offeredOn", "box", "element", "row", "chip", "renderCatalog", "classes", "all", "toggleClass", "longhands", "property", "probe", "list", "declaration", "cssText", "style", "createCustom", "ge", "node", "properties", "changed", "covered", "longhand", "box", "element", "textarea", "free", "rest", "i", "name", "before", "wanted", "render", "takesInlineStyle", "node", "kind", "is", "child", "familyApplies", "family", "partContent", "ge", "part", "fields", "box", "element", "field", "createAccordion", "context", "inline", "accordion", "catalogs", "notes", "custom", "customItem", "changed", "render", "item", "key", "labelKey", "entry", "header", "button", "collapse", "body", "opening", "hasClass", "toggle", "shown", "toggleClass", "one", "resolved", "section", "parts", "name", "properties", "property", "offeredOn", "catalog", "createCatalog", "addClass", "note", "grid", "createStyleField", "createCustom", "open", "all", "renderStyleField", "renderCatalog", "GridEditor", "PARTS", "ge", "options", "resolveOptions", "parts", "spacingPart", "textalignPart", "displayPart", "flexPart", "floatPart", "stickyPart", "drawerflowPart", "accordions", "context", "key", "entry", "each", "hook", "args", "name", "partsRefresh", "all", "family", "node", "kind", "accordion", "createAccordion", "breakpoint", "scope"]
|
|
7
7
|
}
|