@prefecthq/prefect-ui-library 2.4.30 → 2.4.32

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 (26) hide show
  1. package/dist/{FlowRunsPageWithDefaultFilter-8k2iODgc.mjs → FlowRunsPageWithDefaultFilter-h3yilDq9.mjs} +2 -2
  2. package/dist/{FlowRunsPageWithDefaultFilter-8k2iODgc.mjs.map → FlowRunsPageWithDefaultFilter-h3yilDq9.mjs.map} +1 -1
  3. package/dist/{index-YHEENGp-.mjs → index-G8ZXHlz0.mjs} +15506 -14996
  4. package/dist/index-G8ZXHlz0.mjs.map +1 -0
  5. package/dist/prefect-ui-library.mjs +541 -540
  6. package/dist/prefect-ui-library.umd.js +82 -82
  7. package/dist/prefect-ui-library.umd.js.map +1 -1
  8. package/dist/types/src/index.d.ts +1 -0
  9. package/dist/types/src/schemas/components/SchemaForm.vue.d.ts +23 -0
  10. package/dist/types/src/schemas/components/SchemaFormKindInput.vue.d.ts +23 -0
  11. package/dist/types/src/schemas/components/SchemaFormProperties.vue.d.ts +25 -0
  12. package/dist/types/src/schemas/components/SchemaFormProperty.vue.d.ts +25 -0
  13. package/dist/types/src/schemas/components/SchemaFormPropertyAllOf.vue.d.ts +26 -0
  14. package/dist/types/src/schemas/components/SchemaFormPropertyAnyOf.vue.d.ts +26 -0
  15. package/dist/types/src/schemas/components/SchemaFormPropertyBlockDocument.vue.d.ts +24 -0
  16. package/dist/types/src/schemas/components/SchemaFormPropertyInput.vue.d.ts +23 -0
  17. package/dist/types/src/schemas/compositions/useSchema.d.ts +4 -0
  18. package/dist/types/src/schemas/index.d.ts +2 -0
  19. package/dist/types/src/schemas/types/schema.d.ts +33 -0
  20. package/dist/types/src/schemas/types/schemaValues.d.ts +34 -0
  21. package/dist/types/src/schemas/utilities/definitions.d.ts +2 -0
  22. package/dist/types/src/schemas/utilities/properties.d.ts +15 -0
  23. package/dist/types/src/types/utilities.d.ts +3 -0
  24. package/dist/types/src/utilities/types.d.ts +1 -0
  25. package/package.json +3 -3
  26. package/dist/index-YHEENGp-.mjs.map +0 -1
@@ -10,6 +10,7 @@ export * from './router';
10
10
  export * from './services';
11
11
  export * from './types';
12
12
  export * from './utilities';
13
+ export * from './schemas';
13
14
  import '@/styles/style.css';
14
15
  import { Plugin } from 'vue';
15
16
  declare const plugin: Plugin;
