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,237 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
-
|
|
10
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
|
|
11
|
-
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
13
|
-
|
|
14
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
15
|
-
const register$2 = (editor) => {
|
|
16
|
-
const registerOption = editor.options.register;
|
|
17
|
-
registerOption('allow_html_in_named_anchor', {
|
|
18
|
-
processor: 'boolean',
|
|
19
|
-
default: false
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
const allowHtmlInNamedAnchor = option('allow_html_in_named_anchor');
|
|
23
|
-
|
|
24
|
-
const namedAnchorSelector = 'a:not([href])';
|
|
25
|
-
const isEmptyString = (str) => !str;
|
|
26
|
-
const getIdFromAnchor = (elm) => {
|
|
27
|
-
const id = elm.getAttribute('id') || elm.getAttribute('name');
|
|
28
|
-
return id || '';
|
|
29
|
-
};
|
|
30
|
-
const isAnchor = (elm) => elm.nodeName.toLowerCase() === 'a';
|
|
31
|
-
const isNamedAnchor = (elm) => isAnchor(elm) && !elm.getAttribute('href') && getIdFromAnchor(elm) !== '';
|
|
32
|
-
const isEmptyNamedAnchor = (elm) => isNamedAnchor(elm) && !elm.firstChild;
|
|
33
|
-
|
|
34
|
-
const removeEmptyNamedAnchorsInSelection = (editor) => {
|
|
35
|
-
const dom = editor.dom;
|
|
36
|
-
global$1(dom).walk(editor.selection.getRng(), (nodes) => {
|
|
37
|
-
global.each(nodes, (node) => {
|
|
38
|
-
if (isEmptyNamedAnchor(node)) {
|
|
39
|
-
dom.remove(node, false);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
const isValidId = (id) =>
|
|
45
|
-
// Follows HTML4 rules: https://www.w3.org/TR/html401/types.html#type-id
|
|
46
|
-
/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
|
|
47
|
-
const getNamedAnchor = (editor) => editor.dom.getParent(editor.selection.getStart(), namedAnchorSelector);
|
|
48
|
-
const getId = (editor) => {
|
|
49
|
-
const anchor = getNamedAnchor(editor);
|
|
50
|
-
if (anchor) {
|
|
51
|
-
return getIdFromAnchor(anchor);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return '';
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const createAnchor = (editor, id) => {
|
|
58
|
-
editor.undoManager.transact(() => {
|
|
59
|
-
if (!allowHtmlInNamedAnchor(editor)) {
|
|
60
|
-
editor.selection.collapse(true);
|
|
61
|
-
}
|
|
62
|
-
if (editor.selection.isCollapsed()) {
|
|
63
|
-
editor.insertContent(editor.dom.createHTML('a', { id }));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// Remove any empty named anchors in the selection as they cannot be removed by the formatter since they are cef
|
|
67
|
-
removeEmptyNamedAnchorsInSelection(editor);
|
|
68
|
-
// Format is set up to truncate any partially selected named anchors so that they are not completely removed
|
|
69
|
-
editor.formatter.remove('namedAnchor', undefined, undefined, true);
|
|
70
|
-
// Insert new anchor using the formatter - will wrap selected content in anchor
|
|
71
|
-
editor.formatter.apply('namedAnchor', { value: id });
|
|
72
|
-
// Need to add visual classes to anchors if required
|
|
73
|
-
editor.addVisual();
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
const updateAnchor = (editor, id, anchorElement) => {
|
|
78
|
-
anchorElement.removeAttribute('name');
|
|
79
|
-
anchorElement.id = id;
|
|
80
|
-
editor.addVisual(); // Need to add visual classes to anchors if required
|
|
81
|
-
editor.undoManager.add();
|
|
82
|
-
};
|
|
83
|
-
const insert = (editor, id) => {
|
|
84
|
-
const anchor = getNamedAnchor(editor);
|
|
85
|
-
if (anchor) {
|
|
86
|
-
updateAnchor(editor, id, anchor);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
createAnchor(editor, id);
|
|
90
|
-
}
|
|
91
|
-
editor.focus();
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const insertAnchor = (editor, newId) => {
|
|
95
|
-
if (!isValidId(newId)) {
|
|
96
|
-
editor.windowManager.alert('ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
insert(editor, newId);
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
const open = (editor) => {
|
|
105
|
-
const currentId = getId(editor);
|
|
106
|
-
editor.windowManager.open({
|
|
107
|
-
title: 'Anchor',
|
|
108
|
-
size: 'normal',
|
|
109
|
-
body: {
|
|
110
|
-
type: 'panel',
|
|
111
|
-
items: [
|
|
112
|
-
{
|
|
113
|
-
name: 'id',
|
|
114
|
-
type: 'input',
|
|
115
|
-
label: 'ID',
|
|
116
|
-
placeholder: 'example'
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
buttons: [
|
|
121
|
-
{
|
|
122
|
-
type: 'cancel',
|
|
123
|
-
name: 'cancel',
|
|
124
|
-
text: 'Cancel'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
type: 'submit',
|
|
128
|
-
name: 'save',
|
|
129
|
-
text: 'Save',
|
|
130
|
-
primary: true
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
initialData: {
|
|
134
|
-
id: currentId
|
|
135
|
-
},
|
|
136
|
-
onSubmit: (api) => {
|
|
137
|
-
if (insertAnchor(editor, api.getData().id)) { // TODO we need a better way to do validation
|
|
138
|
-
api.close();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const register$1 = (editor) => {
|
|
145
|
-
editor.addCommand('mceAnchor', () => {
|
|
146
|
-
open(editor);
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Note: node.firstChild check is for the 'allow_html_in_named_anchor' setting
|
|
151
|
-
// Only want to add contenteditable attributes if there is no text within the anchor
|
|
152
|
-
const isNamedAnchorNode = (node) => isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name'));
|
|
153
|
-
const isEmptyNamedAnchorNode = (node) => isNamedAnchorNode(node) && !node.firstChild;
|
|
154
|
-
const setContentEditable = (state) => (nodes) => {
|
|
155
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
156
|
-
const node = nodes[i];
|
|
157
|
-
if (isEmptyNamedAnchorNode(node)) {
|
|
158
|
-
node.attr('contenteditable', state);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
const setup = (editor) => {
|
|
163
|
-
editor.on('PreInit', () => {
|
|
164
|
-
editor.parser.addNodeFilter('a', setContentEditable('false'));
|
|
165
|
-
editor.serializer.addNodeFilter('a', setContentEditable(null));
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const registerFormats = (editor) => {
|
|
170
|
-
editor.formatter.register('namedAnchor', {
|
|
171
|
-
inline: 'a',
|
|
172
|
-
selector: namedAnchorSelector,
|
|
173
|
-
remove: 'all',
|
|
174
|
-
split: true,
|
|
175
|
-
deep: true,
|
|
176
|
-
attributes: {
|
|
177
|
-
id: '%value'
|
|
178
|
-
},
|
|
179
|
-
onmatch: (node, _fmt, _itemName) => {
|
|
180
|
-
return isNamedAnchor(node);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const onSetupEditable = (editor) => (api) => {
|
|
186
|
-
const nodeChanged = () => {
|
|
187
|
-
api.setEnabled(editor.selection.isEditable());
|
|
188
|
-
};
|
|
189
|
-
editor.on('NodeChange', nodeChanged);
|
|
190
|
-
nodeChanged();
|
|
191
|
-
return () => {
|
|
192
|
-
editor.off('NodeChange', nodeChanged);
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
const register = (editor) => {
|
|
196
|
-
const onAction = () => editor.execCommand('mceAnchor');
|
|
197
|
-
editor.ui.registry.addToggleButton('anchor', {
|
|
198
|
-
icon: 'bookmark',
|
|
199
|
-
tooltip: 'Anchor',
|
|
200
|
-
onAction,
|
|
201
|
-
onSetup: (buttonApi) => {
|
|
202
|
-
const unbindSelectorChanged = editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind;
|
|
203
|
-
const unbindEditableChanged = onSetupEditable(editor)(buttonApi);
|
|
204
|
-
return () => {
|
|
205
|
-
unbindSelectorChanged();
|
|
206
|
-
unbindEditableChanged();
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
editor.ui.registry.addMenuItem('anchor', {
|
|
211
|
-
icon: 'bookmark',
|
|
212
|
-
text: 'Anchor...',
|
|
213
|
-
onAction,
|
|
214
|
-
onSetup: onSetupEditable(editor)
|
|
215
|
-
});
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
var Plugin = () => {
|
|
219
|
-
global$2.add('anchor', (editor) => {
|
|
220
|
-
register$2(editor);
|
|
221
|
-
setup(editor);
|
|
222
|
-
register$1(editor);
|
|
223
|
-
register(editor);
|
|
224
|
-
editor.on('PreInit', () => {
|
|
225
|
-
registerFormats(editor);
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
Plugin();
|
|
231
|
-
/** *****
|
|
232
|
-
* DO NOT EXPORT ANYTHING
|
|
233
|
-
*
|
|
234
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
235
|
-
*******/
|
|
236
|
-
|
|
237
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>e.options.get("allow_html_in_named_anchor");const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{const r=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{const o=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();
|
|
@@ -1,315 +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
|
-
/* 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
|
-
const isNullable = (a) => a === null || a === undefined;
|
|
40
|
-
const isNonNullable = (a) => !isNullable(a);
|
|
41
|
-
|
|
42
|
-
const not = (f) => (t) => !f(t);
|
|
43
|
-
|
|
44
|
-
const hasOwnProperty = Object.hasOwnProperty;
|
|
45
|
-
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
|
46
|
-
|
|
47
|
-
const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
|
48
|
-
const contains = (str, substr, start = 0, end) => {
|
|
49
|
-
const idx = str.indexOf(substr, start);
|
|
50
|
-
if (idx !== -1) {
|
|
51
|
-
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
/** Does 'str' start with 'prefix'?
|
|
58
|
-
* Note: all strings start with the empty string.
|
|
59
|
-
* More formally, for all strings x, startsWith(x, "").
|
|
60
|
-
* This is so that for all strings x and y, startsWith(y + x, y)
|
|
61
|
-
*/
|
|
62
|
-
const startsWith = (str, prefix) => {
|
|
63
|
-
return checkRange(str, prefix, 0);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const zeroWidth = '\uFEFF';
|
|
67
|
-
const isZwsp = (char) => char === zeroWidth;
|
|
68
|
-
const removeZwsp = (s) => s.replace(/\uFEFF/g, '');
|
|
69
|
-
|
|
70
|
-
/*
|
|
71
|
-
The RegEx parses the following components (https://www.rfc-editor.org/rfc/rfc3986.txt):
|
|
72
|
-
|
|
73
|
-
scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
|
|
74
|
-
|
|
75
|
-
foo://example.com:8042/over/there?name=ferret#nose
|
|
76
|
-
\_/ \______________/\_________/ \_________/ \__/
|
|
77
|
-
| | | | |
|
|
78
|
-
scheme authority path query fragment
|
|
79
|
-
|
|
80
|
-
Originally from:
|
|
81
|
-
http://blog.mattheworiordan.com/post/13174566389/url-regular-expression-for-links-with-or-without-the
|
|
82
|
-
|
|
83
|
-
Modified to:
|
|
84
|
-
- include port numbers
|
|
85
|
-
- allow full stops in email addresses
|
|
86
|
-
- allow [-.~*+=!&;:'%@?^${}(),\/\w] after the #
|
|
87
|
-
- allow [-.~*+=!&;:'%@?^${}(),\/\w] after the ?
|
|
88
|
-
- move allow -_.~*+=!&;:'%@?^${}() in email usernames to the first @ match (TBIO-4809)
|
|
89
|
-
- enforce domains to be [A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)* so they can't end in a period (TBIO-4809)
|
|
90
|
-
- removed a bunch of escaping, made every group non-capturing (during TBIO-4809)
|
|
91
|
-
- colons are only valid when followed directly by // or some text and then @ (TBIO-4867)
|
|
92
|
-
- only include the fragment '#' if it has 1 or more trailing matches
|
|
93
|
-
- only include the query '?' if it has 1 or more trailing matches
|
|
94
|
-
- allow commas in URL path
|
|
95
|
-
- exclude trailing comma and period in URL path
|
|
96
|
-
- allow up to 15 character schemes including all valid characters from the spec https://url.spec.whatwg.org/#url-scheme-string (TINY-5074)
|
|
97
|
-
- changed instances of 0-9 to be \d (TINY-5074)
|
|
98
|
-
- reduced duplication (TINY-5074)
|
|
99
|
-
- allow [*!;:'@$] in the path segment as they are valid characters per the spec: https://url.spec.whatwg.org/#url-path-segment-string (TINY-8069)
|
|
100
|
-
|
|
101
|
-
(?:
|
|
102
|
-
(?:
|
|
103
|
-
[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?
|
|
104
|
-
| www\.
|
|
105
|
-
| [-;:&=+$,.\w]+@
|
|
106
|
-
)
|
|
107
|
-
[A-Za-z\d-]+
|
|
108
|
-
(?:\.[A-Za-z\d-]+)*
|
|
109
|
-
)
|
|
110
|
-
(?::\d+)?
|
|
111
|
-
(?:
|
|
112
|
-
\/
|
|
113
|
-
(?:
|
|
114
|
-
[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w]
|
|
115
|
-
)?
|
|
116
|
-
)?
|
|
117
|
-
(?:
|
|
118
|
-
\?
|
|
119
|
-
(?:
|
|
120
|
-
[-.~*+=!&;:'%@?^${}(),\/\w]+
|
|
121
|
-
)
|
|
122
|
-
)?
|
|
123
|
-
(?:
|
|
124
|
-
#
|
|
125
|
-
(?:
|
|
126
|
-
[-.~*+=!&;:'%@?^${}(),\/\w]+
|
|
127
|
-
)
|
|
128
|
-
)?
|
|
129
|
-
*/
|
|
130
|
-
const link = () =>
|
|
131
|
-
// eslint-disable-next-line max-len
|
|
132
|
-
/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
|
|
133
|
-
|
|
134
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
135
|
-
const register = (editor) => {
|
|
136
|
-
const registerOption = editor.options.register;
|
|
137
|
-
registerOption('autolink_pattern', {
|
|
138
|
-
processor: 'regexp',
|
|
139
|
-
// Use the Polaris link detection, however for autolink we need to make it be an exact match
|
|
140
|
-
default: new RegExp('^' + link().source + '$', 'i')
|
|
141
|
-
});
|
|
142
|
-
registerOption('link_default_target', {
|
|
143
|
-
processor: 'string'
|
|
144
|
-
});
|
|
145
|
-
registerOption('link_default_protocol', {
|
|
146
|
-
processor: 'string',
|
|
147
|
-
default: 'https'
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
const getAutoLinkPattern = option('autolink_pattern');
|
|
151
|
-
const getDefaultLinkTarget = option('link_default_target');
|
|
152
|
-
const getDefaultLinkProtocol = option('link_default_protocol');
|
|
153
|
-
const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
|
|
154
|
-
|
|
155
|
-
var global = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
|
|
156
|
-
|
|
157
|
-
const isTextNode = (node) => node.nodeType === 3;
|
|
158
|
-
const isElement = (node) => node.nodeType === 1;
|
|
159
|
-
const isBracketOrSpace = (char) => /^[(\[{ \u00a0]$/.test(char);
|
|
160
|
-
// Note: This is similar to the Polaris protocol detection, except it also handles `mailto` and any length scheme
|
|
161
|
-
const hasProtocol = (url) => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url);
|
|
162
|
-
// A limited list of punctuation characters that might be used after a link
|
|
163
|
-
const isPunctuation = (char) => /[?!,.;:]/.test(char);
|
|
164
|
-
const findChar = (text, index, predicate) => {
|
|
165
|
-
for (let i = index - 1; i >= 0; i--) {
|
|
166
|
-
const char = text.charAt(i);
|
|
167
|
-
if (!isZwsp(char) && predicate(char)) {
|
|
168
|
-
return i;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return -1;
|
|
172
|
-
};
|
|
173
|
-
const freefallRtl = (container, offset) => {
|
|
174
|
-
let tempNode = container;
|
|
175
|
-
let tempOffset = offset;
|
|
176
|
-
while (isElement(tempNode) && tempNode.childNodes[tempOffset]) {
|
|
177
|
-
tempNode = tempNode.childNodes[tempOffset];
|
|
178
|
-
tempOffset = isTextNode(tempNode) ? tempNode.data.length : tempNode.childNodes.length;
|
|
179
|
-
}
|
|
180
|
-
return { container: tempNode, offset: tempOffset };
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const parseCurrentLine = (editor, offset) => {
|
|
184
|
-
const voidElements = editor.schema.getVoidElements();
|
|
185
|
-
const autoLinkPattern = getAutoLinkPattern(editor);
|
|
186
|
-
const { dom, selection } = editor;
|
|
187
|
-
// Never create a link when we are inside a link
|
|
188
|
-
if (dom.getParent(selection.getNode(), 'a[href]') !== null || editor.mode.isReadOnly()) {
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
const rng = selection.getRng();
|
|
192
|
-
const textSeeker = global(dom, (node) => {
|
|
193
|
-
return dom.isBlock(node) || has(voidElements, node.nodeName.toLowerCase()) || dom.getContentEditable(node) === 'false' || dom.getParent(node, 'a[href]') !== null;
|
|
194
|
-
});
|
|
195
|
-
// Descend down the end container to find the text node
|
|
196
|
-
const { container: endContainer, offset: endOffset } = freefallRtl(rng.endContainer, rng.endOffset);
|
|
197
|
-
// Find the root container to use when walking
|
|
198
|
-
const root = dom.getParent(endContainer, dom.isBlock) ?? dom.getRoot();
|
|
199
|
-
// Move the selection backwards to the start of the potential URL to account for the pressed character
|
|
200
|
-
// while also excluding the last full stop from a word like "www.site.com."
|
|
201
|
-
const endSpot = textSeeker.backwards(endContainer, endOffset + offset, (node, offset) => {
|
|
202
|
-
const text = node.data;
|
|
203
|
-
const idx = findChar(text, offset, not(isBracketOrSpace));
|
|
204
|
-
// Move forward one so the offset is after the found character unless the found char is a punctuation char
|
|
205
|
-
return idx === -1 || isPunctuation(text[idx]) ? idx : idx + 1;
|
|
206
|
-
}, root);
|
|
207
|
-
if (!endSpot) {
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
|
-
// Walk backwards until we find a boundary or a bracket/space
|
|
211
|
-
let lastTextNode = endSpot.container;
|
|
212
|
-
const startSpot = textSeeker.backwards(endSpot.container, endSpot.offset, (node, offset) => {
|
|
213
|
-
lastTextNode = node;
|
|
214
|
-
const idx = findChar(node.data, offset, isBracketOrSpace);
|
|
215
|
-
// Move forward one so that the offset is after the bracket/space
|
|
216
|
-
return idx === -1 ? idx : idx + 1;
|
|
217
|
-
}, root);
|
|
218
|
-
const newRng = dom.createRng();
|
|
219
|
-
if (!startSpot) {
|
|
220
|
-
newRng.setStart(lastTextNode, 0);
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
newRng.setStart(startSpot.container, startSpot.offset);
|
|
224
|
-
}
|
|
225
|
-
newRng.setEnd(endSpot.container, endSpot.offset);
|
|
226
|
-
const rngText = removeZwsp(newRng.toString());
|
|
227
|
-
const matches = rngText.match(autoLinkPattern);
|
|
228
|
-
if (matches) {
|
|
229
|
-
let url = matches[0];
|
|
230
|
-
if (startsWith(url, 'www.')) {
|
|
231
|
-
const protocol = getDefaultLinkProtocol(editor);
|
|
232
|
-
url = protocol + '://' + url;
|
|
233
|
-
}
|
|
234
|
-
else if (contains(url, '@') && !hasProtocol(url)) {
|
|
235
|
-
url = 'mailto:' + url;
|
|
236
|
-
}
|
|
237
|
-
return { rng: newRng, url };
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
return null;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
const convertToLink = (editor, result) => {
|
|
244
|
-
const { dom, selection } = editor;
|
|
245
|
-
const { rng, url } = result;
|
|
246
|
-
const bookmark = selection.getBookmark();
|
|
247
|
-
selection.setRng(rng);
|
|
248
|
-
// Needs to be a native createlink command since this is executed in a keypress event handler
|
|
249
|
-
// so the pending character that is to be inserted needs to be inserted after the link. That will not
|
|
250
|
-
// happen if we use the formatter create link version. Since we're using the native command
|
|
251
|
-
// then we also need to ensure the exec command events are fired for backwards compatibility.
|
|
252
|
-
const command = 'createlink';
|
|
253
|
-
const args = { command, ui: false, value: url };
|
|
254
|
-
const beforeExecEvent = editor.dispatch('BeforeExecCommand', args);
|
|
255
|
-
if (!beforeExecEvent.isDefaultPrevented()) {
|
|
256
|
-
editor.getDoc().execCommand(command, false, url);
|
|
257
|
-
editor.dispatch('ExecCommand', args);
|
|
258
|
-
const defaultLinkTarget = getDefaultLinkTarget(editor);
|
|
259
|
-
if (isString(defaultLinkTarget)) {
|
|
260
|
-
const anchor = selection.getNode();
|
|
261
|
-
dom.setAttrib(anchor, 'target', defaultLinkTarget);
|
|
262
|
-
// Ensure noopener is added for blank targets to prevent window opener attacks
|
|
263
|
-
if (defaultLinkTarget === '_blank' && !allowUnsafeLinkTarget(editor)) {
|
|
264
|
-
dom.setAttrib(anchor, 'rel', 'noopener');
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
selection.moveToBookmark(bookmark);
|
|
269
|
-
editor.nodeChanged();
|
|
270
|
-
};
|
|
271
|
-
const handleSpacebar = (editor) => {
|
|
272
|
-
const result = parseCurrentLine(editor, -1);
|
|
273
|
-
if (isNonNullable(result)) {
|
|
274
|
-
convertToLink(editor, result);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
const handleBracket = handleSpacebar;
|
|
278
|
-
const handleEnter = (editor) => {
|
|
279
|
-
const result = parseCurrentLine(editor, 0);
|
|
280
|
-
if (isNonNullable(result)) {
|
|
281
|
-
convertToLink(editor, result);
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
const setup = (editor) => {
|
|
285
|
-
editor.on('keydown', (e) => {
|
|
286
|
-
if (e.keyCode === 13 && !e.isDefaultPrevented()) {
|
|
287
|
-
handleEnter(editor);
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
editor.on('keyup', (e) => {
|
|
291
|
-
if (e.keyCode === 32) {
|
|
292
|
-
handleSpacebar(editor);
|
|
293
|
-
// One of the closing bracket keys: ), ] or }
|
|
294
|
-
}
|
|
295
|
-
else if (e.keyCode === 48 && e.shiftKey || e.keyCode === 221) {
|
|
296
|
-
handleBracket(editor);
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
var Plugin = () => {
|
|
302
|
-
global$1.add('autolink', (editor) => {
|
|
303
|
-
register(editor);
|
|
304
|
-
setup(editor);
|
|
305
|
-
});
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
Plugin();
|
|
309
|
-
/** *****
|
|
310
|
-
* DO NOT EXPORT ANYTHING
|
|
311
|
-
*
|
|
312
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
313
|
-
*******/
|
|
314
|
-
|
|
315
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||o.constructor?.name===r.name)?"string":t;var n,o,r})(e);const n=e=>undefined===e;const o=e=>!(e=>null==e)(e),r=Object.hasOwnProperty,a=e=>"\ufeff"===e,s=e=>t=>t.options.get(e),l=s("autolink_pattern"),c=s("link_default_target"),i=s("link_default_protocol"),d=s("allow_unsafe_link_target");var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!a(t)&&n(t))return o}return-1},m=(e,t)=>{const o=e.schema.getVoidElements(),a=l(e),{dom:s,selection:c}=e;if(null!==s.getParent(c.getNode(),"a[href]")||e.mode.isReadOnly())return null;const d=c.getRng(),m=u(s,(e=>{return s.isBlock(e)||(t=o,n=e.nodeName.toLowerCase(),r.call(t,n))||"false"===s.getContentEditable(e)||null!==s.getParent(e,"a[href]");var t,n})),{container:k,offset:p}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(d.endContainer,d.endOffset),y=s.getParent(k,s.isBlock)??s.getRoot(),w=m.backwards(k,p+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),y);if(!w)return null;let h=w.container;const _=m.backwards(w.container,w.offset,((e,t)=>{h=e;const n=g(e.data,t,f);return-1===n?n:n+1}),y),v=s.createRng();_?v.setStart(_.container,_.offset):v.setStart(h,0),v.setEnd(w.container,w.offset);const A=v.toString().replace(/\uFEFF/g,"").match(a);if(A){let t=A[0];return b="www.",(C=t).length>=4&&C.substr(0,4)===b?t=i(e)+"://"+t:((e,t,o=0,r)=>{const a=e.indexOf(t,o);return-1!==a&&(!!n(r)||a+t.length<=r)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:v,url:t}}var C,b;return null},k=(e,n)=>{const{dom:o,selection:r}=e,{rng:a,url:s}=n,l=r.getBookmark();r.setRng(a);const i="createlink",u={command:i,ui:!1,value:s};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(i,!1,s),e.dispatch("ExecCommand",u);const n=c(e);if(t(n)){const t=r.getNode();o.setAttrib(t,"target",n),"_blank"!==n||d(e)||o.setAttrib(t,"rel","noopener")}}r.moveToBookmark(l),e.nodeChanged()},p=e=>{const t=m(e,-1);o(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);o(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();
|