@v1nt1248/3nclient-lib 0.2.32 → 0.2.34

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.
Files changed (53) hide show
  1. package/README.md +2 -0
  2. package/dist/components/ui3n-dialog/types.d.ts +1 -1
  3. package/dist/components/ui3n-editable/types.d.ts +1 -1
  4. package/dist/components/ui3n-editable/ui3n-editable.vue.d.ts +1 -1
  5. package/dist/components/ui3n-editable/useContentEditable.d.ts +1 -1
  6. package/dist/components/ui3n-input/ui3n-input.vue.d.ts +33 -5
  7. package/dist/components/ui3n-text/ui3n-text.vue.d.ts +31 -5
  8. package/dist/directives/index.d.ts +2 -1
  9. package/dist/directives/ui3n-long-press.d.ts +27 -0
  10. package/dist/index.d.ts +3 -2
  11. package/dist/style.css +1 -1
  12. package/dist/types/directives.types.d.ts +7 -0
  13. package/dist/types/index.d.ts +3 -0
  14. package/dist/ui3n-components.d.ts +3 -1
  15. package/dist/ui3n-components.js +5640 -5563
  16. package/dist/ui3n-plugins.d.ts +1 -2
  17. package/dist/ui3n-plugins.js +2 -2
  18. package/dist/ui3n-utils.js +154 -144
  19. package/dist/utils/files/create-video-thumbnail.d.ts +1 -1
  20. package/dist/utils/for-vue/try-on-scope-dispose.d.ts +2 -0
  21. package/dist/utils/for-vue/unref-element.d.ts +2 -0
  22. package/dist/utils/index.d.ts +3 -1
  23. package/package.json +52 -46
  24. package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +32 -9
  25. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +14 -14
  26. package/src/components/ui3n-button/ui3n-button.vue +229 -226
  27. package/src/components/ui3n-checkbox/ui3n-checkbox.vue +30 -7
  28. package/src/components/ui3n-chip/ui3n-chip.vue +113 -109
  29. package/src/components/ui3n-dialog/types.ts +1 -1
  30. package/src/components/ui3n-dialog/ui3n-dialog.vue +7 -8
  31. package/src/components/ui3n-editable/types.ts +1 -1
  32. package/src/components/ui3n-editable/ui3n-editable.vue +34 -12
  33. package/src/components/ui3n-editable/useContentEditable.ts +6 -3
  34. package/src/components/ui3n-icon/ui3n-icon.vue +1 -1
  35. package/src/components/ui3n-input/ui3n-input.vue +272 -273
  36. package/src/components/ui3n-input-file/ui3n-input-file.vue +2 -2
  37. package/src/components/ui3n-list/ui3n-list.vue +70 -60
  38. package/src/components/ui3n-menu/ui3n-menu.vue +1 -1
  39. package/src/components/ui3n-notification/ui3n-notification.vue +4 -1
  40. package/src/components/ui3n-progress/ui3n-progress-circular.vue +168 -147
  41. package/src/components/ui3n-progress/ui3n-progress-linear.vue +77 -73
  42. package/src/components/ui3n-radio-group/ui3n-radio.vue +178 -177
  43. package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +50 -46
  44. package/src/components/ui3n-switch/ui3n-switch.vue +114 -116
  45. package/src/components/ui3n-table/composables/useTable.ts +17 -9
  46. package/src/components/ui3n-table/ui3n-table-sort-icon.vue +9 -6
  47. package/src/components/ui3n-table/ui3n-table.vue +7 -5
  48. package/src/components/ui3n-text/ui3n-text.vue +157 -215
  49. package/src/components/ui3n-tooltip/ui3n-tooltip.vue +4 -5
  50. package/src/components/types/index.ts +0 -15
  51. /package/dist/{components/types/index.d.ts → types/components.types.d.ts} +0 -0
  52. /package/dist/{plugins/types.d.ts → types/plugins.types.d.ts} +0 -0
  53. /package/dist/utils/{for-we3n.d.ts → for-web3n.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
- import { Nullable } from '../../components/types';
1
+ import { Nullable } from '../../types';
2
2
  export declare function createVideoThumbnail(file: File, targetSize: number, seekTo: number): Promise<Nullable<string>>;
@@ -0,0 +1,2 @@
1
+ import { Fn } from '../../types';
2
+ export declare function tryOnScopeDispose(fn: Fn): boolean;
@@ -0,0 +1,2 @@
1
+ import { MaybeComputedElementRef, MaybeElement, UnRefElementReturn } from '../../types';
2
+ export declare function unrefElement<T extends MaybeElement>(elRef: MaybeComputedElementRef<T>): UnRefElementReturn<T>;
@@ -6,7 +6,7 @@ export * from './processes/task-runner';
6
6
  export * from './round';
7
7
  export * from './get-random-id';
8
8
  export * from './textarea-max-rows';
9
- export * from './for-we3n';
9
+ export * from './for-web3n';
10
10
  export * from './ui/selection';
11
11
  export * from './ui/mark-search';
12
12
  export * from './ui/has-slot-content';
@@ -26,5 +26,7 @@ export * from './files/resize-image';
26
26
  export * from './files/file-to-uint8array';
27
27
  export * from './files/create-video-thumbnail';
28
28
  export * from './files/mime-types';
29
+ export * from './for-vue/unref-element';
30
+ export * from './for-vue/try-on-scope-dispose';
29
31
  export { SQLiteOn3NStorage } from './sqlite-on-3nstorage';
30
32
  export type { BindParams, Database, QueryExecResult } from './sqlite-on-3nstorage';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.2.32",
5
+ "version": "0.2.34",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -37,72 +37,77 @@
37
37
  "build:components": "LIB_NAME=lib vite build",
38
38
  "build:plugins": "LIB_NAME=plugins vite build",
39
39
  "build:utils": "LIB_NAME=utils vite build",
40
- "build": "pnpm run clean:dist && pnpm run build:plugins && pnpm run build:utils && pnpm run build:components && pnpm run copy:css",
41
- "pack": "pnpm run build && npm pack && cp *.tgz ./dist && rm *.tgz",
40
+ "build": "pnpm clean:dist && pnpm build:plugins && pnpm build:utils && pnpm build:components && pnpm copy:css",
41
+ "pack": "pnpm build && npm pack && cp *.tgz ./dist && rm *.tgz",
42
42
  "preview": "vite preview",
43
- "stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss}'",
44
- "stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss}'",
45
- "linter": "eslint -c .eslintrc.cjs --ext .js,.vue,.ts, src",
46
- "linter:fix": "eslint -c .eslintrc.cjs --fix --ext .js,.vue,.ts, src",
47
- "lint": "pnpm run linter && pnpm run stylelint",
48
- "lint:fix": "pnpm run linter:fix && pnpm run stylelint:fix",
43
+ "stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss,css}'",
44
+ "stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss,css}'",
45
+ "linter": "eslint -c eslint.config.js --ext .js,.vue,.ts, src",
46
+ "linter:fix": "eslint -c eslint.config.js --fix --ext .js,.vue,.ts, src",
47
+ "lint": "pnpm linter && pnpm stylelint",
48
+ "lint:fix": "pnpm linter:fix && pnpm stylelint:fix",
49
49
  "docs:dev": "vitepress dev docs",
50
50
  "docs:build": "vitepress build docs",
51
51
  "docs:preview": "vitepress preview docs"
52
52
  },
