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mB,MAAO,eAAQgB,EAAS,iQAGxB,CACAtB,GAAI,OACJ2B,QAAS,WAAM,OAAAlG,EAAO0D,WAAW,YAAlB,EACfmB,MAAO,eAAQgB,EAAS,uPAGxB,CACAtB,GAAI5E,EACJuG,QAAS,WAAM,OAAAlG,EAAO0D,WAAW/D,EAAlB,EACfkF,MAAO,eAAQgB,EAAS,wIAGxB,CACAtB,GAAIxE,EACJmG,QAAS,WAAM,OAAAlG,EAAO0D,WAAW3D,EAAlB,EACf8E,MAAO,eAAQgB,EAAS,sLAI5B,CACAtB,GAAI,QACJ0B,QAAW,CAAC,CACV1B,GAAIgB,EACJW,QAASX,EACTY,QAAQ,EACRtB,MAAO,eAAQgB,EAAS,ySAGxB,CACAtB,GAAIiB,EACJU,QAASV,EACTX,MAAO,eAAQgB,EAAS,s+BAGxB,CACAtB,GAAIkB,EACJS,QAAST,EACTZ,MAAO,eAAQgB,EAAS,yMAGxB,CACAtB,GAAImB,EACJQ,QAASR,EACTb,MAAO,eAAQgB,EAAS,yNAM5B,IAAMQ,EAASjB,EAAOkB,UAAU,QAASZ,GACzC1F,EAAOuG,GAAG,QAAQ,WAAM,OAAAF,aAAM,EAANA,EAAQG,IAAI,UAAU,EAAtB,IAGxB7C,EAAKG,oBAAsB9D,EAAOuG,GAAG,sBAAsB,WACzD,IAAME,EAAYrB,EAAOkB,UAAU,QAASf,GACtCmB,EAAgBtB,EAAOkB,UAAU,QAASb,GAI1CiB,GAAkBA,EAAcxH,IAAI,YAAcc,EAAO2G,eAC7DF,SAAAA,EAAWD,IAAI,UAAU,EAE7B,GACD,CFtBCI,CAAO5G,EAAQC,EACjB,E","sources":["webpack://grapesjs-preset-webpage/webpack/universalModuleDefinition","webpack://grapesjs-preset-webpage/webpack/bootstrap","webpack://grapesjs-preset-webpage/webpack/runtime/define property getters","webpack://grapesjs-preset-webpage/webpack/runtime/hasOwnProperty shorthand","webpack://grapesjs-preset-webpage/webpack/runtime/make namespace object","webpack://grapesjs-preset-webpage/./src/consts.ts","webpack://grapesjs-preset-webpage/./src/commands/openImport.ts","webpack://grapesjs-preset-webpage/./src/commands/index.ts","webpack://grapesjs-preset-webpage/./src/index.ts","webpack://grapesjs-preset-webpage/./src/blocks.ts","webpack://grapesjs-preset-webpage/./src/panels.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"grapesjs-preset-webpage\"] = factory();\n\telse\n\t\troot[\"grapesjs-preset-webpage\"] = factory();\n})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this), () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const cmdImport = 'gjs-open-import-webpage';\nexport const cmdDeviceDesktop = 'set-device-desktop';\nexport const cmdDeviceTablet = 'set-device-tablet';\nexport const cmdDeviceMobile = 'set-device-mobile';\nexport const cmdClear = 'canvas-clear';\n","import type { Editor } from 'grapesjs';\nimport { RequiredPluginOptions } from '..';\nimport { cmdImport } from './../consts';\n\nexport default (editor: Editor, config: RequiredPluginOptions) => {\n const pfx = editor.getConfig('stylePrefix');\n const importLabel = config.modalImportLabel;\n const importCnt = config.modalImportContent;\n\n editor.Commands.add(cmdImport, {\n codeViewer: null as any,\n container: null as HTMLElement | null,\n\n run(editor) {\n const codeContent = typeof importCnt == 'function' ? importCnt(editor) : importCnt;\n const codeViewer = this.getCodeViewer();\n editor.Modal.open({\n title: config.modalImportTitle,\n content: this.getContainer(),\n }).onceClose(() => editor.stopCommand(cmdImport));\n codeViewer.setContent(codeContent ?? '');\n codeViewer.refresh();\n setTimeout(()=> codeViewer.focus(), 0);\n },\n\n stop() {\n editor.Modal.close();\n },\n\n getContainer() {\n if (!this.container) {\n const codeViewer = this.getCodeViewer();\n const container = document.createElement('div');\n container.className = `${pfx}import-container`;\n\n // Import Label\n if (importLabel) {\n const labelEl = document.createElement('div');\n labelEl.className = `${pfx}import-label`;\n labelEl.innerHTML = importLabel;\n container.appendChild(labelEl);\n }\n\n container.appendChild(codeViewer.getElement());\n\n // Import button\n const btnImp = document.createElement('button');\n btnImp.type = 'button';\n btnImp.innerHTML = config.modalImportButton;\n btnImp.className = `${pfx}btn-prim ${pfx}btn-import`;\n btnImp.onclick = () => {\n editor.Css.clear();\n editor.setComponents(codeViewer.getContent().trim());\n editor.Modal.close();\n };\n container.appendChild(btnImp);\n\n this.container = container;\n }\n\n return this.container;\n },\n\n /**\n * Return the code viewer instance\n * @returns {CodeViewer}\n */\n getCodeViewer() {\n if (!this.codeViewer) {\n this.codeViewer = editor.CodeManager.createViewer({\n codeName: 'htmlmixed',\n theme: 'hopscotch',\n readOnly: false,\n ...config.importViewerOptions,\n });\n }\n\n return this.codeViewer;\n },\n });\n};\n","import type { Editor } from 'grapesjs';\nimport { RequiredPluginOptions } from '..';\nimport {\n cmdClear,\n cmdDeviceDesktop,\n cmdDeviceMobile,\n cmdDeviceTablet,\n} from './../consts';\nimport openImport from './openImport';\n\nexport default (editor: Editor, config: RequiredPluginOptions) => {\n const { Commands } = editor;\n const txtConfirm = config.textCleanCanvas;\n\n openImport(editor, config);\n\n Commands.add(cmdDeviceDesktop, {\n run: ed => ed.setDevice('Desktop'),\n stop: () => {},\n });\n Commands.add(cmdDeviceTablet, {\n run: ed => ed.setDevice('Tablet'),\n stop: () => {},\n });\n Commands.add(cmdDeviceMobile, {\n run: ed => ed.setDevice('Mobile portrait'),\n stop: () => {},\n });\n Commands.add(cmdClear, (e: Editor) => confirm(txtConfirm) && e.runCommand('core:canvas-clear'));\n}\n","import type { Editor, Plugin } from 'grapesjs';\nimport blocks from './blocks';\nimport commands from './commands';\nimport panels from './panels';\n\nexport type PluginOptions = {\n /**\n * Which blocks to add.\n * @default ['link-block', 'quote', 'text-basic']\n */\n blocks?: string[];\n\n /**\n * Add custom block options, based on block id.\n * @default (blockId) => ({})\n * @example (blockId) => blockId === 'quote' ? { attributes: {...} } : {};\n */\n block?: (blockId: string) => ({});\n\n /**\n * Modal import title.\n * @default 'Import'\n */\n modalImportTitle?: string;\n\n /**\n * Modal import button text.\n * @default 'Import'\n */\n modalImportButton?: string;\n\n /**\n * Import description inside import modal.\n * @default ''\n */\n modalImportLabel?: string;\n\n /**\n * Default content to setup on import model open.\n * Could also be a function with a dynamic content return (must be a string).\n * @default ''\n * @example editor => editor.getHtml()\n */\n modalImportContent?: string | ((editor: Editor) => string);\n\n /**\n * Code viewer (eg. CodeMirror) options.\n * @default {}\n */\n importViewerOptions?: Record;\n\n /**\n * Confirm text before clearing the canvas.\n * @default 'Are you sure you want to clear the canvas?'\n */\n textCleanCanvas?: string;\n\n /**\n * Show the Style Manager on component change.\n * @default true\n */\n showStylesOnChange?: boolean;\n\n /**\n * Load custom preset theme.\n * @default true\n */\n useCustomTheme?: boolean;\n};\n\nexport type RequiredPluginOptions = Required;\n\nconst plugin: Plugin = (editor, opts: Partial = {}) => {\n const config: RequiredPluginOptions = {\n blocks: ['link-block', 'quote', 'text-basic'],\n block: () => ({}),\n modalImportTitle: 'Import',\n modalImportButton: 'Import',\n modalImportLabel: '',\n modalImportContent: '',\n importViewerOptions: {},\n textCleanCanvas: 'Are you sure you want to clear the canvas?',\n showStylesOnChange: true,\n useCustomTheme: true,\n ...opts,\n };\n\n if (config.useCustomTheme && typeof window !== 'undefined') {\n const primaryColor = '#463a3c';\n const secondaryColor = '#b9a5a6';\n const tertiaryColor = '#804f7b';\n const quaternaryColor = '#d97aa6';\n const prefix = 'gjs-';\n let cssString = '';\n\n [\n ['one', primaryColor],\n ['two', secondaryColor],\n ['three', tertiaryColor],\n ['four', quaternaryColor],\n ].forEach(([cnum, ccol]) => {\n cssString += `\n .${prefix}${cnum}-bg {\n background-color: ${ccol};\n }\n\n .${prefix}${cnum}-color {\n color: ${ccol};\n }\n\n .${prefix}${cnum}-color-h:hover {\n color: ${ccol};\n }\n `;\n });\n\n const style = document.createElement('style');\n style.innerText = cssString;\n document.head.appendChild(style);\n }\n\n // Load blocks\n blocks(editor, config);\n\n // Load commands\n commands(editor, config);\n\n // Load panels\n panels(editor, config);\n}\n\nexport default plugin;\n","import type { Editor, BlockProperties } from 'grapesjs';\nimport { RequiredPluginOptions } from '.';\n\nexport default (editor: Editor, opts: RequiredPluginOptions) => {\n const addBlock = (id: string, def: BlockProperties) => {\n opts.blocks.indexOf(id)! >= 0 && editor.Blocks.add(id, {\n select: true,\n category: 'Basic',\n ...def,\n ...opts.block(id),\n });\n }\n\n addBlock('link-block', {\n label: 'Link Block',\n media: `\n \n `,\n content: {\n type: 'link',\n editable: false,\n droppable: true,\n style: {\n display: 'inline-block',\n padding: '5px',\n 'min-height': '50px',\n 'min-width': '50px'\n }\n },\n });\n\n addBlock('quote', {\n label: 'Quote',\n media: `\n \n `,\n content: `
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\n
`\n });\n\n addBlock('text-basic', {\n label: 'Text section',\n media: `\n \n `,\n content: `
\n

