@varlet/ui 3.5.4 → 3.6.0-alpha.1728498016952

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.5.4",
3
+ "version": "3.6.0-alpha.1728498016952",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,26 +48,27 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/icons": "3.5.4",
52
- "@varlet/shared": "3.5.4",
53
- "@varlet/use": "3.5.4"
51
+ "@varlet/icons": "3.6.0-alpha.1728498016952",
52
+ "@varlet/shared": "3.6.0-alpha.1728498016952",
53
+ "@varlet/use": "3.6.0-alpha.1728498016952"
54
54
  },
55
55
  "devDependencies": {
56
- "@vue/runtime-core": "3.4.21",
57
- "@vue/test-utils": "2.4.1",
58
56
  "@types/node": "^18.7.18",
59
57
  "@vitest/coverage-istanbul": "2.0.5",
60
- "zod": "^3.23.8",
61
- "jsdom": "24.1.1",
62
- "vitest": "2.0.5",
58
+ "@vue/runtime-core": "3.4.21",
59
+ "@vue/test-utils": "2.4.1",
63
60
  "clipboard": "^2.0.6",
61
+ "jsdom": "24.1.1",
64
62
  "live-server": "^1.2.1",
63
+ "shiki": "^1.21.0",
65
64
  "typescript": "^5.1.5",
65
+ "vitest": "2.0.5",
66
66
  "vue": "3.4.21",
67
67
  "vue-router": "4.2.0",
68
- "@varlet/cli": "3.5.4",
69
- "@varlet/ui": "3.5.4",
70
- "@varlet/touch-emulator": "3.5.4"
68
+ "zod": "^3.23.8",
69
+ "@varlet/cli": "3.6.0-alpha.1728498016952",
70
+ "@varlet/touch-emulator": "3.6.0-alpha.1728498016952",
71
+ "@varlet/ui": "3.6.0-alpha.1728498016952"
71
72
  },
72
73
  "scripts": {
73
74
  "dev": "varlet-cli dev",
@@ -0,0 +1,18 @@
1
+ import { VarComponent, BasicAttributes, SetPropsDefaults } from './varComponent'
2
+
3
+ export declare const codeProps: Record<keyof CodeProps, any>
4
+
5
+ export interface CodeProps extends BasicAttributes {
6
+ code?: string
7
+ language?: string
8
+ theme?: string
9
+ wordWrap?: boolean
10
+ }
11
+
12
+ export class Code extends VarComponent {
13
+ static setPropsDefaults: SetPropsDefaults<CodeProps>
14
+
15
+ $props: CodeProps
16
+ }
17
+
18
+ export class _CodeComponent extends Code {}
@@ -0,0 +1,26 @@
1
+ import { VarComponent, BasicAttributes, SetPropsDefaults } from './varComponent'
2
+
3
+ export declare const highlighterProps: Record<keyof HighlighterProviderProps, any>
4
+
5
+ export interface CodeToHtmlOptions {
6
+ lang?: string
7
+ theme?: string
8
+ }
9
+
10
+ export interface Highlighter {
11
+ codeToHtml: (code: string, options: CodeToHtmlOptions) => Promise<string>
12
+ }
13
+
14
+ export interface HighlighterProviderProps extends BasicAttributes {
15
+ highlighter?: Highlighter
16
+ theme?: string
17
+ tag?: string
18
+ }
19
+
20
+ export class HighlighterProvider extends VarComponent {
21
+ static setPropsDefaults: SetPropsDefaults<HighlighterProviderProps>
22
+
23
+ $props: HighlighterProviderProps
24
+ }
25
+
26
+ export class _HighlighterProviderComponent extends HighlighterProvider {}
package/types/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export * from './cell'
21
21
  export * from './checkbox'
22
22
  export * from './checkboxGroup'
23
23
  export * from './chip'
24
+ export * from './code'
24
25
  export * from './col'
25
26
  export * from './collapse'
26
27
  export * from './collapseItem'
@@ -37,6 +38,7 @@ export * from './fab'
37
38
  export * from './floatingPanel'
38
39
  export * from './form'
39
40
  export * from './formDetails'
41
+ export * from './highlighterProvider'
40
42
  export * from './hover'
41
43
  export * from './hoverOverlay'
42
44
  export * from './icon'
@@ -115,6 +117,7 @@ declare module 'vue' {
115
117
  VarCheckbox: typeof import('@varlet/ui')['_CheckboxComponent']
116
118
  VarCheckboxGroup: typeof import('@varlet/ui')['_CheckboxGroupComponent']
117
119
  VarChip: typeof import('@varlet/ui')['_ChipComponent']
120
+ VarCode: typeof import('@varlet/ui')['_CodeComponent']
118
121
  VarCol: typeof import('@varlet/ui')['_ColComponent']
119
122
  VarCollapse: typeof import('@varlet/ui')['_CollapseComponent']
120
123
  VarCollapseItem: typeof import('@varlet/ui')['_CollapseItemComponent']
@@ -131,6 +134,7 @@ declare module 'vue' {
131
134
  VarFloatingPanel: typeof import('@varlet/ui')['_FloatingPanelComponent']
132
135
  VarForm: typeof import('@varlet/ui')['_FormComponent']
133
136
  VarFormDetails: typeof import('@varlet/ui')['_FormDetailsComponent']
137
+ VarHighlighterProvider: typeof import('@varlet/ui')['_HighlighterProviderComponent']
134
138
  VarHoverOverlay: typeof import('@varlet/ui')['_HoverOverlayComponent']
135
139
  VarIcon: typeof import('@varlet/ui')['_IconComponent']
136
140
  VarImage: typeof import('@varlet/ui')['_ImageComponent']
@@ -224,6 +224,8 @@ interface BaseStyleVars {
224
224
  '--chip-small-font-size'?: string
225
225
  '--chip-normal-font-size'?: string
226
226
  '--chip-large-font-size'?: string
227
+ '--code-line-height'?: string
228
+ '--code-font-size'?: string
227
229
  '--collapse-background'?: string
228
230
  '--collapse-text-color'?: string
229
231
  '--collapse-header-font-size'?: string