53
53
  "dependencies": {
54
- "@floating-ui/dom": "^1.6.13",
55
- "@floating-ui/vue": "1.1.6",
54
+ "@floating-ui/dom": "^1.7.3",
55
+ "@floating-ui/vue": "1.1.8",
56
56
  "dayjs": "1.11.13",
57
57
  "lodash": "4.17.21",
58
58
  "mitt": "3.0.1",
59
- "sanitize-html": "2.16.0",
60
- "tslib": "2.8.1",
59
+ "sanitize-html": "2.17.0",
61
60
  "vuedraggable": "4.1.0"
62
61
  },
63
62
  "peerDependencies": {
64
- "pinia": "3.0.2",
65
- "vue": "3.5.13"
63
+ "pinia": "3.0.3",
64
+ "vue": "3.5.18"
66
65
  },
67
66
  "devDependencies": {
68
- "@types/lodash": "4.17.12",
69
- "@types/node": "20.17.12",
70
- "@types/sanitize-html": "2.13.0",
71
- "@typescript-eslint/eslint-plugin": "8.0.1",
72
- "@typescript-eslint/parser": "8.0.1",
73
- "@vitejs/plugin-vue": "5.2.3",
74
- "@vue/compiler-core": "3.5.13",
75
- "@vue/eslint-config-typescript": "13.0.0",
76
- "@vue/runtime-core": "3.5.13",
67
+ "@eslint/eslintrc": "^3.3.1",
68
+ "@eslint/js": "^9.32.0",
69
+ "@types/lodash": "4.17.20",
70
+ "@types/node": "22.17.0",
71
+ "@types/sanitize-html": "2.16.0",
72
+ "@typescript-eslint/eslint-plugin": "8.39.0",
73
+ "@typescript-eslint/parser": "8.39.0",
74
+ "@vitejs/plugin-vue": "6.0.1",
75
+ "@vue/compiler-core": "3.5.18",
76
+ "@vue/eslint-config-typescript": "14.6.0",
77
+ "@vue/runtime-core": "3.5.18",
77
78
  "@vuedx/typescript-plugin-vue": "0.7.6",
78
- "eslint": "9.9.0",
79
- "eslint-config-prettier": "^9.1.0",
80
- "eslint-plugin-import": "2.29.1",
79
+ "eslint": "9.32.0",
80
+ "eslint-config-prettier": "10.1.8",
81
+ "eslint-plugin-import": "2.32.0",
81
82
  "eslint-plugin-node": "11.1.0",
82
- "eslint-plugin-prettier": "^5.2.1",
83
- "eslint-plugin-promise": "7.1.0",
84
- "eslint-plugin-vue": "9.27.0",
85
- "jackspeak": "4.0.1",
83
+ "eslint-plugin-prettier": "^5.5.3",
84
+ "eslint-plugin-promise": "7.2.1",
85
+ "eslint-plugin-vue": "10.4.0",
86
+ "globals": "^16.3.0",
87
+ "jackspeak": "4.1.1",
86
88
  "path": "0.12.7",
87
- "pinia": "3.0.2",
88
- "postcss-html": "1.7.0",
89
- "prettier": "^3.3.3",
90
- "sass": "1.87.0",
91
- "stylelint": "16.8.1",
89
+ "pinia": "3.0.3",
90
+ "postcss-html": "1.8.0",
91
+ "prettier": "^3.6.2",
92
+ "sass": "1.89.2",
93
+ "stylelint": "16.23.0",
92
94
  "stylelint-config-recommended-scss": "14.1.0",
93
- "stylelint-config-recommended-vue": "1.5.0",
95
+ "stylelint-config-recommended-vue": "1.6.1",
94
96
  "stylelint-config-standard": "36.0.1",
95
- "stylelint-scss": "6.5.0",
96
- "typescript": "5.8.3",
97
- "vite": "6.3.3",
97
+ "stylelint-scss": "6.12.1",
98
+ "tslib": "2.8.1",
99
+ "typescript": "5.9.2",
100
+ "typescript-eslint": "^8.39.0",
101
+ "vite": "6.3.5",
98
102
  "vite-plugin-css-injected-by-js": "3.5.2",
99
- "vite-plugin-dts": "4.5.3",
100
- "vite-plugin-vue-devtools": "^7.7.5",
103
+ "vite-plugin-dts": "4.5.4",
104
+ "vite-plugin-vue-devtools": "^7.7.7",
101
105
  "vitepress": "1.6.3",
102
- "vue": "3.5.13",
103
- "vue-tsc": "2.2.10"
106
+ "vue": "3.5.18",
107
+ "vue-eslint-parser": "^10.2.0",
108
+ "vue-tsc": "2.2.12"
104
109
  },
