create-nextjs-cms 0.5.55 → 0.5.58
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/package.json +4 -4
- package/templates/default/CHANGELOG.md +140 -140
- package/templates/default/_gitignore +1 -0
- package/templates/default/app/(auth)/auth/login/LoginPage.tsx +14 -11
- package/templates/default/app/(rootLayout)/admins/page.tsx +7 -2
- package/templates/default/app/(rootLayout)/advanced/page.tsx +8 -2
- package/templates/default/app/(rootLayout)/browse/[section]/[page]/page.tsx +17 -3
- package/templates/default/app/(rootLayout)/categorized/[section]/page.tsx +9 -1
- package/templates/default/app/(rootLayout)/dashboard-new/page.tsx +7 -0
- package/templates/default/app/(rootLayout)/edit/[section]/[itemId]/page.tsx +11 -1
- package/templates/default/app/(rootLayout)/layout.tsx +8 -1
- package/templates/default/app/(rootLayout)/new/[section]/page.tsx +9 -1
- package/templates/default/app/(rootLayout)/section/[section]/page.tsx +10 -1
- package/templates/default/app/(rootLayout)/settings/page.tsx +7 -1
- package/templates/default/app/api/trpc/[trpc]/route.ts +1 -1
- package/templates/default/app/api/video/route.ts +1 -1
- package/templates/default/app/layout.tsx +5 -3
- package/templates/default/app/providers.tsx +10 -9
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/LICENSE +191 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/README.md +118 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/build.js +38 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/check.js +14 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/channel.js +177 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/colour.js +195 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/composite.js +212 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/constructor.js +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.d.ts +1971 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.js +16 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/input.js +809 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/is.js +143 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/libvips.js +207 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/operation.js +1016 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/output.js +1666 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/resize.js +595 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/sharp.js +121 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/utility.js +291 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/package.json +202 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/binding.gyp +298 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.cc +1130 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.h +402 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.cc +346 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.h +90 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.cc +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.h +137 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.cc +1814 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.h +408 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/sharp.cc +43 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.cc +186 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.h +62 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.cc +288 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.h +22 -0
- package/templates/default/components/BrowsePage.tsx +4 -4
- package/templates/default/components/DashboardNewPage.tsx +252 -0
- package/templates/default/components/Layout.tsx +2 -2
- package/templates/default/components/LogPage.tsx +2 -3
- package/templates/default/components/NavbarAlt.tsx +5 -5
- package/templates/default/components/SettingsPage.tsx +1 -1
- package/templates/default/components/Sidebar.tsx +7 -7
- package/templates/default/components/form/Form.tsx +5 -5
- package/templates/default/components/form/helpers/util.ts +5 -5
- package/templates/default/dynamic-schemas/schema.ts +381 -381
- package/templates/default/next-env.d.ts +1 -1
- package/templates/default/next.config.ts +24 -0
- package/templates/default/package.json +23 -17
- package/templates/default/{middleware.ts → proxy.ts} +3 -4
- package/templates/default/test/prize.section.ts +58 -0
- package/templates/default/tsconfig.json +6 -3
- package/templates/default/app/api/placeholder/route.ts +0 -7
- package/templates/default/components/form/helpers/_section-hot-reload.js +0 -11
- package/templates/default/public/tinymce/CHANGELOG.md +0 -3940
- package/templates/default/public/tinymce/README.md +0 -77
- package/templates/default/public/tinymce/bower.json +0 -27
- package/templates/default/public/tinymce/composer.json +0 -52
- package/templates/default/public/tinymce/icons/default/icons.js +0 -239
- package/templates/default/public/tinymce/icons/default/icons.min.js +0 -1
- package/templates/default/public/tinymce/icons/default/index.js +0 -7
- package/templates/default/public/tinymce/license.md +0 -9
- package/templates/default/public/tinymce/models/dom/index.js +0 -7
- package/templates/default/public/tinymce/models/dom/model.js +0 -8980
- package/templates/default/public/tinymce/models/dom/model.min.js +0 -1
- package/templates/default/public/tinymce/notices.txt +0 -21
- package/templates/default/public/tinymce/package.json +0 -32
- package/templates/default/public/tinymce/plugins/accordion/index.js +0 -7
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +0 -1373
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/advlist/index.js +0 -7
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +0 -473
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/anchor/index.js +0 -7
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +0 -237
- package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autolink/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +0 -315
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autoresize/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +0 -221
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autosave/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +0 -249
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/charmap/index.js +0 -7
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +0 -997
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/code/index.js +0 -7
- package/templates/default/public/tinymce/plugins/code/plugin.js +0 -98
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/codesample/index.js +0 -7
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +0 -3655
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +0 -9
- package/templates/default/public/tinymce/plugins/directionality/index.js +0 -7
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +0 -634
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/index.js +0 -7
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +0 -809
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/fullscreen/index.js +0 -7
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +0 -1607
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/help/index.js +0 -7
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he-IL.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th-TH.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +0 -87
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -87
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -93
- package/templates/default/public/tinymce/plugins/help/plugin.js +0 -826
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/image/index.js +0 -7
- package/templates/default/public/tinymce/plugins/image/plugin.js +0 -1691
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/importcss/index.js +0 -7
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +0 -401
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/insertdatetime/index.js +0 -7
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +0 -187
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/link/index.js +0 -7
- package/templates/default/public/tinymce/plugins/link/plugin.js +0 -1709
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/lists/index.js +0 -7
- package/templates/default/public/tinymce/plugins/lists/plugin.js +0 -602
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/media/index.js +0 -7
- package/templates/default/public/tinymce/plugins/media/plugin.js +0 -1442
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/nonbreaking/index.js +0 -7
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +0 -128
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/pagebreak/index.js +0 -7
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +0 -123
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/preview/index.js +0 -7
- package/templates/default/public/tinymce/plugins/preview/plugin.js +0 -843
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/quickbars/index.js +0 -7
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +0 -654
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/save/index.js +0 -7
- package/templates/default/public/tinymce/plugins/save/plugin.js +0 -136
- package/templates/default/public/tinymce/plugins/save/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/searchreplace/index.js +0 -7
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +0 -1367
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/table/index.js +0 -7
- package/templates/default/public/tinymce/plugins/table/plugin.js +0 -4008
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/visualblocks/index.js +0 -7
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +0 -106
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/visualchars/index.js +0 -7
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +0 -808
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/wordcount/index.js +0 -7
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +0 -480
- package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +0 -1
- package/templates/default/public/tinymce/skins/content/dark/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/dark/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/dark/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/default/content.css +0 -70
- package/templates/default/public/tinymce/skins/content/default/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/default/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/default/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/default/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/document/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/document/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/document/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/document/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/document/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +0 -70
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/writer/content.css +0 -71
- package/templates/default/public/tinymce/skins/content/writer/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/writer/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/writer/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/writer/content.ts +0 -3
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +0 -1037
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +0 -5615
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide/skin.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +0 -1025
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +0 -5618
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +0 -1037
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +0 -5734
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +0 -1025
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -5734
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.ts +0 -508
- package/templates/default/public/tinymce/themes/silver/index.js +0 -7
- package/templates/default/public/tinymce/themes/silver/theme.js +0 -34748
- package/templates/default/public/tinymce/themes/silver/theme.min.js +0 -1
- package/templates/default/public/tinymce/tinymce.d.ts +0 -3413
- package/templates/default/public/tinymce/tinymce.js +0 -41518
- package/templates/default/public/tinymce/tinymce.min.js +0 -10
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>!!a(e,t.prototype)||e.constructor?.name===t.name,i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,s=e=>t=>typeof t===e,r=i("string"),o=i("object"),n=e=>((e,i)=>o(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=e=>null===e;const m=s("boolean"),d=e=>!(e=>null==e)(e),g=s("function"),p=s("number"),u=()=>{};class h{tag;value;static singletonNone=new h(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return d(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const b=Array.prototype.push,y=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);b.apply(t,e[a])}return t};g(Array.from)&&Array.from;const v=Object.keys,f=Object.hasOwnProperty,A=(e,t)=>f.call(e,t),w=(D=(e,t)=>n(e)&&n(t)?w(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)A(i,e)&&(t[e]=D(t[e],i[e]))}return t});var D;const _=e=>e.length>0,C=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I=C,U=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||m(a)||p(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)};var S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>t=>t.options.get(e),T=N("image_dimensions"),E=N("image_advtab"),L=N("image_uploadtab"),O=N("image_prepend_url"),j=N("image_class_list"),M=N("image_description"),R=N("image_title"),k=N("image_caption"),z=N("image_list"),B=N("a11y_advanced_options"),P=N("automatic_uploads"),H=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),G=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),W=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),$=(e,t)=>{const a=e.options.get;return x.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},V=S.DOM,K=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",Z=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",q=e=>e.style.borderWidth?F(e.style.borderWidth):"",J=(e,t)=>e.hasAttribute(t)?e.getAttribute(t)??"":"",Q=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,X=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},Y=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ee=(e,t)=>(e,a,i)=>{const s=e.style;s[a]?(s[a]=G(i),Y(e,t)):X(e,a,i)},te=(e,t)=>e.style[t]?F(e.style[t]):J(e,t),ae=(e,t)=>{const a=G(t);e.style.marginLeft=a,e.style.marginRight=a},ie=(e,t)=>{const a=G(t);e.style.marginTop=a,e.style.marginBottom=a},se=(e,t)=>{const a=G(t);e.style.borderWidth=a},re=(e,t)=>{e.style.borderStyle=t},oe=e=>e.style.borderStyle??"",ne=e=>d(e)&&"FIGURE"===e.nodeName,le=e=>{const t=V.getAttrib(e,"alt"),a=V.getAttrib(e,"role");return e.hasAttribute("alt")&&0===t.length||"presentation"===a||"none"===a},ce=e=>le(e)?"":J(e,"alt"),me=(e,t)=>{const a=document.createElement("img");return X(a,"style",t.style),(K(a)||""!==t.hspace)&&ae(a,t.hspace),(Z(a)||""!==t.vspace)&&ie(a,t.vspace),(q(a)||""!==t.border)&&se(a,t.border),(oe(a)||""!==t.borderStyle)&&re(a,t.borderStyle),e(a.getAttribute("style")??"")},de=(e,t)=>({src:J(t,"src"),alt:ce(t),title:J(t,"title"),width:te(t,"width"),height:te(t,"height"),class:J(t,"class"),style:e(J(t,"style")),caption:Q(t),hspace:K(t),vspace:Z(t),border:q(t),borderStyle:oe(t),isDecorative:le(t)}),ge=(e,t,a,i,s)=>{a[i]!==t[i]&&s(e,i,String(a[i]))},pe=(e,t,a)=>{if(a){V.setAttrib(e,"role","presentation");const t=I(e);U(t,"alt","")}else{if(c(t)){I(e).dom.removeAttribute("alt")}else{const a=I(e);U(a,"alt",t)}"presentation"===V.getAttrib(e,"role")&&V.setAttrib(e,"role","")}},ue=(e,t)=>(a,i,s)=>{e(a,s),Y(a,t)},he=(e,t,a)=>{const i=de(e,a);ge(a,i,t,"caption",((e,t,a)=>(e=>{Q(e)?(e=>{const t=e.parentNode;d(t)&&(V.insertAfter(e,t),V.remove(t))})(e):(e=>{const t=V.create("figure",{class:"image"});V.insertAfter(t,e),t.appendChild(e),t.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),ge(a,i,t,"src",X),ge(a,i,t,"title",X),ge(a,i,t,"width",ee(0,e)),ge(a,i,t,"height",ee(0,e)),ge(a,i,t,"class",X),ge(a,i,t,"style",ue(((e,t)=>X(e,"style",t)),e)),ge(a,i,t,"hspace",ue(ae,e)),ge(a,i,t,"vspace",ue(ie,e)),ge(a,i,t,"border",ue(se,e)),ge(a,i,t,"borderStyle",ue(re,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||pe(e,a.alt,a.isDecorative)})(a,i,t)},be=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},ye=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||W(t))?null:t},ve=(e,t)=>{const a=e.dom,i=(t=>{const a={};var i;return((e,t,a,i)=>{((e,t)=>{const a=v(e);for(let i=0,s=a.length;i<s;i++){const s=a[i];t(e[s],s)}})(e,((e,s)=>{(t(e,s)?a:i)(e,s)}))})(t,((t,a)=>!e.schema.isValidChild(a,"figure")),(i=a,(e,t)=>{i[t]=e}),u),a})(e.schema.getTextBlockElements()),s=a.getParent(t.parentNode,(e=>{return t=i,a=e.nodeName,A(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return s?a.split(s,t)??t:t},fe=(e,t)=>{const a=((t,a)=>{const i=document.createElement("img");if(he((t=>be(e,t)),{...a,caption:!1},i),pe(i,a.alt,a.isDecorative),a.caption){const e=V.create("figure",{class:"image"});return e.appendChild(i),e.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return i})(0,t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.insertContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),ne(i)){const t=ve(e,i);e.selection.select(t)}else e.selection.select(i)},Ae=(e,t)=>{const a=ye(e);if(a){const i={...de((t=>be(e,t)),a),...t},s=((e,t)=>{const a=t.src;return{...t,src:$(e,a)?a:""}})(e,i);i.src?((e,t)=>{const a=ye(e);if(a)if(he((t=>be(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),ne(a.parentNode)){e.dom.setStyle(a,"float","");const t=a.parentNode;ve(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)})(e,s):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&fe(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})};var we=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),De=tinymce.util.Tools.resolve("tinymce.util.Tools");const _e=e=>r(e.value)?e.value:"",Ce=(e,t)=>{const a=[];return De.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const s=Ce(e.menu,t);a.push({text:i,items:s})}else{const s=t(e);a.push({text:i,value:s})}})),a},Ie=(e=_e)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),Ue=(e,t)=>(e=>{for(let i=0;i<e.length;i++){const s=(e=>A(e,"items"))(a=e[i])?Ue(a.items,t):a.value===t?h.some(a):h.none();if(s.isSome())return s}var a;return h.none()})(e),Se=Ie,xe=(e,t)=>e.bind((e=>Ue(e,t))),Ne=e=>{const t=Se((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=z(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):g(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>y([[{text:"None",value:""}],e]))))}))})),i=(w=j(e),Ie(_e)(w)),s=E(e),o=L(e),n=(e=>_(e.options.get("images_upload_url")))(e),l=(e=>d(e.options.get("images_upload_handler")))(e),c=(e=>{const t=ye(e);return t?de((t=>be(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=M(e),p=R(e),u=T(e),b=k(e),v=B(e),f=P(e),A=h.some(O(e)).filter((e=>r(e)&&e.length>0));var w;return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:s,hasUploadTab:o,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:p,hasDimensions:u,hasImageCaption:b,prependURL:A,hasAccessibilityOptions:v,automaticUploads:f})))},Te=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return y([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(s=e.classList.isSome()&&e.hasImageCaption,s?{type:"grid",columns:2}:{type:"panel"}),items:y([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var s},Ee=e=>({title:"General",name:"general",items:Te(e)}),Le=Te,Oe=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),je=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Me=(e,t,a,i)=>{((e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))})(t,i),((e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const s=w({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&xe(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&m(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,s,i),t.setData(s)}})(t,i),((e,t,a,i)=>{const s=i.getData(),r=s.src.value,o=s.src.meta||{};o.width||o.height||!t.hasDimensions||(_(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),s=xe(e.imageList,i.src.value);t.prevImage=s,a.setData({images:s.map((e=>e.value)).getOr("")})})(t,a,i)},Re=(e,t,a,i)=>{const s=i.getData();var r;i.block("Uploading image"),(r=s.fileinput,(e=>0<e.length?h.some(e[0]):h.none())(r)).fold((()=>{i.unblock()}),(s=>{const r=URL.createObjectURL(s),o=()=>{i.unblock(),URL.revokeObjectURL(r)},n=s=>{i.setData({src:{value:s,meta:{}}}),i.showTab("general"),Me(e,t,a,i),i.focus("src")};var l;(l=s,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{t(a.error?.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(s,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),o()})).catch((t=>{o(),e.alertErr(t,(()=>{i.focus("fileinput")}))})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},ke=(e,t,a)=>(i,s)=>{"src"===s.name?Me(e,t,a,i):"images"===s.name?((e,t,a,i)=>{const s=i.getData(),r=xe(t.imageList,s.images);r.each((e=>{const t=""===s.alt||a.prevImage.map((e=>e.text===s.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Me(e,t,a,i)})(e,t,a,i):"alt"===s.name?a.prevAlt=i.getData().alt:"fileinput"===s.name?Re(e,t,a,i):"isDecorative"===s.name&&i.setEnabled("alt",!i.getData().isDecorative)},ze=e=>()=>{e.open=!1},Be=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:y([[Ee(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Le(e)},Pe=(e,t,a)=>i=>{const s=w(Oe(t.image),i.getData()),r={...s,style:me(a.normalizeCss,je(s,!1))};e.execCommand("mceUpdateImage",!1,je(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},He=e=>t=>$(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.parentNode&&a.parentNode.removeChild(a),t(e)};a.addEventListener("load",(()=>{const e={width:H(a.width,a.clientWidth),height:H(a.height,a.clientHeight)};i(Promise.resolve(e))})),a.addEventListener("error",(()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))}));const s=a.style;s.visibility="hidden",s.position="fixed",s.bottom=s.left="0px",s.width=s.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Fe=e=>(t,a,i)=>e.editorUpload.blobCache.create({blob:t,blobUri:a,name:t.name?.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]}),Ge=e=>t=>{e.editorUpload.blobCache.add(t)},We=e=>(t,a)=>{e.windowManager.alert(t,a)},$e=e=>t=>be(e,t),Ve=e=>t=>e.dom.parseStyle(t),Ke=e=>(t,a)=>e.dom.serializeStyle(t,a),Ze=e=>t=>we(e).upload([t],!1).then((e=>0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(e[0].error?.message):e[0])),qe=e=>{const t={imageSize:He(e),addToBlobCache:Ge(e),createBlobCache:Fe(e),alertErr:We(e),normalizeCss:$e(e),parseStyle:Ve(e),serializeStyle:Ke(e),uploadImage:Ze(e)};return{open:()=>{Ne(e).then((a=>{const i=(e=>({prevImage:xe(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Be(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Oe(a.image),onSubmit:Pe(e,a,t),onChange:ke(t,a,i),onClose:ze(i)}})).then(e.windowManager.open)}}},Je=e=>{const t=e.attr("class");return d(t)&&/\bimage\b/.test(t)},Qe=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const s=t[a];Je(s)&&(s.attr("contenteditable",e?"false":null),De.each(s.getAll("figcaption"),i))}},Xe=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,o)||g(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Qe(!0)),e.serializer.addNodeFilter("figure",Qe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:qe(e).open,onSetup:t=>{t.setActive(d(ye(e)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=Xe(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:qe(e).open,onSetup:Xe(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(ne(t)||"IMG"===t.nodeName&&!W(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",qe(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ae(e,a)))}))})(e)}))}();
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
-
|
|
10
|
-
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
11
|
-
const hasProto = (v, constructor, predicate) => {
|
|
12
|
-
if (predicate(v, constructor.prototype)) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
// String-based fallback time
|
|
17
|
-
return v.constructor?.name === constructor.name;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const typeOf = (x) => {
|
|
21
|
-
const t = typeof x;
|
|
22
|
-
if (x === null) {
|
|
23
|
-
return 'null';
|
|
24
|
-
}
|
|
25
|
-
else if (t === 'object' && Array.isArray(x)) {
|
|
26
|
-
return 'array';
|
|
27
|
-
}
|
|
28
|
-
else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
29
|
-
return 'string';
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return t;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const isType = (type) => (value) => typeOf(value) === type;
|
|
36
|
-
const isSimpleType = (type) => (value) => typeof value === type;
|
|
37
|
-
const isString = isType('string');
|
|
38
|
-
const isObject = isType('object');
|
|
39
|
-
const isArray = isType('array');
|
|
40
|
-
const isFunction = isSimpleType('function');
|
|
41
|
-
|
|
42
|
-
const nativeSlice = Array.prototype.slice;
|
|
43
|
-
const nativePush = Array.prototype.push;
|
|
44
|
-
const map = (xs, f) => {
|
|
45
|
-
// pre-allocating array size when it's guaranteed to be known
|
|
46
|
-
// http://jsperf.com/push-allocated-vs-dynamic/22
|
|
47
|
-
const len = xs.length;
|
|
48
|
-
const r = new Array(len);
|
|
49
|
-
for (let i = 0; i < len; i++) {
|
|
50
|
-
const x = xs[i];
|
|
51
|
-
r[i] = f(x, i);
|
|
52
|
-
}
|
|
53
|
-
return r;
|
|
54
|
-
};
|
|
55
|
-
const flatten = (xs) => {
|
|
56
|
-
// Note, this is possible because push supports multiple arguments:
|
|
57
|
-
// http://jsperf.com/concat-push/6
|
|
58
|
-
// Note that in the past, concat() would silently work (very slowly) for array-like objects.
|
|
59
|
-
// With this change it will throw an error.
|
|
60
|
-
const r = [];
|
|
61
|
-
for (let i = 0, len = xs.length; i < len; ++i) {
|
|
62
|
-
// Ensure that each value is an array itself
|
|
63
|
-
if (!isArray(xs[i])) {
|
|
64
|
-
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
|
65
|
-
}
|
|
66
|
-
nativePush.apply(r, xs[i]);
|
|
67
|
-
}
|
|
68
|
-
return r;
|
|
69
|
-
};
|
|
70
|
-
const bind = (xs, f) => flatten(map(xs, f));
|
|
71
|
-
isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
|
|
72
|
-
|
|
73
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
74
|
-
|
|
75
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
76
|
-
|
|
77
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
78
|
-
|
|
79
|
-
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
80
|
-
|
|
81
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
82
|
-
const register = (editor) => {
|
|
83
|
-
const registerOption = editor.options.register;
|
|
84
|
-
const filterProcessor = (value) => isString(value) || isFunction(value) || isObject(value);
|
|
85
|
-
registerOption('importcss_merge_classes', {
|
|
86
|
-
processor: 'boolean',
|
|
87
|
-
default: true
|
|
88
|
-
});
|
|
89
|
-
registerOption('importcss_exclusive', {
|
|
90
|
-
processor: 'boolean',
|
|
91
|
-
default: true
|
|
92
|
-
});
|
|
93
|
-
registerOption('importcss_selector_converter', {
|
|
94
|
-
processor: 'function'
|
|
95
|
-
});
|
|
96
|
-
registerOption('importcss_selector_filter', {
|
|
97
|
-
processor: filterProcessor
|
|
98
|
-
});
|
|
99
|
-
registerOption('importcss_file_filter', {
|
|
100
|
-
processor: filterProcessor
|
|
101
|
-
});
|
|
102
|
-
registerOption('importcss_groups', {
|
|
103
|
-
processor: 'object[]'
|
|
104
|
-
});
|
|
105
|
-
registerOption('importcss_append', {
|
|
106
|
-
processor: 'boolean',
|
|
107
|
-
default: false
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
const shouldMergeClasses = option('importcss_merge_classes');
|
|
111
|
-
const shouldImportExclusive = option('importcss_exclusive');
|
|
112
|
-
const getSelectorConverter = option('importcss_selector_converter');
|
|
113
|
-
const getSelectorFilter = option('importcss_selector_filter');
|
|
114
|
-
const getCssGroups = option('importcss_groups');
|
|
115
|
-
const shouldAppend = option('importcss_append');
|
|
116
|
-
const getFileFilter = option('importcss_file_filter');
|
|
117
|
-
const getSkin = option('skin');
|
|
118
|
-
const getSkinUrl = option('skin_url');
|
|
119
|
-
|
|
120
|
-
const generate = () => {
|
|
121
|
-
const ungroupedOrder = [];
|
|
122
|
-
const groupOrder = [];
|
|
123
|
-
const groups = {};
|
|
124
|
-
const addItemToGroup = (groupTitle, itemInfo) => {
|
|
125
|
-
if (groups[groupTitle]) {
|
|
126
|
-
groups[groupTitle].push(itemInfo);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
groupOrder.push(groupTitle);
|
|
130
|
-
groups[groupTitle] = [itemInfo];
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
const addItem = (itemInfo) => {
|
|
134
|
-
ungroupedOrder.push(itemInfo);
|
|
135
|
-
};
|
|
136
|
-
const toFormats = () => {
|
|
137
|
-
const groupItems = bind(groupOrder, (g) => {
|
|
138
|
-
const items = groups[g];
|
|
139
|
-
return items.length === 0 ? [] : [{
|
|
140
|
-
title: g,
|
|
141
|
-
items
|
|
142
|
-
}];
|
|
143
|
-
});
|
|
144
|
-
return groupItems.concat(ungroupedOrder);
|
|
145
|
-
};
|
|
146
|
-
return {
|
|
147
|
-
addItemToGroup,
|
|
148
|
-
addItem,
|
|
149
|
-
toFormats
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
const internalEditorStyle = /^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/;
|
|
154
|
-
const removeCacheSuffix = (url) => {
|
|
155
|
-
const cacheSuffix = global$1.cacheSuffix;
|
|
156
|
-
if (isString(url)) {
|
|
157
|
-
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
|
158
|
-
}
|
|
159
|
-
return url;
|
|
160
|
-
};
|
|
161
|
-
const isSkinContentCss = (editor, href) => {
|
|
162
|
-
const skin = getSkin(editor);
|
|
163
|
-
if (skin) {
|
|
164
|
-
const skinUrlBase = getSkinUrl(editor);
|
|
165
|
-
const skinUrl = skinUrlBase ? editor.documentBaseURI.toAbsolute(skinUrlBase) : global$2.baseURL + '/skins/ui/' + skin;
|
|
166
|
-
const contentSkinUrlPart = global$2.baseURL + '/skins/content/';
|
|
167
|
-
const suffix = editor.editorManager.suffix;
|
|
168
|
-
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + `${suffix}.css` || href.indexOf(contentSkinUrlPart) !== -1;
|
|
169
|
-
}
|
|
170
|
-
return false;
|
|
171
|
-
};
|
|
172
|
-
const compileFilter = (filter) => {
|
|
173
|
-
if (isString(filter)) {
|
|
174
|
-
return (value) => {
|
|
175
|
-
return value.indexOf(filter) !== -1;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
else if (filter instanceof RegExp) {
|
|
179
|
-
return (value) => {
|
|
180
|
-
return filter.test(value);
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
return filter;
|
|
184
|
-
};
|
|
185
|
-
const isCssImportRule = (rule) => rule.styleSheet;
|
|
186
|
-
const isCssPageRule = (rule) => rule.selectorText;
|
|
187
|
-
const getSelectors = (editor, doc, fileFilter) => {
|
|
188
|
-
const selectors = [];
|
|
189
|
-
const contentCSSUrls = {};
|
|
190
|
-
const append = (styleSheet, imported) => {
|
|
191
|
-
let href = styleSheet.href;
|
|
192
|
-
let rules;
|
|
193
|
-
href = removeCacheSuffix(href);
|
|
194
|
-
if (!href || fileFilter && !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
// TODO: Is this still need as TypeScript/MDN says imports doesn't exist?
|
|
198
|
-
global.each(styleSheet.imports, (styleSheet) => {
|
|
199
|
-
append(styleSheet, true);
|
|
200
|
-
});
|
|
201
|
-
try {
|
|
202
|
-
rules = styleSheet.cssRules || styleSheet.rules;
|
|
203
|
-
}
|
|
204
|
-
catch {
|
|
205
|
-
// Firefox fails on rules to remote domain for example:
|
|
206
|
-
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
|
207
|
-
}
|
|
208
|
-
global.each(rules, (cssRule) => {
|
|
209
|
-
if (isCssImportRule(cssRule) && cssRule.styleSheet) {
|
|
210
|
-
append(cssRule.styleSheet, true);
|
|
211
|
-
}
|
|
212
|
-
else if (isCssPageRule(cssRule)) {
|
|
213
|
-
global.each(cssRule.selectorText.split(','), (selector) => {
|
|
214
|
-
selectors.push(global.trim(selector));
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
global.each(editor.contentCSS, (url) => {
|
|
220
|
-
contentCSSUrls[url] = true;
|
|
221
|
-
});
|
|
222
|
-
if (!fileFilter) {
|
|
223
|
-
fileFilter = (href, imported) => {
|
|
224
|
-
return imported || contentCSSUrls[href];
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
try {
|
|
228
|
-
global.each(doc.styleSheets, (styleSheet) => {
|
|
229
|
-
append(styleSheet);
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
catch {
|
|
233
|
-
// Ignore
|
|
234
|
-
}
|
|
235
|
-
return selectors;
|
|
236
|
-
};
|
|
237
|
-
const defaultConvertSelectorToFormat = (editor, selectorText) => {
|
|
238
|
-
let format = {};
|
|
239
|
-
// Parse simple element.class1, .class1
|
|
240
|
-
const selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
|
241
|
-
if (!selector) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
const elementName = selector[1];
|
|
245
|
-
const classes = selector[2].substr(1).split('.').join(' ');
|
|
246
|
-
const inlineSelectorElements = global.makeMap('a,img');
|
|
247
|
-
// element.class - Produce block formats
|
|
248
|
-
if (selector[1]) {
|
|
249
|
-
format = {
|
|
250
|
-
title: selectorText
|
|
251
|
-
};
|
|
252
|
-
if (editor.schema.getTextBlockElements()[elementName]) {
|
|
253
|
-
// Text block format ex: h1.class1
|
|
254
|
-
format.block = elementName;
|
|
255
|
-
}
|
|
256
|
-
else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
|
257
|
-
// Block elements such as table.class and special inline elements such as a.class or img.class
|
|
258
|
-
format.selector = elementName;
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
// Inline format strong.class1
|
|
262
|
-
format.inline = elementName;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
else if (selector[2]) {
|
|
266
|
-
// .class - Produce inline span with classes
|
|
267
|
-
format = {
|
|
268
|
-
inline: 'span',
|
|
269
|
-
title: selectorText.substr(1),
|
|
270
|
-
classes
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
// Append to or override class attribute
|
|
274
|
-
if (shouldMergeClasses(editor)) {
|
|
275
|
-
format.classes = classes;
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
format.attributes = { class: classes };
|
|
279
|
-
}
|
|
280
|
-
return format;
|
|
281
|
-
};
|
|
282
|
-
const getGroupsBySelector = (groups, selector) => {
|
|
283
|
-
return global.grep(groups, (group) => {
|
|
284
|
-
return !group.filter || group.filter(selector);
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
const compileUserDefinedGroups = (groups) => {
|
|
288
|
-
return global.map(groups, (group) => {
|
|
289
|
-
return global.extend({}, group, {
|
|
290
|
-
original: group,
|
|
291
|
-
selectors: {},
|
|
292
|
-
filter: compileFilter(group.filter)
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
};
|
|
296
|
-
const isExclusiveMode = (editor, group) => {
|
|
297
|
-
// Exclusive mode can only be disabled when there are groups allowing the same style to be present in multiple groups
|
|
298
|
-
return group === null || shouldImportExclusive(editor);
|
|
299
|
-
};
|
|
300
|
-
const isUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {
|
|
301
|
-
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
|
302
|
-
};
|
|
303
|
-
const markUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {
|
|
304
|
-
if (isExclusiveMode(editor, group)) {
|
|
305
|
-
globallyUniqueSelectors[selector] = true;
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
group.selectors[selector] = true;
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
const convertSelectorToFormat = (editor, plugin, selector, group) => {
|
|
312
|
-
let selectorConverter;
|
|
313
|
-
const converter = getSelectorConverter(editor);
|
|
314
|
-
if (group && group.selector_converter) {
|
|
315
|
-
selectorConverter = group.selector_converter;
|
|
316
|
-
}
|
|
317
|
-
else if (converter) {
|
|
318
|
-
selectorConverter = converter;
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
selectorConverter = () => {
|
|
322
|
-
return defaultConvertSelectorToFormat(editor, selector);
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
return selectorConverter.call(plugin, selector, group);
|
|
326
|
-
};
|
|
327
|
-
const setup = (editor) => {
|
|
328
|
-
editor.on('init', () => {
|
|
329
|
-
const model = generate();
|
|
330
|
-
const globallyUniqueSelectors = {};
|
|
331
|
-
const selectorFilter = compileFilter(getSelectorFilter(editor));
|
|
332
|
-
const groups = compileUserDefinedGroups(getCssGroups(editor));
|
|
333
|
-
const processSelector = (selector, group) => {
|
|
334
|
-
if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
|
|
335
|
-
markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
|
|
336
|
-
const format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
|
|
337
|
-
if (format) {
|
|
338
|
-
const formatName = format.name || global$3.DOM.uniqueId();
|
|
339
|
-
editor.formatter.register(formatName, format);
|
|
340
|
-
return {
|
|
341
|
-
title: format.title,
|
|
342
|
-
format: formatName
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return null;
|
|
347
|
-
};
|
|
348
|
-
global.each(getSelectors(editor, editor.getDoc(), compileFilter(getFileFilter(editor))), (selector) => {
|
|
349
|
-
if (!internalEditorStyle.test(selector)) {
|
|
350
|
-
if (!selectorFilter || selectorFilter(selector)) {
|
|
351
|
-
const selectorGroups = getGroupsBySelector(groups, selector);
|
|
352
|
-
if (selectorGroups.length > 0) {
|
|
353
|
-
global.each(selectorGroups, (group) => {
|
|
354
|
-
const menuItem = processSelector(selector, group);
|
|
355
|
-
if (menuItem) {
|
|
356
|
-
model.addItemToGroup(group.title, menuItem);
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
const menuItem = processSelector(selector, null);
|
|
362
|
-
if (menuItem) {
|
|
363
|
-
model.addItem(menuItem);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
const items = model.toFormats();
|
|
370
|
-
editor.dispatch('addStyleModifications', {
|
|
371
|
-
items,
|
|
372
|
-
replace: !shouldAppend(editor)
|
|
373
|
-
});
|
|
374
|
-
});
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
const get = (editor) => {
|
|
378
|
-
const convertSelectorToFormat = (selectorText) => {
|
|
379
|
-
return defaultConvertSelectorToFormat(editor, selectorText);
|
|
380
|
-
};
|
|
381
|
-
return {
|
|
382
|
-
convertSelectorToFormat
|
|
383
|
-
};
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
var Plugin = () => {
|
|
387
|
-
global$4.add('importcss', (editor) => {
|
|
388
|
-
register(editor);
|
|
389
|
-
setup(editor);
|
|
390
|
-
return get(editor);
|
|
391
|
-
});
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
Plugin();
|
|
395
|
-
/** *****
|
|
396
|
-
* DO NOT EXPORT ANYTHING
|
|
397
|
-
*
|
|
398
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
399
|
-
*******/
|
|
400
|
-
|
|
401
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||r.constructor?.name===o.name)?"string":t;var s,r,o})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=e=>"function"==typeof e;Array.prototype.slice;const c=Array.prototype.push;n(Array.from)&&Array.from;var i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),y=u("importcss_selector_converter"),h=u("importcss_selector_filter"),d=u("importcss_groups"),g=u("importcss_append"),_=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),k=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);c.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(h(e)),u=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),m=(t,s)=>{if(((e,t,s,r)=>!(A(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=y(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||i.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};p.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let i,u=t.href;if(u=(e=>{const t=a.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=v(e);if(s){const r=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/",c=e.editorManager.suffix;return t===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch{}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch{}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(u,e);if(s.length>0)p.each(s,(s=>{const r=m(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=m(e,null);s&&t.addItem(s)}}}));const f=t.toFormats();e.dispatch("addStyleModifications",{items:f,replace:!g(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),k(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
-
|
|
10
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
11
|
-
const register$2 = (editor) => {
|
|
12
|
-
const registerOption = editor.options.register;
|
|
13
|
-
registerOption('insertdatetime_dateformat', {
|
|
14
|
-
processor: 'string',
|
|
15
|
-
default: editor.translate('%Y-%m-%d')
|
|
16
|
-
});
|
|
17
|
-
registerOption('insertdatetime_timeformat', {
|
|
18
|
-
processor: 'string',
|
|
19
|
-
default: editor.translate('%H:%M:%S')
|
|
20
|
-
});
|
|
21
|
-
registerOption('insertdatetime_formats', {
|
|
22
|
-
processor: 'string[]',
|
|
23
|
-
default: ['%H:%M:%S', '%Y-%m-%d', '%I:%M:%S %p', '%D']
|
|
24
|
-
});
|
|
25
|
-
registerOption('insertdatetime_element', {
|
|
26
|
-
processor: 'boolean',
|
|
27
|
-
default: false
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
const getDateFormat = option('insertdatetime_dateformat');
|
|
31
|
-
const getTimeFormat = option('insertdatetime_timeformat');
|
|
32
|
-
const getFormats = option('insertdatetime_formats');
|
|
33
|
-
const shouldInsertTimeElement = option('insertdatetime_element');
|
|
34
|
-
const getDefaultDateTime = (editor) => {
|
|
35
|
-
const formats = getFormats(editor);
|
|
36
|
-
return formats.length > 0 ? formats[0] : getTimeFormat(editor);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
|
40
|
-
const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
|
41
|
-
const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
|
42
|
-
const monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
|
43
|
-
const addZeros = (value, len) => {
|
|
44
|
-
value = '' + value;
|
|
45
|
-
if (value.length < len) {
|
|
46
|
-
for (let i = 0; i < (len - value.length); i++) {
|
|
47
|
-
value = '0' + value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return value;
|
|
51
|
-
};
|
|
52
|
-
const getDateTime = (editor, fmt, date = new Date()) => {
|
|
53
|
-
fmt = fmt.replace('%D', '%m/%d/%Y');
|
|
54
|
-
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
|
55
|
-
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
|
56
|
-
fmt = fmt.replace('%y', '' + date.getYear());
|
|
57
|
-
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
|
58
|
-
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
|
59
|
-
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
|
60
|
-
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
|
61
|
-
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
|
62
|
-
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
|
63
|
-
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
|
64
|
-
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
|
65
|
-
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
|
66
|
-
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
|
67
|
-
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
|
68
|
-
fmt = fmt.replace('%%', '%');
|
|
69
|
-
return fmt;
|
|
70
|
-
};
|
|
71
|
-
const updateElement = (editor, timeElm, computerTime, userTime) => {
|
|
72
|
-
const newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
|
73
|
-
editor.dom.replace(newTimeElm, timeElm);
|
|
74
|
-
editor.selection.select(newTimeElm, true);
|
|
75
|
-
editor.selection.collapse(false);
|
|
76
|
-
};
|
|
77
|
-
const insertDateTime = (editor, format) => {
|
|
78
|
-
if (shouldInsertTimeElement(editor) && editor.selection.isEditable()) {
|
|
79
|
-
const userTime = getDateTime(editor, format);
|
|
80
|
-
let computerTime;
|
|
81
|
-
if (/%[HMSIp]/.test(format)) {
|
|
82
|
-
computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
computerTime = getDateTime(editor, '%Y-%m-%d');
|
|
86
|
-
}
|
|
87
|
-
const timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
|
88
|
-
if (timeElm) {
|
|
89
|
-
updateElement(editor, timeElm, computerTime, userTime);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
editor.insertContent(getDateTime(editor, format));
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const register$1 = (editor) => {
|
|
101
|
-
editor.addCommand('mceInsertDate', (_ui, value) => {
|
|
102
|
-
insertDateTime(editor, value ?? getDateFormat(editor));
|
|
103
|
-
});
|
|
104
|
-
editor.addCommand('mceInsertTime', (_ui, value) => {
|
|
105
|
-
insertDateTime(editor, value ?? getTimeFormat(editor));
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const Cell = (initial) => {
|
|
110
|
-
let value = initial;
|
|
111
|
-
const get = () => {
|
|
112
|
-
return value;
|
|
113
|
-
};
|
|
114
|
-
const set = (v) => {
|
|
115
|
-
value = v;
|
|
116
|
-
};
|
|
117
|
-
return {
|
|
118
|
-
get,
|
|
119
|
-
set
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
124
|
-
|
|
125
|
-
const onSetupEditable = (editor) => (api) => {
|
|
126
|
-
const nodeChanged = () => {
|
|
127
|
-
api.setEnabled(editor.selection.isEditable());
|
|
128
|
-
};
|
|
129
|
-
editor.on('NodeChange', nodeChanged);
|
|
130
|
-
nodeChanged();
|
|
131
|
-
return () => {
|
|
132
|
-
editor.off('NodeChange', nodeChanged);
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
const register = (editor) => {
|
|
136
|
-
const formats = getFormats(editor);
|
|
137
|
-
const defaultFormat = Cell(getDefaultDateTime(editor));
|
|
138
|
-
const insertDateTime = (format) => editor.execCommand('mceInsertDate', false, format);
|
|
139
|
-
editor.ui.registry.addSplitButton('insertdatetime', {
|
|
140
|
-
icon: 'insert-time',
|
|
141
|
-
tooltip: 'Insert date/time',
|
|
142
|
-
chevronTooltip: 'Insert date/time menu',
|
|
143
|
-
select: (value) => value === defaultFormat.get(),
|
|
144
|
-
fetch: (done) => {
|
|
145
|
-
done(global.map(formats, (format) => ({ type: 'choiceitem', text: getDateTime(editor, format), value: format })));
|
|
146
|
-
},
|
|
147
|
-
onAction: (_api) => {
|
|
148
|
-
insertDateTime(defaultFormat.get());
|
|
149
|
-
},
|
|
150
|
-
onItemAction: (_api, value) => {
|
|
151
|
-
defaultFormat.set(value);
|
|
152
|
-
insertDateTime(value);
|
|
153
|
-
},
|
|
154
|
-
onSetup: onSetupEditable(editor)
|
|
155
|
-
});
|
|
156
|
-
const makeMenuItemHandler = (format) => () => {
|
|
157
|
-
defaultFormat.set(format);
|
|
158
|
-
insertDateTime(format);
|
|
159
|
-
};
|
|
160
|
-
editor.ui.registry.addNestedMenuItem('insertdatetime', {
|
|
161
|
-
icon: 'insert-time',
|
|
162
|
-
text: 'Date/time',
|
|
163
|
-
getSubmenuItems: () => global.map(formats, (format) => ({
|
|
164
|
-
type: 'menuitem',
|
|
165
|
-
text: getDateTime(editor, format),
|
|
166
|
-
onAction: makeMenuItemHandler(format)
|
|
167
|
-
})),
|
|
168
|
-
onSetup: onSetupEditable(editor)
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
var Plugin = () => {
|
|
173
|
-
global$1.add('insertdatetime', (editor) => {
|
|
174
|
-
register$2(editor);
|
|
175
|
-
register$1(editor);
|
|
176
|
-
register(editor);
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
Plugin();
|
|
181
|
-
/** *****
|
|
182
|
-
* DO NOT EXPORT ANYTHING
|
|
183
|
-
*
|
|
184
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
185
|
-
*******/
|
|
186
|
-
|
|
187
|
-
})();
|