From 8fc6d55beb1c993f03007a2df8333c03be0e2948 Mon Sep 17 00:00:00 2001 From: aabidsofi19 Date: Sat, 28 Sep 2024 15:46:20 +0530 Subject: [PATCH] update styles Signed-off-by: aabidsofi19 --- schemas/constructs/core.json | 8 ++++-- .../constructs/v1alpha3/relationship.d.ts | 5 ++-- typescript/constructs/v1beta1/component.d.ts | 19 ++++++++++++- typescript/constructs/v1beta1/designs.d.ts | 28 ++++++++++++++++--- 4 files changed, 51 insertions(+), 9 deletions(-) diff --git a/schemas/constructs/core.json b/schemas/constructs/core.json index 5073811a33..10d24a7cae 100644 --- a/schemas/constructs/core.json +++ b/schemas/constructs/core.json @@ -40,7 +40,7 @@ "styles": { "type": "object", "description": "Common styles for all entities", - "additionalProperties": false, + "additionalProperties": true, "required": ["primaryColor", "svgColor", "svgWhite"], "properties": { "primaryColor": { @@ -107,6 +107,10 @@ "label": { "type": "string", "description": "The text to display for an element\u2019s label. Can give a path, e.g. data(id) will label with the elements id" + }, + "animation": { + "type": "string", + "description": "The animation to apply to the element. example ripple,bounce,etc " } } }, @@ -282,7 +286,7 @@ "x": { "type": "number", "description": "The x-coordinate of the node.", - "x-go-type": "float64" + "x-go-type": "float64" }, "y": { "type": "number", diff --git a/typescript/constructs/v1alpha3/relationship.d.ts b/typescript/constructs/v1alpha3/relationship.d.ts index 0250f9d7db..e4d0d798e6 100644 --- a/typescript/constructs/v1alpha3/relationship.d.ts +++ b/typescript/constructs/v1alpha3/relationship.d.ts @@ -37,7 +37,7 @@ export interface HttpsSchemasMesheryIoRelationshipJson { /** * Status of the relationship. */ - status?: "ignored" | "enabled" | "deleted"; + status?: "pending" | "approved" | "ignored" | "enabled" | "deleted"; /** * Optional. Assigns the policy to be used for the evaluation of the relationship. Deprecation Notice: In the future, this property is either to be removed or to it is to be an array of optional policy $refs. */ @@ -803,7 +803,8 @@ export interface HttpsSchemasMesheryIoCapabilityJson { /** * Most granular unit of capability classification. The combination of Kind, Type and SubType together uniquely identify a Capability. */ - subType?: string; + subType?: ("inventory" | "matchLabels" | "permission" | "network" | "firewall" | "mount" | "alias" | "annotation") & + string; /** * Key that backs the capability. */ diff --git a/typescript/constructs/v1beta1/component.d.ts b/typescript/constructs/v1beta1/component.d.ts index b4b338a5c2..d4be32ede4 100644 --- a/typescript/constructs/v1beta1/component.d.ts +++ b/typescript/constructs/v1beta1/component.d.ts @@ -219,6 +219,18 @@ export type ComponentStyles = Styles & { * An array (or a space-separated string) of numbers ranging on [-1, 1], representing alternating x and y values (i.e. x1 y1 x2 y2, x3 y3 ...). This represents the points in the polygon for the node’s shape. The bounding box of the node is given by (-1, -1), (1, -1), (1, 1), (-1, 1). The node’s position is the origin (0, 0 ) */ "shape-polygon-points"?: string; + /** + * The colour of the background of the component menu. Colours may be specified by name (e.g. red), hex (e.g. #ff0000 or #f00), RGB (e.g. rgb(255, 0, 0)), or HSL (e.g. hsl(0, 100%, 50%)). + */ + "menu-background-color"?: string; + /** + * The opacity of the background of the component menu. + */ + "menu-background-opacity"?: number; + /** + * The colour of the text or icons in the component menu. Colours may be specified by name (e.g. red), hex (e.g. #ff0000 or #f00), RGB (e.g. rgb(255, 0, 0)), or HSL (e.g. hsl(0, 100%, 50%)). + */ + "menu-forground-color"?: string; [k: string]: unknown; }; @@ -263,7 +275,7 @@ export interface HttpsSchemasMesheryIoComponentJson { * - enabled: model is available for use for all users of this Meshery Server. * - ignored: model is unavailable for use for all users of this Meshery Server. */ - status?: "ignored" | "enabled" | "duplicate"; + status?: "ignored" | "enabled" | "duplicate" | "resolved" | "open"; /** * Metadata contains additional information associated with the component. */ @@ -577,4 +589,9 @@ export interface Styles { * The text to display for an element’s label. Can give a path, e.g. data(id) will label with the elements id */ label?: string; + /** + * The animation to apply to the element. example ripple,bounce,etc + */ + animation?: string; + [k: string]: unknown; } diff --git a/typescript/constructs/v1beta1/designs.d.ts b/typescript/constructs/v1beta1/designs.d.ts index 0ee17078a3..3838502cc9 100644 --- a/typescript/constructs/v1beta1/designs.d.ts +++ b/typescript/constructs/v1beta1/designs.d.ts @@ -219,6 +219,18 @@ export type ComponentStyles = Styles & { * An array (or a space-separated string) of numbers ranging on [-1, 1], representing alternating x and y values (i.e. x1 y1 x2 y2, x3 y3 ...). This represents the points in the polygon for the node’s shape. The bounding box of the node is given by (-1, -1), (1, -1), (1, 1), (-1, 1). The node’s position is the origin (0, 0 ) */ "shape-polygon-points"?: string; + /** + * The colour of the background of the component menu. Colours may be specified by name (e.g. red), hex (e.g. #ff0000 or #f00), RGB (e.g. rgb(255, 0, 0)), or HSL (e.g. hsl(0, 100%, 50%)). + */ + "menu-background-color"?: string; + /** + * The opacity of the background of the component menu. + */ + "menu-background-opacity"?: number; + /** + * The colour of the text or icons in the component menu. Colours may be specified by name (e.g. red), hex (e.g. #ff0000 or #f00), RGB (e.g. rgb(255, 0, 0)), or HSL (e.g. hsl(0, 100%, 50%)). + */ + "menu-forground-color"?: string; [k: string]: unknown; }; @@ -255,7 +267,9 @@ export interface DesignSchema { /** * List of available layers */ - layers: string[]; + layers: { + [k: string]: unknown; + }; [k: string]: unknown; }; /** @@ -305,7 +319,7 @@ export interface HttpsSchemasMesheryIoComponentJson { * - enabled: model is available for use for all users of this Meshery Server. * - ignored: model is unavailable for use for all users of this Meshery Server. */ - status?: "ignored" | "enabled" | "duplicate"; + status?: "ignored" | "enabled" | "duplicate" | "resolved" | "open"; /** * Metadata contains additional information associated with the component. */ @@ -619,6 +633,11 @@ export interface Styles { * The text to display for an element’s label. Can give a path, e.g. data(id) will label with the elements id */ label?: string; + /** + * The animation to apply to the element. example ripple,bounce,etc + */ + animation?: string; + [k: string]: unknown; } /** * Relationships define the nature of interaction between interconnected components in Meshery. The combination of relationship properties kind, type, and subtype characterize various genealogical relations among and between components. Relationships have selectors, selector sets, metadata, and optional parameters. Learn more at https://docs.meshery.io/concepts/logical/relationships. @@ -652,7 +671,7 @@ export interface HttpsSchemasMesheryIoRelationshipJson { /** * Status of the relationship. */ - status?: "ignored" | "enabled" | "deleted"; + status?: "pending" | "approved" | "ignored" | "enabled" | "deleted"; /** * Optional. Assigns the policy to be used for the evaluation of the relationship. Deprecation Notice: In the future, this property is either to be removed or to it is to be an array of optional policy $refs. */ @@ -1418,7 +1437,8 @@ export interface HttpsSchemasMesheryIoCapabilityJson1 { /** * Most granular unit of capability classification. The combination of Kind, Type and SubType together uniquely identify a Capability. */ - subType?: string; + subType?: ("inventory" | "matchLabels" | "permission" | "network" | "firewall" | "mount" | "alias" | "annotation") & + string; /** * Key that backs the capability. */