@@ -0,0 +1,23 @@
1
+ import { Schema } from '../../schemas/types/schema';
2
+ import { SchemaValues } from '../../schemas/types/schemaValues';
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
+ schema: Schema;
5
+ values: SchemaValues;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:values": (args_0: SchemaValues) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ schema: Schema;
10
+ values: SchemaValues;
11
+ }>>> & {
12
+ "onUpdate:values"?: ((args_0: SchemaValues) => any) | undefined;
13
+ }, {}, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -0,0 +1,23 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { PrefectKindValue } from '../../schemas/types/schemaValues';
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
+ property: SchemaProperty;
5
+ value: PrefectKindValue;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:value": (args_0: PrefectKindValue) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ property: SchemaProperty;
10
+ value: PrefectKindValue;
11
+ }>>> & {
12
+ "onUpdate:value"?: ((args_0: PrefectKindValue) => any) | undefined;
13
+ }, {}, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -0,0 +1,25 @@
1
+ import { SchemaProperty, SchemaProperties } from '../../schemas/types/schema';
2
+ import { SchemaValues } from '../../schemas/types/schemaValues';
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
+ parent: SchemaProperty;
5
+ properties: SchemaProperties;
6
+ values: SchemaValues;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:values": (args_0: SchemaValues) => void;
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ parent: SchemaProperty;
11
+ properties: SchemaProperties;
12
+ values: SchemaValues;
13
+ }>>> & {
14
+ "onUpdate:values"?: ((args_0: SchemaValues) => any) | undefined;
15
+ }, {}, {}>;
16
+ export default _default;
17
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
@@ -0,0 +1,25 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { SchemaValue } from '../../schemas/types/schemaValues';
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
+ property: SchemaProperty;
5
+ value: SchemaValue;
6
+ required: boolean;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:value": (args_0: unknown) => void;
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ property: SchemaProperty;
11
+ value: SchemaValue;
12
+ required: boolean;
13
+ }>>> & {
14
+ "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
15
+ }, {}, {}>;
16
+ export default _default;
17
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
@@ -0,0 +1,26 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { SchemaValue } from '../../schemas/types/schemaValues';
3
+ import { Require } from '../../types/utilities';
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
5
+ property: Require<SchemaProperty, 'allOf'>;
6
+ value: SchemaValue;
7
+ required: boolean;
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:value": (args_0: unknown) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ property: Require<SchemaProperty, 'allOf'>;
12
+ value: SchemaValue;
13
+ required: boolean;
14
+ }>>> & {
15
+ "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
16
+ }, {}, {}>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
@@ -0,0 +1,26 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { SchemaValue } from '../../schemas/types/schemaValues';
3
+ import { Require } from '../../types/utilities';
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
5
+ property: Require<SchemaProperty, 'anyOf'>;
6
+ value: SchemaValue;
7
+ required: boolean;
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:value": (args_0: unknown) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ property: Require<SchemaProperty, 'anyOf'>;
12
+ value: SchemaValue;
13
+ required: boolean;
14
+ }>>> & {
15
+ "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
16
+ }, {}, {}>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
@@ -0,0 +1,24 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { BlockDocumentReferenceValue } from '../../schemas/types/schemaValues';
3
+ import { Require } from '../../types/utilities';
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
5
+ property: Require<SchemaProperty, 'block_type_slug'>;
6
+ value: BlockDocumentReferenceValue | null | undefined;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:value": (args_0: BlockDocumentReferenceValue | null | undefined) => void;
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ property: Require<SchemaProperty, 'block_type_slug'>;
11
+ value: BlockDocumentReferenceValue | null | undefined;
12
+ }>>> & {
13
+ "onUpdate:value"?: ((args_0: BlockDocumentReferenceValue | null | undefined) => any) | undefined;
14
+ }, {}, {}>;
15
+ export default _default;
16
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ type __VLS_TypePropsToRuntimeProps<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
@@ -0,0 +1,23 @@
1
+ import { SchemaProperty } from '../../schemas/types/schema';
2
+ import { SchemaValue } from '../../schemas/types/schemaValues';
3
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
+ property: SchemaProperty;
5
+ value: SchemaValue;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:value": (args_0: unknown) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ property: SchemaProperty;
10
+ value: SchemaValue;
11
+ }>>> & {
12
+ "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
13
+ }, {}, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -0,0 +1,4 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { Schema } from '../../schemas/types/schema';
3
+ export declare const schemaInjectionKey: InjectionKey<Schema>;
4
+ export declare function useSchema(): Schema;
@@ -0,0 +1,2 @@
1
+ import SchemaForm from '../schemas/components/SchemaForm.vue';
2
+ export { SchemaForm as SchemaFormV2 };
@@ -0,0 +1,33 @@
1
+ import { Simplify } from '../../types/utilities';
2
+ export declare const schemaTypes: readonly ["null", "string", "boolean", "integer", "number", "array", "object"], isSchemaType: (value: unknown) => value is "string" | "number" | "boolean" | "object" | "null" | "integer" | "array";
3
+ export type SchemaPropertyType = typeof schemaTypes[number];
4
+ export declare function isSchemaPropertyType<T extends SchemaPropertyType | undefined>(value: unknown, type: T): value is T;
5
+ export declare const schemaStringFormat: readonly ["date", "date-time", "regex", "password"], isSchemaStringFormat: (value: unknown) => value is "date" | "regex" | "date-time" | "password";
6
+ export type SchemaStringFormat = typeof schemaStringFormat[number];
7
+ export type SchemaPropertiesResponse = Record<string, SchemaPropertyResponse>;
8
+ export type SchemaDefinitionsResponse = Record<string, SchemaPropertyResponse>;
9
+ export type SchemaDefinition = `#/definitions/${string}`;
10
+ export type SchemaPropertyResponse = {
11
+ position?: number;
12
+ block_type_slug?: string;
13
+ $ref?: SchemaDefinition;
14
+ anyOf?: SchemaPropertyResponse[];
15
+ allOf?: SchemaPropertyResponse[];
16
+ example?: string;
17
+ default?: unknown;
18
+ description?: string;
19
+ enum?: unknown[];
20
+ format?: SchemaStringFormat;
21
+ items?: SchemaPropertyResponse;
22
+ properties?: SchemaPropertiesResponse;
23
+ required?: string[];
24
+ title?: string;
25
+ type?: SchemaPropertyType;
26
+ };
27
+ export declare function isPropertyWith<TKey extends keyof SchemaProperty>(value: SchemaProperty, property: TKey): value is Simplify<SchemaProperty & Required<Pick<SchemaProperty, TKey>>>;
28
+ export type SchemaResponse = SchemaPropertyResponse & {
29
+ definitions?: SchemaDefinitionsResponse;
30
+ };
31
+ export type SchemaProperties = SchemaPropertiesResponse;
32
+ export type SchemaProperty = SchemaPropertyResponse;
33
+ export type Schema = SchemaResponse;
@@ -0,0 +1,34 @@
1
+ import { Simplify } from '../../types/utilities';
2
+ export type SchemaValue = unknown;
3
+ export type SchemaValues = Record<string, SchemaValue>;
4
+ export declare const prefectKinds: readonly [null, "json", "jinja", "workspace_variable"], isPrefectKind: (value: unknown) => value is "json" | "jinja" | "workspace_variable" | null;
5
+ export type PrefectKind = typeof prefectKinds[number];
6
+ type BasePrefectKindValue<TKind extends PrefectKind = PrefectKind, TRest extends Record<string, unknown> = Record<string, unknown>> = {
7
+ __prefect_kind: TKind;
8
+ } & TRest;
9
+ export type PrefectKindValue = PrefectKindNull | PrefectKindJinja | PrefectKindJson | PrefectKindWorkspaceVariable;
10
+ export declare function isPrefectKindValue<T extends PrefectKind = PrefectKind>(value: unknown, kind?: T): value is Simplify<PrefectKindValue & {
11
+ __prefect_kind: T;
12
+ }>;
13
+ export type PrefectKindNull = BasePrefectKindValue<null, {
14
+ value: unknown;
15
+ }>;
16
+ export declare function isPrefectKindNull(value: unknown): value is PrefectKindNull;
17
+ export type PrefectKindJson = BasePrefectKindValue<'json', {
18
+ value: string;
19
+ }>;
20
+ export declare function isPrefectKindJson(value: unknown): value is PrefectKindJson;
21
+ export type PrefectKindJinja = BasePrefectKindValue<'jinja', {
22
+ template: string;
23
+ }>;
24
+ export declare function isPrefectKindJinja(value: unknown): value is PrefectKindJinja;
25
+ export type PrefectKindWorkspaceVariable = BasePrefectKindValue<'workspace_variable', {
26
+ variable_name: string;
27
+ }>;
28
+ export declare function isPrefectKindWorkspaceVariable(value: unknown): value is PrefectKindWorkspaceVariable;
29
+ export type BlockDocumentReferenceValue = {
30
+ $ref: string;
31
+ };
32
+ export declare function isBlockDocumentReferenceValue(value: unknown): value is BlockDocumentReferenceValue;
33
+ export declare function asBlockDocumentReferenceValue(value: unknown): BlockDocumentReferenceValue | null;
34
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Schema, SchemaDefinition, SchemaProperty } from '../../schemas/types/schema';
2
+ export declare function getSchemaDefinition(schema: Schema, definition: SchemaDefinition): SchemaProperty;
@@ -0,0 +1,15 @@
1
+ import { Schema, SchemaProperty, SchemaPropertyType } from '../../schemas/types/schema';
2
+ import { SchemaValue } from '../../schemas/types/schemaValues';
3
+ import { Require } from '../../types/utilities';
4
+ import { CreateApi } from '../../utilities/api';
5
+ export declare function getSchemaPropertyTypeLabel(type: SchemaPropertyType | undefined): string;
6
+ export declare function getSchemaPropertyLabel(property: SchemaProperty): string;
7
+ export declare function getSchemaPropertyAllOfDefinitions(property: Require<SchemaProperty, 'anyOf'>, schema: Schema): SchemaProperty[];
8
+ type InitialIndexContext = {
9
+ property: Require<SchemaProperty, 'anyOf'>;
10
+ value: SchemaValue;
11
+ schema: Schema;
12
+ api: CreateApi;
13
+ };
14
+ export declare function getInitialIndexForSchemaPropertyAnyOfValue({ value, property, schema, api }: InitialIndexContext): Promise<number>;
15
+ export {};
@@ -5,3 +5,6 @@ export type Require<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
5
5
  export type AnyCase<T extends string> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? (`${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}`) : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : '';
