@coffic/cosy-ui 1.0.11 → 1.0.13

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 (32) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/index-astro.ts +1 -0
  3. package/dist/index-vue.ts +1 -0
  4. package/dist/src/assets/iconData.js +3 -0
  5. package/dist/src/assets/icons-data/arrowDownS.d.ts +2 -0
  6. package/dist/src/assets/icons-data/arrowDownS.js +3 -0
  7. package/dist/src/assets/icons-data/arrowUpS.d.ts +2 -0
  8. package/dist/src/assets/icons-data/arrowUpS.js +3 -0
  9. package/dist/src/assets/icons-data/function.d.ts +2 -0
  10. package/dist/src/assets/icons-data/function.js +3 -0
  11. package/dist/src/assets/icons-data/index.d.ts +3 -0
  12. package/dist/src/assets/icons-data/index.js +3 -0
  13. package/dist/src-astro/icons/ArrowDownSIcon.astro +28 -0
  14. package/dist/src-astro/icons/ArrowUpSIcon.astro +28 -0
  15. package/dist/src-astro/icons/FunctionIcon.astro +28 -0
  16. package/dist/src-astro/icons/index.ts +3 -0
  17. package/dist/src-astro/mac-window/MacWindow.astro +7 -34
  18. package/dist/src-astro/math-formula/MathFormula.astro +463 -0
  19. package/dist/src-astro/math-formula/index.ts +3 -0
  20. package/dist/src-astro/math-formula/props.ts +11 -0
  21. package/dist/src-astro/math-formula/types.ts +46 -0
  22. package/dist/src-astro/products/ProductCard.astro +12 -6
  23. package/dist/src-astro/products/ProductHero.astro +0 -3
  24. package/dist/src-astro/products/ProductHeroContent.astro +0 -3
  25. package/dist/src-astro/products/ProductHeroImage.astro +0 -3
  26. package/dist/src-astro/products/Products.astro +8 -3
  27. package/dist/src-vue/math-formula/MathFormula.vue +198 -0
  28. package/dist/src-vue/math-formula/index.ts +2 -0
  29. package/dist/src-vue/math-formula/types.ts +18 -0
  30. package/dist/src-vue/products/ProductCard.vue +14 -2
  31. package/package.json +1 -1
  32. /package/dist/{src-astro/products → src/styles}/product-card.css +0 -0
@@ -67,6 +67,7 @@ export * from "./src-astro/login";
67
67
  export * from "./src-astro/logout";
68
68
  export * from "./src-astro/mac-window";
69
69
  export * from "./src-astro/main";
70
+ export * from "./src-astro/math-formula";
70
71
  export * from "./src-astro/modal";
71
72
  export * from "./src-astro/module";
72
73
  export * from "./src-astro/nav-section";
package/dist/index-vue.ts CHANGED
@@ -25,6 +25,7 @@ export * from "./src-vue/link/index";
25
25
  export * from "./src-vue/list/index";
26
26
  export * from "./src-vue/login/index";
27
27
  export * from "./src-vue/mac-window/index";
28
+ export * from "./src-vue/math-formula";
28
29
  export * from "./src-vue/photo-wall/index";
29
30
  export * from "./src-vue/placeholder/index";
30
31
  export * from "./src-vue/products/index";
