@soul-refiner/design-system 2.0.0-alpha.18 → 2.0.0-alpha.19
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/dist/_virtual/_cloneBuffer.js +5 -0
- package/dist/_virtual/_commonjsHelpers.js +10 -0
- package/dist/_virtual/_nodeUtil.js +5 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/isBuffer.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.min.js +5 -0
- package/dist/_virtual/util.js +5 -0
- package/dist/_virtual/with-selector.development.js +5 -0
- package/dist/_virtual/with-selector.js +5 -0
- package/dist/_virtual/with-selector.production.min.js +5 -0
- package/dist/node_modules/@udecode/plate-alignment/dist/index.js +98 -0
- package/dist/node_modules/@udecode/plate-core/dist/index.js +2656 -0
- package/dist/node_modules/@udecode/plate-link/dist/index.js +585 -0
- package/dist/node_modules/@udecode/plate-media/dist/index.js +211 -0
- package/dist/node_modules/@udecode/plate-normalizers/dist/index.js +20 -0
- package/dist/node_modules/@udecode/plate-resizable/dist/index.js +334 -0
- package/dist/node_modules/@udecode/plate-table/dist/index.js +1371 -0
- package/dist/node_modules/@udecode/plate-utils/dist/index.js +127 -0
- package/dist/node_modules/@udecode/slate/dist/index.js +316 -0
- package/dist/node_modules/@udecode/slate-react/dist/index.js +35 -0
- package/dist/node_modules/@udecode/slate-utils/dist/index.js +230 -0
- package/dist/node_modules/@udecode/utils/dist/index.js +61 -0
- package/dist/node_modules/clsx/dist/clsx.m.js +8 -0
- package/dist/node_modules/dequal/dist/index.js +88 -0
- package/dist/node_modules/immer/dist/immer.js +968 -0
- package/dist/node_modules/is-hotkey/lib/index.js +253 -0
- package/dist/node_modules/jotai/esm/react/utils.js +29 -0
- package/dist/node_modules/jotai/esm/react.js +116 -0
- package/dist/node_modules/jotai/esm/vanilla/utils.js +44 -0
- package/dist/node_modules/jotai/esm/vanilla.js +602 -0
- package/dist/node_modules/jotai-optics/dist/index.modern.js +8 -0
- package/dist/node_modules/jotai-x/dist/index.js +259 -0
- package/dist/node_modules/js-video-url-parser/lib/base.js +9 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/allocine.js +38 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/canalplus.js +50 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/coub.js +58 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/dailymotion.js +74 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/facebook.js +82 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/loom.js +55 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/soundcloud.js +129 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/teachertube.js +114 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/ted.js +100 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/tiktok.js +54 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/twitch.js +154 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/vimeo.js +93 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/wistia.js +116 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/youku.js +87 -0
- package/dist/node_modules/js-video-url-parser/lib/provider/youtube.js +209 -0
- package/dist/node_modules/js-video-url-parser/lib/urlParser.js +88 -0
- package/dist/node_modules/js-video-url-parser/lib/util.js +112 -0
- package/dist/node_modules/lodash/_DataView.js +14 -0
- package/dist/node_modules/lodash/_Hash.js +42 -0
- package/dist/node_modules/lodash/_ListCache.js +42 -0
- package/dist/node_modules/lodash/_Map.js +14 -0
- package/dist/node_modules/lodash/_MapCache.js +42 -0
- package/dist/node_modules/lodash/_Promise.js +14 -0
- package/dist/node_modules/lodash/_Set.js +14 -0
- package/dist/node_modules/lodash/_SetCache.js +35 -0
- package/dist/node_modules/lodash/_Stack.js +38 -0
- package/dist/node_modules/lodash/_Symbol.js +12 -0
- package/dist/node_modules/lodash/_Uint8Array.js +12 -0
- package/dist/node_modules/lodash/_WeakMap.js +14 -0
- package/dist/node_modules/lodash/_apply.js +26 -0
- package/dist/node_modules/lodash/_arrayAggregator.js +27 -0
- package/dist/node_modules/lodash/_arrayEach.js +27 -0
- package/dist/node_modules/lodash/_arrayFilter.js +30 -0
- package/dist/node_modules/lodash/_arrayLikeKeys.js +60 -0
- package/dist/node_modules/lodash/_arrayMap.js +26 -0
- package/dist/node_modules/lodash/_arrayPush.js +25 -0
- package/dist/node_modules/lodash/_arraySome.js +28 -0
- package/dist/node_modules/lodash/_assignMergeValue.js +27 -0
- package/dist/node_modules/lodash/_assignValue.js +35 -0
- package/dist/node_modules/lodash/_assocIndexOf.js +27 -0
- package/dist/node_modules/lodash/_baseAggregator.js +27 -0
- package/dist/node_modules/lodash/_baseAssign.js +24 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +24 -0
- package/dist/node_modules/lodash/_baseAssignValue.js +31 -0
- package/dist/node_modules/lodash/_baseClone.js +193 -0
- package/dist/node_modules/lodash/_baseCreate.js +36 -0
- package/dist/node_modules/lodash/_baseEach.js +21 -0
- package/dist/node_modules/lodash/_baseFlatten.js +45 -0
- package/dist/node_modules/lodash/_baseFor.js +22 -0
- package/dist/node_modules/lodash/_baseForOwn.js +23 -0
- package/dist/node_modules/lodash/_baseGet.js +31 -0
- package/dist/node_modules/lodash/_baseGetAllKeys.js +27 -0
- package/dist/node_modules/lodash/_baseGetTag.js +36 -0
- package/dist/node_modules/lodash/_baseHasIn.js +18 -0
- package/dist/node_modules/lodash/_baseIsArguments.js +25 -0
- package/dist/node_modules/lodash/_baseIsEqual.js +35 -0
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +96 -0
- package/dist/node_modules/lodash/_baseIsMap.js +25 -0
- package/dist/node_modules/lodash/_baseIsMatch.js +69 -0
- package/dist/node_modules/lodash/_baseIsNative.js +56 -0
- package/dist/node_modules/lodash/_baseIsSet.js +25 -0
- package/dist/node_modules/lodash/_baseIsTypedArray.js +68 -0
- package/dist/node_modules/lodash/_baseIteratee.js +41 -0
- package/dist/node_modules/lodash/_baseKeys.js +37 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +41 -0
- package/dist/node_modules/lodash/_baseMap.js +29 -0
- package/dist/node_modules/lodash/_baseMatches.js +30 -0
- package/dist/node_modules/lodash/_baseMatchesProperty.js +45 -0
- package/dist/node_modules/lodash/_baseMerge.js +54 -0
- package/dist/node_modules/lodash/_baseMergeDeep.js +114 -0
- package/dist/node_modules/lodash/_baseProperty.js +19 -0
- package/dist/node_modules/lodash/_basePropertyDeep.js +22 -0
- package/dist/node_modules/lodash/_baseRest.js +25 -0
- package/dist/node_modules/lodash/_baseSetToString.js +30 -0
- package/dist/node_modules/lodash/_baseSlice.js +36 -0
- package/dist/node_modules/lodash/_baseTimes.js +25 -0
- package/dist/node_modules/lodash/_baseToString.js +46 -0
- package/dist/node_modules/lodash/_baseUnary.js +19 -0
- package/dist/node_modules/lodash/_baseUnset.js +29 -0
- package/dist/node_modules/lodash/_baseValues.js +25 -0
- package/dist/node_modules/lodash/_cacheHas.js +18 -0
- package/dist/node_modules/lodash/_castPath.js +30 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +22 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +48 -0
- package/dist/node_modules/lodash/_cloneDataView.js +22 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +22 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +24 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +22 -0
- package/dist/node_modules/lodash/_copyArray.js +25 -0
- package/dist/node_modules/lodash/_copyObject.js +47 -0
- package/dist/node_modules/lodash/_copySymbols.js +23 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +23 -0
- package/dist/node_modules/lodash/_coreJsData.js +12 -0
- package/dist/node_modules/lodash/_createAggregator.js +32 -0
- package/dist/node_modules/lodash/_createAssigner.js +44 -0
- package/dist/node_modules/lodash/_createBaseEach.js +38 -0
- package/dist/node_modules/lodash/_createBaseFor.js +30 -0
- package/dist/node_modules/lodash/_customDefaultsMerge.js +35 -0
- package/dist/node_modules/lodash/_customOmitClone.js +22 -0
- package/dist/node_modules/lodash/_defineProperty.js +17 -0
- package/dist/node_modules/lodash/_equalArrays.js +92 -0
- package/dist/node_modules/lodash/_equalByTag.js +123 -0
- package/dist/node_modules/lodash/_equalObjects.js +96 -0
- package/dist/node_modules/lodash/_flatRest.js +24 -0
- package/dist/node_modules/lodash/_freeGlobal.js +11 -0
- package/dist/node_modules/lodash/_getAllKeys.js +24 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +25 -0
- package/dist/node_modules/lodash/_getMapData.js +24 -0
- package/dist/node_modules/lodash/_getMatchData.js +31 -0
- package/dist/node_modules/lodash/_getNative.js +24 -0
- package/dist/node_modules/lodash/_getPrototype.js +12 -0
- package/dist/node_modules/lodash/_getRawTag.js +52 -0
- package/dist/node_modules/lodash/_getSymbols.js +37 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +34 -0
- package/dist/node_modules/lodash/_getTag.js +70 -0
- package/dist/node_modules/lodash/_getValue.js +18 -0
- package/dist/node_modules/lodash/_hasPath.js +50 -0
- package/dist/node_modules/lodash/_hashClear.js +21 -0
- package/dist/node_modules/lodash/_hashDelete.js +22 -0
- package/dist/node_modules/lodash/_hashGet.js +36 -0
- package/dist/node_modules/lodash/_hashHas.js +29 -0
- package/dist/node_modules/lodash/_hashSet.js +29 -0
- package/dist/node_modules/lodash/_initCloneArray.js +31 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +87 -0
- package/dist/node_modules/lodash/_initCloneObject.js +26 -0
- package/dist/node_modules/lodash/_isFlattenable.js +28 -0
- package/dist/node_modules/lodash/_isIndex.js +30 -0
- package/dist/node_modules/lodash/_isIterateeCall.js +39 -0
- package/dist/node_modules/lodash/_isKey.js +36 -0
- package/dist/node_modules/lodash/_isKeyable.js +20 -0
- package/dist/node_modules/lodash/_isMasked.js +26 -0
- package/dist/node_modules/lodash/_isPrototype.js +23 -0
- package/dist/node_modules/lodash/_isStrictComparable.js +21 -0
- package/dist/node_modules/lodash/_listCacheClear.js +18 -0
- package/dist/node_modules/lodash/_listCacheDelete.js +41 -0
- package/dist/node_modules/lodash/_listCacheGet.js +25 -0
- package/dist/node_modules/lodash/_listCacheHas.js +22 -0
- package/dist/node_modules/lodash/_listCacheSet.js +32 -0
- package/dist/node_modules/lodash/_mapCacheClear.js +29 -0
- package/dist/node_modules/lodash/_mapCacheDelete.js +24 -0
- package/dist/node_modules/lodash/_mapCacheGet.js +22 -0
- package/dist/node_modules/lodash/_mapCacheHas.js +22 -0
- package/dist/node_modules/lodash/_mapCacheSet.js +28 -0
- package/dist/node_modules/lodash/_mapToArray.js +23 -0
- package/dist/node_modules/lodash/_matchesStrictComparable.js +25 -0
- package/dist/node_modules/lodash/_memoizeCapped.js +32 -0
- package/dist/node_modules/lodash/_nativeCreate.js +12 -0
- package/dist/node_modules/lodash/_nativeKeys.js +12 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +25 -0
- package/dist/node_modules/lodash/_nodeUtil.js +43 -0
- package/dist/node_modules/lodash/_objectToString.js +27 -0
- package/dist/node_modules/lodash/_overArg.js +20 -0
- package/dist/node_modules/lodash/_overRest.js +42 -0
- package/dist/node_modules/lodash/_parent.js +23 -0
- package/dist/node_modules/lodash/_root.js +15 -0
- package/dist/node_modules/lodash/_safeGet.js +26 -0
- package/dist/node_modules/lodash/_setCacheAdd.js +24 -0
- package/dist/node_modules/lodash/_setCacheHas.js +19 -0
- package/dist/node_modules/lodash/_setToArray.js +23 -0
- package/dist/node_modules/lodash/_setToString.js +21 -0
- package/dist/node_modules/lodash/_shortOut.js +42 -0
- package/dist/node_modules/lodash/_stackClear.js +21 -0
- package/dist/node_modules/lodash/_stackDelete.js +23 -0
- package/dist/node_modules/lodash/_stackGet.js +19 -0
- package/dist/node_modules/lodash/_stackHas.js +19 -0
- package/dist/node_modules/lodash/_stackSet.js +42 -0
- package/dist/node_modules/lodash/_stringToPath.js +33 -0
- package/dist/node_modules/lodash/_toKey.js +27 -0
- package/dist/node_modules/lodash/_toSource.js +31 -0
- package/dist/node_modules/lodash/castArray.js +55 -0
- package/dist/node_modules/lodash/cloneDeep.js +40 -0
- package/dist/node_modules/lodash/constant.js +31 -0
- package/dist/node_modules/lodash/defaults.js +69 -0
- package/dist/node_modules/lodash/defaultsDeep.js +44 -0
- package/dist/node_modules/lodash/eq.js +42 -0
- package/dist/node_modules/lodash/flatten.js +28 -0
- package/dist/node_modules/lodash/get.js +39 -0
- package/dist/node_modules/lodash/hasIn.js +41 -0
- package/dist/node_modules/lodash/identity.js +26 -0
- package/dist/node_modules/lodash/isArguments.js +43 -0
- package/dist/node_modules/lodash/isArray.js +31 -0
- package/dist/node_modules/lodash/isArrayLike.js +40 -0
- package/dist/node_modules/lodash/isArrayLikeObject.js +40 -0
- package/dist/node_modules/lodash/isBuffer.js +52 -0
- package/dist/node_modules/lodash/isFunction.js +44 -0
- package/dist/node_modules/lodash/isLength.js +40 -0
- package/dist/node_modules/lodash/isMap.js +35 -0
- package/dist/node_modules/lodash/isObject.js +36 -0
- package/dist/node_modules/lodash/isObjectLike.js +34 -0
- package/dist/node_modules/lodash/isPlainObject.js +70 -0
- package/dist/node_modules/lodash/isSet.js +35 -0
- package/dist/node_modules/lodash/isSymbol.js +36 -0
- package/dist/node_modules/lodash/isTypedArray.js +35 -0
- package/dist/node_modules/lodash/keyBy.js +48 -0
- package/dist/node_modules/lodash/keys.js +45 -0
- package/dist/node_modules/lodash/keysIn.js +40 -0
- package/dist/node_modules/lodash/last.js +25 -0
- package/dist/node_modules/lodash/map.js +67 -0
- package/dist/node_modules/lodash/memoize.js +79 -0
- package/dist/node_modules/lodash/merge.js +51 -0
- package/dist/node_modules/lodash/mergeWith.js +46 -0
- package/dist/node_modules/lodash/omit.js +75 -0
- package/dist/node_modules/lodash/property.js +41 -0
- package/dist/node_modules/lodash/stubArray.js +28 -0
- package/dist/node_modules/lodash/stubFalse.js +23 -0
- package/dist/node_modules/lodash/toPlainObject.js +39 -0
- package/dist/node_modules/lodash/toString.js +34 -0
- package/dist/node_modules/lodash/values.js +46 -0
- package/dist/node_modules/lodash.mapvalues/index.js +2290 -0
- package/dist/node_modules/optics-ts/dist/mjs/index.js +31 -0
- package/dist/node_modules/optics-ts/dist/mjs/internals.js +460 -0
- package/dist/node_modules/proxy-compare/dist/index.modern.js +7 -0
- package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js +395 -0
- package/dist/node_modules/react-tracked/dist/index.modern.js +48 -0
- package/dist/node_modules/use-deep-compare/dist-web/index.js +35 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +181 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +32 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +254 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +30 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +21 -0
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +19 -0
- package/dist/node_modules/zustand/esm/middleware.js +551 -0
- package/dist/node_modules/zustand/esm/traditional.js +25 -0
- package/dist/node_modules/zustand/esm/vanilla.js +34 -0
- package/dist/node_modules/zustand-x/dist/index.js +217 -0
- package/dist/src/common/styles.js +12 -12
- package/dist/src/components/actions/button/button.js +11 -10
- package/dist/src/components/actions/dropdown/dropdown.js +5 -5
- package/dist/src/components/actions/rate/rate.js +2 -2
- package/dist/src/components/actions/switch/switch.js +3 -3
- package/dist/src/components/actions/toggle/toggle.js +4 -4
- package/dist/src/components/actions/upload/upload.js +3 -3
- package/dist/src/components/atoms/box/box.js +2 -2
- package/dist/src/components/atoms/typography/display.js +2 -2
- package/dist/src/components/atoms/typography/heading.js +2 -2
- package/dist/src/components/atoms/typography/paragraph.js +2 -2
- package/dist/src/components/atoms/typography/typography.js +2 -2
- package/dist/src/components/card/action/action.js +6 -6
- package/dist/src/components/card/audio/audio.js +5 -5
- package/dist/src/components/card/feature/feature.js +7 -7
- package/dist/src/components/card/meeting/meeting.js +6 -6
- package/dist/src/components/card/person/person.js +5 -5
- package/dist/src/components/card/price/price.js +4 -4
- package/dist/src/components/card/regular/regular.js +2 -2
- package/dist/src/components/card/styles.js +2 -2
- package/dist/src/components/card/video/video.js +5 -5
- package/dist/src/components/card/written/written.js +5 -5
- package/dist/src/components/custom/courses_selection/courses_selection.js +5 -5
- package/dist/src/components/custom/users_selection/users_selection.js +6 -6
- package/dist/src/components/editor/editor.js +2 -2
- package/dist/src/components/editor/navbar/alignment_dropdown.js +3 -3
- package/dist/src/components/editor/navbar/button_modal.js +2 -2
- package/dist/src/components/editor/navbar/navbar.js +6 -6
- package/dist/src/components/editor/plugins/blocks/buttons.js +3 -3
- package/dist/src/components/editor/plugins/blocks/image.js +12 -11
- package/dist/src/components/editor/plugins/blocks/list.js +2 -2
- package/dist/src/components/editor/plugins/blocks/media-popover.js +9 -7
- package/dist/src/components/editor/plugins/blocks/qa.js +2 -2
- package/dist/src/components/editor/plugins/blocks/resizable.js +3 -3
- package/dist/src/components/editor/plugins/blocks/table-cell.js +7 -7
- package/dist/src/components/editor/plugins/blocks/table-row.js +2 -2
- package/dist/src/components/editor/plugins/blocks/table.js +16 -14
- package/dist/src/components/editor/plugins/leafs/leafs.js +2 -2
- package/dist/src/components/editor/plugins/leafs/link.js +2 -2
- package/dist/src/components/editor/plugins/plate.js +3 -3
- package/dist/src/components/editor/simple_editor/navbar.js +4 -4
- package/dist/src/components/editor/simple_editor/simple_editor.js +3 -3
- package/dist/src/components/editor/styles/menu_button.js +2 -2
- package/dist/src/components/feedback/animated_toast/animated_toast.js +3 -3
- package/dist/src/components/feedback/badge/badge.js +3 -3
- package/dist/src/components/feedback/banner/banner.js +2 -2
- package/dist/src/components/feedback/chip/chip.js +3 -3
- package/dist/src/components/feedback/loader/loader.js +4 -3
- package/dist/src/components/feedback/notification/notification.js +2 -2
- package/dist/src/components/feedback/progress/progress.js +5 -5
- package/dist/src/components/feedback/toast/toast.js +3 -3
- package/dist/src/components/iconography/avatar/avatar.js +6 -6
- package/dist/src/components/iconography/icon/icon.js +2 -2
- package/dist/src/components/input/calendar/calendar.js +13 -13
- package/dist/src/components/input/checkbox/checkbox.js +2 -2
- package/dist/src/components/input/date/date.js +13 -13
- package/dist/src/components/input/filter/filter.js +11 -10
- package/dist/src/components/input/filter/filter_option.js +3 -3
- package/dist/src/components/input/radio/radio.js +3 -3
- package/dist/src/components/input/search/search.js +4 -4
- package/dist/src/components/input/select/select.js +3 -3
- package/dist/src/components/input/text_area/text_area.js +6 -6
- package/dist/src/components/input/text_input/text_input.js +7 -7
- package/dist/src/components/input/time/time.js +3 -3
- package/dist/src/components/media/video-player/playlist-item.js +3 -3
- package/dist/src/components/media/video-player/video.js +6 -6
- package/dist/src/components/navigation/breadcrumb/breadcrumb.js +3 -3
- package/dist/src/components/navigation/inner/inner.js +8 -8
- package/dist/src/components/navigation/tabs/tabs.js +4 -4
- package/dist/src/components/surfaces/accordion/accordion.js +3 -3
- package/dist/src/components/surfaces/calendar_date/calendar_date.js +6 -6
- package/dist/src/components/surfaces/carousel/card/card.js +4 -4
- package/dist/src/components/surfaces/comment/comment.js +10 -10
- package/dist/src/components/surfaces/drawer/drawer.js +6 -6
- package/dist/src/components/surfaces/message/message.js +2 -2
- package/dist/src/components/surfaces/modal/modal.js +3 -3
- package/dist/src/components/surfaces/post/post.js +9 -9
- package/dist/src/components/table/table/table.js +7 -7
- package/dist/src/index.js +0 -1
- package/package.json +2 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('../../../_virtual/index.js');
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(index.__exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Constants.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
var IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
|
14
|
+
|
|
15
|
+
var MODIFIERS = {
|
|
16
|
+
alt: 'altKey',
|
|
17
|
+
control: 'ctrlKey',
|
|
18
|
+
meta: 'metaKey',
|
|
19
|
+
shift: 'shiftKey'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var ALIASES = {
|
|
23
|
+
add: '+',
|
|
24
|
+
break: 'pause',
|
|
25
|
+
cmd: 'meta',
|
|
26
|
+
command: 'meta',
|
|
27
|
+
ctl: 'control',
|
|
28
|
+
ctrl: 'control',
|
|
29
|
+
del: 'delete',
|
|
30
|
+
down: 'arrowdown',
|
|
31
|
+
esc: 'escape',
|
|
32
|
+
ins: 'insert',
|
|
33
|
+
left: 'arrowleft',
|
|
34
|
+
mod: IS_MAC ? 'meta' : 'control',
|
|
35
|
+
opt: 'alt',
|
|
36
|
+
option: 'alt',
|
|
37
|
+
return: 'enter',
|
|
38
|
+
right: 'arrowright',
|
|
39
|
+
space: ' ',
|
|
40
|
+
spacebar: ' ',
|
|
41
|
+
up: 'arrowup',
|
|
42
|
+
win: 'meta',
|
|
43
|
+
windows: 'meta'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var CODES = {
|
|
47
|
+
backspace: 8,
|
|
48
|
+
tab: 9,
|
|
49
|
+
enter: 13,
|
|
50
|
+
shift: 16,
|
|
51
|
+
control: 17,
|
|
52
|
+
alt: 18,
|
|
53
|
+
pause: 19,
|
|
54
|
+
capslock: 20,
|
|
55
|
+
escape: 27,
|
|
56
|
+
' ': 32,
|
|
57
|
+
pageup: 33,
|
|
58
|
+
pagedown: 34,
|
|
59
|
+
end: 35,
|
|
60
|
+
home: 36,
|
|
61
|
+
arrowleft: 37,
|
|
62
|
+
arrowup: 38,
|
|
63
|
+
arrowright: 39,
|
|
64
|
+
arrowdown: 40,
|
|
65
|
+
insert: 45,
|
|
66
|
+
delete: 46,
|
|
67
|
+
meta: 91,
|
|
68
|
+
numlock: 144,
|
|
69
|
+
scrolllock: 145,
|
|
70
|
+
';': 186,
|
|
71
|
+
'=': 187,
|
|
72
|
+
',': 188,
|
|
73
|
+
'-': 189,
|
|
74
|
+
'.': 190,
|
|
75
|
+
'/': 191,
|
|
76
|
+
'`': 192,
|
|
77
|
+
'[': 219,
|
|
78
|
+
'\\': 220,
|
|
79
|
+
']': 221,
|
|
80
|
+
'\'': 222
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
for (var f = 1; f < 20; f++) {
|
|
84
|
+
CODES['f' + f] = 111 + f;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Is hotkey?
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
function isHotkey(hotkey, options, event) {
|
|
92
|
+
if (options && !('byKey' in options)) {
|
|
93
|
+
event = options;
|
|
94
|
+
options = null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (!Array.isArray(hotkey)) {
|
|
98
|
+
hotkey = [hotkey];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
var array = hotkey.map(function (string) {
|
|
102
|
+
return parseHotkey(string, options);
|
|
103
|
+
});
|
|
104
|
+
var check = function check(e) {
|
|
105
|
+
return array.some(function (object) {
|
|
106
|
+
return compareHotkey(object, e);
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
var ret = event == null ? check : check(event);
|
|
110
|
+
return ret;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isCodeHotkey(hotkey, event) {
|
|
114
|
+
return isHotkey(hotkey, event);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function isKeyHotkey(hotkey, event) {
|
|
118
|
+
return isHotkey(hotkey, { byKey: true }, event);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Parse.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
function parseHotkey(hotkey, options) {
|
|
126
|
+
var byKey = options && options.byKey;
|
|
127
|
+
var ret = {};
|
|
128
|
+
|
|
129
|
+
// Special case to handle the `+` key since we use it as a separator.
|
|
130
|
+
hotkey = hotkey.replace('++', '+add');
|
|
131
|
+
var values = hotkey.split('+');
|
|
132
|
+
var length = values.length;
|
|
133
|
+
|
|
134
|
+
// Ensure that all the modifiers are set to false unless the hotkey has them.
|
|
135
|
+
|
|
136
|
+
for (var k in MODIFIERS) {
|
|
137
|
+
ret[MODIFIERS[k]] = false;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
var _iteratorNormalCompletion = true;
|
|
141
|
+
var _didIteratorError = false;
|
|
142
|
+
var _iteratorError = undefined;
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
for (var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
146
|
+
var value = _step.value;
|
|
147
|
+
|
|
148
|
+
var optional = value.endsWith('?') && value.length > 1;
|
|
149
|
+
|
|
150
|
+
if (optional) {
|
|
151
|
+
value = value.slice(0, -1);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var name = toKeyName(value);
|
|
155
|
+
var modifier = MODIFIERS[name];
|
|
156
|
+
|
|
157
|
+
if (value.length > 1 && !modifier && !ALIASES[value] && !CODES[name]) {
|
|
158
|
+
throw new TypeError('Unknown modifier: "' + value + '"');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (length === 1 || !modifier) {
|
|
162
|
+
if (byKey) {
|
|
163
|
+
ret.key = name;
|
|
164
|
+
} else {
|
|
165
|
+
ret.which = toKeyCode(value);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (modifier) {
|
|
170
|
+
ret[modifier] = optional ? null : true;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
} catch (err) {
|
|
174
|
+
_didIteratorError = true;
|
|
175
|
+
_iteratorError = err;
|
|
176
|
+
} finally {
|
|
177
|
+
try {
|
|
178
|
+
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
179
|
+
_iterator.return();
|
|
180
|
+
}
|
|
181
|
+
} finally {
|
|
182
|
+
if (_didIteratorError) {
|
|
183
|
+
throw _iteratorError;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return ret;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Compare.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
function compareHotkey(object, event) {
|
|
196
|
+
for (var key in object) {
|
|
197
|
+
var expected = object[key];
|
|
198
|
+
var actual = void 0;
|
|
199
|
+
|
|
200
|
+
if (expected == null) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (key === 'key' && event.key != null) {
|
|
205
|
+
actual = event.key.toLowerCase();
|
|
206
|
+
} else if (key === 'which') {
|
|
207
|
+
actual = expected === 91 && event.which === 93 ? 91 : event.which;
|
|
208
|
+
} else {
|
|
209
|
+
actual = event[key];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (actual == null && expected === false) {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (actual !== expected) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Utils.
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
function toKeyCode(name) {
|
|
229
|
+
name = toKeyName(name);
|
|
230
|
+
var code = CODES[name] || name.toUpperCase().charCodeAt(0);
|
|
231
|
+
return code;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function toKeyName(name) {
|
|
235
|
+
name = name.toLowerCase();
|
|
236
|
+
name = ALIASES[name] || name;
|
|
237
|
+
return name;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Export.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
index.__exports.default = isHotkey;
|
|
245
|
+
index.__exports.isHotkey = isHotkey;
|
|
246
|
+
index.__exports.isCodeHotkey = isCodeHotkey;
|
|
247
|
+
var isKeyHotkey_1 = index.__exports.isKeyHotkey = isKeyHotkey;
|
|
248
|
+
index.__exports.parseHotkey = parseHotkey;
|
|
249
|
+
index.__exports.compareHotkey = compareHotkey;
|
|
250
|
+
index.__exports.toKeyCode = toKeyCode;
|
|
251
|
+
index.__exports.toKeyName = toKeyName;
|
|
252
|
+
|
|
253
|
+
exports.isKeyHotkey = isKeyHotkey_1;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
require('react');
|
|
5
|
+
var react = require('../react.js');
|
|
6
|
+
require('../vanilla/utils.js');
|
|
7
|
+
require('../vanilla.js');
|
|
8
|
+
|
|
9
|
+
const hydratedMap = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
function useHydrateAtoms(values, options) {
|
|
11
|
+
const store = react.useStore(options);
|
|
12
|
+
const hydratedSet = getHydratedSet(store);
|
|
13
|
+
for (const [atom, value] of values) {
|
|
14
|
+
if (!hydratedSet.has(atom) || (options == null ? void 0 : options.dangerouslyForceHydrate)) {
|
|
15
|
+
hydratedSet.add(atom);
|
|
16
|
+
store.set(atom, value);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const getHydratedSet = (store) => {
|
|
21
|
+
let hydratedSet = hydratedMap.get(store);
|
|
22
|
+
if (!hydratedSet) {
|
|
23
|
+
hydratedSet = /* @__PURE__ */ new WeakSet();
|
|
24
|
+
hydratedMap.set(store, hydratedSet);
|
|
25
|
+
}
|
|
26
|
+
return hydratedSet;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.useHydrateAtoms = useHydrateAtoms;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var vanilla = require('./vanilla.js');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
|
|
11
|
+
const StoreContext = React.createContext(void 0);
|
|
12
|
+
const useStore = (options) => {
|
|
13
|
+
const store = React.useContext(StoreContext);
|
|
14
|
+
return (options == null ? void 0 : options.store) || store || vanilla.getDefaultStore();
|
|
15
|
+
};
|
|
16
|
+
const Provider = ({
|
|
17
|
+
children,
|
|
18
|
+
store
|
|
19
|
+
}) => {
|
|
20
|
+
const storeRef = React.useRef();
|
|
21
|
+
if (!store && !storeRef.current) {
|
|
22
|
+
storeRef.current = vanilla.createStore();
|
|
23
|
+
}
|
|
24
|
+
return React.createElement(
|
|
25
|
+
StoreContext.Provider,
|
|
26
|
+
{
|
|
27
|
+
value: store || storeRef.current
|
|
28
|
+
},
|
|
29
|
+
children
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === "function";
|
|
34
|
+
const use = React__default.default.use || ((promise) => {
|
|
35
|
+
if (promise.status === "pending") {
|
|
36
|
+
throw promise;
|
|
37
|
+
} else if (promise.status === "fulfilled") {
|
|
38
|
+
return promise.value;
|
|
39
|
+
} else if (promise.status === "rejected") {
|
|
40
|
+
throw promise.reason;
|
|
41
|
+
} else {
|
|
42
|
+
promise.status = "pending";
|
|
43
|
+
promise.then(
|
|
44
|
+
(v) => {
|
|
45
|
+
promise.status = "fulfilled";
|
|
46
|
+
promise.value = v;
|
|
47
|
+
},
|
|
48
|
+
(e) => {
|
|
49
|
+
promise.status = "rejected";
|
|
50
|
+
promise.reason = e;
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
throw promise;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
function useAtomValue(atom, options) {
|
|
57
|
+
const store = useStore(options);
|
|
58
|
+
const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = React.useReducer(
|
|
59
|
+
(prev) => {
|
|
60
|
+
const nextValue = store.get(atom);
|
|
61
|
+
if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {
|
|
62
|
+
return prev;
|
|
63
|
+
}
|
|
64
|
+
return [nextValue, store, atom];
|
|
65
|
+
},
|
|
66
|
+
void 0,
|
|
67
|
+
() => [store.get(atom), store, atom]
|
|
68
|
+
);
|
|
69
|
+
let value = valueFromReducer;
|
|
70
|
+
if (storeFromReducer !== store || atomFromReducer !== atom) {
|
|
71
|
+
rerender();
|
|
72
|
+
value = store.get(atom);
|
|
73
|
+
}
|
|
74
|
+
const delay = options == null ? void 0 : options.delay;
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
const unsub = store.sub(atom, () => {
|
|
77
|
+
if (typeof delay === "number") {
|
|
78
|
+
setTimeout(rerender, delay);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
rerender();
|
|
82
|
+
});
|
|
83
|
+
rerender();
|
|
84
|
+
return unsub;
|
|
85
|
+
}, [store, atom, delay]);
|
|
86
|
+
React.useDebugValue(value);
|
|
87
|
+
return isPromiseLike(value) ? use(value) : value;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function useSetAtom(atom, options) {
|
|
91
|
+
const store = useStore(options);
|
|
92
|
+
const setAtom = React.useCallback(
|
|
93
|
+
(...args) => {
|
|
94
|
+
if ((undefined ? undefined.MODE : void 0) !== "production" && !("write" in atom)) {
|
|
95
|
+
throw new Error("not writable atom");
|
|
96
|
+
}
|
|
97
|
+
return store.set(atom, ...args);
|
|
98
|
+
},
|
|
99
|
+
[store, atom]
|
|
100
|
+
);
|
|
101
|
+
return setAtom;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function useAtom(atom, options) {
|
|
105
|
+
return [
|
|
106
|
+
useAtomValue(atom, options),
|
|
107
|
+
// We do wrong type assertion here, which results in throwing an error.
|
|
108
|
+
useSetAtom(atom, options)
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
exports.Provider = Provider;
|
|
113
|
+
exports.useAtom = useAtom;
|
|
114
|
+
exports.useAtomValue = useAtomValue;
|
|
115
|
+
exports.useSetAtom = useSetAtom;
|
|
116
|
+
exports.useStore = useStore;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vanilla = require('../vanilla.js');
|
|
4
|
+
|
|
5
|
+
Symbol(
|
|
6
|
+
(undefined ? undefined.MODE : void 0) !== "production" ? "RESET" : ""
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const getCached$2 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);
|
|
10
|
+
const cache1$4 = /* @__PURE__ */ new WeakMap();
|
|
11
|
+
const memo3 = (create, dep1, dep2, dep3) => {
|
|
12
|
+
const cache2 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache1$4, dep1);
|
|
13
|
+
const cache3 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache2, dep2);
|
|
14
|
+
return getCached$2(create, cache3, dep3);
|
|
15
|
+
};
|
|
16
|
+
function selectAtom(anAtom, selector, equalityFn = Object.is) {
|
|
17
|
+
return memo3(
|
|
18
|
+
() => {
|
|
19
|
+
const EMPTY = Symbol();
|
|
20
|
+
const selectValue = ([value, prevSlice]) => {
|
|
21
|
+
if (prevSlice === EMPTY) {
|
|
22
|
+
return selector(value);
|
|
23
|
+
}
|
|
24
|
+
const slice = selector(value, prevSlice);
|
|
25
|
+
return equalityFn(prevSlice, slice) ? prevSlice : slice;
|
|
26
|
+
};
|
|
27
|
+
const derivedAtom = vanilla.atom((get) => {
|
|
28
|
+
const prev = get(derivedAtom);
|
|
29
|
+
const value = get(anAtom);
|
|
30
|
+
if (value instanceof Promise || prev instanceof Promise) {
|
|
31
|
+
return Promise.all([value, prev]).then(selectValue);
|
|
32
|
+
}
|
|
33
|
+
return selectValue([value, prev]);
|
|
34
|
+
});
|
|
35
|
+
derivedAtom.init = EMPTY;
|
|
36
|
+
return derivedAtom;
|
|
37
|
+
},
|
|
38
|
+
anAtom,
|
|
39
|
+
selector,
|
|
40
|
+
equalityFn
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.selectAtom = selectAtom;
|