umaki 0.8.1 → 0.9.1
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/README.md +53 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +2 -1
- package/dist/libs/callback/index.cjs.js +6 -0
- package/dist/libs/callback/index.d.ts +2 -2
- package/dist/libs/callback/index.es.js +6 -0
- package/dist/libs/config/index.cjs.js +10 -0
- package/dist/libs/config/index.d.ts +4 -4
- package/dist/libs/config/index.es.js +10 -0
- package/dist/libs/control/index.cjs.js +10 -0
- package/dist/libs/control/index.d.ts +4 -4
- package/dist/libs/control/index.es.js +10 -0
- package/dist/libs/convert/index.cjs.js +6 -0
- package/dist/libs/convert/index.d.ts +2 -2
- package/dist/libs/convert/index.es.js +6 -0
- package/dist/libs/eventControl/index.cjs.js +6 -0
- package/dist/libs/eventControl/index.d.ts +2 -2
- package/dist/libs/eventControl/index.es.js +6 -0
- package/dist/libs/get/index.cjs.js +34 -0
- package/dist/libs/get/index.d.ts +16 -16
- package/dist/libs/get/index.es.js +34 -0
- package/dist/libs/is/index.cjs.js +20 -0
- package/dist/libs/is/index.d.ts +9 -9
- package/dist/libs/is/index.es.js +20 -0
- package/dist/libs/remove/index.cjs.js +10 -0
- package/dist/libs/remove/index.d.ts +4 -4
- package/dist/libs/remove/index.es.js +10 -0
- package/dist/libs/security/index.cjs.js +4 -0
- package/dist/libs/security/index.d.ts +1 -1
- package/dist/libs/security/index.es.js +4 -0
- package/dist/libs/set/index.cjs.js +14 -0
- package/dist/libs/set/index.d.ts +6 -6
- package/dist/libs/set/index.es.js +14 -0
- package/dist/libs/to/index.cjs.js +6 -0
- package/dist/libs/to/index.d.ts +2 -2
- package/dist/libs/to/index.es.js +6 -0
- package/dist/libs/transform/index.cjs.js +4 -0
- package/dist/libs/transform/index.d.ts +1 -1
- package/dist/libs/transform/index.es.js +4 -0
- package/dist/libs/wait/index.cjs.js +6 -0
- package/dist/libs/wait/index.d.ts +2 -2
- package/dist/libs/wait/index.es.js +6 -0
- package/package.json +71 -4
- package/dist/libs/get/get-image-size.d.ts +0 -7
- package/dist/libs/get/get-path-from-local-public.d.ts +0 -7
- package/dist/libs/get/get-path-from-local-public.test.d.ts +0 -1
- package/dist/libs/get/get-path.d.ts +0 -7
- package/dist/libs/get/get-path.test.d.ts +0 -1
- package/dist/libs/is/is-production.d.ts +0 -1
- package/dist/libs/is/is-production.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1136,6 +1136,42 @@ tap(bgScrollStop(true), () => {
|
|
|
1136
1136
|
|
|
1137
1137
|
Specific usage for frameworks or various tools is described below.
|
|
1138
1138
|
|
|
1139
|
+
### Subpath Exports (Selective Module Imports)
|
|
1140
|
+
|
|
1141
|
+
Umaki supports subpath exports, allowing you to import only the modules you need. This is particularly useful for avoiding unnecessary dependencies and reducing bundle size.
|
|
1142
|
+
|
|
1143
|
+
```ts
|
|
1144
|
+
// Import only the 'get' module (does not load isomorphic-dompurify)
|
|
1145
|
+
import { getUaData, getScrollbarWidth } from "umaki/get";
|
|
1146
|
+
|
|
1147
|
+
// Import only the 'is' module
|
|
1148
|
+
import { isIpad, isSafari } from "umaki/is";
|
|
1149
|
+
|
|
1150
|
+
// Import only the 'security' module (loads isomorphic-dompurify)
|
|
1151
|
+
import { sanitizeHtml } from "umaki/security";
|
|
1152
|
+
|
|
1153
|
+
// Traditional import (loads all modules)
|
|
1154
|
+
import { getUaData, sanitizeHtml } from "umaki";
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
#### Available Subpath Exports
|
|
1158
|
+
|
|
1159
|
+
| Path | Description |
|
|
1160
|
+
|------|-------------|
|
|
1161
|
+
| `umaki/callback` | Callback utilities (tap, tapAsync) |
|
|
1162
|
+
| `umaki/config` | Configuration (setConfig, getConfig) |
|
|
1163
|
+
| `umaki/control` | Scroll control, video playback, etc. |
|
|
1164
|
+
| `umaki/convert` | Data conversion (dates, JSON) |
|
|
1165
|
+
| `umaki/eventControl` | debounce, throttle |
|
|
1166
|
+
| `umaki/get` | Value retrieval (DOM, UA, etc.) |
|
|
1167
|
+
| `umaki/is` | Boolean checks (device detection, etc.) |
|
|
1168
|
+
| `umaki/remove` | DOM/storage removal utilities |
|
|
1169
|
+
| `umaki/security` | HTML sanitization |
|
|
1170
|
+
| `umaki/set` | DOM/storage setters |
|
|
1171
|
+
| `umaki/to` | Type conversions |
|
|
1172
|
+
| `umaki/transform` | DOM transformations |
|
|
1173
|
+
| `umaki/wait` | Async utilities (sleep, media loading) |
|
|
1174
|
+
|
|
1139
1175
|
### Astro or Vite
|
|
1140
1176
|
|
|
1141
1177
|
When using with Astro for SSR, add `umaki` to `vite.ssr.noExternal.`
|
|
@@ -1152,3 +1188,20 @@ export default defineConfig(({ mode }) => {
|
|
|
1152
1188
|
};
|
|
1153
1189
|
});
|
|
1154
1190
|
```
|
|
1191
|
+
|
|
1192
|
+
### Next.js
|
|
1193
|
+
|
|
1194
|
+
When using umaki with Next.js, you may encounter ESM compatibility issues during SSR if you import from the main entry point. This is because `isomorphic-dompurify` (used by the security module) has dependencies that can cause issues in SSR environments.
|
|
1195
|
+
|
|
1196
|
+
**Recommended: Use subpath exports to import only the modules you need:**
|
|
1197
|
+
|
|
1198
|
+
```ts
|
|
1199
|
+
// ✅ Safe for Next.js SSR (does not load isomorphic-dompurify)
|
|
1200
|
+
import { getUaData } from "umaki/get";
|
|
1201
|
+
import { debounce } from "umaki/eventControl";
|
|
1202
|
+
|
|
1203
|
+
// ⚠️ Only import security module if you need HTML sanitization
|
|
1204
|
+
import { sanitizeHtml } from "umaki/security";
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
This approach avoids loading `isomorphic-dompurify` and its dependencies unless you specifically need the `sanitizeHtml` function.
|
package/dist/index.cjs.js
CHANGED
|
@@ -57,6 +57,7 @@ const waitForAllMediaLoaded = require("./libs/wait/wait-for-all-media-loaded.cjs
|
|
|
57
57
|
exports.tap = tap.tap;
|
|
58
58
|
exports.tapAsync = tapAsync.tapAsync;
|
|
59
59
|
exports.defaultConfig = defaultConfig.defaultConfig;
|
|
60
|
+
exports.currentConfig = getConfig.currentConfig;
|
|
60
61
|
exports.getConfig = getConfig.getConfig;
|
|
61
62
|
exports.getConfigValue = getConfig.getConfigValue;
|
|
62
63
|
exports.setConfig = setConfig.setConfig;
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tap } from "./libs/callback/tap.es.js";
|
|
2
2
|
import { tapAsync } from "./libs/callback/tap-async.es.js";
|
|
3
3
|
import { defaultConfig } from "./libs/config/default-config.es.js";
|
|
4
|
-
import { getConfig, getConfigValue } from "./libs/config/get-config.es.js";
|
|
4
|
+
import { currentConfig, getConfig, getConfigValue } from "./libs/config/get-config.es.js";
|
|
5
5
|
import { setConfig } from "./libs/config/set-config.es.js";
|
|
6
6
|
import { bgScrollStop } from "./libs/control/bg-scroll-stop.es.js";
|
|
7
7
|
import { pd } from "./libs/control/pd.es.js";
|
|
@@ -56,6 +56,7 @@ export {
|
|
|
56
56
|
bgScrollStop,
|
|
57
57
|
changeDateStringToSpecificFormat,
|
|
58
58
|
checkDeviceSize,
|
|
59
|
+
currentConfig,
|
|
59
60
|
debounce,
|
|
60
61
|
defaultConfig,
|
|
61
62
|
getAspectRatio,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const defaultConfig = require("./default-config.cjs.js");
|
|
4
|
+
const getConfig = require("./get-config.cjs.js");
|
|
5
|
+
const setConfig = require("./set-config.cjs.js");
|
|
6
|
+
exports.defaultConfig = defaultConfig.defaultConfig;
|
|
7
|
+
exports.currentConfig = getConfig.currentConfig;
|
|
8
|
+
exports.getConfig = getConfig.getConfig;
|
|
9
|
+
exports.getConfigValue = getConfig.getConfigValue;
|
|
10
|
+
exports.setConfig = setConfig.setConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configuration functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
4
|
+
export * from './default-config';
|
|
5
|
+
export * from './get-config';
|
|
6
|
+
export * from './set-config';
|
|
7
|
+
export * from './types';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultConfig } from "./default-config.es.js";
|
|
2
|
+
import { currentConfig, getConfig, getConfigValue } from "./get-config.es.js";
|
|
3
|
+
import { setConfig } from "./set-config.es.js";
|
|
4
|
+
export {
|
|
5
|
+
currentConfig,
|
|
6
|
+
defaultConfig,
|
|
7
|
+
getConfig,
|
|
8
|
+
getConfigValue,
|
|
9
|
+
setConfig
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const bgScrollStop = require("./bg-scroll-stop.cjs.js");
|
|
4
|
+
const pd = require("./pd.cjs.js");
|
|
5
|
+
const scrollToHash = require("./scroll-to-hash.cjs.js");
|
|
6
|
+
const videoPlayControl = require("./video-play-control.cjs.js");
|
|
7
|
+
exports.bgScrollStop = bgScrollStop.bgScrollStop;
|
|
8
|
+
exports.pd = pd.pd;
|
|
9
|
+
exports.scrollToHash = scrollToHash.scrollToHash;
|
|
10
|
+
exports.videoPlayControl = videoPlayControl.videoPlayControl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Control functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
4
|
+
export * from './bg-scroll-stop';
|
|
5
|
+
export * from './pd';
|
|
6
|
+
export * from './scroll-to-hash';
|
|
7
|
+
export * from './video-play-control';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { bgScrollStop } from "./bg-scroll-stop.es.js";
|
|
2
|
+
import { pd } from "./pd.es.js";
|
|
3
|
+
import { scrollToHash } from "./scroll-to-hash.es.js";
|
|
4
|
+
import { videoPlayControl } from "./video-play-control.es.js";
|
|
5
|
+
export {
|
|
6
|
+
bgScrollStop,
|
|
7
|
+
pd,
|
|
8
|
+
scrollToHash,
|
|
9
|
+
videoPlayControl
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const changeDateStringToSpecificFormat = require("./change-date-string-to-specific-format.cjs.js");
|
|
4
|
+
const jsonStringToJsonObject = require("./json-string-to-json-object.cjs.js");
|
|
5
|
+
exports.changeDateStringToSpecificFormat = changeDateStringToSpecificFormat.changeDateStringToSpecificFormat;
|
|
6
|
+
exports.jsonStringToJsonObject = jsonStringToJsonObject.jsonStringToJsonObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Convert functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export * from './change-date-string-to-specific-format';
|
|
5
|
+
export * from './json-string-to-json-object';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const getAspectRatio = require("./get-aspect-ratio.cjs.js");
|
|
4
|
+
const getClassNames = require("./get-class-names.cjs.js");
|
|
5
|
+
const getDocumentHeight = require("./get-document-height.cjs.js");
|
|
6
|
+
const getEventPaths = require("./get-event-paths.cjs.js");
|
|
7
|
+
const getGcd = require("./get-gcd.cjs.js");
|
|
8
|
+
const getGravatarUrl = require("./get-gravatar-url.cjs.js");
|
|
9
|
+
const getOrientation = require("./get-orientation.cjs.js");
|
|
10
|
+
const getParentList = require("./get-parent-list.cjs.js");
|
|
11
|
+
const getQueryParams = require("./get-query-params.cjs.js");
|
|
12
|
+
const getRem = require("./get-rem.cjs.js");
|
|
13
|
+
const getScrollbarWidth = require("./get-scrollbar-width.cjs.js");
|
|
14
|
+
const getSessionStorage = require("./get-session-storage.cjs.js");
|
|
15
|
+
const getStringLength = require("./get-string-length.cjs.js");
|
|
16
|
+
const getStylePropertyValue = require("./get-style-property-value.cjs.js");
|
|
17
|
+
const getStylePropertyValueToNumber = require("./get-style-property-value-to-number.cjs.js");
|
|
18
|
+
const getUaData = require("./get-ua-data.cjs.js");
|
|
19
|
+
exports.getAspectRatio = getAspectRatio.getAspectRatio;
|
|
20
|
+
exports.getClassNames = getClassNames.getClassNames;
|
|
21
|
+
exports.getDocumentHeight = getDocumentHeight.getDocumentHeight;
|
|
22
|
+
exports.getEventPaths = getEventPaths.getEventPaths;
|
|
23
|
+
exports.getGcd = getGcd.getGcd;
|
|
24
|
+
exports.getGravatarUrl = getGravatarUrl.getGravatarUrl;
|
|
25
|
+
exports.getOrientation = getOrientation.getOrientation;
|
|
26
|
+
exports.getParentList = getParentList.getParentList;
|
|
27
|
+
exports.getQueryParams = getQueryParams.getQueryParams;
|
|
28
|
+
exports.getRem = getRem.getRem;
|
|
29
|
+
exports.getScrollbarWidth = getScrollbarWidth.getScrollbarWidth;
|
|
30
|
+
exports.getSessionStorage = getSessionStorage.getSessionStorage;
|
|
31
|
+
exports.getStringLength = getStringLength.getStringLength;
|
|
32
|
+
exports.getStylePropertyValue = getStylePropertyValue.getStylePropertyValue;
|
|
33
|
+
exports.getStylePropertyValueToNumber = getStylePropertyValueToNumber.getStylePropertyValueToNumber;
|
|
34
|
+
exports.getUaData = getUaData.getUaData;
|
package/dist/libs/get/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
4
|
+
export * from './get-aspect-ratio';
|
|
5
|
+
export * from './get-class-names';
|
|
6
|
+
export * from './get-document-height';
|
|
7
|
+
export * from './get-event-paths';
|
|
8
|
+
export * from './get-gcd';
|
|
9
|
+
export * from './get-gravatar-url';
|
|
10
|
+
export * from './get-orientation';
|
|
11
|
+
export * from './get-parent-list';
|
|
12
|
+
export * from './get-query-params';
|
|
13
|
+
export * from './get-rem';
|
|
14
|
+
export * from './get-scrollbar-width';
|
|
15
|
+
export * from './get-session-storage';
|
|
16
|
+
export * from './get-string-length';
|
|
17
|
+
export * from './get-style-property-value';
|
|
18
|
+
export * from './get-style-property-value-to-number';
|
|
19
|
+
export * from './get-ua-data';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getAspectRatio } from "./get-aspect-ratio.es.js";
|
|
2
|
+
import { getClassNames } from "./get-class-names.es.js";
|
|
3
|
+
import { getDocumentHeight } from "./get-document-height.es.js";
|
|
4
|
+
import { getEventPaths } from "./get-event-paths.es.js";
|
|
5
|
+
import { getGcd } from "./get-gcd.es.js";
|
|
6
|
+
import { getGravatarUrl } from "./get-gravatar-url.es.js";
|
|
7
|
+
import { getOrientation } from "./get-orientation.es.js";
|
|
8
|
+
import { getParentList } from "./get-parent-list.es.js";
|
|
9
|
+
import { getQueryParams } from "./get-query-params.es.js";
|
|
10
|
+
import { getRem } from "./get-rem.es.js";
|
|
11
|
+
import { getScrollbarWidth } from "./get-scrollbar-width.es.js";
|
|
12
|
+
import { getSessionStorage } from "./get-session-storage.es.js";
|
|
13
|
+
import { getStringLength } from "./get-string-length.es.js";
|
|
14
|
+
import { getStylePropertyValue } from "./get-style-property-value.es.js";
|
|
15
|
+
import { getStylePropertyValueToNumber } from "./get-style-property-value-to-number.es.js";
|
|
16
|
+
import { getUaData } from "./get-ua-data.es.js";
|
|
17
|
+
export {
|
|
18
|
+
getAspectRatio,
|
|
19
|
+
getClassNames,
|
|
20
|
+
getDocumentHeight,
|
|
21
|
+
getEventPaths,
|
|
22
|
+
getGcd,
|
|
23
|
+
getGravatarUrl,
|
|
24
|
+
getOrientation,
|
|
25
|
+
getParentList,
|
|
26
|
+
getQueryParams,
|
|
27
|
+
getRem,
|
|
28
|
+
getScrollbarWidth,
|
|
29
|
+
getSessionStorage,
|
|
30
|
+
getStringLength,
|
|
31
|
+
getStylePropertyValue,
|
|
32
|
+
getStylePropertyValueToNumber,
|
|
33
|
+
getUaData
|
|
34
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const checkDeviceSize = require("./check-device-size.cjs.js");
|
|
4
|
+
const isAfterDateTime = require("./is-after-date-time.cjs.js");
|
|
5
|
+
const isBetweenDateTime = require("./is-between-date-time.cjs.js");
|
|
6
|
+
const isExistAllElements = require("./is-exist-all-elements.cjs.js");
|
|
7
|
+
const isIpad = require("./is-ipad.cjs.js");
|
|
8
|
+
const isKeyExists = require("./is-key-exists.cjs.js");
|
|
9
|
+
const isSafari = require("./is-safari.cjs.js");
|
|
10
|
+
const isScrollable = require("./is-scrollable.cjs.js");
|
|
11
|
+
const isTouchSupport = require("./is-touch-support.cjs.js");
|
|
12
|
+
exports.checkDeviceSize = checkDeviceSize.checkDeviceSize;
|
|
13
|
+
exports.isAfterDateTime = isAfterDateTime.isAfterDateTime;
|
|
14
|
+
exports.isBetweenDateTime = isBetweenDateTime.isBetweenDateTime;
|
|
15
|
+
exports.isExistAllElements = isExistAllElements.isExistAllElements;
|
|
16
|
+
exports.isIpad = isIpad.isIpad;
|
|
17
|
+
exports.isKeyExists = isKeyExists.isKeyExists;
|
|
18
|
+
exports.isSafari = isSafari.isSafari;
|
|
19
|
+
exports.isScrollable = isScrollable.isScrollable;
|
|
20
|
+
exports.isTouchSupport = isTouchSupport.isTouchSupport;
|
package/dist/libs/is/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Is functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
4
|
+
export * from './check-device-size';
|
|
5
|
+
export * from './is-after-date-time';
|
|
6
|
+
export * from './is-between-date-time';
|
|
7
|
+
export * from './is-exist-all-elements';
|
|
8
|
+
export * from './is-ipad';
|
|
9
|
+
export * from './is-key-exists';
|
|
10
|
+
export * from './is-safari';
|
|
11
|
+
export * from './is-scrollable';
|
|
12
|
+
export * from './is-touch-support';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { checkDeviceSize } from "./check-device-size.es.js";
|
|
2
|
+
import { isAfterDateTime } from "./is-after-date-time.es.js";
|
|
3
|
+
import { isBetweenDateTime } from "./is-between-date-time.es.js";
|
|
4
|
+
import { isExistAllElements } from "./is-exist-all-elements.es.js";
|
|
5
|
+
import { isIpad } from "./is-ipad.es.js";
|
|
6
|
+
import { isKeyExists } from "./is-key-exists.es.js";
|
|
7
|
+
import { isSafari } from "./is-safari.es.js";
|
|
8
|
+
import { isScrollable } from "./is-scrollable.es.js";
|
|
9
|
+
import { isTouchSupport } from "./is-touch-support.es.js";
|
|
10
|
+
export {
|
|
11
|
+
checkDeviceSize,
|
|
12
|
+
isAfterDateTime,
|
|
13
|
+
isBetweenDateTime,
|
|
14
|
+
isExistAllElements,
|
|
15
|
+
isIpad,
|
|
16
|
+
isKeyExists,
|
|
17
|
+
isSafari,
|
|
18
|
+
isScrollable,
|
|
19
|
+
isTouchSupport
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const removeAllHtmlTags = require("./remove-all-html-tags.cjs.js");
|
|
4
|
+
const removeAttribute = require("./remove-attribute.cjs.js");
|
|
5
|
+
const removeSessionStorage = require("./remove-session-storage.cjs.js");
|
|
6
|
+
const removeStylePropertyValue = require("./remove-style-property-value.cjs.js");
|
|
7
|
+
exports.removeAllHtmlTags = removeAllHtmlTags.removeAllHtmlTags;
|
|
8
|
+
exports.removeAttribute = removeAttribute.removeAttribute;
|
|
9
|
+
exports.removeSessionStorage = removeSessionStorage.removeSessionStorage;
|
|
10
|
+
exports.removeStylePropertyValue = removeStylePropertyValue.removeStylePropertyValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Remove functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
4
|
+
export * from './remove-all-html-tags';
|
|
5
|
+
export * from './remove-attribute';
|
|
6
|
+
export * from './remove-session-storage';
|
|
7
|
+
export * from './remove-style-property-value';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { removeAllHtmlTags } from "./remove-all-html-tags.es.js";
|
|
2
|
+
import { removeAttribute } from "./remove-attribute.es.js";
|
|
3
|
+
import { removeSessionStorage } from "./remove-session-storage.es.js";
|
|
4
|
+
import { removeStylePropertyValue } from "./remove-style-property-value.es.js";
|
|
5
|
+
export {
|
|
6
|
+
removeAllHtmlTags,
|
|
7
|
+
removeAttribute,
|
|
8
|
+
removeSessionStorage,
|
|
9
|
+
removeStylePropertyValue
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const set100vh = require("./set-100vh.cjs.js");
|
|
4
|
+
const set100vw = require("./set-100vw.cjs.js");
|
|
5
|
+
const setAttribute = require("./set-attribute.cjs.js");
|
|
6
|
+
const setScrollPositionToCenter = require("./set-scroll-position-to-center.cjs.js");
|
|
7
|
+
const setSessionStorage = require("./set-session-storage.cjs.js");
|
|
8
|
+
const setStylePropertyValue = require("./set-style-property-value.cjs.js");
|
|
9
|
+
exports.set100vh = set100vh.set100vh;
|
|
10
|
+
exports.set100vw = set100vw.set100vw;
|
|
11
|
+
exports.setAttribute = setAttribute.setAttribute;
|
|
12
|
+
exports.setScrollPositionToCenter = setScrollPositionToCenter.setScrollPositionToCenter;
|
|
13
|
+
exports.setSessionStorage = setSessionStorage.setSessionStorage;
|
|
14
|
+
exports.setStylePropertyValue = setStylePropertyValue.setStylePropertyValue;
|
package/dist/libs/set/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Set functions
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
4
|
+
export * from './set-100vh';
|
|
5
|
+
export * from './set-100vw';
|
|
6
|
+
export * from './set-attribute';
|
|
7
|
+
export * from './set-scroll-position-to-center';
|
|
8
|
+
export * from './set-session-storage';
|
|
9
|
+
export * from './set-style-property-value';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { set100vh } from "./set-100vh.es.js";
|
|
2
|
+
import { set100vw } from "./set-100vw.es.js";
|
|
3
|
+
import { setAttribute } from "./set-attribute.es.js";
|
|
4
|
+
import { setScrollPositionToCenter } from "./set-scroll-position-to-center.es.js";
|
|
5
|
+
import { setSessionStorage } from "./set-session-storage.es.js";
|
|
6
|
+
import { setStylePropertyValue } from "./set-style-property-value.es.js";
|
|
7
|
+
export {
|
|
8
|
+
set100vh,
|
|
9
|
+
set100vw,
|
|
10
|
+
setAttribute,
|
|
11
|
+
setScrollPositionToCenter,
|
|
12
|
+
setSessionStorage,
|
|
13
|
+
setStylePropertyValue
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const toBoolean = require("./to-boolean.cjs.js");
|
|
4
|
+
const toPositiveNumber = require("./to-positive-number.cjs.js");
|
|
5
|
+
exports.toBoolean = toBoolean.toBoolean;
|
|
6
|
+
exports.toPositiveNumber = toPositiveNumber.toPositiveNumber;
|
package/dist/libs/to/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sleep = require("./sleep.cjs.js");
|
|
4
|
+
const waitForAllMediaLoaded = require("./wait-for-all-media-loaded.cjs.js");
|
|
5
|
+
exports.sleep = sleep.sleep;
|
|
6
|
+
exports.waitForAllMediaLoaded = waitForAllMediaLoaded.waitForAllMediaLoaded;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umaki",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A utility that is often used in web production.",
|
|
5
5
|
"author": "TsubasaHiga",
|
|
6
6
|
"homepage": "https://github.com/TsubasaHiga/umaki",
|
|
@@ -23,9 +23,76 @@
|
|
|
23
23
|
"module": "./dist/index.es.js",
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"exports": {
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.es.js",
|
|
29
|
+
"require": "./dist/index.cjs.js"
|
|
30
|
+
},
|
|
31
|
+
"./callback": {
|
|
32
|
+
"types": "./dist/libs/callback/index.d.ts",
|
|
33
|
+
"import": "./dist/libs/callback/index.es.js",
|
|
34
|
+
"require": "./dist/libs/callback/index.cjs.js"
|
|
35
|
+
},
|
|
36
|
+
"./config": {
|
|
37
|
+
"types": "./dist/libs/config/index.d.ts",
|
|
38
|
+
"import": "./dist/libs/config/index.es.js",
|
|
39
|
+
"require": "./dist/libs/config/index.cjs.js"
|
|
40
|
+
},
|
|
41
|
+
"./control": {
|
|
42
|
+
"types": "./dist/libs/control/index.d.ts",
|
|
43
|
+
"import": "./dist/libs/control/index.es.js",
|
|
44
|
+
"require": "./dist/libs/control/index.cjs.js"
|
|
45
|
+
},
|
|
46
|
+
"./convert": {
|
|
47
|
+
"types": "./dist/libs/convert/index.d.ts",
|
|
48
|
+
"import": "./dist/libs/convert/index.es.js",
|
|
49
|
+
"require": "./dist/libs/convert/index.cjs.js"
|
|
50
|
+
},
|
|
51
|
+
"./eventControl": {
|
|
52
|
+
"types": "./dist/libs/eventControl/index.d.ts",
|
|
53
|
+
"import": "./dist/libs/eventControl/index.es.js",
|
|
54
|
+
"require": "./dist/libs/eventControl/index.cjs.js"
|
|
55
|
+
},
|
|
56
|
+
"./get": {
|
|
57
|
+
"types": "./dist/libs/get/index.d.ts",
|
|
58
|
+
"import": "./dist/libs/get/index.es.js",
|
|
59
|
+
"require": "./dist/libs/get/index.cjs.js"
|
|
60
|
+
},
|
|
61
|
+
"./is": {
|
|
62
|
+
"types": "./dist/libs/is/index.d.ts",
|
|
63
|
+
"import": "./dist/libs/is/index.es.js",
|
|
64
|
+
"require": "./dist/libs/is/index.cjs.js"
|
|
65
|
+
},
|
|
66
|
+
"./remove": {
|
|
67
|
+
"types": "./dist/libs/remove/index.d.ts",
|
|
68
|
+
"import": "./dist/libs/remove/index.es.js",
|
|
69
|
+
"require": "./dist/libs/remove/index.cjs.js"
|
|
70
|
+
},
|
|
71
|
+
"./security": {
|
|
72
|
+
"types": "./dist/libs/security/index.d.ts",
|
|
73
|
+
"import": "./dist/libs/security/index.es.js",
|
|
74
|
+
"require": "./dist/libs/security/index.cjs.js"
|
|
75
|
+
},
|
|
76
|
+
"./set": {
|
|
77
|
+
"types": "./dist/libs/set/index.d.ts",
|
|
78
|
+
"import": "./dist/libs/set/index.es.js",
|
|
79
|
+
"require": "./dist/libs/set/index.cjs.js"
|
|
80
|
+
},
|
|
81
|
+
"./to": {
|
|
82
|
+
"types": "./dist/libs/to/index.d.ts",
|
|
83
|
+
"import": "./dist/libs/to/index.es.js",
|
|
84
|
+
"require": "./dist/libs/to/index.cjs.js"
|
|
85
|
+
},
|
|
86
|
+
"./transform": {
|
|
87
|
+
"types": "./dist/libs/transform/index.d.ts",
|
|
88
|
+
"import": "./dist/libs/transform/index.es.js",
|
|
89
|
+
"require": "./dist/libs/transform/index.cjs.js"
|
|
90
|
+
},
|
|
91
|
+
"./wait": {
|
|
92
|
+
"types": "./dist/libs/wait/index.d.ts",
|
|
93
|
+
"import": "./dist/libs/wait/index.es.js",
|
|
94
|
+
"require": "./dist/libs/wait/index.cjs.js"
|
|
95
|
+
}
|
|
29
96
|
},
|
|
30
97
|
"scripts": {
|
|
31
98
|
"dev": "vite",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the full path of a file located in the local public folder.
|
|
3
|
-
*
|
|
4
|
-
* @param fileName - The name of the file for which to get the path.
|
|
5
|
-
* @returns The full path to the specified file in the local public folder.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getPathFromLocalPublic: (fileName: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the specified path with `import.meta.env.BASE_URL` prepended to it.
|
|
3
|
-
*
|
|
4
|
-
* @param pathName - The path to be appended to the base URL.
|
|
5
|
-
* @returns The full path including the base URL.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getPath: (pathName: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isProduction: () => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|