@ndla/image-search 11.0.154-alpha.0 → 11.0.156-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ImageMeta.mjs","names":[],"sources":["../src/ImageMeta.tsx"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Text } from \"@ndla/primitives\";\nimport type { ImageDimensionsDTO } from \"@ndla/types-backend/image-api\";\nimport { humanFileSize } from \"@ndla/util\";\nimport { useMemo } from \"react\";\n\ninterface Props {\n contentType: string;\n fileSize: number;\n imageDimensions?: ImageDimensionsDTO;\n originalDate?: string;\n locale: string;\n}\n\nexport const ImageMeta = ({ contentType, fileSize, imageDimensions, originalDate, locale }: Props) => {\n const prettySize = useMemo(() => {\n return humanFileSize(fileSize, locale);\n }, [fileSize, locale]);\n\n const dimensions = imageDimensions ? ` - ${imageDimensions.width}x${imageDimensions.height} px` : \"\";\n const date = originalDate ? ` - ${originalDate}` : \"\";\n return <Text>{`${contentType} - ${prettySize}${dimensions}${date}`}</Text>;\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,aAAa,EAAE,aAAa,UAAU,iBAAiB,cAAc,aAAoB;AAOpG,QAAO,oBAAC,MAAD,EAAA,UAAO,GAAG,YAAY,KANV,cAAc;AAC/B,SAAO,cAAc,UAAU,OAAO;IACrC,CAAC,UAAU,OAAO,CAAC,GAEH,kBAAkB,MAAM,gBAAgB,MAAM,GAAG,gBAAgB,OAAO,OAAO,KACrF,eAAe,MAAM,iBAAiB,MACuB,CAAA"}
1
+ {"version":3,"file":"ImageMeta.mjs","names":[],"sources":["../src/ImageMeta.tsx"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Text } from \"@ndla/primitives\";\nimport type { ImageDimensionsDTO } from \"@ndla/types-backend/image-api\";\nimport { humanFileSize } from \"@ndla/util\";\nimport { useMemo } from \"react\";\n\ninterface Props {\n contentType: string;\n fileSize: number;\n imageDimensions?: ImageDimensionsDTO;\n originalDate?: string;\n locale: string;\n}\n\nexport const ImageMeta = ({ contentType, fileSize, imageDimensions, originalDate, locale }: Props) => {\n const prettySize = useMemo(() => {\n return humanFileSize(fileSize, locale);\n }, [fileSize, locale]);\n\n const dimensions = imageDimensions ? ` - ${imageDimensions.width}x${imageDimensions.height} px` : \"\";\n const date = originalDate ? ` - ${originalDate}` : \"\";\n return <Text>{`${contentType} - ${prettySize}${dimensions}${date}`}</Text>;\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,aAAa,EAAE,aAAa,UAAU,iBAAiB,cAAc,aAAoB;AAOpG,QAAO,oBAAC,MAAD,EAAA,UAAO,GAAG,YAAY,KANV,cAAc;AAC/B,SAAO,cAAc,UAAU,OAAO;IACrC,CAAC,UAAU,OAAO,CAIuB,GAFzB,kBAAkB,MAAM,gBAAgB,MAAM,GAAG,gBAAgB,OAAO,OAAO,KACrF,eAAe,MAAM,iBAAiB,MACuB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImageMeta.js","names":["Text"],"sources":["../src/ImageMeta.tsx"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Text } from \"@ndla/primitives\";\nimport type { ImageDimensionsDTO } from \"@ndla/types-backend/image-api\";\nimport { humanFileSize } from \"@ndla/util\";\nimport { useMemo } from \"react\";\n\ninterface Props {\n contentType: string;\n fileSize: number;\n imageDimensions?: ImageDimensionsDTO;\n originalDate?: string;\n locale: string;\n}\n\nexport const ImageMeta = ({ contentType, fileSize, imageDimensions, originalDate, locale }: Props) => {\n const prettySize = useMemo(() => {\n return humanFileSize(fileSize, locale);\n }, [fileSize, locale]);\n\n const dimensions = imageDimensions ? ` - ${imageDimensions.width}x${imageDimensions.height} px` : \"\";\n const date = originalDate ? ` - ${originalDate}` : \"\";\n return <Text>{`${contentType} - ${prettySize}${dimensions}${date}`}</Text>;\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,aAAa,EAAE,aAAa,UAAU,iBAAiB,cAAc,aAAoB;AAOpG,QAAO,iBAAA,GAAA,kBAAA,KAACA,iBAAAA,MAAD,EAAA,UAAO,GAAG,YAAY,MAAA,GAAA,MAAA,eANI;AAC/B,UAAA,GAAA,WAAA,eAAqB,UAAU,OAAO;IACrC,CAAC,UAAU,OAAO,CAAC,GAEH,kBAAkB,MAAM,gBAAgB,MAAM,GAAG,gBAAgB,OAAO,OAAO,KACrF,eAAe,MAAM,iBAAiB,MACuB,CAAA"}
1
+ {"version":3,"file":"ImageMeta.js","names":["Text"],"sources":["../src/ImageMeta.tsx"],"sourcesContent":["/**\n * Copyright (c) 2022-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Text } from \"@ndla/primitives\";\nimport type { ImageDimensionsDTO } from \"@ndla/types-backend/image-api\";\nimport { humanFileSize } from \"@ndla/util\";\nimport { useMemo } from \"react\";\n\ninterface Props {\n contentType: string;\n fileSize: number;\n imageDimensions?: ImageDimensionsDTO;\n originalDate?: string;\n locale: string;\n}\n\nexport const ImageMeta = ({ contentType, fileSize, imageDimensions, originalDate, locale }: Props) => {\n const prettySize = useMemo(() => {\n return humanFileSize(fileSize, locale);\n }, [fileSize, locale]);\n\n const dimensions = imageDimensions ? ` - ${imageDimensions.width}x${imageDimensions.height} px` : \"\";\n const date = originalDate ? ` - ${originalDate}` : \"\";\n return <Text>{`${contentType} - ${prettySize}${dimensions}${date}`}</Text>;\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,aAAa,EAAE,aAAa,UAAU,iBAAiB,cAAc,aAAoB;AAOpG,QAAO,iBAAA,GAAA,kBAAA,KAACA,iBAAAA,MAAD,EAAA,UAAO,GAAG,YAAY,MAAA,GAAA,MAAA,eANI;AAC/B,UAAA,GAAA,WAAA,eAAqB,UAAU,OAAO;IACrC,CAAC,UAAU,OAAO,CAIuB,GAFzB,kBAAkB,MAAM,gBAAgB,MAAM,GAAG,gBAAgB,OAAO,OAAO,KACrF,eAAe,MAAM,iBAAiB,MACuB,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ndla/image-search",
3
3
  "type": "module",
4
- "version": "11.0.154-alpha.0",
4
+ "version": "11.0.156-alpha.0",
5
5
  "description": "A simple library for searching images from NDLA",
6
6
  "license": "GPL-3.0",
7
7
  "exports": {
@@ -31,14 +31,14 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@ndla/icons": "^8.0.89-alpha.0",
34
- "@ndla/licenses": "^10.0.11-alpha.0",
35
- "@ndla/primitives": "^1.0.128-alpha.0",
34
+ "@ndla/licenses": "^10.0.12-alpha.0",
35
+ "@ndla/primitives": "^1.0.129-alpha.0",
36
36
  "@ndla/styled-system": "^0.0.49",
37
37
  "@ndla/util": "^5.0.21-alpha.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@ndla/preset-panda": "^0.0.76",
41
- "@ndla/types-backend": "^1.0.89",
41
+ "@ndla/types-backend": "^1.0.125",
42
42
  "@pandacss/dev": "^1.10.0"
43
43
  },
44
44
  "peerDependencies": {
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "f8a73392a71c05f052f6cc69d55ca57c38e0db5b"
51
+ "gitHead": "471ee3863b03f1cc6a48d09ab624fbd1a5613c6e"
52
52
  }