@@ -9,6 +9,8 @@ import * as icons from "./icons-data";
9
9
  export const iconData = {
10
10
  alertTriangle: icons.alertTriangle,
11
11
  appstore: icons.appstore,
12
+ arrowDownS: icons.arrowDownS,
13
+ arrowUpS: icons.arrowUpS,
12
14
  calendar: icons.calendar,
13
15
  chart: icons.chart,
14
16
  check: icons.check,
@@ -26,6 +28,7 @@ export const iconData = {
26
28
  edit: icons.edit,
27
29
  facebook: icons.facebook,
28
30
  folder: icons.folder,
31
+ function: icons.functionIcon,
29
32
  github: icons.github,
30
33
  globe: icons.globe,
31
34
  heart: icons.heart,
@@ -0,0 +1,2 @@
1
+ import type { IconData } from "../iconData";
2
+ export declare const arrowDownS: IconData;
@@ -0,0 +1,3 @@
1
+ export const arrowDownS = {
2
+ path: "M8 9l4 4 4-4",
3
+ };
@@ -0,0 +1,2 @@
1
+ import type { IconData } from "../iconData";
2
+ export declare const arrowUpS: IconData;
@@ -0,0 +1,3 @@
1
+ export const arrowUpS = {
2
+ path: "M16 15l-4-4-4 4",
3
+ };
@@ -0,0 +1,2 @@
1
+ import type { IconData } from "../iconData";
2
+ export declare const functionIcon: IconData;
@@ -0,0 +1,3 @@
1
+ export const functionIcon = {
2
+ path: "M4 4h6v6H4V4zm0 10h6v6H4v-6zm10 0h6v6h-6v-6zm0-10h6v6h-6V4z",
3
+ };
@@ -4,6 +4,8 @@
4
4
  */
5
5
  export { alertTriangle } from "./alertTriangle";
6
6
  export { appstore } from "./appstore";
7
+ export { arrowDownS } from "./arrowDownS";
8
+ export { arrowUpS } from "./arrowUpS";
7
9
  export { calendar } from "./calendar";
8
10
  export { chart } from "./chart";
9
11
  export { check } from "./check";
@@ -21,6 +23,7 @@ export { download } from "./download";
21
23
  export { edit } from "./edit";
22
24
  export { facebook } from "./facebook";
23
25
  export { folder } from "./folder";
26
+ export { functionIcon } from "./function";
24
27
  export { github } from "./github";
25
28
  export { globe } from "./globe";
26
29
  export { heart } from "./heart";
@@ -5,6 +5,8 @@
5
5
  // 导入所有图标数据
6
6
  export { alertTriangle } from "./alertTriangle";
7
7
  export { appstore } from "./appstore";
8
+ export { arrowDownS } from "./arrowDownS";
9
+ export { arrowUpS } from "./arrowUpS";
8
10
  export { calendar } from "./calendar";
9
11
  export { chart } from "./chart";
10
12
  export { check } from "./check";
@@ -22,6 +24,7 @@ export { download } from "./download";
22
24
  export { edit } from "./edit";
23
25
  export { facebook } from "./facebook";
24
26
  export { folder } from "./folder";
27
+ export { functionIcon } from "./function";
25
28
  export { github } from "./github";
26
29
  export { globe } from "./globe";
27
30
  export { heart } from "./heart";
@@ -0,0 +1,28 @@
1
+ ---
2
+ import AstroIcon from './AstroIcon.astro';
3
+
4
+ interface Props {
5
+ /**
6
+ * 图标的大小
7
+ * @default "24px"
8
+ */
9
+ size?: string;
10
+ /**
11
+ * 图标的颜色
12
+ * @default "currentColor"
13
+ */
14
+ color?: string;
15
+ /**
16
+ * 自定义类名
17
+ */
18
+ class?: string;
19
+ }
20
+
21
+ const {
22
+ size = '24px',
23
+ color = 'currentColor',
24
+ class: className = '',
25
+ } = Astro.props;
26
+ ---
27
+
28
+ <AstroIcon name="arrowDownS" size={size} color={color} class={className} />
@@ -0,0 +1,28 @@
1
+ ---
2
+ import AstroIcon from './AstroIcon.astro';
3
+
4
+ interface Props {
5
+ /**
6
+ * 图标的大小
7
+ * @default "24px"
8
+ */
9
+ size?: string;
10
+ /**
11
+ * 图标的颜色
12
+ * @default "currentColor"
13
+ */
14
+ color?: string;
15
+ /**
16
+ * 自定义类名
17
+ */
18
+ class?: string;
19
+ }
20
+
21
+ const {
22
+ size = '24px',
23
+ color = 'currentColor',
24
+ class: className = '',
25
+ } = Astro.props;
26
+ ---
27
+
28
+ <AstroIcon name="arrowUpS" size={size} color={color} class={className} />
@@ -0,0 +1,28 @@
1
+ ---
2
+ import AstroIcon from './AstroIcon.astro';
3
+
4
+ interface Props {
5
+ /**
6
+ * 图标的大小
7
+ * @default "24px"
8
+ */
9
+ size?: string;
10
+ /**
11
+ * 图标的颜色
12
+ * @default "currentColor"
13
+ */
14
+ color?: string;
15
+ /**
16
+ * 自定义类名
17
+ */
18
+ class?: string;
19
+ }
20
+
21
+ const {
22
+ size = '24px',
23
+ color = 'currentColor',
24
+ class: className = '',
25
+ } = Astro.props;
26
+ ---
27
+
28
+ <AstroIcon name="function" size={size} color={color} class={className} />
@@ -3,6 +3,8 @@
3
3
  export { default as SmartIcon } from "../smart-icon/SmartIcon.astro";
4
4
  export { default as AlertTriangle } from "./AlertTriangle.astro";
5
5
  export { default as AppStoreIcon } from "./AppStoreIcon.astro";
6
+ export { default as ArrowDownSIcon } from "./ArrowDownSIcon.astro";
7
+ export { default as ArrowUpSIcon } from "./ArrowUpSIcon.astro";
6
8
  export { default as CalendarIcon } from "./CalendarIcon.astro";
7
9
  export { default as ChartIcon } from "./ChartIcon.astro";
8
10
  export { default as CheckCircle } from "./CheckCircle.astro";
@@ -21,6 +23,7 @@ export { default as EditIcon } from "./EditIcon.astro";
21
23
  export { default as ErrorIcon } from "./ErrorIcon.astro";
22
24
  export { default as FacebookIcon } from "./FacebookIcon.astro";
23
25
  export { default as FolderIcon } from "./FolderIcon.astro";
26
+ export { default as FunctionIcon } from "./FunctionIcon.astro";
24
27
  export { default as GithubIcon } from "./GithubIcon.astro";
25
28
  export { default as GlobeIcon } from "./GlobeIcon.astro";
26
29
  export { default as HeartIcon } from "./HeartIcon.astro";
@@ -1,7 +1,4 @@
1
1
  ---
2
-
3
-
4
-
5
2
  /**
6
3
  * @component MacWindow
7
4
  *
@@ -127,11 +124,10 @@ const headerClass = cn()
127
124
  .left(0)
128
125
  .right(0)
129
126
  .flex()
127
+ .roundedTop('2xl')
130
128
  .items('center')
131
129
  .h(12)
132
130
  .px(4)
133
- .border()
134
- .borderColor('base-300')
135
131
  .add(headerBgClass) // 保留:动态类名
136
132
  .build();
137
133
 
@@ -144,18 +140,9 @@ const buttonClass = cn()
144
140
  .transition('opacity')
145
141
  .build();
146
142
 
147
- const titleClass = cn()
148
- .ml(6)
149
- .text('sm')
150
- .medium()
151
- .color('base-content')
152
- .build();
143
+ const titleClass = cn().ml(6).text('sm').medium().color('base-content').build();
153
144
 
154
- const tabsContainerClass = cn()
155
- .flex1()
156
- .flex()
157
- .justify('center')
158
- .build();
145
+ const tabsContainerClass = cn().flex1().flex().justify('center').build();
159
146
 
160
147
  const tabsWrapperClass = cn()
161
148
  .add('cosy:inline-flex') // 保留:inline-flex 暂不支持
@@ -183,19 +170,9 @@ const getTabButtonClass = (isActive: boolean) =>
183
170
  )
184
171
  .build();
185
172
 
186
- const toolbarClass = cn()
187
- .ml('auto')
188
- .flex()
189
- .items('center')
190
- .spaceX(2)
191
- .build();
173
+ const toolbarClass = cn().ml('auto').flex().items('center').spaceX(2).build();
192
174
 
193
- const mainContentClass = cn()
194
- .flex1()
195
- .flex('col')
196
- .pt(12)
197
- .h('full')
198
- .build();
175
+ const mainContentClass = cn().flex1().flex('col').pt(12).h('full').build();
199
176
 
200
177
  const contentWrapperClass = cn()
201
178
  .flex()
@@ -216,11 +193,7 @@ const statusBarClass = cn()
216
193
  .add(statusBgClass) // 保留:动态类名
217
194
  .build();
218
195
 
219
- const statusContentClass = cn()
220
- .flex()
221
- .items('center')
222
- .spaceX(2)
223
- .build();
196
+ const statusContentClass = cn().flex().items('center').spaceX(2).build();
224
197
  ---
225
198
 
226
199
  <Container
@@ -232,7 +205,7 @@ const statusContentClass = cn()
232
205
  class={containerClass}
233
206
  data-window-id={windowId}>
234
207
  <!-- 窗口控制按钮 -->
235
- <div class={headerClass}>
208
+ <div class={headerClass} aria-label="MacWindow-Header">
236
209
  <div class="cosy:flex cosy:items-center cosy:space-x-2">
237
210
  <div
238
211
  class={cn().add(buttonClass).bg('error').build()}