@chai-ui/vue 0.0.0-stage → 0.7.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.
Files changed (88) hide show
  1. package/DESIGN.md +235 -0
  2. package/LICENSE +21 -0
  3. package/README.md +122 -2
  4. package/dist/ChaiProvider.vue.d.ts +24 -0
  5. package/dist/ChaiProvider.vue.d.ts.map +1 -0
  6. package/dist/Composer.vue.d.ts +94 -0
  7. package/dist/Composer.vue.d.ts.map +1 -0
  8. package/dist/EditCard.vue.d.ts +38 -0
  9. package/dist/EditCard.vue.d.ts.map +1 -0
  10. package/dist/MediaAnalyzer.vue.d.ts +54 -0
  11. package/dist/MediaAnalyzer.vue.d.ts.map +1 -0
  12. package/dist/PageSlide.vue.d.ts +23 -0
  13. package/dist/PageSlide.vue.d.ts.map +1 -0
  14. package/dist/ResultCard.vue.d.ts +29 -0
  15. package/dist/ResultCard.vue.d.ts.map +1 -0
  16. package/dist/composer/AttachMenu.vue.d.ts +17 -0
  17. package/dist/composer/AttachMenu.vue.d.ts.map +1 -0
  18. package/dist/composer/Chip.vue.d.ts +14 -0
  19. package/dist/composer/Chip.vue.d.ts.map +1 -0
  20. package/dist/dismiss.d.ts +4 -0
  21. package/dist/dismiss.d.ts.map +1 -0
  22. package/dist/edit-card/ExpandedImage.vue.d.ts +12 -0
  23. package/dist/edit-card/ExpandedImage.vue.d.ts.map +1 -0
  24. package/dist/edit-card/RegionShape.vue.d.ts +20 -0
  25. package/dist/edit-card/RegionShape.vue.d.ts.map +1 -0
  26. package/dist/icons.d.ts +43 -0
  27. package/dist/icons.d.ts.map +1 -0
  28. package/dist/index.d.ts +16 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +2521 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/page-slide.d.ts +31 -0
  33. package/dist/page-slide.d.ts.map +1 -0
  34. package/dist/primitives/Pagination.vue.d.ts +26 -0
  35. package/dist/primitives/Pagination.vue.d.ts.map +1 -0
  36. package/dist/primitives/SearchMenu.vue.d.ts +51 -0
  37. package/dist/primitives/SearchMenu.vue.d.ts.map +1 -0
  38. package/dist/primitives/Toggle.vue.d.ts +16 -0
  39. package/dist/primitives/Toggle.vue.d.ts.map +1 -0
  40. package/dist/primitives/search-menu.d.ts +19 -0
  41. package/dist/primitives/search-menu.d.ts.map +1 -0
  42. package/dist/reasoning.d.ts +6 -0
  43. package/dist/reasoning.d.ts.map +1 -0
  44. package/dist/result-card/IconButton.vue.d.ts +21 -0
  45. package/dist/result-card/IconButton.vue.d.ts.map +1 -0
  46. package/dist/result-card/MoreMenu.vue.d.ts +13 -0
  47. package/dist/result-card/MoreMenu.vue.d.ts.map +1 -0
  48. package/dist/result-card/ResultMedia.vue.d.ts +28 -0
  49. package/dist/result-card/ResultMedia.vue.d.ts.map +1 -0
  50. package/dist/result-card/ResultText.vue.d.ts +8 -0
  51. package/dist/result-card/ResultText.vue.d.ts.map +1 -0
  52. package/dist/result-card/VideoPlayer.vue.d.ts +18 -0
  53. package/dist/result-card/VideoPlayer.vue.d.ts.map +1 -0
  54. package/dist/result-card/types.d.ts +9 -0
  55. package/dist/result-card/types.d.ts.map +1 -0
  56. package/dist/style.css +2378 -0
  57. package/dist/useComposer.d.ts +22 -0
  58. package/dist/useComposer.d.ts.map +1 -0
  59. package/dist/useMediaAnalyzer.d.ts +17 -0
  60. package/dist/useMediaAnalyzer.d.ts.map +1 -0
  61. package/package.json +79 -3
  62. package/src/ChaiProvider.vue +26 -0
  63. package/src/Composer.vue +372 -0
  64. package/src/EditCard.vue +520 -0
  65. package/src/MediaAnalyzer.vue +216 -0
  66. package/src/PageSlide.vue +36 -0
  67. package/src/ResultCard.vue +297 -0
  68. package/src/composer/AttachMenu.vue +66 -0
  69. package/src/composer/Chip.vue +26 -0
  70. package/src/dismiss.ts +22 -0
  71. package/src/edit-card/ExpandedImage.vue +39 -0
  72. package/src/edit-card/RegionShape.vue +39 -0
  73. package/src/icons.ts +55 -0
  74. package/src/index.ts +77 -0
  75. package/src/page-slide.ts +32 -0
  76. package/src/primitives/Pagination.vue +76 -0
  77. package/src/primitives/SearchMenu.vue +167 -0
  78. package/src/primitives/Toggle.vue +23 -0
  79. package/src/primitives/search-menu.ts +20 -0
  80. package/src/reasoning.ts +10 -0
  81. package/src/result-card/IconButton.vue +18 -0
  82. package/src/result-card/MoreMenu.vue +35 -0
  83. package/src/result-card/ResultMedia.vue +77 -0
  84. package/src/result-card/ResultText.vue +37 -0
  85. package/src/result-card/VideoPlayer.vue +90 -0
  86. package/src/result-card/types.ts +10 -0
  87. package/src/useComposer.ts +38 -0
  88. package/src/useMediaAnalyzer.ts +33 -0