6
6
  export type NumberRange<N extends number, M extends number, Result extends unknown[] = [N]> = (Result['length'] extends M ? [...Result, M] : NumberRange<N, M, [...Result, Result['length']]>);
7
7
  export type MaybeArray<T> = T | T[];
8
+ export type Simplify<T> = {
9
+ [K in keyof T]: T[K];
10
+ } & {};
@@ -0,0 +1 @@
1
+ export declare function asType<T extends () => unknown>(value: unknown, type: T): ReturnType<T> | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "2.4.30",
3
+ "version": "2.4.32",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "@types/lodash.camelcase": "4.3.9",
44
44
  "@types/lodash.debounce": "4.0.9",
45
45
  "@types/lodash.merge": "4.6.9",
46
- "@types/node": "^20.11.5",
46
+ "@types/node": "^20.11.10",
47
47
  "@types/prismjs": "^1.26.3",
48
48
  "@vitejs/plugin-vue": "5.0.3",
49
49
  "auto-changelog": "^2.4.0",
@@ -57,7 +57,7 @@
57
57
  "typescript": "5.3.3",
58
58
  "vite": "5.0.12",
59
59
  "vite-svg-loader": "^5.1.0",
60
- "vitest": "^1.2.1",
60
+ "vitest": "^1.2.2",
61
61
  "vue-tsc": "1.8.27"
62
62
  },
63
63
  "peerDependencies": {