@useinsider/ab-components 0.0.113 → 0.0.116-beta.7

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/dist/index.d.ts CHANGED
@@ -10,8 +10,10 @@ import { CSSProperties } from 'vue';
10
10
  import { DebuggerEvent } from 'vue';
11
11
  import { DefineComponent } from 'vue';
12
12
  import { DirectiveBinding } from 'vue';
13
+ import { editor } from 'monaco-editor';
13
14
  import { GlobalComponents } from 'vue';
14
15
  import { GlobalDirectives } from 'vue';
16
+ import { monacoEditor } from 'monaco-editor';
15
17
  import { nextTick } from 'vue';
16
18
  import { OnCleanup } from '@vue/reactivity';
17
19
  import { Placement } from '@floating-ui/vue';
@@ -227,6 +229,7 @@ declare type __VLS_Props = {
227
229
  preventXss?: boolean;
228
230
  iconName?: IconNames;
229
231
  hideDelay?: number;
232
+ showDelay?: number;
230
233
  };
231
234
 
232
235
  declare function __VLS_template(): {
@@ -1057,6 +1060,11 @@ declare interface InToggleProps {
1057
1060
  disabled?: boolean;
1058
1061
  }
1059
1062
 
1063
+ export declare interface LiquidVariable {
1064
+ key: string;
1065
+ displayName?: string;
1066
+ }
1067
+
1060
1068
  export declare interface MenuItem {
1061
1069
  text: string;
1062
1070
  value: string;
@@ -1078,6 +1086,59 @@ declare interface ModalProps {
1078
1086
  hasOverlay?: boolean;
1079
1087
  }
1080
1088
 
1089
+ export declare const MonacoEditor: DefineComponent<MonacoEditorProps, {
1090
+ getCode: () => Promise<{
1091
+ code: string;
1092
+ valid: boolean;
1093
+ }>;
1094
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1095
+ "update:codeEditorLength": (length: number) => any;
1096
+ "update:shouldShowLengthError": (show: boolean) => any;
1097
+ "update:valid": (valid: boolean) => any;
1098
+ ready: (editor: editor.IStandaloneCodeEditor) => any;
1099
+ destroyed: () => any;
1100
+ }, string, PublicProps, Readonly<MonacoEditorProps> & Readonly<{
1101
+ "onUpdate:codeEditorLength"?: ((length: number) => any) | undefined;
1102
+ "onUpdate:shouldShowLengthError"?: ((show: boolean) => any) | undefined;
1103
+ "onUpdate:valid"?: ((valid: boolean) => any) | undefined;
1104
+ onReady?: ((editor: editor.IStandaloneCodeEditor) => any) | undefined;
1105
+ onDestroyed?: (() => any) | undefined;
1106
+ }>, {
1107
+ code: string;
1108
+ placeholder: string;
1109
+ language: keyof ReturnType<typeof useValidators>;
1110
+ disableValidation: boolean;
1111
+ liquidVariables: LiquidVariable[];
1112
+ editorOptions: editor.IStandaloneEditorConstructionOptions;
1113
+ errorGlyph: boolean;
1114
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
1115
+ iframe: HTMLIFrameElement;
1116
+ }, HTMLIFrameElement>;
1117
+
1118
+ export declare interface MonacoEditorProps {
1119
+ language?: keyof ReturnType<typeof useValidators>;
1120
+ code?: string;
1121
+ disableValidation?: boolean;
1122
+ /**
1123
+ * Absolute URL to the served Monaco `vs` directory. The consuming app must
1124
+ * host these assets. When omitted, falls back to the current origin + `/vs`.
1125
+ */
1126
+ monacoVsPath?: string;
1127
+ /**
1128
+ * Dynamic variables suggested by autocomplete when `language` is `liquid`.
1129
+ */
1130
+ liquidVariables?: LiquidVariable[];
1131
+ /**
1132
+ * Per-consumer Monaco options merged over the shared defaults (e.g. disabling
1133
+ * the minimap). `language`/`value` are always owned by the component.
1134
+ */
1135
+ editorOptions?: editor.IStandaloneEditorConstructionOptions;
1136
+ /** Render the custom error icon (gutter) + hover infobox. Off by default. */
1137
+ errorGlyph?: boolean;
1138
+ /** Dimmed text shown over the editor while it is empty. */
1139
+ placeholder?: string;
1140
+ }
1141
+
1081
1142
  export declare const NumberInput: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1082
1143
  input: (event: Event) => any;
1083
1144
  blur: (event: FocusEvent) => any;
@@ -1358,4 +1419,26 @@ declare interface TypographyProps {
1358
1419
 
1359
1420
  declare type TypographyVariant = 'heading' | 'title' | 'body' | 'body-default' | 'body-muted' | 'label' | 'detail' | 'detail-muted' | 'detail-danger' | 'section';
1360
1421
 
1422
+ declare function useValidators(): {
1423
+ javascript(editor: editor, monaco: monacoEditor): Promise<{
1424
+ valid: boolean;
1425
+ results: editor[];
1426
+ }>;
1427
+ html(editor: editor, monaco: monacoEditor): Promise<{
1428
+ valid: boolean;
1429
+ results: never[];
1430
+ } | {
1431
+ valid: false;
1432
+ results: editor[];
1433
+ }>;
1434
+ css(editor: editor, monaco: monacoEditor): Promise<{
1435
+ valid: boolean;
1436
+ results: editor[];
1437
+ }>;
1438
+ liquid(editor: editor, monaco: monacoEditor, knownKeys?: string[] | undefined): Promise<{
1439
+ valid: boolean;
1440
+ results: editor[];
1441
+ }>;
1442
+ };
1443
+
1361
1444
  export { }