@@ -0,0 +1,19 @@
1
+ export interface SearchMenuOption {
2
+ id: string;
3
+ /** Shown on the trigger once selected, and searched. Keep it the short name. */
4
+ label: string;
5
+ /** Shown in the option row instead of `label`, e.g. "Terse (short)". */
6
+ rowLabel?: string;
7
+ }
8
+ /** One labeled group of options, under its own header with a divider before the next. */
9
+ export interface SearchMenuSection<T extends SearchMenuOption> {
10
+ label: string;
11
+ options: T[];
12
+ }
13
+ /** A toggle pinned above every group, e.g. "Auto-select model". While on, the rows are disabled but keep their check. */
14
+ export interface SearchMenuToggleHeader {
15
+ label: string;
16
+ value: boolean;
17
+ onChange: (next: boolean) => void;
18
+ }
19
+ //# sourceMappingURL=search-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-menu.d.ts","sourceRoot":"","sources":["../../src/primitives/search-menu.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yFAAyF;AACzF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,gBAAgB;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,yHAAyH;AACzH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC"}
@@ -0,0 +1,6 @@
1
+ import { type ComputedRef, type InjectionKey } from "vue";
2
+ import type { Reasoning } from "@chai-ui/core";
3
+ export declare const reasoningKey: InjectionKey<ComputedRef<Reasoning>>;
4
+ /** The nearest `ChaiProvider`'s reasoning engine and models; `undefined` outside one. */
5
+ export declare function useReasoning(): ComputedRef<Reasoning | undefined>;
6
+ //# sourceMappingURL=reasoning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../src/reasoning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAA4B,CAAC;AAE3F,yFAAyF;AACzF,wBAAgB,YAAY,IAAI,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAGjE"}
@@ -0,0 +1,21 @@
1
+ /** The card's small icon buttons, with the hover circle: in a dark group along the top, in the light pill, or the round button on the right. */
2
+ type __VLS_Props = {
3
+ variant: "top" | "pill" | "round";
4
+ label: string;
5
+ active?: boolean;
6
+ disabled?: boolean;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
21
+ //# sourceMappingURL=IconButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.vue.d.ts","sourceRoot":"","sources":["../../src/result-card/IconButton.vue"],"names":[],"mappings":"AAqBA,gJAAgJ;AAChJ,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA6B9G,QAAA,IAAI,OAAO,IAAW,CAAC;AACvB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ResultCardMoreAction } from "./types.js";
2
+ type __VLS_Props = {
3
+ actions: ResultCardMoreAction[];
4
+ disabled?: boolean;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ select: (action: ResultCardMoreAction) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onSelect?: ((action: ResultCardMoreAction) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ //# sourceMappingURL=MoreMenu.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoreMenu.vue.d.ts","sourceRoot":"","sources":["../../src/result-card/MoreMenu.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA0H3E,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,28 @@
1
+ import type { Result } from "@chai-ui/core";
2
+ type __VLS_Props = {
3
+ result: Result;
4
+ alt: string;
5
+ disabled?: boolean;
6
+ mediaExpanded: boolean;
7
+ linkCopied: boolean;
8
+ videoTime: {
9
+ current: number;
10
+ };
11
+ videoWasPlaying: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ download: () => any;
15
+ share: () => any;
16
+ dimensions: (width: number, height: number) => any;
17
+ expand: () => any;
18
+ videoPlayingChange: (playing: boolean) => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onDownload?: (() => any) | undefined;
21
+ onShare?: (() => any) | undefined;
22
+ onDimensions?: ((width: number, height: number) => any) | undefined;
23
+ onExpand?: (() => any) | undefined;
24
+ onVideoPlayingChange?: ((playing: boolean) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ //# sourceMappingURL=ResultMedia.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultMedia.vue.d.ts","sourceRoot":"","sources":["../../src/result-card/ResultMedia.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAM5C,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAsUF,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ text: string;
3
+ streaming: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ //# sourceMappingURL=ResultText.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultText.vue.d.ts","sourceRoot":"","sources":["../../src/result-card/ResultText.vue"],"names":[],"mappings":"AAgDA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC;AA0CxD,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ src: string;
3
+ expanded?: boolean;
4
+ time: {
5
+ current: number;
6
+ };
7
+ wasPlaying: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ playingChange: (playing: boolean) => any;
11
+ dimensions: (width: number, height: number) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onPlayingChange?: ((playing: boolean) => any) | undefined;
14
+ onDimensions?: ((width: number, height: number) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ //# sourceMappingURL=VideoPlayer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoPlayer.vue.d.ts","sourceRoot":"","sources":["../../src/result-card/VideoPlayer.vue"],"names":[],"mappings":"AAsGA,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAmIvG,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,9 @@
1
+ import type { Component } from "vue";
2
+ /** One row in the "more" (⋯) menu, for app-specific actions (e.g. "Flag content"). Each one just emits `action` with this `id`. */
3
+ export interface ResultCardMoreAction {
4
+ id: string;
5
+ label: string;
6
+ icon?: Component;
7
+ }
8
+ export type ResultCardVote = "like" | "dislike" | null;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/result-card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,mIAAmI;AACnI,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC"}