Insert title here

\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

\n
`\n });\n}\n","import type { Editor } from 'grapesjs';\nimport { RequiredPluginOptions } from '.';\n\nimport {\n cmdImport,\n cmdDeviceDesktop,\n cmdDeviceTablet,\n cmdDeviceMobile,\n cmdClear\n} from './consts';\n\nexport default (editor: Editor, opts: RequiredPluginOptions) => {\n const { Panels } = editor;\n const config = editor.getConfig();\n const swv = 'sw-visibility';\n const expt = 'export-template';\n const osm = 'open-sm';\n const otm = 'open-tm';\n const ola = 'open-layers';\n const obl = 'open-blocks';\n const ful = 'fullscreen';\n const prv = 'preview';\n const iconStyle = 'style=\"display: block; max-width:22px\"';\n\n config.showDevices = false;\n\n Panels.getPanels().reset([\n {\n id: 'commands',\n buttons: [{}],\n },\n {\n id: 'devices-c',\n buttons: [{\n id: cmdDeviceDesktop,\n command: cmdDeviceDesktop,\n active: true,\n label: `\n \n `\n },{\n id: cmdDeviceTablet,\n command: cmdDeviceTablet,\n label: `\n \n `\n },{\n id: cmdDeviceMobile,\n command: cmdDeviceMobile,\n label: `\n \n `\n }]\n },\n {\n id: 'options',\n buttons: [{\n id: swv,\n command: swv,\n context: swv,\n label: `\n \n `,\n },{\n id: prv,\n context: prv,\n command: () => editor.runCommand(prv),\n label: ``\n },{\n id: ful,\n command: ful,\n context: ful,\n label: `\n \n `\n },{\n id: expt,\n command: () => editor.runCommand(expt),\n label: `\n \n `\n },{\n id: 'undo',\n command: () => editor.runCommand('core:undo'),\n label: `\n \n `\n },{\n id: 'redo',\n command: () => editor.runCommand('core:redo'),\n label: `\n \n `,\n },{\n id: cmdImport,\n command: () => editor.runCommand(cmdImport),\n label: `\n \n `,\n },{\n id: cmdClear,\n command: () => editor.runCommand(cmdClear),\n label: `\n \n `,\n }],\n },{\n id: 'views',\n buttons : [{\n id: osm,\n command: osm,\n active: true,\n label: `\n \n `,\n },{\n id: otm,\n command: otm,\n label: `\n \n `\n },{\n id: ola,\n command: ola,\n label: `\n \n `\n },{\n id: obl,\n command: obl,\n label: `\n \n `\n }],\n }]);\n\n const openBl = Panels.getButton('views', obl);\n editor.on('load', () => openBl?.set('active', true));\n\n // On component change show the Style Manager\n opts.showStylesOnChange && editor.on('component:selected', () => {\n const openSmBtn = Panels.getButton('views', osm);\n const openLayersBtn = Panels.getButton('views', ola);\n\n // Don't switch when the Layer Manager is on or\n // there is no selected component\n if ((!openLayersBtn || !openLayersBtn.get('active')) && editor.getSelected()) {\n openSmBtn?.set('active', true);\n }\n });\n}\n"],"names":["root","factory","exports","module","define","amd","globalThis","window","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","cmdImport","cmdDeviceDesktop","cmdDeviceTablet","cmdDeviceMobile","cmdClear","editor","config","Commands","txtConfirm","textCleanCanvas","pfx","getConfig","importLabel","modalImportLabel","importCnt","modalImportContent","add","codeViewer","container","run","codeContent","getCodeViewer","Modal","open","title","modalImportTitle","content","getContainer","onceClose","stopCommand","setContent","refresh","setTimeout","focus","stop","close","document","createElement","className","labelEl","innerHTML","appendChild","getElement","btnImp","type","modalImportButton","onclick","Css","clear","setComponents","getContent","trim","CodeManager","createViewer","codeName","theme","readOnly","importViewerOptions","openImport","ed","setDevice","e","confirm","runCommand","opts","blocks","block","showStylesOnChange","useCustomTheme","forEach","cnum","ccol","style","innerText","head","addBlock","id","def","indexOf","Blocks","select","category","label","media","editable","droppable","display","padding","commands","Panels","swv","expt","osm","otm","ola","obl","ful","prv","iconStyle","showDevices","getPanels","reset","buttons","command","active","context","openBl","getButton","on","set","openSmBtn","openLayersBtn","getSelected","panels"],"sourceRoot":""}