@edifice.io/react 2.0.0-develop-pedago.3 → 2.0.0-develop-pedago.5

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.
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef, Suspense } from "react";
2
+ import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
4
  import * as iconsApps from "../../icons-apps.js";
5
+ import SvgIconPlaceholder from "../../modules/icons/components/apps/IconPlaceholder.js";
5
6
  import Image from "../Image/Image.js";
6
- import LoadingScreen from "../LoadingScreen/LoadingScreen.js";
7
7
  import useEdificeIcons from "../../hooks/useEdificeIcons/useEdificeIcons.js";
8
8
  const AppIcon = /* @__PURE__ */ forwardRef(({
9
9
  app,
@@ -34,17 +34,17 @@ const AppIcon = /* @__PURE__ */ forwardRef(({
34
34
  ...iconFits,
35
35
  [`bg-light-${appCode}`]: appCode && !isContain,
36
36
  [`color-app-${appCode}`]: appCode
37
- }, className), IconComponent = iconsApps[`Icon${appCode.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`];
37
+ }, className), IconComponent = iconsApps[`Icon${appCode.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`] ?? SvgIconPlaceholder;
38
38
  if (isIconURL) {
39
39
  const classes2 = clsx("h-full", className);
40
40
  return /* @__PURE__ */ jsx(Image, { src: icon, alt: displayName, objectFit: "contain", width: size, height: size, className: classes2, style: {
41
41
  minWidth: size + "px"
42
42
  } });
43
43
  }
44
- return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, {}), children: /* @__PURE__ */ jsx("div", { ref, className: classes, style: {
44
+ return /* @__PURE__ */ jsx("div", { ref, className: classes, style: {
45
45
  width: size + "px",
46
46
  height: size + "px"
47
- }, children: /* @__PURE__ */ jsx(IconComponent, { width: size, height: size }) }) });
47
+ }, children: /* @__PURE__ */ jsx(IconComponent, { width: size, height: size }) });
48
48
  });
49
49
  export {
50
50
  AppIcon as default
@@ -57,6 +57,9 @@ function useEdificeIcons() {
57
57
  case "cahier de texte 2d":
58
58
  appCode = "cahier-textes";
59
59
  break;
60
+ case "scrap-book":
61
+ appCode = "scrapbook";
62
+ break;
60
63
  }
61
64
  return appCode;
62
65
  }
@@ -3,7 +3,7 @@ import { EdificeClientContext } from "./EdificeClientProvider.context.js";
3
3
  function useEdificeClient() {
4
4
  const context = useContext(EdificeClientContext);
5
5
  if (!context)
6
- throw new Error("Cannot be used outside of OdeClientProvider");
6
+ throw new Error("Cannot be used outside of EdificeClientProvider");
7
7
  return context;
8
8
  }
9
9
  export {
@@ -3,7 +3,7 @@ import { EdificeThemeContext } from "./EdificeThemeProvider.context.js";
3
3
  function useEdificeTheme() {
4
4
  const context = useContext(EdificeThemeContext);
5
5
  if (!context)
6
- throw new Error("Cannot be used outside of OdeClientProvider");
6
+ throw new Error("Cannot be used outside of EdificeThemeProvider");
7
7
  return context;
8
8
  }
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.0.0-develop-pedago.3",
3
+ "version": "2.0.0-develop-pedago.5",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -119,9 +119,9 @@
119
119
  "react-slugify": "^3.0.3",
120
120
  "swiper": "^10.1.0",
121
121
  "ua-parser-js": "^1.0.36",
122
- "@edifice.io/bootstrap": "2.0.0-develop-pedago.3",
123
- "@edifice.io/tiptap-extensions": "2.0.0-develop-pedago.3",
124
- "@edifice.io/utilities": "2.0.0-develop-pedago.3"
122
+ "@edifice.io/bootstrap": "2.0.0-develop-pedago.5",
123
+ "@edifice.io/tiptap-extensions": "2.0.0-develop-pedago.5",
124
+ "@edifice.io/utilities": "2.0.0-develop-pedago.5"
125
125
  },
126
126
  "devDependencies": {
127
127
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -147,7 +147,7 @@
147
147
  "typescript-eslint": "^8.8.1",
148
148
  "vite": "^5.4.11",
149
149
  "vite-plugin-dts": "^4.1.0",
150
- "@edifice.io/client": "2.0.0-develop-pedago.3"
150
+ "@edifice.io/client": "2.0.0-develop-pedago.5"
151
151
  },
152
152
  "peerDependencies": {
153
153
  "@react-spring/web": "^9.7.5",