@inpageedit/core 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/dist/{ActionButton-BgbTKTg7.js → ActionButton-CRjo_l3y.js} +2 -2
- package/dist/{ActionButton-BgbTKTg7.js.map → ActionButton-CRjo_l3y.js.map} +1 -1
- package/dist/{CheckBox-D3rHnX7I.js → CheckBox-Bc79KBEB.js} +2 -2
- package/dist/{CheckBox-D3rHnX7I.js.map → CheckBox-Bc79KBEB.js.map} +1 -1
- package/dist/{IconQuickEdit-CAL1HXIb.js → IconQuickEdit-CMCQncyj.js} +2 -2
- package/dist/IconQuickEdit-CMCQncyj.js.map +1 -0
- package/dist/InPageEdit.d.ts +5 -1
- package/dist/{InputBox-BV4m05Xs.js → InputBox-DZAdyZ4B.js} +2 -2
- package/dist/InputBox-DZAdyZ4B.js.map +1 -0
- package/dist/PluginPrefSync-BPQkNtX8.js +292 -0
- package/dist/PluginPrefSync-BPQkNtX8.js.map +1 -0
- package/dist/PluginStoreApp-Cxspe6t8.js +158 -0
- package/dist/PluginStoreApp-Cxspe6t8.js.map +1 -0
- package/dist/Preferences-DS4-CFWe.js.map +1 -1
- package/dist/{RadioBox-nJqWsxW2.js → RadioBox-0UuxlcWZ.js} +2 -2
- package/dist/{RadioBox-nJqWsxW2.js.map → RadioBox-0UuxlcWZ.js.map} +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +10 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js.map +1 -0
- package/dist/components/index.js +8 -8
- package/dist/components/index.js.map +1 -1
- package/dist/constants/endpoints.d.ts +2 -1
- package/dist/index-B5DtUqkK.js +180 -0
- package/dist/index-B5DtUqkK.js.map +1 -0
- package/dist/{index-DFPN4uYd.js → index-BXaiDKnr.js} +2316 -2314
- package/dist/index-BXaiDKnr.js.map +1 -0
- package/dist/{index-B5vDBMEh.js → index-Bv7Dw5eO.js} +10 -9
- package/dist/index-Bv7Dw5eO.js.map +1 -0
- package/dist/{index-BVkdBJNf.js → index-CB7TltEb.js} +25 -30
- package/dist/index-CB7TltEb.js.map +1 -0
- package/dist/{index-lZkYoUca.js → index-CG38LlAh.js} +2 -2
- package/dist/index-CG38LlAh.js.map +1 -0
- package/dist/{index-BP-e8PeH.js → index-CJFePavo.js} +4 -4
- package/dist/index-CJFePavo.js.map +1 -0
- package/dist/{index-CvhkVj_L.js → index-CM_6yF2v.js} +3 -3
- package/dist/{index-CvhkVj_L.js.map → index-CM_6yF2v.js.map} +1 -1
- package/dist/{index-D7NpqwUe.js → index-CPoUaSMw.js} +8 -8
- package/dist/index-CPoUaSMw.js.map +1 -0
- package/dist/{index-CFb1PSJg.js → index-CYc6LH26.js} +53 -43
- package/dist/index-CYc6LH26.js.map +1 -0
- package/dist/index-CZXxH2-9.js +173 -0
- package/dist/index-CZXxH2-9.js.map +1 -0
- package/dist/{index-DkQLtTG0.js → index-Ckozkp6W.js} +5 -7
- package/dist/index-Ckozkp6W.js.map +1 -0
- package/dist/{index-BjwVNZ_h.js → index-D4uwfUZL.js} +6 -6
- package/dist/index-D4uwfUZL.js.map +1 -0
- package/dist/{index-Bh70Udzi.js → index-DD5CVCfD.js} +2 -2
- package/dist/index-DD5CVCfD.js.map +1 -0
- package/dist/index-DEav9Ptt.js +365 -0
- package/dist/index-DEav9Ptt.js.map +1 -0
- package/dist/index-hSl8LzNb.js +1169 -0
- package/dist/index-hSl8LzNb.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/makeCallable-LDU0xZMJ.js.map +1 -1
- package/dist/models/MemoryStorage.d.ts +10 -0
- package/dist/models/WikiPage/index.d.ts +14 -0
- package/dist/noop-ClDc6zv4.js.map +1 -1
- package/dist/plugins/in-article-links/index.d.ts +5 -0
- package/dist/plugins/plugin-store/index.d.ts +59 -0
- package/dist/plugins/plugin-store/schema.d.ts +41 -0
- package/dist/plugins/preferences-ui/PluginPrefSync.d.ts +1 -0
- package/dist/plugins/preferences-ui/index.d.ts +34 -5
- package/dist/plugins/quick-delete/index.d.ts +3 -0
- package/dist/plugins/quick-diff/index.d.ts +3 -0
- package/dist/plugins/quick-edit/index.d.ts +8 -0
- package/dist/plugins/quick-move/index.d.ts +5 -3
- package/dist/plugins/quick-preview/index.d.ts +4 -0
- package/dist/plugins/quick-redirect/index.d.ts +11 -4
- package/dist/plugins/toolbox/index.d.ts +3 -0
- package/dist/services/PreferencesService.d.ts +53 -11
- package/dist/services/ResourceLoaderService.d.ts +3 -0
- package/dist/services/WikiMetadataService.d.ts +1 -1
- package/dist/services/storage/index.d.ts +18 -8
- package/dist/services/storage/{IPEStorageManager.d.ts → managers/IDBStorageManager.d.ts} +9 -6
- package/dist/services/storage/managers/LocalStorageManager.d.ts +27 -0
- package/dist/style.css +1 -1
- package/dist/vueHooks-D0uVqbO-.js +4032 -0
- package/dist/vueHooks-D0uVqbO-.js.map +1 -0
- package/lib/index.umd.js +11 -115
- package/lib/index.umd.js.map +1 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
- package/dist/IconQuickEdit-CAL1HXIb.js.map +0 -1
- package/dist/InputBox-BV4m05Xs.js.map +0 -1
- package/dist/PluginPrefSync-PIoKRRu2.js +0 -254
- package/dist/PluginPrefSync-PIoKRRu2.js.map +0 -1
- package/dist/index-B5vDBMEh.js.map +0 -1
- package/dist/index-BP-e8PeH.js.map +0 -1
- package/dist/index-BVkdBJNf.js.map +0 -1
- package/dist/index-Bh70Udzi.js.map +0 -1
- package/dist/index-BjwVNZ_h.js.map +0 -1
- package/dist/index-BzCqww16.js +0 -159
- package/dist/index-BzCqww16.js.map +0 -1
- package/dist/index-CFb1PSJg.js.map +0 -1
- package/dist/index-D7NpqwUe.js.map +0 -1
- package/dist/index-DFPN4uYd.js.map +0 -1
- package/dist/index-DGOY4X1J.js +0 -4912
- package/dist/index-DGOY4X1J.js.map +0 -1
- package/dist/index-DKDtc9IF.js +0 -167
- package/dist/index-DKDtc9IF.js.map +0 -1
- package/dist/index-DkQLtTG0.js.map +0 -1
- package/dist/index-lZkYoUca.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginStoreApp-Cxspe6t8.js","sources":["../src/plugins/plugin-store/components/PluginStoreApp.vue"],"sourcesContent":["<template lang=\"pug\">\n#ipe-plugin-store-app\n .sotre-header\n .store-search-wrapper\n input.store-search-input(\n v-model='searchInput',\n type='text',\n placeholder='Search plugins...',\n :disabled='registryInfos.length === 0'\n )\n .store-search-icon 🔍\n button.store-refresh-btn(\n @click='refreshRegistries',\n :disabled='isRefreshing',\n :class='{ refreshing: isRefreshing }'\n )\n span.refresh-text {{ isRefreshing ? 'Refreshing...' : 'Refresh' }}\n\n .store-loading(v-if='registryInfos.length === 0')\n .loading-spinner\n .loading-text Loading...\n\n .store-plugins(v-else-if='filteredPlugins.length > 0')\n .plugin-item(\n v-for='plugin in filteredPlugins',\n :key='`${plugin.registry}:${plugin.id}`',\n :class='{ installed: isInstalled(plugin.registry, plugin.id) }'\n )\n .plugin-info\n .plugin-header\n .name {{ plugin.name }}\n .status-badge(v-if='isInstalled(plugin.registry, plugin.id)') ✓\n a.registry-tag(:href='plugin.registryHomepage', target='_blank') {{ getRegistryLabel(plugin.registry) }}\n .plugin-id {{ plugin.id }}\n .plugin-desc(v-if='plugin.description') {{ plugin.description }}\n .plugin-meta\n span.version(v-if='plugin.version') v{{ plugin.version }}\n span.author(v-if='plugin.author') 👤 {{ plugin.author }}\n span.license(v-if='plugin.license') 📜 {{ plugin.license }}\n button(\n :class='{ active: isInstalled(plugin.registry, plugin.id) }',\n @click='togglePlugin(plugin.registry, plugin.id)'\n ) {{ isInstalled(plugin.registry, plugin.id) ? 'Remove' : 'Install' }}\n\n .plugin-empty(v-else)\n .plugin-empty-icon 📦\n .plugin-empty-text No matching plugins found\n</template>\n\n<script setup lang=\"ts\" vapor>\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\nimport type { PluginStoreRegistry } from '../schema.js'\n\ninterface RegistryWithUrl extends PluginStoreRegistry {\n registryUrl: string\n}\n\nconst ctx = useIPE()\nconst registryInfos = ref<RegistryWithUrl[]>([])\nconst installedPlugins = ref<string[]>([])\nconst searchInput = ref('')\nconst isRefreshing = ref(false)\n\nonMounted(async () => {\n await initRegistries()\n})\n\nconst initRegistries = async () => {\n const registryUrls = (await ctx.store.ctx.preferences.get('pluginStore.registries')) || []\n\n const results = await Promise.allSettled(\n registryUrls.map(async (url) => {\n const info = await ctx.store.getRegistryInfo(url)\n return { ...info, registryUrl: url }\n })\n )\n\n registryInfos.value = results\n .filter((r) => r.status === 'fulfilled')\n .map((r) => (r as PromiseFulfilledResult<RegistryWithUrl>).value)\n}\n\nconst isInstalled = (registry: string, id: string) => {\n return installedPlugins.value.includes(`${registry}:${id}`)\n}\n\n// 获取仓库标签显示名称\nconst getRegistryLabel = (registryUrl: string) => {\n try {\n const url = new URL(registryUrl)\n return url.hostname\n } catch {\n return registryUrl\n }\n}\n\n// 搜索过滤 - 合并所有仓库的插件\nconst filteredPlugins = computed(() => {\n // 合并所有仓库的packages,并添加registry信息(使用完整的registryUrl)\n const allPlugins = registryInfos.value.flatMap((registry) =>\n (registry.packages || []).map((pkg) => ({\n ...pkg,\n registry: registry.registryUrl, // 使用完整的 registry URL (index.json 地址)\n registryHomepage: registry.homepage,\n }))\n )\n\n if (!searchInput.value.trim()) return allPlugins\n\n const query = searchInput.value.toLowerCase()\n return allPlugins.filter((plugin) => {\n return (\n plugin.name?.toLowerCase().includes(query) ||\n plugin.id?.toLowerCase().includes(query) ||\n plugin.description?.toLowerCase().includes(query) ||\n plugin.author?.toLowerCase().includes(query)\n )\n })\n})\n\nconst enablePlugin = async (registry: string, id: string) => {\n ctx.store.installAndSetPreference(registry, id)\n}\nconst disablePlugin = async (registry: string, id: string) => {\n ctx.store.uninstallAndRemovePreference(registry, id)\n}\n\n// 切换插件状态\nconst togglePlugin = (registry: string, id: string) => {\n if (isInstalled(registry, id)) {\n disablePlugin(registry, id)\n } else {\n enablePlugin(registry, id)\n }\n}\n\n// 刷新所有 registry 缓存\nconst refreshRegistries = async () => {\n if (isRefreshing.value) return\n\n isRefreshing.value = true\n try {\n const registryUrls = (await ctx.store.ctx.preferences.get('pluginStore.registries')) || []\n\n const results = await Promise.allSettled(\n registryUrls.map(async (url) => {\n const info = await ctx.store.refreshRegistryCache(url)\n return { ...info, registryUrl: url }\n })\n )\n\n registryInfos.value = results\n .filter((r) => r.status === 'fulfilled')\n .map((r) => (r as PromiseFulfilledResult<RegistryWithUrl>).value)\n\n ctx.modal.notify('success', {\n content: `${registryUrls.length} registries refreshed successfully`,\n })\n } catch (error) {\n ctx.modal.notify('error', {\n content: 'Failed to refresh registries',\n })\n } finally {\n setTimeout(() => {\n isRefreshing.value = false\n }, 3000)\n }\n}\n\n// init plugin states\nconst initInstalStatus = async () => {\n const prefs = (await ctx.store.ctx.preferences.get('pluginStore.plugins')) || []\n installedPlugins.value = prefs.map((p) => `${p.registry}:${p.id}`)\n}\nfunction onPreferencesChanged(payload: { changes: Record<string, unknown> }) {\n const plugins = payload.changes['pluginStore.plugins'] as {\n registry: string\n id: string\n }[]\n if (plugins && Array.isArray(plugins)) {\n installedPlugins.value = plugins.map((p) => `${p.registry}:${p.id}`)\n }\n}\nonMounted(() => {\n initInstalStatus()\n ctx.on('preferences/changed', onPreferencesChanged)\n})\n\nonMounted(() => {\n console.info('mount plugin store app', ctx)\n})\nonBeforeUnmount(() => {\n console.info('unmount plugin store app', ctx)\n})\n</script>\n\n<style scoped lang=\"scss\">\n#ipe-plugin-store-app {\n padding: var(--ipe-modal-spacing);\n font-size: 0.875rem;\n color: var(--ipe-modal-text);\n}\n\n.sotre-header {\n margin-bottom: 1.25rem;\n display: flex;\n align-items: center;\n gap: var(--ipe-modal-spacing);\n\n h2 {\n margin: 0;\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--ipe-modal-text);\n }\n\n .store-search-wrapper {\n flex: 1;\n position: relative;\n\n .store-search-input {\n width: 100%;\n height: 2.5rem;\n padding: 0 0.875rem 0 2.5rem;\n border: 1.5px solid var(--ipe-modal-border-color);\n border-radius: var(--ipe-modal-button-radius);\n font-size: 0.875rem;\n outline: none;\n background: var(--ipe-modal-bg);\n color: var(--ipe-modal-text);\n transition: all 0.2s ease;\n line-height: 1.5;\n\n &:focus {\n border-color: var(--ipe-modal-accent);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--ipe-modal-accent) 10%, transparent);\n }\n\n &::placeholder {\n color: var(--ipe-modal-muted);\n }\n }\n\n .store-search-icon {\n position: absolute;\n left: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n opacity: 0.5;\n }\n }\n\n .store-refresh-btn {\n height: 2.5rem;\n padding: 0 1rem;\n border: 1.5px solid var(--ipe-modal-border-color);\n border-radius: var(--ipe-modal-button-radius);\n background: var(--ipe-modal-bg);\n color: var(--ipe-modal-text);\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: 500;\n white-space: nowrap;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 0.375rem;\n\n &:hover:not(:disabled) {\n background: var(--ipe-modal-secondary-bg);\n border-color: var(--ipe-modal-accent);\n transform: translateY(-1px);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--ipe-modal-text) 10%, transparent);\n }\n\n &:active:not(:disabled) {\n transform: translateY(0);\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n }\n}\n\n.store-loading {\n padding: 10rem 1.25rem;\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n\n .loading-spinner {\n width: 2rem;\n height: 2rem;\n border: 3px solid var(--ipe-modal-border-color);\n border-top-color: var(--ipe-modal-accent);\n border-radius: 50%;\n animation: spin 0.8s linear infinite;\n }\n\n .loading-text {\n color: var(--ipe-modal-muted);\n font-size: 0.875rem;\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.store-plugins {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.plugin-item {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.875rem;\n border: 1.5px solid var(--ipe-modal-border-color);\n border-radius: calc(var(--ipe-modal-button-radius) + 2px);\n background: var(--ipe-modal-secondary-bg);\n position: relative;\n transition: all 0.2s ease;\n\n &:hover {\n background: var(--ipe-modal-divider-color);\n border-color: color-mix(in srgb, var(--ipe-modal-accent) 30%, var(--ipe-modal-border-color));\n box-shadow: 0 2px 8px color-mix(in srgb, var(--ipe-modal-text) 5%, transparent);\n }\n\n &.installed {\n background: color-mix(in srgb, var(--ipe-modal-success) 5%, var(--ipe-modal-secondary-bg));\n border-color: color-mix(in srgb, var(--ipe-modal-success) 50%, var(--ipe-modal-border-color));\n\n &:hover {\n background: color-mix(in srgb, var(--ipe-modal-success) 8%, var(--ipe-modal-secondary-bg));\n border-color: var(--ipe-modal-success);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--ipe-modal-success) 15%, transparent);\n }\n }\n\n .plugin-info {\n flex: 1;\n min-width: 0;\n\n .plugin-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.25rem;\n\n .name {\n font-weight: 600;\n font-size: 1rem;\n color: var(--ipe-modal-text);\n line-height: 1.2;\n }\n\n .status-badge {\n font-size: 0.6875rem;\n color: var(--ipe-modal-success);\n font-weight: 600;\n background: color-mix(in srgb, var(--ipe-modal-success) 15%, transparent);\n padding: 0.125rem 0.375rem;\n border-radius: calc(var(--ipe-modal-button-radius) - 2px);\n line-height: 1;\n }\n }\n\n .plugin-id {\n font-size: 0.75rem;\n color: var(--ipe-modal-muted);\n font-family: monospace;\n margin-bottom: 0.375rem;\n background: color-mix(in srgb, var(--ipe-modal-muted) 5%, transparent);\n padding: 0.125rem 0.375rem;\n border-radius: 3px;\n display: inline-block;\n margin-left: 0.375rem;\n }\n\n .registry-tag {\n font-size: 0.6875rem;\n color: var(--ipe-modal-accent);\n font-family: monospace;\n margin-bottom: 0.375rem;\n background: color-mix(in srgb, var(--ipe-modal-accent) 10%, transparent);\n padding: 0.125rem 0.375rem;\n border-radius: 3px;\n display: inline-block;\n border: 1px solid color-mix(in srgb, var(--ipe-modal-accent) 20%, transparent);\n }\n\n .plugin-desc {\n font-size: 0.8125rem;\n color: var(--ipe-modal-muted);\n margin-bottom: 0.375rem;\n line-height: 1.5;\n }\n\n .plugin-meta {\n font-size: 0.75rem;\n color: var(--ipe-modal-muted);\n display: flex;\n gap: 1rem;\n\n .version {\n font-family: monospace;\n font-weight: 500;\n }\n\n .author {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n }\n }\n }\n\n button {\n padding: 0.5rem 1.25rem;\n border: 1.5px solid var(--ipe-modal-accent);\n border-radius: var(--ipe-modal-button-radius);\n background: var(--ipe-modal-bg);\n color: var(--ipe-modal-accent);\n cursor: pointer;\n font-size: 0.8125rem;\n font-weight: 500;\n white-space: nowrap;\n transition: all 0.2s ease;\n\n &:hover {\n background: var(--ipe-modal-accent);\n color: var(--ipe-modal-bg);\n transform: translateY(-1px);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--ipe-modal-accent) 25%, transparent);\n }\n\n &:active {\n transform: translateY(0);\n }\n\n &.active {\n border-color: var(--ipe-modal-danger);\n color: var(--ipe-modal-danger);\n\n &:hover {\n background: var(--ipe-modal-danger);\n color: var(--ipe-modal-bg);\n box-shadow: 0 2px 6px color-mix(in srgb, var(--ipe-modal-danger) 25%, transparent);\n }\n }\n }\n}\n\n.plugin-empty {\n padding: 3rem 1.25rem;\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n\n .plugin-empty-icon {\n font-size: 3rem;\n opacity: 0.3;\n }\n\n .plugin-empty-text {\n color: var(--ipe-modal-muted);\n font-size: 0.9375rem;\n }\n}\n</style>\n"],"names":["ctx","useIPE","registryInfos","ref","installedPlugins","searchInput","isRefreshing","onMounted","initRegistries","registryUrls","results","url","r","isInstalled","registry","id","getRegistryLabel","registryUrl","filteredPlugins","computed","allPlugins","pkg","query","plugin","enablePlugin","disablePlugin","togglePlugin","refreshRegistries","initInstalStatus","prefs","p","onPreferencesChanged","payload","plugins","onBeforeUnmount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,UAAMA,IAAMC,EAAA,GACNC,IAAgBC,EAAuB,EAAE,GACzCC,IAAmBD,EAAc,EAAE,GACnCE,IAAcF,EAAI,EAAE,GACpBG,IAAeH,EAAI,EAAK;AAE9B,IAAAI,EAAU,YAAY;AACpB,YAAMC,EAAA;AAAA,IACR,CAAC;AAED,UAAMA,IAAiB,YAAY;AACjC,YAAMC,IAAgB,MAAMT,EAAI,MAAM,IAAI,YAAY,IAAI,wBAAwB,KAAM,CAAA,GAElFU,IAAU,MAAM,QAAQ;AAAA,QAC5BD,EAAa,IAAI,OAAOE,OAEf,EAAE,GADI,MAAMX,EAAI,MAAM,gBAAgBW,CAAG,GAC9B,aAAaA,EAAA,EAChC;AAAA,MAAA;AAGH,MAAAT,EAAc,QAAQQ,EACnB,OAAO,CAACE,MAAMA,EAAE,WAAW,WAAW,EACtC,IAAI,CAACA,MAAOA,EAA8C,KAAK;AAAA,IACpE,GAEMC,IAAc,CAACC,GAAkBC,MAC9BX,EAAiB,MAAM,SAAS,GAAGU,CAAQ,IAAIC,CAAE,EAAE,GAItDC,IAAmB,CAACC,MAAwB;AAChD,UAAI;AAEF,eADY,IAAI,IAAIA,CAAW,EACpB;AAAA,MACb,QAAQ;AACN,eAAOA;AAAA,MACT;AAAA,IACF,GAGMC,IAAkBC,EAAS,MAAM;AAErC,YAAMC,IAAalB,EAAc,MAAM;AAAA,QAAQ,CAACY,OAC7CA,EAAS,YAAY,CAAA,GAAI,IAAI,CAACO,OAAS;AAAA,UACtC,GAAGA;AAAA,UACH,UAAUP,EAAS;AAAA;AAAA,UACnB,kBAAkBA,EAAS;AAAA,QAAA,EAC3B;AAAA,MAAA;AAGJ,UAAI,CAACT,EAAY,M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AA,QACH,UAAA;AACE,qBAAW,MAAM;AACf,YAAAM,EAAa,QAAQ;AAAA,UACvB,GAAG,GAAI;AAAA,QACT;AAAA;AAAA,IACF,GAGMsB,IAAmB,YAAY;AACnC,YAAMC,IAAS,MAAM7B,EAAI,MAAM,IAAI,YAAY,IAAI,qBAAqB,KAAM,CAAA;AAC9E,MAAAI,EAAiB,QAAQyB,EAAM,IAAI,CAACC,MAAM,GAAGA,EAAE,QAAQ,IAAIA,EAAE,EAAE,EAAE;AAAA,IACnE;AACA,aAASC,EAAqBC,GAA+C;AAC3E,YAAMC,IAAUD,EAAQ,QAAQ,qBAAqB;AAIrD,MAAIC,KAAW,MAAM,QAAQA,CAAO,MAClC7B,EAAiB,QAAQ6B,EAAQ,IAAI,CAACH,MAAM,GAAGA,EAAE,QAAQ,IAAIA,EAAE,EAAE,EAAE;AAAA,IAEvE;AACA,WAAAvB,EAAU,MAAM;AACd,MAAAqB,EAAA,GACA5B,EAAI,GAAG,uBAAuB+B,CAAoB;AAAA,IACpD,CAAC,GAEDxB,EAAU,MAAM;AAAA,IAEhB,CAAC,GACD2B,EAAgB,MAAM;AAAA,IAEtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences-DS4-CFWe.js","sources":["../src/decorators/Preferences.ts"],"sourcesContent":["import type Schema from 'schemastery'\n\ntype AnyConstructor<T = any> = new (...args: any[]) => T\n\nexport type PreferenceAugmented<D, C extends AnyConstructor> = C & {\n PreferencesSchema: Schema<D>\n}\n\n/**\n * Decorator for registering preferences\n *\n * ```ts\n * @RegisterPreferences(\n * Schema.object({\n * foo: Schema.string().description('Foo description'),\n * }),\n * {\n * foo: 'default foo value',\n * }\n * )\n * class Foo {}\n * ```\n *\n * same as:\n *\n * ```ts\n * class Foo {\n * static ConfigSchema = Schema.object({\n * foo: Schema.string().description('Foo description')\n * })\n * static ConfigDefaults = {\n * foo: 'default foo value'\n * }\n * }\n * ```\n */\nexport function RegisterPreferences<D extends Record<string, any>>(schema: Schema<D>) {\n return function <T extends AnyConstructor>(target: T): PreferenceAugmented<D, T> {\n ;(target as any).PreferencesSchema = schema\n return target as PreferenceAugmented<D, T>\n }\n}\n"],"names":["RegisterPreferences","schema","target"],"mappings":"AAoCO,SAASA,EAAmDC,GAAmB;AACpF,SAAO,SAAoCC,GAAsC;AAC7E,WAAAA,EAAe,oBAAoBD,GAC9BC;AAAA,EACT;AACF;"}
|
|
1
|
+
{"version":3,"file":"Preferences-DS4-CFWe.js","sources":["../src/decorators/Preferences.ts"],"sourcesContent":["import type Schema from 'schemastery'\r\n\r\ntype AnyConstructor<T = any> = new (...args: any[]) => T\r\n\r\nexport type PreferenceAugmented<D, C extends AnyConstructor> = C & {\r\n PreferencesSchema: Schema<D>\r\n}\r\n\r\n/**\r\n * Decorator for registering preferences\r\n *\r\n * ```ts\r\n * @RegisterPreferences(\r\n * Schema.object({\r\n * foo: Schema.string().description('Foo description'),\r\n * }),\r\n * {\r\n * foo: 'default foo value',\r\n * }\r\n * )\r\n * class Foo {}\r\n * ```\r\n *\r\n * same as:\r\n *\r\n * ```ts\r\n * class Foo {\r\n * static ConfigSchema = Schema.object({\r\n * foo: Schema.string().description('Foo description')\r\n * })\r\n * static ConfigDefaults = {\r\n * foo: 'default foo value'\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport function RegisterPreferences<D extends Record<string, any>>(schema: Schema<D>) {\r\n return function <T extends AnyConstructor>(target: T): PreferenceAugmented<D, T> {\r\n ;(target as any).PreferencesSchema = schema\r\n return target as PreferenceAugmented<D, T>\r\n }\r\n}\r\n"],"names":["RegisterPreferences","schema","target"],"mappings":"AAoCO,SAASA,EAAmDC,GAAmB;AACpF,SAAO,SAAoCC,GAAsC;AAC7E,WAAAA,EAAe,oBAAoBD,GAC9BC;AAAA,EACT;AACF;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./index-
|
|
1
|
+
import { j as e } from "./index-CM_6yF2v.js";
|
|
2
2
|
const d = (a) => {
|
|
3
3
|
const { id: o, name: s, value: i, label: r, inputProps: l, labelProps: p, children: n, ...t } = a;
|
|
4
4
|
return /* @__PURE__ */ e("label", { className: "theme-ipe ipe-radio-box", ...t, children: [
|
|
@@ -10,4 +10,4 @@ const d = (a) => {
|
|
|
10
10
|
export {
|
|
11
11
|
d as R
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=RadioBox-
|
|
13
|
+
//# sourceMappingURL=RadioBox-0UuxlcWZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioBox-
|
|
1
|
+
{"version":3,"file":"RadioBox-0UuxlcWZ.js","sources":["../src/components/RadioBox.tsx"],"sourcesContent":["import { JSX } from 'jsx-dom'\n\nexport type RadioBoxProps = {\n id?: string\n name: string\n value: string\n label?: string | HTMLElement\n inputProps?: JSX.IntrinsicElements['input']\n labelProps?: JSX.IntrinsicElements['span']\n} & JSX.IntrinsicElements['label']\n\nexport const RadioBox = (props: RadioBoxProps) => {\n const { id, name, value, label, inputProps, labelProps, children, ...rest } = props\n return (\n <label className=\"theme-ipe ipe-radio-box\" {...rest}>\n <input type=\"radio\" id={id} name={name} value={value} {...inputProps} />\n <span className=\"ipe-checkbox-box\"></span>\n <span {...labelProps}>{label || children}</span>\n </label>\n )\n}\n"],"names":["RadioBox","props","id","name","value","label","inputProps","labelProps","children","rest","jsxs","jsx"],"mappings":";AAWO,MAAMA,IAAW,CAACC,MAAyB;AAChD,QAAM,EAAE,IAAAC,GAAI,MAAAC,GAAM,OAAAC,GAAO,OAAAC,GAAO,YAAAC,GAAY,YAAAC,GAAY,UAAAC,GAAU,GAAGC,EAAA,IAASR;AAC9E,SACES,gBAAAA,EAAC,SAAA,EAAM,WAAU,2BAA2B,GAAGD,GAC7C,UAAA;AAAA,IAAA,gBAAAE,EAAC,WAAM,MAAK,SAAQ,IAAAT,GAAQ,MAAAC,GAAY,OAAAC,GAAe,GAAGE,GAAY;AAAA,IACtE,gBAAAK,EAAC,QAAA,EAAK,WAAU,mBAAA,CAAmB;AAAA,IACnC,gBAAAA,EAAC,QAAA,EAAM,GAAGJ,GAAa,eAASC,EAAA,CAAS;AAAA,EAAA,GAC3C;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_plugin-vue_export-helper-CHgC5LLL.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { M as x } from "../index-
|
|
2
|
-
import { j as n } from "../index-
|
|
3
|
-
import { P as V } from "../index-
|
|
4
|
-
import { T as A } from "../index-
|
|
5
|
-
import { A as B } from "../ActionButton-
|
|
6
|
-
import { C as T } from "../CheckBox-
|
|
7
|
-
import { I as $ } from "../InputBox-
|
|
8
|
-
import { R as k } from "../RadioBox-
|
|
1
|
+
import { M as x } from "../index-CG38LlAh.js";
|
|
2
|
+
import { j as n } from "../index-CM_6yF2v.js";
|
|
3
|
+
import { P as V } from "../index-CM_6yF2v.js";
|
|
4
|
+
import { T as A } from "../index-DD5CVCfD.js";
|
|
5
|
+
import { A as B } from "../ActionButton-CRjo_l3y.js";
|
|
6
|
+
import { C as T } from "../CheckBox-Bc79KBEB.js";
|
|
7
|
+
import { I as $ } from "../InputBox-DZAdyZ4B.js";
|
|
8
|
+
import { R as k } from "../RadioBox-0UuxlcWZ.js";
|
|
9
9
|
const r = "_tabview_zlbug_1", _ = "_labels_container_zlbug_4", b = "_label_zlbug_4", d = "_active_zlbug_32", m = "_contents_container_zlbug_35", i = {
|
|
10
10
|
tabview: r,
|
|
11
11
|
labels_container: _,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/TabView/index.tsx"],"sourcesContent":["import { ReactNode } from 'jsx-dom'\nimport styles from './styles.module.sass'\n\nexport interface TabViewLabelOptions {\n name: string\n children: ReactNode\n}\n\nconsole.log(styles)\n\nexport function TabView({\n tabs = [],\n defaultActiveIndex = 0,\n}: {\n tabs: (TabViewLabelOptions & { content: ReactNode })[]\n defaultActiveIndex?: number\n}) {\n const el = (\n <div className={`ipe-tabView ${styles.tabview}`}>\n <ul className={`ipe-tabView__labels-container ${styles.labels_container}`}>\n {tabs.map((tab) => (\n <TabLabel key={tab.name} name={tab.name}>\n {tab.children}\n </TabLabel>\n ))}\n </ul>\n <div className={`ipe-tabView__contents ${styles.contents_container}`}>\n {tabs.map((tab) => (\n <TabContent key={tab.name} name={tab.name}>\n {tab.content}\n </TabContent>\n ))}\n </div>\n </div>\n )\n\n const defaultActiveLabel = el.querySelector<HTMLAnchorElement>(\n `.ipe-tabView__labels-container > .ipe-tabView__label:nth-child(${defaultActiveIndex + 1})`\n )\n if (defaultActiveLabel) {\n defaultActiveLabel.click()\n }\n\n return el\n}\n\nexport function TabLabel({ name, children }: { name: string; children: ReactNode }) {\n return (\n <li\n data-tab-name={name}\n className={`ipe-tabView__label ${styles.label}`}\n onClick={function (e) {\n e.preventDefault()\n const container = this.closest('.ipe-tabView')\n if (!container) return\n const labels = Array.from(container.children).find((el) =>\n el.classList.contains('ipe-tabView__labels')\n )?.children\n if (labels) {\n Array.from(labels).forEach((label) => {\n label.classList.remove(styles.active)\n })\n }\n this.classList.add(styles.active)\n const contents = Array.from(container.children).find((el) =>\n el.classList.contains('ipe-tabView__contents')\n )?.children\n if (contents) {\n Array.from(contents).forEach((content) => {\n if (content instanceof HTMLElement) {\n if (content.dataset.tabName === name) {\n content.style.display = ''\n content.classList.add(styles.active)\n } else {\n content.style.display = 'none'\n content.classList.remove(styles.active)\n }\n }\n })\n }\n }}\n >\n <a>{children || name}</a>\n </li>\n )\n}\n\nexport function TabContent({ name, children }: { name: string; children: ReactNode }) {\n return (\n <div\n data-tab-name={name}\n className=\"ipe-tabView__content-body\"\n style={{\n display: 'none',\n }}\n >\n {children}\n </div>\n )\n}\n"],"names":["TabView","tabs","defaultActiveIndex","el","jsxs","styles","jsx","tab","TabLabel","TabContent","defaultActiveLabel","name","children","e","container","labels","label","contents","content"],"mappings":";;;;;;;;;;;;;;;AAUO,SAASA,EAAQ;AAAA,EACtB,MAAAC,IAAO,CAAA;AAAA,EACP,oBAAAC,IAAqB;AACvB,GAGG;AACD,QAAMC,IACJC,gBAAAA,EAAC,OAAA,EAAI,WAAW,eAAeC,EAAO,OAAO,IAC3C,UAAA;AAAA,IAAA,gBAAAC,EAAC,MAAA,EAAG,WAAW,iCAAiCD,EAAO,gBAAgB,IACpE,UAAAJ,EAAK,IAAI,CAACM,wBACRC,GAAA,EAAwB,MAAMD,EAAI,MAChC,UAAAA,EAAI,YADQA,EAAI,IAEnB,CACD,EAAA,CACH;AAAA,IACA,gBAAAD,EAAC,SAAI,WAAW,yBAAyBD,EAAO,kBAAkB,IAC/D,YAAK,IAAI,CAACE,MACT,gBAAAD,EAACG,GAAA,EAA0B,MAAMF,EAAI,MAClC,YAAI,QAAA,GADUA,EAAI,IAErB,CACD,EAAA,CACH;AAAA,EAAA,GACF,GAGIG,IAAqBP,EAAG;AAAA,IAC5B,kEAAkED,IAAqB,CAAC;AAAA,EAAA;AAE1F,SAAIQ,KACFA,EAAmB,MAAA,GAGdP;AACT;AAEO,SAASK,EAAS,EAAE,MAAAG,GAAM,UAAAC,KAAmD;AAClF,SACE,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAeK;AAAA,MACf,WAAW,sBAAsBN,EAAO,KAAK;AAAA,MAC7C,SAAS,SAAUQ,GAAG;AACpB,QAAAA,EAAE,eAAA;AACF,cAAMC,IAAY,KAAK,QAAQ,cAAc;AAC7C,YAAI,CAACA,EAAW;AAChB,cAAMC,IAAS,MAAM,KAAKD,EAAU,QAAQ,EAAE;AAAA,UAAK,CAACX,MAClDA,EAAG,UAAU,SAAS,qBAAqB;AAAA,QAAA,GAC1C;AACH,QAAIY,KACF,MAAM,KAAKA,CAAM,EAAE,QAAQ,CAACC,MAAU;AACpC,UAAAA,EAAM,UAAU,OAAOX,EAAO,MAAM;AAAA,QACtC,CAAC,GAEH,KAAK,UAAU,IAAIA,EAAO,MAAM;AAChC,cAAMY,IAAW,MAAM,KAAKH,EAAU,QAAQ,EAAE;AAAA,UAAK,CAACX,MACpDA,EAAG,UAAU,SAAS,uBAAuB;AAAA,QAAA,GAC5C;AACH,QAAIc,KACF,MAAM,KAAKA,CAAQ,EAAE,QAAQ,CAACC,MAAY;AACxC,UAAIA,aAAmB,gBACjBA,EAAQ,QAAQ,YAAYP,KAC9BO,EAAQ,MAAM,UAAU,IACxBA,EAAQ,UAAU,IAAIb,EAAO,MAAM,MAEnCa,EAAQ,MAAM,UAAU,QACxBA,EAAQ,UAAU,OAAOb,EAAO,MAAM;AAAA,QAG5C,CAAC;AAAA,MAEL;AAAA,MAEA,UAAA,gBAAAC,EAAC,KAAA,EAAG,UAAAM,KAAYD,EAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AAG3B;AAEO,SAASF,EAAW,EAAE,MAAAE,GAAM,UAAAC,KAAmD;AACpF,SACE,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAeK;AAAA,MACf,WAAU;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,MAGV,UAAAC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/TabView/index.tsx"],"sourcesContent":["import { ReactNode } from 'jsx-dom'\r\nimport styles from './styles.module.sass'\r\n\r\nexport interface TabViewLabelOptions {\r\n name: string\r\n children: ReactNode\r\n}\r\n\r\nconsole.log(styles)\r\n\r\nexport function TabView({\r\n tabs = [],\r\n defaultActiveIndex = 0,\r\n}: {\r\n tabs: (TabViewLabelOptions & { content: ReactNode })[]\r\n defaultActiveIndex?: number\r\n}) {\r\n const el = (\r\n <div className={`ipe-tabView ${styles.tabview}`}>\r\n <ul className={`ipe-tabView__labels-container ${styles.labels_container}`}>\r\n {tabs.map((tab) => (\r\n <TabLabel key={tab.name} name={tab.name}>\r\n {tab.children}\r\n </TabLabel>\r\n ))}\r\n </ul>\r\n <div className={`ipe-tabView__contents ${styles.contents_container}`}>\r\n {tabs.map((tab) => (\r\n <TabContent key={tab.name} name={tab.name}>\r\n {tab.content}\r\n </TabContent>\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n\r\n const defaultActiveLabel = el.querySelector<HTMLAnchorElement>(\r\n `.ipe-tabView__labels-container > .ipe-tabView__label:nth-child(${defaultActiveIndex + 1})`\r\n )\r\n if (defaultActiveLabel) {\r\n defaultActiveLabel.click()\r\n }\r\n\r\n return el\r\n}\r\n\r\nexport function TabLabel({ name, children }: { name: string; children: ReactNode }) {\r\n return (\r\n <li\r\n data-tab-name={name}\r\n className={`ipe-tabView__label ${styles.label}`}\r\n onClick={function (e) {\r\n e.preventDefault()\r\n const container = this.closest('.ipe-tabView')\r\n if (!container) return\r\n const labels = Array.from(container.children).find((el) =>\r\n el.classList.contains('ipe-tabView__labels')\r\n )?.children\r\n if (labels) {\r\n Array.from(labels).forEach((label) => {\r\n label.classList.remove(styles.active)\r\n })\r\n }\r\n this.classList.add(styles.active)\r\n const contents = Array.from(container.children).find((el) =>\r\n el.classList.contains('ipe-tabView__contents')\r\n )?.children\r\n if (contents) {\r\n Array.from(contents).forEach((content) => {\r\n if (content instanceof HTMLElement) {\r\n if (content.dataset.tabName === name) {\r\n content.style.display = ''\r\n content.classList.add(styles.active)\r\n } else {\r\n content.style.display = 'none'\r\n content.classList.remove(styles.active)\r\n }\r\n }\r\n })\r\n }\r\n }}\r\n >\r\n <a>{children || name}</a>\r\n </li>\r\n )\r\n}\r\n\r\nexport function TabContent({ name, children }: { name: string; children: ReactNode }) {\r\n return (\r\n <div\r\n data-tab-name={name}\r\n className=\"ipe-tabView__content-body\"\r\n style={{\r\n display: 'none',\r\n }}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n"],"names":["TabView","tabs","defaultActiveIndex","el","jsxs","styles","jsx","tab","TabLabel","TabContent","defaultActiveLabel","name","children","e","container","labels","label","contents","content"],"mappings":";;;;;;;;;;;;;;;AAUO,SAASA,EAAQ;AAAA,EACtB,MAAAC,IAAO,CAAA;AAAA,EACP,oBAAAC,IAAqB;AACvB,GAGG;AACD,QAAMC,IACJC,gBAAAA,EAAC,OAAA,EAAI,WAAW,eAAeC,EAAO,OAAO,IAC3C,UAAA;AAAA,IAAA,gBAAAC,EAAC,MAAA,EAAG,WAAW,iCAAiCD,EAAO,gBAAgB,IACpE,UAAAJ,EAAK,IAAI,CAACM,wBACRC,GAAA,EAAwB,MAAMD,EAAI,MAChC,UAAAA,EAAI,YADQA,EAAI,IAEnB,CACD,EAAA,CACH;AAAA,IACA,gBAAAD,EAAC,SAAI,WAAW,yBAAyBD,EAAO,kBAAkB,IAC/D,YAAK,IAAI,CAACE,MACT,gBAAAD,EAACG,GAAA,EAA0B,MAAMF,EAAI,MAClC,YAAI,QAAA,GADUA,EAAI,IAErB,CACD,EAAA,CACH;AAAA,EAAA,GACF,GAGIG,IAAqBP,EAAG;AAAA,IAC5B,kEAAkED,IAAqB,CAAC;AAAA,EAAA;AAE1F,SAAIQ,KACFA,EAAmB,MAAA,GAGdP;AACT;AAEO,SAASK,EAAS,EAAE,MAAAG,GAAM,UAAAC,KAAmD;AAClF,SACE,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAeK;AAAA,MACf,WAAW,sBAAsBN,EAAO,KAAK;AAAA,MAC7C,SAAS,SAAUQ,GAAG;AACpB,QAAAA,EAAE,eAAA;AACF,cAAMC,IAAY,KAAK,QAAQ,cAAc;AAC7C,YAAI,CAACA,EAAW;AAChB,cAAMC,IAAS,MAAM,KAAKD,EAAU,QAAQ,EAAE;AAAA,UAAK,CAACX,MAClDA,EAAG,UAAU,SAAS,qBAAqB;AAAA,QAAA,GAC1C;AACH,QAAIY,KACF,MAAM,KAAKA,CAAM,EAAE,QAAQ,CAACC,MAAU;AACpC,UAAAA,EAAM,UAAU,OAAOX,EAAO,MAAM;AAAA,QACtC,CAAC,GAEH,KAAK,UAAU,IAAIA,EAAO,MAAM;AAChC,cAAMY,IAAW,MAAM,KAAKH,EAAU,QAAQ,EAAE;AAAA,UAAK,CAACX,MACpDA,EAAG,UAAU,SAAS,uBAAuB;AAAA,QAAA,GAC5C;AACH,QAAIc,KACF,MAAM,KAAKA,CAAQ,EAAE,QAAQ,CAACC,MAAY;AACxC,UAAIA,aAAmB,gBACjBA,EAAQ,QAAQ,YAAYP,KAC9BO,EAAQ,MAAM,UAAU,IACxBA,EAAQ,UAAU,IAAIb,EAAO,MAAM,MAEnCa,EAAQ,MAAM,UAAU,QACxBA,EAAQ,UAAU,OAAOb,EAAO,MAAM;AAAA,QAG5C,CAAC;AAAA,MAEL;AAAA,MAEA,UAAA,gBAAAC,EAAC,KAAA,EAAG,UAAAM,KAAYD,EAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AAG3B;AAEO,SAASF,EAAW,EAAE,MAAAE,GAAM,UAAAC,KAAmD;AACpF,SACE,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAeK;AAAA,MACf,WAAU;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,MAGV,UAAAC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -3,5 +3,6 @@ export declare enum Endpoints {
|
|
|
3
3
|
ANALYTICS_DASH_URL = "https://analytics.ipe.wiki",
|
|
4
4
|
GITHUB_URL = "https://github.com/inpageedit/inpageedit-next",
|
|
5
5
|
HOME_URL = "https://www.ipe.wiki/",
|
|
6
|
-
UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/"
|
|
6
|
+
UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/",
|
|
7
|
+
PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json"
|
|
7
8
|
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { j as i, P as S } from "./index-CM_6yF2v.js";
|
|
2
|
+
import { B as E, I as j, S as k } from "./index-BXaiDKnr.js";
|
|
3
|
+
import { R as q } from "./Preferences-DS4-CFWe.js";
|
|
4
|
+
import { T as F } from "./index-DD5CVCfD.js";
|
|
5
|
+
import { C as v } from "./CheckBox-Bc79KBEB.js";
|
|
6
|
+
import { I } from "./InputBox-DZAdyZ4B.js";
|
|
7
|
+
var T = Object.create, p = Object.defineProperty, B = Object.getOwnPropertyDescriptor, b = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), _ = (t) => {
|
|
8
|
+
throw TypeError(t);
|
|
9
|
+
}, C = (t, e, r) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Q = (t, e) => p(t, "name", { value: e, configurable: !0 }), z = (t) => [, , , T(t?.[b("metadata")] ?? null)], D = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], x = (t) => t !== void 0 && typeof t != "function" ? _("Function expected") : t, N = (t, e, r, a, o) => ({ kind: D[t], name: e, metadata: a, addInitializer: (n) => r._ ? _("Already initialized") : o.push(x(n || null)) }), O = (t, e) => C(e, b("metadata"), t[3]), R = (t, e, r, a) => {
|
|
10
|
+
for (var o = 0, n = t[e >> 1], s = n && n.length; o < s; o++) n[o].call(r);
|
|
11
|
+
return a;
|
|
12
|
+
}, L = (t, e, r, a, o, n) => {
|
|
13
|
+
var s, c, l, d = e & 7, f = !1, w = 0, y = t[w] || (t[w] = []), m = d && (o = o.prototype, d < 5 && (d > 3 || !f) && B(o, r));
|
|
14
|
+
Q(o, r);
|
|
15
|
+
for (var u = a.length - 1; u >= 0; u--)
|
|
16
|
+
l = N(d, r, c = {}, t[3], y), s = (0, a[u])(o, l), c._ = 1, x(s) && (o = s);
|
|
17
|
+
return O(t, o), m && p(o, r, m), f ? d ^ 4 ? n : m : o;
|
|
18
|
+
}, M, g, P;
|
|
19
|
+
M = [q(
|
|
20
|
+
k.object({
|
|
21
|
+
"quickMove.reason": k.string().default("[IPE-NEXT] Quick move")
|
|
22
|
+
}).description("Quick move options").extra("category", "editor")
|
|
23
|
+
), j(["modal", "wiki"])];
|
|
24
|
+
class h extends (P = E) {
|
|
25
|
+
constructor(e) {
|
|
26
|
+
super(e, {}, "quick-move"), this.ctx = e, e.set("quickMove", this);
|
|
27
|
+
}
|
|
28
|
+
start() {
|
|
29
|
+
this.ctx.inject(["toolbox"], (e) => {
|
|
30
|
+
this.injectToolbox(e);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
injectToolbox(e) {
|
|
34
|
+
const r = window.mw?.config.get("wgPageName") || "", a = window.mw?.config.get("wgIsProbablyEditable");
|
|
35
|
+
e.toolbox.addButton({
|
|
36
|
+
id: "quick-move",
|
|
37
|
+
icon: /* @__PURE__ */ i(
|
|
38
|
+
"svg",
|
|
39
|
+
{
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: "24",
|
|
42
|
+
height: "24",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "none",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
"stroke-width": "2",
|
|
47
|
+
"stroke-linecap": "round",
|
|
48
|
+
"stroke-linejoin": "round",
|
|
49
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-forms",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ i("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
52
|
+
/* @__PURE__ */ i("path", { d: "M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3" }),
|
|
53
|
+
/* @__PURE__ */ i("path", { d: "M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3" }),
|
|
54
|
+
/* @__PURE__ */ i("path", { d: "M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7" }),
|
|
55
|
+
/* @__PURE__ */ i("path", { d: "M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1" }),
|
|
56
|
+
/* @__PURE__ */ i("path", { d: "M17 12h.01" }),
|
|
57
|
+
/* @__PURE__ */ i("path", { d: "M13 12h.01" })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
tooltip: "Quick Move",
|
|
62
|
+
group: "group1",
|
|
63
|
+
index: 1,
|
|
64
|
+
onClick: () => {
|
|
65
|
+
this.showModal(
|
|
66
|
+
a ? {
|
|
67
|
+
lockFromField: !0,
|
|
68
|
+
from: r
|
|
69
|
+
} : {}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async showModal(e) {
|
|
75
|
+
const r = await this.ctx.preferences.get("quickMove.reason"), a = this.ctx.modal.createObject({
|
|
76
|
+
title: "Quick Move",
|
|
77
|
+
content: /* @__PURE__ */ i(S, {}),
|
|
78
|
+
className: "quick-move compact-buttons",
|
|
79
|
+
sizeClass: "smallToMedium",
|
|
80
|
+
center: !0
|
|
81
|
+
}).init();
|
|
82
|
+
let o = null;
|
|
83
|
+
return a.setContent(
|
|
84
|
+
/* @__PURE__ */ i(
|
|
85
|
+
"form",
|
|
86
|
+
{
|
|
87
|
+
ref: (n) => o = n,
|
|
88
|
+
style: {
|
|
89
|
+
display: "flex",
|
|
90
|
+
flexDirection: "column",
|
|
91
|
+
gap: "1rem"
|
|
92
|
+
},
|
|
93
|
+
onSubmit: (n) => {
|
|
94
|
+
if (n.preventDefault(), o?.checkValidity(), !o?.reportValidity())
|
|
95
|
+
return;
|
|
96
|
+
const s = new FormData(o), c = {
|
|
97
|
+
from: s.get("from")?.toString().trim(),
|
|
98
|
+
to: s.get("to")?.toString().trim(),
|
|
99
|
+
reason: s.get("reason") || "",
|
|
100
|
+
movetalk: s.get("movetalk") === "on",
|
|
101
|
+
movesubpages: s.get("movesubpages") === "on",
|
|
102
|
+
noredirect: s.get("noredirect") === "on"
|
|
103
|
+
};
|
|
104
|
+
if (!c.from || !c.to) {
|
|
105
|
+
this.ctx.modal.notify("error", {
|
|
106
|
+
title: "Failed to move",
|
|
107
|
+
content: "From and to are required."
|
|
108
|
+
});
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.ctx.emit("quick-move/submit", { ctx: this.ctx, modal: a, payload: c }), a.setLoadingState(!0), this.movePage(c).then(() => {
|
|
112
|
+
location.reload();
|
|
113
|
+
}).catch((l) => {
|
|
114
|
+
a.setLoadingState(!1), this.ctx.modal.notify("error", {
|
|
115
|
+
title: "Failed to move",
|
|
116
|
+
content: l instanceof Error ? l.message : String(l)
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ i(
|
|
122
|
+
F,
|
|
123
|
+
{
|
|
124
|
+
inputs: [
|
|
125
|
+
{
|
|
126
|
+
label: "Move from",
|
|
127
|
+
name: "from",
|
|
128
|
+
value: e?.from,
|
|
129
|
+
required: !0
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: "Move to",
|
|
133
|
+
name: "to",
|
|
134
|
+
value: e?.to,
|
|
135
|
+
required: !0
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(v, { name: "movetalk", id: "movetalk", checked: e?.movetalk, children: "Move talk page" }) }),
|
|
141
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(v, { name: "movesubpages", id: "movesubpages", checked: e?.movesubpages, children: "Move subpage(s) (up to 100)" }) }),
|
|
142
|
+
this.ctx.wiki.hasRight("suppressredirect") && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(v, { name: "noredirect", id: "noredirect", checked: e?.noredirect, children: "Move without leaving a redirect" }) }),
|
|
143
|
+
/* @__PURE__ */ i(
|
|
144
|
+
I,
|
|
145
|
+
{
|
|
146
|
+
label: "Reason",
|
|
147
|
+
id: "reason",
|
|
148
|
+
name: "reason",
|
|
149
|
+
value: e?.reason ?? r ?? ""
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
), a.setButtons([
|
|
156
|
+
{
|
|
157
|
+
label: "Move",
|
|
158
|
+
className: "is-primary is-ghost",
|
|
159
|
+
method: () => {
|
|
160
|
+
o?.dispatchEvent(new Event("submit"));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]), a.show();
|
|
164
|
+
}
|
|
165
|
+
async movePage(e) {
|
|
166
|
+
const { from: r, to: a, reason: o = "", ...n } = e;
|
|
167
|
+
if (!r || !a)
|
|
168
|
+
throw new Error("From and to titles are required.");
|
|
169
|
+
if (r === a)
|
|
170
|
+
throw new Error("From and to titles cannot be the same.");
|
|
171
|
+
return (await this.ctx.wikiPage.newFromTitle(r)).moveTo(a, o, n);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
g = z(P);
|
|
175
|
+
h = L(g, 0, "PluginQuickMove", M, h);
|
|
176
|
+
R(g, 1, h);
|
|
177
|
+
export {
|
|
178
|
+
h as PluginQuickMove
|
|
179
|
+
};
|
|
180
|
+
//# sourceMappingURL=index-B5DtUqkK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-B5DtUqkK.js","sources":["../src/plugins/quick-move/index.tsx"],"sourcesContent":["import { Inject, InPageEdit, Schema } from '@/InPageEdit'\nimport { IPEModal } from '@inpageedit/modal'\n\ndeclare module '@/InPageEdit' {\n interface InPageEdit {\n quickMove: PluginQuickMove\n }\n interface Events {\n 'quick-move/init-options'(payload: {\n ctx: InPageEdit\n options: Partial<QuickMoveOptions>\n }): void\n 'quick-move/show-modal'(payload: { ctx: InPageEdit; modal: IPEModal }): void\n 'quick-move/submit'(payload: {\n ctx: InPageEdit\n modal: IPEModal\n payload: MovePageOptions\n }): void\n }\n interface PreferencesMap {\n 'quickMove.reason': string\n }\n}\n\nexport interface MovePageOptions {\n from: string\n to: string\n reason?: string\n movetalk?: boolean\n movesubpages?: boolean\n noredirect?: boolean\n}\nexport interface QuickMoveOptions extends Partial<MovePageOptions> {\n lockFromField?: boolean\n lockToField?: boolean\n}\n\n@RegisterPreferences(\n Schema.object({\n 'quickMove.reason': Schema.string().default('[IPE-NEXT] Quick move'),\n })\n .description('Quick move options')\n .extra('category', 'editor')\n)\n@Inject(['modal', 'wiki'])\nexport class PluginQuickMove extends BasePlugin {\n constructor(public ctx: InPageEdit) {\n super(ctx, {}, 'quick-move')\n ctx.set('quickMove', this)\n }\n\n protected start(): Promise<void> | void {\n this.ctx.inject(['toolbox'], (ctx) => {\n this.injectToolbox(ctx)\n })\n }\n\n private injectToolbox(ctx: InPageEdit) {\n const curPageName = window.mw?.config.get('wgPageName') || ''\n const canEdit = window.mw?.config.get('wgIsProbablyEditable')\n ctx.toolbox.addButton({\n id: 'quick-move',\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-forms\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3\" />\n <path d=\"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3\" />\n <path d=\"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7\" />\n <path d=\"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1\" />\n <path d=\"M17 12h.01\" />\n <path d=\"M13 12h.01\" />\n </svg>\n ),\n tooltip: 'Quick Move',\n group: 'group1',\n index: 1,\n onClick: () => {\n this.showModal(\n canEdit\n ? {\n lockFromField: true,\n from: curPageName,\n }\n : {}\n )\n },\n })\n }\n\n async showModal(options?: Partial<QuickMoveOptions>) {\n const reason = await this.ctx.preferences.get('quickMove.reason')\n const modal = this.ctx.modal\n .createObject({\n title: 'Quick Move',\n content: (<ProgressBar />) as HTMLElement,\n className: 'quick-move compact-buttons',\n sizeClass: 'smallToMedium',\n center: true,\n })\n .init()\n\n let formRef: HTMLFormElement | null = null\n modal.setContent(\n (\n <form\n ref={(el) => (formRef = el)}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '1rem',\n }}\n onSubmit={(e) => {\n e.preventDefault()\n formRef?.checkValidity()\n if (!formRef?.reportValidity()) {\n return\n }\n const formData = new FormData(formRef!)\n const options = {\n from: formData.get('from')?.toString().trim()!,\n to: formData.get('to')?.toString().trim()!,\n reason: (formData.get('reason') as string) || '',\n movetalk: formData.get('movetalk') === 'on',\n movesubpages: formData.get('movesubpages') === 'on',\n noredirect: formData.get('noredirect') === 'on',\n }\n if (!options.from || !options.to) {\n this.ctx.modal.notify('error', {\n title: 'Failed to move',\n content: 'From and to are required.',\n })\n return\n }\n this.ctx.emit('quick-move/submit', { ctx: this.ctx, modal, payload: options })\n modal.setLoadingState(true)\n this.movePage(options)\n .then(() => {\n location.reload()\n })\n .catch((error) => {\n modal.setLoadingState(false)\n this.ctx.modal.notify('error', {\n title: 'Failed to move',\n content: error instanceof Error ? error.message : String(error),\n })\n })\n }}\n >\n <TwinSwapInput\n inputs={[\n {\n label: 'Move from',\n name: 'from',\n value: options?.from,\n required: true,\n },\n {\n label: 'Move to',\n name: 'to',\n value: options?.to,\n required: true,\n },\n ]}\n />\n <div>\n <CheckBox name=\"movetalk\" id=\"movetalk\" checked={options?.movetalk}>\n Move talk page\n </CheckBox>\n </div>\n <div>\n <CheckBox name=\"movesubpages\" id=\"movesubpages\" checked={options?.movesubpages}>\n Move subpage(s) (up to 100)\n </CheckBox>\n </div>\n {this.ctx.wiki.hasRight('suppressredirect') && (\n <div>\n <CheckBox name=\"noredirect\" id=\"noredirect\" checked={options?.noredirect}>\n Move without leaving a redirect\n </CheckBox>\n </div>\n )}\n <InputBox\n label=\"Reason\"\n id=\"reason\"\n name=\"reason\"\n value={options?.reason ?? reason ?? ''}\n />\n </form>\n ) as HTMLElement\n )\n\n modal.setButtons([\n {\n label: 'Move',\n className: 'is-primary is-ghost',\n method: () => {\n formRef?.dispatchEvent(new Event('submit'))\n },\n },\n ])\n\n return modal.show()\n }\n\n async movePage(options: MovePageOptions) {\n const { from, to, reason = '', ...rest } = options\n\n if (!from || !to) {\n throw new Error('From and to titles are required.')\n }\n if (from === to) {\n throw new Error('From and to titles cannot be the same.')\n }\n\n const wikiPage = await this.ctx.wikiPage.newFromTitle(from)\n return wikiPage.moveTo(to, reason, rest)\n }\n}\n"],"names":["_PluginQuickMove_decorators","_init","_a","RegisterPreferences","Schema","Inject","PluginQuickMove","BasePlugin","ctx","curPageName","canEdit","jsxs","jsx","options","reason","modal","ProgressBar","formRef","el","e","formData","error","TwinSwapInput","CheckBox","InputBox","from","to","rest","__decoratorStart","__decorateElement","__runInitializers"],"mappings":";;;;;;;;;;;;;;;;;GAAAA,GAAAC,GAAAC;AAqCAF,IAAA,CAACG;AAAA,EACCC,EAAO,OAAO;AAAA,IACZ,oBAAoBA,EAAO,OAAA,EAAS,QAAQ,uBAAuB;AAAA,EAAA,CACpE,EACE,YAAY,oBAAoB,EAChC,MAAM,YAAY,QAAQ;AAC/B,GACCC,EAAO,CAAC,SAAS,MAAM,CAAC,CAAA;AAClB,MAAMC,WAAwBJ,IAAAK,GAAW;AAAA,EAC9C,YAAmBC,GAAiB;AAClC,UAAMA,GAAK,CAAA,GAAI,YAAY,GADV,KAAA,MAAAA,GAEjBA,EAAI,IAAI,aAAa,IAAI;AAAA,EAC3B;AAAA,EAEU,QAA8B;AACtC,SAAK,IAAI,OAAO,CAAC,SAAS,GAAG,CAACA,MAAQ;AACpC,WAAK,cAAcA,CAAG;AAAA,IACxB,CAAC;AAAA,EACH;AAAA,EAEQ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