105
- "packageManager": "pnpm@10.10.0",
110
+ "packageManager": "pnpm@10.14.0",
106
111
  "pnpm": {
107
112
  "peerDependencyRules": {
108
113
  "ignoreMissing": [
@@ -111,7 +116,8 @@
111
116
  ]
112
117
  },
113
118
  "onlyBuiltDependencies": [
114
- "esbuild"
119
+ "esbuild",
120
+ "vue-demi"
115
121
  ]
116
122
  }
117
123
  }
@@ -23,7 +23,7 @@
23
23
  import Ui3nMenu from '../ui3n-menu/ui3n-menu.vue';
24
24
  import Ui3nHtml from '@/directives/ui3n-html';
25
25
  import { markSearch, getRandomId } from '@/utils';
26
- import type { Nullable } from '@/components/types';
26
+ import type { Nullable } from '@/types';
27
27
  import {
28
28
  Ui3nAutocompleteOptionBase,
29
29
  Ui3nAutocompleteProps,
@@ -252,10 +252,20 @@
252
252
  :content-border-radius="[0, 0, 8, 8]"
253
253
  :disabled="disabled"
254
254
  >
255
- <div ref="activatorEl" :class="$style.trigger">
255
+ <div
256
+ ref="activatorEl"
257
+ :class="$style.trigger"
258
+ >
256
259
  <template v-if="chips">
257
- <template v-for="(item, index) in modelValue" :key="item.id">
258
- <slot name="chip" :item="item" :index="index">
260
+ <template
261
+ v-for="(item, index) in modelValue"
262
+ :key="item.id"
263
+ >
264
+ <slot
265
+ name="chip"
266
+ :item="item"
267
+ :index="index"
268
+ >
259
269
  <ui3n-chip
260
270
  height="32"
261
271
  round
@@ -269,7 +279,9 @@
269
279
  </template>
270
280
 
271
281
  <template v-else>
272
- <div :class="$style.displayValue">{{ displayValue }}</div>
282
+ <div :class="$style.displayValue">
283
+ {{ displayValue }}
284
+ </div>
273
285
  </template>
274
286
 
275
287
  <input
@@ -287,7 +299,7 @@
287
299
  @keydown.esc="onKeydown($event, 'esc')"
288
300
  @keydown.enter="onKeydown($event, 'enter')"
289
301
  @keydown.tab="onKeydown($event, 'tab')"
290
- />
302
+ >
291
303
  </div>
292
304
 
293
305
  <template #menu>
@@ -297,7 +309,10 @@
297
309
  :class="$style.body"
298
310
  >
299
311
  <template v-if="size(filteredItems)">
300
- <template v-for="(item, index) in filteredItems" :key="item.id">
312
+ <template
313
+ v-for="(item, index) in filteredItems"
314
+ :key="item.id"
315
+ >
301
316
  <div
302
317
  :id="`${componentId}-${index}`"
303
318
  :class="[
@@ -307,7 +322,12 @@
307
322
  ]"
