@micromag/core 0.4.98 → 0.4.100

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/es/components.js CHANGED
@@ -11,19 +11,19 @@ import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown';
11
11
  import { faAngleUp } from '@fortawesome/free-solid-svg-icons/faAngleUp';
12
12
  import React, { useState, useEffect, useCallback, useRef, createElement, Suspense, useMemo, cloneElement } from 'react';
13
13
  import dayjs from 'dayjs';
14
- import throttle from 'lodash/throttle';
14
+ import throttle from 'lodash-es/throttle';
15
15
  import { useForm, useDocumentEvent, useIntersectionObserver, useDimensionObserver, useDevicePixelRatio } from '@micromag/core/hooks';
16
- import get from 'lodash/get';
16
+ import get from 'lodash-es/get';
17
17
  import { useFieldsManager, useFieldComponent, FieldContextProvider, useFieldContext, withPanels, usePanels, ScreenSizeProvider, useScreenComponent, ScreenProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
18
- import isObject from 'lodash/isObject';
19
- import isArray from 'lodash/isArray';
20
- import isString from 'lodash/isString';
18
+ import isObject from 'lodash-es/isObject';
19
+ import isArray from 'lodash-es/isArray';
20
+ import isString from 'lodash-es/isString';
21
21
  import queryString from 'query-string';
22
22
  import { createPortal } from 'react-dom';
23
23
  import { faAd } from '@fortawesome/free-solid-svg-icons/faAd';
24
24
  import { faImage } from '@fortawesome/free-solid-svg-icons/faImage';
25
25
  import { faMusic } from '@fortawesome/free-solid-svg-icons/faMusic';
26
- import isNumber from 'lodash/isNumber';
26
+ import isNumber from 'lodash-es/isNumber';
27
27
  import { faMapMarkerAlt } from '@fortawesome/free-solid-svg-icons/faMapMarkerAlt';
28
28
  import { faMapMarkedAlt } from '@fortawesome/free-solid-svg-icons/faMapMarkedAlt';
29
29
  import { faVideo } from '@fortawesome/free-solid-svg-icons/faVideo';
package/es/contexts.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { c } from 'react/compiler-runtime';
2
- import isString from 'lodash/isString';
2
+ import isString from 'lodash-es/isString';
3
3
  import React, { createContext, use, useState, useEffect, useContext, useRef, useMemo } from 'react';
4
4
  import { ComponentsManager, FieldsManager, ScreensManager, ColorsParser, Tracking } from '@micromag/core';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  import JSCookie from 'js-cookie';
7
7
  import { defineMessages, useIntl } from 'react-intl';
8
- import uniqBy from 'lodash/uniqBy';
8
+ import uniqBy from 'lodash-es/uniqBy';
9
9
  import { getJSON } from '@folklore/fetch';
10
- import isObject from 'lodash/isObject';
10
+ import isObject from 'lodash-es/isObject';
11
11
  import { loadGoogleApi, loadGoogleMaps } from '@folklore/services';
12
12
  export { ModalContext, ModalProvider as ModalsProvider } from '@panneau/core/contexts';
13
13
  import { getDisplayName, getMediaSrc, getMediaHasAudio, getMediaFilename, getMediaDuration, getScreenExtraField } from '@micromag/core/utils';
package/es/hooks.d.ts CHANGED
@@ -186,7 +186,7 @@ declare class MediasParser {
186
186
  static replaceMediasWithPaths(data: any, patterns: any, medias?: null, keyPrefix?: null): any;
187
187
  static getMediaPatternsFromData(obj: any): RegExp[];
188
188
  static dot(obj: any): any;
189
- static keys(obj: any): string[] | number[];
189
+ static keys(obj: any): any[];
190
190
  }
191
191
 
192
192
  declare const useMediasParser: () => {
package/es/hooks.js CHANGED
@@ -9,17 +9,17 @@ import classNames from 'classnames';
9
9
  import screenfull from 'screenfull';
10
10
  import { useResizeObserver, useIntersectionObserver, useWindowSize } from '@folklore/hooks';
11
11
  export { useIntersectionObserver, useResizeObserver } from '@folklore/hooks';
12
- import isObject from 'lodash/isObject';
12
+ import isObject from 'lodash-es/isObject';
13
13
  import raf from 'raf';
14
14
  import createDebug from 'debug';
15
15
  import { useScreensManager, useFieldsManager, useTracking, useScreen } from '@micromag/core/contexts';
16
- import isEmpty from 'lodash/isEmpty';
16
+ import isEmpty from 'lodash-es/isEmpty';
17
17
  import { match } from 'css-mediaquery';
18
- import isArray from 'lodash/isArray';
18
+ import isArray from 'lodash-es/isArray';
19
19
  import dayjs from 'dayjs';
20
- import isString from 'lodash/isString';
20
+ import isString from 'lodash-es/isString';
21
21
  import { useIntl } from 'react-intl';
22
- import clamp from 'lodash/clamp';
22
+ import clamp from 'lodash-es/clamp';
23
23
 
24
24
  function useActivityDetector(t0) {
25
25
  const $ = c(8);
package/es/index.d.ts CHANGED
@@ -557,7 +557,7 @@ declare class MediasParser {
557
557
  static replaceMediasWithPaths(data: any, patterns: any, medias?: null, keyPrefix?: null): any;
558
558
  static getMediaPatternsFromData(obj: any): RegExp[];
559
559
  static dot(obj: any): any;
560
- static keys(obj: any): string[] | number[];
560
+ static keys(obj: any): any[];
561
561
  }
562
562
 
563
563
  type ScreensFieldsPattern = {
package/es/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import isArray from 'lodash/isArray';
2
- import isObject from 'lodash/isObject';
3
- import uniqWith from 'lodash/uniqWith';
4
- import sortBy from 'lodash/sortBy';
1
+ import isArray from 'lodash-es/isArray';
2
+ import isObject from 'lodash-es/isObject';
3
+ import uniqWith from 'lodash-es/uniqWith';
4
+ import sortBy from 'lodash-es/sortBy';
5
5
  import EventEmitter from 'wolfy87-eventemitter';
6
6
  import { pascalCase } from 'change-case';
7
- import uniqBy from 'lodash/uniqBy';
8
- import uniq from 'lodash/uniq';
9
- import isString from 'lodash/isString';
10
- import isEmpty from 'lodash/isEmpty';
7
+ import uniqBy from 'lodash-es/uniqBy';
8
+ import uniq from 'lodash-es/uniq';
9
+ import isString from 'lodash-es/isString';
10
+ import isEmpty from 'lodash-es/isEmpty';
11
11
  import { Tracking as Tracking$1 } from '@folklore/tracking';
12
12
 
13
13
  const sortedColors = colors => sortBy(colors, ['color', 'alpha']);
package/es/utils.d.ts CHANGED
@@ -220,7 +220,7 @@ declare const largestRemainderRound: (numbers: any, desiredTotal: any) => any;
220
220
 
221
221
  declare const getLayersFromBackground: (background?: null) => never[];
222
222
 
223
- declare const getMediaFilesAsArray: (files: any) => string | any[];
223
+ declare const getMediaFilesAsArray: (files: any) => any;
224
224
 
225
225
  declare function getMediaThumbnail(media: any, thumbnail?: MediaFile | ImageMedia | string): {
226
226
  metadata?: {
package/es/utils.js CHANGED
@@ -1,11 +1,11 @@
1
- import isString from 'lodash/isString';
2
- import isNumber from 'lodash/isNumber';
1
+ import isString from 'lodash-es/isString';
2
+ import isNumber from 'lodash-es/isNumber';
3
3
  import { kebabCase, pascalCase, snakeCase } from 'change-case';
4
4
  export { camelCase, pascalCase, snakeCase } from 'change-case';
5
- import isObject from 'lodash/isObject';
5
+ import isObject from 'lodash-es/isObject';
6
6
  import { useEffect } from 'react';
7
7
  import tinycolor from 'tinycolor2';
8
- import isArray from 'lodash/isArray';
8
+ import isArray from 'lodash-es/isArray';
9
9
  import slugify from 'slugify';
10
10
 
11
11
  function addNonBreakingSpaces(text) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.98",
3
+ "version": "0.4.100",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -11,6 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/urbania-media/micromag-js.git"
13
13
  },
14
+ "license": "ISC",
14
15
  "author": {
15
16
  "name": "Folklore",
16
17
  "email": "info@folklore.email"
@@ -29,13 +30,10 @@
29
30
  "email": "jc@folklore.email"
30
31
  }
31
32
  ],
32
- "license": "ISC",
33
- "type": "module",
34
- "module": "es/index.js",
35
- "style": "assets/css/styles.css",
36
33
  "sideEffects": [
37
34
  "**/*.css"
38
35
  ],
36
+ "type": "module",
39
37
  "exports": {
40
38
  ".": {
41
39
  "types": "./es/index.d.ts",
@@ -65,6 +63,7 @@
65
63
  "./assets/css/vendor": "./assets/css/vendor.css",
66
64
  "./assets/css/vendor.css": "./assets/css/vendor.css"
67
65
  },
66
+ "module": "es/index.js",
68
67
  "browser": {
69
68
  ".": "./es/index.js",
70
69
  "./components": "./es/components.js",
@@ -72,6 +71,8 @@
72
71
  "./hooks": "./es/hooks.js",
73
72
  "./utils": "./es/utils.js"
74
73
  },
74
+ "types": "es/index.d.ts",
75
+ "style": "assets/css/styles.css",
75
76
  "files": [
76
77
  "lib",
77
78
  "es",
@@ -83,41 +84,12 @@
83
84
  "utils.js"
84
85
  ],
85
86
  "scripts": {
87
+ "build": "../../scripts/prepare-package.sh --types && npm run css:vendor && npm run css:theme",
86
88
  "clean": "rm -rf es && rm -rf lib && rm -rf assets && rm -rf styles && rm -rf styles",
87
- "css:vendor": "../../scripts/build-css.js ./src/styles/vendor.css ./assets/css/vendor.css",
88
- "css:theme": "../../scripts/build-css.js ./src/styles/theme.css ./assets/css/theme.css",
89
89
  "css:styles": "../../scripts/build-css.js ./src/styles/styles.css ./assets/css/styles.css",
90
- "prepublishOnly": "npm run build",
91
- "build": "../../scripts/prepare-package.sh --types && npm run css:vendor && npm run css:theme"
92
- },
93
- "devDependencies": {
94
- "react": "^19.0.0",
95
- "react-dom": "^19.0.0"
96
- },
97
- "peerDependencies": {
98
- "@panneau/core": "^4.0.55",
99
- "@panneau/displays": "^4.0.55",
100
- "@panneau/element-button": "^4.0.55",
101
- "@panneau/element-buttons": "^4.0.55",
102
- "@panneau/element-dropdown": "^4.0.55",
103
- "@panneau/element-form-group": "^4.0.55",
104
- "@panneau/element-grid": "^4.0.55",
105
- "@panneau/element-icon": "^4.0.55",
106
- "@panneau/element-link": "^4.0.55",
107
- "@panneau/element-media-card": "^4.0.55",
108
- "@panneau/element-media-player": "^4.0.55",
109
- "@panneau/element-modal": "^4.0.55",
110
- "@panneau/fields": "^4.0.55",
111
- "@panneau/filters": "^4.0.55",
112
- "@panneau/intl": "^4.0.55",
113
- "@panneau/medias": "^4.0.42",
114
- "@panneau/modal-dialog": "^4.0.55",
115
- "@panneau/uppy": "^4.0.55",
116
- "@uppy/core": "^5.1.1",
117
- "@uppy/dashboard": "^5.0.4",
118
- "@uppy/react": "^5.1.1",
119
- "react": "^19.0.0",
120
- "react-dom": "^19.0.0"
90
+ "css:theme": "../../scripts/build-css.js ./src/styles/theme.css ./assets/css/theme.css",
91
+ "css:vendor": "../../scripts/build-css.js ./src/styles/vendor.css ./assets/css/vendor.css",
92
+ "prepublishOnly": "npm run build"
121
93
  },
122
94
  "dependencies": {
123
95
  "@babel/runtime": "^7.28.6",
@@ -143,7 +115,7 @@
143
115
  "flat": "^6.0.1",
144
116
  "hoist-non-react-statics": "^3.3.2",
145
117
  "js-cookie": "^3.0.5",
146
- "lodash": "^4.17.23",
118
+ "lodash-es": "^4.17.23",
147
119
  "query-string": "^9.0.0",
148
120
  "raf": "^3.4.1",
149
121
  "react-helmet": "^6.1.0",
@@ -156,10 +128,38 @@
156
128
  "wolfy87-eventemitter": "^5.2.9",
157
129
  "wouter": "^3.0.0"
158
130
  },
131
+ "devDependencies": {
132
+ "react": "^19.0.0",
133
+ "react-dom": "^19.0.0"
134
+ },
135
+ "peerDependencies": {
136
+ "@panneau/core": "^4.0.55",
137
+ "@panneau/displays": "^4.0.55",
138
+ "@panneau/element-button": "^4.0.55",
139
+ "@panneau/element-buttons": "^4.0.55",
140
+ "@panneau/element-dropdown": "^4.0.55",
141
+ "@panneau/element-form-group": "^4.0.55",
142
+ "@panneau/element-grid": "^4.0.55",
143
+ "@panneau/element-icon": "^4.0.55",
144
+ "@panneau/element-link": "^4.0.55",
145
+ "@panneau/element-media-card": "^4.0.55",
146
+ "@panneau/element-media-player": "^4.0.55",
147
+ "@panneau/element-modal": "^4.0.55",
148
+ "@panneau/fields": "^4.0.55",
149
+ "@panneau/filters": "^4.0.55",
150
+ "@panneau/intl": "^4.0.55",
151
+ "@panneau/medias": "^4.0.42",
152
+ "@panneau/modal-dialog": "^4.0.55",
153
+ "@panneau/uppy": "^4.0.55",
154
+ "@uppy/core": "^5.1.1",
155
+ "@uppy/dashboard": "^5.0.4",
156
+ "@uppy/react": "^5.1.1",
157
+ "react": "^19.0.0",
158
+ "react-dom": "^19.0.0"
159
+ },
159
160
  "publishConfig": {
160
161
  "access": "public",
161
162
  "registry": "https://registry.npmjs.org/"
162
163
  },
163
- "gitHead": "5b90ff3e707ec3b96a1c6ae07812ce29a105d1c8",
164
- "types": "es/index.d.ts"
164
+ "gitHead": "724328f428f29f4950850cf34adb68ef5f46669a"
165
165
  }