@hywax/cms 3.8.1 → 3.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/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hywax/cms",
3
- "version": "3.8.1",
3
+ "version": "3.9.1",
4
4
  "configKey": "cms",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -7,7 +7,7 @@ import { pascalCase, kebabCase, camelCase } from 'scule';
7
7
  import { globSync } from 'tinyglobby';
8
8
 
9
9
  const name = "@hywax/cms";
10
- const version = "3.8.1";
10
+ const version = "3.9.1";
11
11
 
12
12
  function createContext(options, nuxt) {
13
13
  const { resolve } = createResolver(import.meta.url);
@@ -3,8 +3,8 @@
3
3
  v-if="madeRaw"
4
4
  v-bind="forwardedTextarea"
5
5
  :ui="{
6
- root: 'w-full px-6',
7
- base: 'text-md text-default min-h-screen'
6
+ root: 'w-full px-5',
7
+ base: 'text-md text-default min-h-screen leading-7 py-0 px-3'
8
8
  }"
9
9
  variant="none"
10
10
  placeholder="Введите текст..."
@@ -1,12 +1,13 @@
1
1
  <template>
2
2
  <div class="relative flex items-center gap-2">
3
- <!-- TODO: добавить <CUploraPlaceholder /> -->
4
- <div v-if="image" class="overflow-hidden rounded-lg shrink-0 size-8">
3
+ <div class="overflow-hidden rounded-lg shrink-0 size-8">
5
4
  <CUploraImage
5
+ v-if="image"
6
6
  v-bind="image"
7
7
  :sizes="[{ width: 32, height: 32, descriptor: '1x' }]"
8
8
  :ui="{ picture: 'aspect-square' }"
9
9
  />
10
+ <div v-else class="w-full h-full bg-elevated" />
10
11
  </div>
11
12
  <div class="flex-1 truncate max-w-100">
12
13
  <ULink
@@ -1,6 +1,8 @@
1
1
  import type { Filters } from '@uplora/serializer';
2
2
  import type { ImageFormat, ImageSize, ImageSource } from '../types';
3
3
  export declare function getUploraFileUrl(id: string): string;
4
+ export declare function getUploraImageUrl(id: string): string;
5
+ export declare function getUploraPlaceholderUrl(width: number, height: number, format?: ImageFormat): string;
4
6
  /**
5
7
  * Создает функцию для получения URL изображения из Uplora
6
8
  */
@@ -4,12 +4,22 @@ import { serialize } from "@uplora/serializer";
4
4
  export function getUploraFileUrl(id) {
5
5
  const runtimeConfig = useRuntimeConfig();
6
6
  const { fluxorUrl } = runtimeConfig.public;
7
- return `${fluxorUrl}/${id}`;
7
+ return `${fluxorUrl}/files/${id}`;
8
+ }
9
+ export function getUploraImageUrl(id) {
10
+ const runtimeConfig = useRuntimeConfig();
11
+ const { fluxorUrl } = runtimeConfig.public;
12
+ return `${fluxorUrl}/images/${id}`;
13
+ }
14
+ export function getUploraPlaceholderUrl(width, height, format = "jpg") {
15
+ const runtimeConfig = useRuntimeConfig();
16
+ const { fluxorUrl } = runtimeConfig.public;
17
+ return `${fluxorUrl}/placeholder/${width}x${height}.${format}`;
8
18
  }
9
19
  export function createUploraImageResolver() {
10
20
  return (id, filters) => {
11
21
  const serializeFilters = filters ? serialize(filters) : "";
12
- return `${getUploraFileUrl(id)}${serializeFilters ? `/${serializeFilters}` : ""}`;
22
+ return `${getUploraImageUrl(id)}${serializeFilters ? `/${serializeFilters}` : ""}`;
13
23
  };
14
24
  }
15
25
  export function buildUploraImage(options) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hywax/cms",
3
3
  "type": "module",
4
- "version": "3.8.1",
4
+ "version": "3.9.1",
5
5
  "description": "Hywax CMS. ⚠️ This package is intended for internal use only.",
6
6
  "imports": {
7
7
  "#build/cms/*": "./.nuxt/cms/*.ts",
@@ -84,7 +84,7 @@
84
84
  "zod": "^4.3.5"
85
85
  },
86
86
  "devDependencies": {
87
- "@antfu/eslint-config": "^6.7.3",
87
+ "@antfu/eslint-config": "^7.0.0",
88
88
  "@commitlint/cli": "^20.3.1",
89
89
  "@commitlint/config-conventional": "^20.3.1",
90
90
  "@nuxt/devtools": "^3.1.1",