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,221 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
const Cell = (initial) => {
|
|
9
|
-
let value = initial;
|
|
10
|
-
const get = () => {
|
|
11
|
-
return value;
|
|
12
|
-
};
|
|
13
|
-
const set = (v) => {
|
|
14
|
-
value = v;
|
|
15
|
-
};
|
|
16
|
-
return {
|
|
17
|
-
get,
|
|
18
|
-
set
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
23
|
-
|
|
24
|
-
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
25
|
-
|
|
26
|
-
const fireResizeEditor = (editor) => editor.dispatch('ResizeEditor');
|
|
27
|
-
|
|
28
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
29
|
-
const register$1 = (editor) => {
|
|
30
|
-
const registerOption = editor.options.register;
|
|
31
|
-
registerOption('autoresize_overflow_padding', {
|
|
32
|
-
processor: 'number',
|
|
33
|
-
default: 1
|
|
34
|
-
});
|
|
35
|
-
registerOption('autoresize_bottom_margin', {
|
|
36
|
-
processor: 'number',
|
|
37
|
-
default: 50
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
const getMinHeight = option('min_height');
|
|
41
|
-
const getMaxHeight = option('max_height');
|
|
42
|
-
const getAutoResizeOverflowPadding = option('autoresize_overflow_padding');
|
|
43
|
-
const getAutoResizeBottomMargin = option('autoresize_bottom_margin');
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* This class contains all core logic for the autoresize plugin.
|
|
47
|
-
*
|
|
48
|
-
* @class tinymce.autoresize.Plugin
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
const isFullscreen = (editor) => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
|
52
|
-
const toggleScrolling = (editor, state) => {
|
|
53
|
-
const body = editor.getBody();
|
|
54
|
-
if (body) {
|
|
55
|
-
body.style.overflowY = state ? '' : 'hidden';
|
|
56
|
-
if (!state) {
|
|
57
|
-
body.scrollTop = 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const parseCssValueToInt = (dom, elm, name, computed) => {
|
|
62
|
-
const value = parseInt(dom.getStyle(elm, name, computed) ?? '', 10);
|
|
63
|
-
// The value maybe be an empty string, so in that case treat it as being 0
|
|
64
|
-
return isNaN(value) ? 0 : value;
|
|
65
|
-
};
|
|
66
|
-
const shouldScrollIntoView = (trigger) => {
|
|
67
|
-
// Only scroll the selection into view when we're inserting content. Any other
|
|
68
|
-
// triggers the selection should already be in view and resizing would only
|
|
69
|
-
// extend the content area.
|
|
70
|
-
if (trigger?.type.toLowerCase() === 'setcontent') {
|
|
71
|
-
const setContentEvent = trigger;
|
|
72
|
-
return setContentEvent.selection === true || setContentEvent.paste === true;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* This method gets executed each time the editor needs to resize.
|
|
80
|
-
*/
|
|
81
|
-
const resize = (editor, oldSize, trigger, getExtraMarginBottom) => {
|
|
82
|
-
const dom = editor.dom;
|
|
83
|
-
const doc = editor.getDoc();
|
|
84
|
-
if (!doc) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
if (isFullscreen(editor)) {
|
|
88
|
-
toggleScrolling(editor, true);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const docEle = doc.documentElement;
|
|
92
|
-
const resizeBottomMargin = getExtraMarginBottom ? getExtraMarginBottom() : getAutoResizeOverflowPadding(editor);
|
|
93
|
-
const minHeight = getMinHeight(editor) ?? editor.getElement().offsetHeight;
|
|
94
|
-
let resizeHeight = minHeight;
|
|
95
|
-
// Calculate outer height of the doc element using CSS styles
|
|
96
|
-
const marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
|
|
97
|
-
const marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
|
|
98
|
-
let contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
|
|
99
|
-
// Make sure we have a valid height
|
|
100
|
-
if (contentHeight < 0) {
|
|
101
|
-
contentHeight = 0;
|
|
102
|
-
}
|
|
103
|
-
// Determine the size of the chroming (menubar, toolbar, etc...)
|
|
104
|
-
const containerHeight = editor.getContainer().offsetHeight;
|
|
105
|
-
const contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
|
|
106
|
-
const chromeHeight = containerHeight - contentAreaHeight;
|
|
107
|
-
// Don't make it smaller than the minimum height
|
|
108
|
-
if (contentHeight + chromeHeight > minHeight) {
|
|
109
|
-
resizeHeight = contentHeight + chromeHeight;
|
|
110
|
-
}
|
|
111
|
-
// If a maximum height has been defined don't exceed this height
|
|
112
|
-
const maxHeight = getMaxHeight(editor);
|
|
113
|
-
if (maxHeight && resizeHeight > maxHeight) {
|
|
114
|
-
resizeHeight = maxHeight;
|
|
115
|
-
toggleScrolling(editor, true);
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
toggleScrolling(editor, false);
|
|
119
|
-
}
|
|
120
|
-
const old = oldSize.get();
|
|
121
|
-
if (old.set) {
|
|
122
|
-
editor.dom.setStyles(editor.getDoc().documentElement, { 'min-height': 0 });
|
|
123
|
-
editor.dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
|
|
124
|
-
}
|
|
125
|
-
// Resize content element
|
|
126
|
-
if (resizeHeight !== old.totalHeight && (contentHeight - resizeBottomMargin !== old.contentHeight || !old.set)) {
|
|
127
|
-
const deltaSize = (resizeHeight - old.totalHeight);
|
|
128
|
-
dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
|
|
129
|
-
oldSize.set({
|
|
130
|
-
totalHeight: resizeHeight,
|
|
131
|
-
contentHeight,
|
|
132
|
-
set: true,
|
|
133
|
-
});
|
|
134
|
-
fireResizeEditor(editor);
|
|
135
|
-
// iPadOS has an issue where it won't rerender the body when the iframe is resized
|
|
136
|
-
// however if we reset the scroll position then it re-renders correctly
|
|
137
|
-
if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
|
|
138
|
-
const win = editor.getWin();
|
|
139
|
-
win.scrollTo(win.pageXOffset, win.pageYOffset);
|
|
140
|
-
}
|
|
141
|
-
// Ensure the selection is in view, as it's potentially out of view after inserting content into the editor
|
|
142
|
-
if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
|
|
143
|
-
editor.selection.scrollIntoView();
|
|
144
|
-
}
|
|
145
|
-
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
|
146
|
-
// So we need to continue to resize the iframe down until the size gets fixed
|
|
147
|
-
if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) {
|
|
148
|
-
resize(editor, oldSize, trigger, getExtraMarginBottom);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
const setup = (editor, oldSize) => {
|
|
153
|
-
const getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
|
|
154
|
-
editor.on('init', (e) => {
|
|
155
|
-
const overflowPadding = getAutoResizeOverflowPadding(editor);
|
|
156
|
-
const dom = editor.dom;
|
|
157
|
-
// Disable height 100% on the root document element otherwise we'll end up resizing indefinitely
|
|
158
|
-
dom.setStyles(editor.getDoc().documentElement, {
|
|
159
|
-
height: 'auto'
|
|
160
|
-
});
|
|
161
|
-
if (global.browser.isEdge() || global.browser.isIE()) {
|
|
162
|
-
dom.setStyles(editor.getBody(), {
|
|
163
|
-
'paddingLeft': overflowPadding,
|
|
164
|
-
'paddingRight': overflowPadding,
|
|
165
|
-
// IE & Edge have a min height of 150px by default on the body, so override that
|
|
166
|
-
'min-height': 0
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
dom.setStyles(editor.getBody(), {
|
|
171
|
-
paddingLeft: overflowPadding,
|
|
172
|
-
paddingRight: overflowPadding
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
resize(editor, oldSize, e, getExtraMarginBottom);
|
|
176
|
-
});
|
|
177
|
-
editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', (e) => {
|
|
178
|
-
resize(editor, oldSize, e, getExtraMarginBottom);
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
const register = (editor, oldSize) => {
|
|
183
|
-
editor.addCommand('mceAutoResize', () => {
|
|
184
|
-
resize(editor, oldSize);
|
|
185
|
-
});
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* This class contains all core logic for the autoresize plugin.
|
|
190
|
-
*
|
|
191
|
-
* @class tinymce.autoresize.Plugin
|
|
192
|
-
* @private
|
|
193
|
-
*/
|
|
194
|
-
var Plugin = () => {
|
|
195
|
-
global$1.add('autoresize', (editor) => {
|
|
196
|
-
register$1(editor);
|
|
197
|
-
// If autoresize is enabled, disable resize if the user hasn't explicitly enabled it
|
|
198
|
-
// TINY-8288: This currently does nothing because of a bug in the theme
|
|
199
|
-
if (!editor.options.isSet('resize')) {
|
|
200
|
-
editor.options.set('resize', false);
|
|
201
|
-
}
|
|
202
|
-
if (!editor.inline) {
|
|
203
|
-
const oldSize = Cell({
|
|
204
|
-
totalHeight: 0,
|
|
205
|
-
contentHeight: 0,
|
|
206
|
-
set: false,
|
|
207
|
-
});
|
|
208
|
-
register(editor, oldSize);
|
|
209
|
-
setup(editor, oldSize);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
Plugin();
|
|
215
|
-
/** *****
|
|
216
|
-
* DO NOT EXPORT ANYTHING
|
|
217
|
-
*
|
|
218
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
219
|
-
*******/
|
|
220
|
-
|
|
221
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),s=o("min_height"),n=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),g=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},l=(e,t,o,s)=>{const n=parseInt(e.getStyle(t,o,s)??"",10);return isNaN(n)?0:n},a=(e,o,r,c)=>{const d=e.dom,h=e.getDoc();if(!h)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void g(e,!0);const m=h.documentElement,u=c?c():i(e),f=s(e)??e.getElement().offsetHeight;let p=f;const y=l(d,m,"margin-top",!0),S=l(d,m,"margin-bottom",!0);let C=m.offsetHeight+y+S+u;C<0&&(C=0);const H=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+H>f&&(p=C+H);const b=n(e);b&&p>b?(p=b,g(e,!0)):g(e,!1);const w=o.get();if(w.set&&(e.dom.setStyles(e.getDoc().documentElement,{"min-height":0}),e.dom.setStyles(e.getBody(),{"min-height":"inherit"})),p!==w.totalHeight&&(C-u!==w.contentHeight||!w.set)){const s=p-w.totalHeight;if(d.setStyle(e.getContainer(),"height",p+"px"),o.set({totalHeight:p,contentHeight:C,set:!0}),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===e?.type.toLowerCase()){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&s<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(()=>{let e={totalHeight:0,contentHeight:0,set:!1};return{get:()=>e,set:t=>{e=t}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{const s=()=>r(e);e.on("init",(n=>{const r=i(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,n,s)})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{a(e,o,t,s)}))})(e,o)}}))}();
|
|
@@ -1,249 +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 eq = (t) => (a) => t === a;
|
|
37
|
-
const isString = isType('string');
|
|
38
|
-
const isUndefined = eq(undefined);
|
|
39
|
-
|
|
40
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
41
|
-
|
|
42
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
|
|
43
|
-
|
|
44
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
45
|
-
|
|
46
|
-
const fireRestoreDraft = (editor) => editor.dispatch('RestoreDraft');
|
|
47
|
-
const fireStoreDraft = (editor) => editor.dispatch('StoreDraft');
|
|
48
|
-
const fireRemoveDraft = (editor) => editor.dispatch('RemoveDraft');
|
|
49
|
-
|
|
50
|
-
const parse = (timeString) => {
|
|
51
|
-
const multiples = {
|
|
52
|
-
s: 1000,
|
|
53
|
-
m: 60000
|
|
54
|
-
};
|
|
55
|
-
const parsedTime = /^(\d+)([ms]?)$/.exec(timeString);
|
|
56
|
-
return (parsedTime && parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
60
|
-
const register$1 = (editor) => {
|
|
61
|
-
const registerOption = editor.options.register;
|
|
62
|
-
const timeProcessor = (value) => {
|
|
63
|
-
const valid = isString(value);
|
|
64
|
-
if (valid) {
|
|
65
|
-
return { value: parse(value), valid };
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
return { valid: false, message: 'Must be a string.' };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
registerOption('autosave_ask_before_unload', {
|
|
72
|
-
processor: 'boolean',
|
|
73
|
-
default: true
|
|
74
|
-
});
|
|
75
|
-
registerOption('autosave_prefix', {
|
|
76
|
-
processor: 'string',
|
|
77
|
-
default: 'tinymce-autosave-{path}{query}{hash}-{id}-'
|
|
78
|
-
});
|
|
79
|
-
registerOption('autosave_restore_when_empty', {
|
|
80
|
-
processor: 'boolean',
|
|
81
|
-
default: false
|
|
82
|
-
});
|
|
83
|
-
registerOption('autosave_interval', {
|
|
84
|
-
processor: timeProcessor,
|
|
85
|
-
default: '30s'
|
|
86
|
-
});
|
|
87
|
-
registerOption('autosave_retention', {
|
|
88
|
-
processor: timeProcessor,
|
|
89
|
-
default: '20m'
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
const shouldAskBeforeUnload = option('autosave_ask_before_unload');
|
|
93
|
-
const shouldRestoreWhenEmpty = option('autosave_restore_when_empty');
|
|
94
|
-
const getAutoSaveInterval = option('autosave_interval');
|
|
95
|
-
const getAutoSaveRetention = option('autosave_retention');
|
|
96
|
-
const getAutoSavePrefix = (editor) => {
|
|
97
|
-
const location = document.location;
|
|
98
|
-
return editor.options.get('autosave_prefix').replace(/{path}/g, location.pathname)
|
|
99
|
-
.replace(/{query}/g, location.search)
|
|
100
|
-
.replace(/{hash}/g, location.hash)
|
|
101
|
-
.replace(/{id}/g, editor.id);
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const isEmpty = (editor, html) => {
|
|
105
|
-
if (isUndefined(html)) {
|
|
106
|
-
return editor.dom.isEmpty(editor.getBody());
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
const trimmedHtml = global$1.trim(html);
|
|
110
|
-
if (trimmedHtml === '') {
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
const fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html');
|
|
115
|
-
return editor.dom.isEmpty(fragment);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const hasDraft = (editor) => {
|
|
120
|
-
const time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time') ?? '0', 10) || 0;
|
|
121
|
-
if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
|
|
122
|
-
removeDraft(editor, false);
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
return true;
|
|
126
|
-
};
|
|
127
|
-
const removeDraft = (editor, fire) => {
|
|
128
|
-
const prefix = getAutoSavePrefix(editor);
|
|
129
|
-
global$2.removeItem(prefix + 'draft');
|
|
130
|
-
global$2.removeItem(prefix + 'time');
|
|
131
|
-
if (fire !== false) {
|
|
132
|
-
fireRemoveDraft(editor);
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
const storeDraft = (editor) => {
|
|
136
|
-
const prefix = getAutoSavePrefix(editor);
|
|
137
|
-
if (!isEmpty(editor) && editor.isDirty()) {
|
|
138
|
-
global$2.setItem(prefix + 'draft', editor.getContent({ format: 'raw', no_events: true }));
|
|
139
|
-
global$2.setItem(prefix + 'time', new Date().getTime().toString());
|
|
140
|
-
fireStoreDraft(editor);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
const restoreDraft = (editor) => {
|
|
144
|
-
const prefix = getAutoSavePrefix(editor);
|
|
145
|
-
if (hasDraft(editor)) {
|
|
146
|
-
editor.setContent(global$2.getItem(prefix + 'draft') ?? '', { format: 'raw' });
|
|
147
|
-
fireRestoreDraft(editor);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
const startStoreDraft = (editor) => {
|
|
151
|
-
const interval = getAutoSaveInterval(editor);
|
|
152
|
-
global$3.setEditorInterval(editor, () => {
|
|
153
|
-
storeDraft(editor);
|
|
154
|
-
}, interval);
|
|
155
|
-
};
|
|
156
|
-
const restoreLastDraft = (editor) => {
|
|
157
|
-
editor.undoManager.transact(() => {
|
|
158
|
-
restoreDraft(editor);
|
|
159
|
-
removeDraft(editor);
|
|
160
|
-
});
|
|
161
|
-
editor.focus();
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const get = (editor) => ({
|
|
165
|
-
hasDraft: () => hasDraft(editor),
|
|
166
|
-
storeDraft: () => storeDraft(editor),
|
|
167
|
-
restoreDraft: () => restoreDraft(editor),
|
|
168
|
-
removeDraft: (fire) => removeDraft(editor, fire),
|
|
169
|
-
isEmpty: (html) => isEmpty(editor, html)
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
173
|
-
|
|
174
|
-
const setup = (editor) => {
|
|
175
|
-
editor.editorManager.on('BeforeUnload', (e) => {
|
|
176
|
-
let msg;
|
|
177
|
-
global$1.each(global.get(), (editor) => {
|
|
178
|
-
// Store a draft for each editor instance
|
|
179
|
-
if (editor.plugins.autosave) {
|
|
180
|
-
editor.plugins.autosave.storeDraft();
|
|
181
|
-
}
|
|
182
|
-
// Setup a return message if the editor is dirty
|
|
183
|
-
if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
|
|
184
|
-
msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
if (msg) {
|
|
188
|
-
e.preventDefault();
|
|
189
|
-
e.returnValue = msg;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const makeSetupHandler = (editor) => (api) => {
|
|
195
|
-
const shouldEnable = () => hasDraft(editor) && !editor.mode.isReadOnly();
|
|
196
|
-
api.setEnabled(shouldEnable());
|
|
197
|
-
const editorEventCallback = () => api.setEnabled(shouldEnable());
|
|
198
|
-
editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
199
|
-
return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
200
|
-
};
|
|
201
|
-
const register = (editor) => {
|
|
202
|
-
// TODO: This was moved from makeSetupHandler as it would only be called when the menu item was rendered?
|
|
203
|
-
// Is it safe to start this process when the plugin is registered?
|
|
204
|
-
startStoreDraft(editor);
|
|
205
|
-
const onAction = () => {
|
|
206
|
-
restoreLastDraft(editor);
|
|
207
|
-
};
|
|
208
|
-
editor.ui.registry.addButton('restoredraft', {
|
|
209
|
-
tooltip: 'Restore last draft',
|
|
210
|
-
icon: 'restore-draft',
|
|
211
|
-
onAction,
|
|
212
|
-
onSetup: makeSetupHandler(editor)
|
|
213
|
-
});
|
|
214
|
-
editor.ui.registry.addMenuItem('restoredraft', {
|
|
215
|
-
text: 'Restore last draft',
|
|
216
|
-
icon: 'restore-draft',
|
|
217
|
-
onAction,
|
|
218
|
-
onSetup: makeSetupHandler(editor)
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* This class contains all core logic for the autosave plugin.
|
|
224
|
-
*
|
|
225
|
-
* @class tinymce.autosave.Plugin
|
|
226
|
-
* @private
|
|
227
|
-
*/
|
|
228
|
-
var Plugin = () => {
|
|
229
|
-
global$4.add('autosave', (editor) => {
|
|
230
|
-
register$1(editor);
|
|
231
|
-
setup(editor);
|
|
232
|
-
register(editor);
|
|
233
|
-
editor.on('init', () => {
|
|
234
|
-
if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
|
|
235
|
-
restoreDraft(editor);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
return get(editor);
|
|
239
|
-
});
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
Plugin();
|
|
243
|
-
/** *****
|
|
244
|
-
* DO NOT EXPORT ANYTHING
|
|
245
|
-
*
|
|
246
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
247
|
-
*******/
|
|
248
|
-
|
|
249
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||o.constructor?.name===a.name)?"string":e;var r,o,a})(t);const r=t=>undefined===t;var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),c=i("autosave_restore_when_empty"),l=i("autosave_interval"),m=i("autosave_retention"),d=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},f=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},v=t=>{const e=parseInt(a.getItem(d(t)+"time")??"0",10)||0;return!((new Date).getTime()-e>m(t)&&(p(t,!1),1))},p=(t,e)=>{const r=d(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},y=t=>{const e=d(t);!f(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},g=t=>{const e=d(t);v(t)&&(t.setContent(a.getItem(e+"draft")??"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var D=tinymce.util.Tools.resolve("tinymce.EditorManager");const h=t=>e=>{const r=()=>v(t)&&!t.mode.isReadOnly();e.setEnabled(r());const o=()=>e.setEnabled(r());return t.on("StoreDraft RestoreDraft RemoveDraft",o),()=>t.off("StoreDraft RestoreDraft RemoveDraft",o)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=l(t);o.setEditorInterval(t,(()=>{y(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{g(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{c(t)&&t.dom.isEmpty(t.getBody())&&g(t)})),(t=>({hasDraft:()=>v(t),storeDraft:()=>y(t),restoreDraft:()=>g(t),removeDraft:e=>p(t,e),isEmpty:e=>f(t,e)}))(t))))}();
|