adminforth 2.22.0-next.15 → 2.22.0-next.17

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.
@@ -12,9 +12,7 @@
12
12
  ref="input"
13
13
  v-bind="$attrs"
14
14
  :type="type"
15
- :min="min"
16
- :max="max"
17
- @input="onInput"
15
+ @input="$emit('update:modelValue', type === 'number' ? Number(($event.target as HTMLInputElement)?.value) : ($event.target as HTMLInputElement)?.value)"
18
16
  :value="modelValue"
19
17
  aria-describedby="helper-text-explanation"
20
18
  class="afcl-input inline-flex bg-lightInputBackground text-lightInputText dark:text-darkInputText border border-lightInputBorder rounded-0 focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary
@@ -50,31 +48,8 @@ const props = defineProps<{
50
48
  suffix?: string,
51
49
  prefix?: string,
52
50
  readonly?: boolean,
53
- min?: number | null,
54
- max?: number | null,
55
51
  }>()
56
52
 
57
- const emit = defineEmits<{
58
- (e: 'update:modelValue', value: number | null): void
59
- }>();
60
-
61
- const onInput = (e: Event) => {
62
- const el = e.target as HTMLInputElement;
63
-
64
- if (props.type === 'number') {
65
- let val = Number(el.value);
66
-
67
- if (props.min != null && val < props.min) val = props.min;
68
- if (props.max != null && val > props.max) val = props.max;
69
-
70
- el.value = String(val);
71
- emit('update:modelValue', val);
72
- } else {
73
- emit('update:modelValue', el.value);
74
- }
75
- };
76
-
77
-
78
53
  const input = ref<HTMLInputElement | null>(null)
79
54
 
80
55
  defineExpose({
@@ -23,4 +23,11 @@ export interface CompletionAdapter {
23
23
  finishReason?: string;
24
24
  error?: string;
25
25
  }>;
26
+
27
+ /**
28
+ * This method should return the number of tokens in the input content.
29
+ * @param content - The input text for which to measure the token count
30
+ * @returns The number of tokens in the input content
31
+ */
32
+ measureTokensCount(content: string): Promise<number> | number;
26
33
  }
@@ -16,5 +16,11 @@ export interface CompletionAdapter {
16
16
  finishReason?: string;
17
17
  error?: string;
18
18
  }>;
19
+ /**
20
+ * This method should return the number of tokens in the input content.
21
+ * @param content - The input text for which to measure the token count
22
+ * @returns The number of tokens in the input content
23
+ */
24
+ measureTokensCount(content: string): Promise<number> | number;
19
25
  }
20
26
  //# sourceMappingURL=CompletionAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,GACjB,OAAO,CAAC;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ"}
1
+ {"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,GACjB,OAAO,CAAC;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.22.0-next.15",
3
+ "version": "2.22.0-next.17",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",