308
323
  @click.stop.prevent="onItemClick(item)"
309
324
  >
310
- <slot name="item" :item="item" :index="index" :query="query">
325
+ <slot
326
+ name="item"
327
+ :item="item"
328
+ :index="index"
329
+ :query="query"
330
+ >
311
331
  <div
312
332
  v-ui3n-html="markSearch(item[props.itemTitle] as string, query)"
313
333
  :class="$style.simpleItem"
@@ -317,7 +337,10 @@
317
337
  </template>
318
338
  </template>
319
339
 
320
- <div v-if="!size(filteredItems) && noDataText" :class="$style.noData">
340
+ <div
341
+ v-if="!size(filteredItems) && noDataText"
342
+ :class="$style.noData"
343
+ >
321
344
  <slot name="noDataText">
322
345
  {{ noDataText }}
323
346
  </slot>
@@ -1,25 +1,25 @@
1
1
  <script lang="ts" setup>
2
- import type { Ui3nBreadcrumbsProps } from './types';
2
+ import type { Ui3nBreadcrumbsProps } from './types';
3
3
 
4
- withDefaults(
5
- defineProps<Ui3nBreadcrumbsProps>(),
6
- {
7
- separator: '/',
8
- disabled: false,
9
- },
10
- );
4
+ withDefaults(
5
+ defineProps<Ui3nBreadcrumbsProps>(),
6
+ {
7
+ separator: '/',
8
+ disabled: false,
9
+ },
10
+ );
11
11
  </script>
12
12
 
13
13
  <template>
14
14
  <div :class="$style.ui3nBreadcrumbs">
15
- <slot/>
15
+ <slot />
16
16
  </div>
17
17
  </template>
18
18
 
19
19
  <style lang="scss" module>
20
- .ui3nBreadcrumbs {
21
- position: relative;
22
- display: flex;
23
- flex-wrap: wrap;
24
- }
20
+ .ui3nBreadcrumbs {
21
+ position: relative;
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ }
25
25
  </style>