@openremote/or-gauge 1.11.0-snapshot.20251103144513 → 1.11.0

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.
@@ -0,0 +1,198 @@
1
+
2
+ import type { OrGauge } from "./lib/index.d.ts";
3
+
4
+ /**
5
+ * This type can be used to create scoped tags for your components.
6
+ *
7
+ * Usage:
8
+ *
9
+ * ```ts
10
+ * import type { ScopedElements } from "path/to/library/jsx-integration";
11
+ *
12
+ * declare module "my-library" {
13
+ * namespace JSX {
14
+ * interface IntrinsicElements
15
+ * extends ScopedElements<'test-', ''> {}
16
+ * }
17
+ * }
18
+ * ```
19
+ *
20
+ * @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
21
+ */
22
+ export type ScopedElements<
23
+ Prefix extends string = "",
24
+ Suffix extends string = ""
25
+ > = {
26
+ [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
27
+ };
28
+
29
+ type BaseProps<T extends HTMLElement> = {
30
+
31
+ /** Content added between the opening and closing tags of the element */
32
+ children?: any;
33
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
34
+ class?: string;
35
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
36
+ className?: string;
37
+ /** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
38
+ classList?: Record<string, boolean | undefined>;
39
+ /** Specifies the text direction of the element. */
40
+ dir?: "ltr" | "rtl";
41
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
42
+ exportparts?: string;
43
+ /** For <label> and <output>, lets you associate the label with some control. */
44
+ htmlFor?: string;
45
+ /** Specifies whether the element should be hidden. */
46
+ hidden?: boolean | string;
47
+ /** A unique identifier for the element. */
48
+ id?: string;
49
+ /** Keys tell React which array item each component corresponds to */
50
+ key?: string | number;
51
+ /** Specifies the language of the element. */
52
+ lang?: string;
53
+ /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
54
+ part?: string;
55
+ /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
56
+ ref?: T | ((e: T) => void);
57
+ /** Adds a reference for a custom element slot */
58
+ slot?: string;
59
+ /** Prop for setting inline styles */
60
+ style?: Record<string, string | number>;
61
+ /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
62
+ tabIndex?: number;
63
+ /** Specifies the tooltip text for the element. */
64
+ title?: string;
65
+ /** Passing 'no' excludes the element content from being translated. */
66
+ translate?: "yes" | "no";
67
+ /** The popover global attribute is used to designate an element as a popover element. */
68
+ popover?: "auto" | "hint" | "manual";
69
+ /** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
70
+ popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
71
+ /** Specifies the action to be performed on a popover element being controlled by a control element. */
72
+ popovertargetaction?: "show" | "hide" | "toggle";
73
+
74
+ } ;
75
+
76
+ type BaseEvents = {
77
+
78
+
79
+ };
80
+
81
+
82
+
83
+ export type OrGaugeProps = {
84
+ /** */
85
+ "attrRef"?: OrGauge['attrRef'];
86
+ /** */
87
+ "asset"?: OrGauge['asset'];
88
+ /** */
89
+ "assetAttribute"?: OrGauge['assetAttribute'];
90
+ /** */
91
+ "value"?: OrGauge['value'];
92
+ /** */
93
+ "decimals"?: OrGauge['decimals'];
94
+ /** */
95
+ "unit"?: OrGauge['unit'];
96
+ /** */
97
+ "min"?: OrGauge['min'];
98
+ /** */
99
+ "max"?: OrGauge['max'];
100
+ /** */
101
+ "thresholds"?: OrGauge['thresholds'];
102
+ /** */
103
+ "config"?: OrGauge['config'];
104
+ /** */
105
+ "realm"?: OrGauge['realm'];
106
+
107
+
108
+ }
109
+
110
+ export type CustomElements = {
111
+
112
+
113
+ /**
114
+ *
115
+ *
116
+ * ## Attributes & Properties
117
+ *
118
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
119
+ *
120
+ * - `attrRef`: undefined
121
+ * - `asset`: undefined
122
+ * - `assetAttribute`: undefined
123
+ * - `value`: undefined
124
+ * - `decimals`: undefined
125
+ * - `unit`: undefined
126
+ * - `min`: undefined
127
+ * - `max`: undefined
128
+ * - `thresholds`: undefined
129
+ * - `config`: undefined
130
+ * - `realm`: undefined
131
+ *
132
+ * ## Methods
133
+ *
134
+ * Methods that can be called to access component functionality.
135
+ *
136
+ * - `setupGauge() => void`: undefined
137
+ * - `getGaugeWidth(gaugeSize?: { width: number, height: number }, includeLabelHeight: boolean = true) => string`: undefined
138
+ * - `shouldShowLabel(gaugeSize: { width: number, height: number }) => boolean`: undefined
139
+ * - `getLabelSize(width: number) => "s" | "m" | "l" | "xl"`: undefined
140
+ * - `loadData(attrRef: AttributeRef) => void`: undefined
141
+ * - `getDefaultConfig() => OrGaugeConfig`: undefined
142
+ */
143
+ "or-gauge": Partial<OrGaugeProps & BaseProps<OrGauge> & BaseEvents>;
144
+ }
145
+
146
+ export type CustomCssProperties = {
147
+
148
+ }
149
+
150
+
151
+ declare module 'react' {
152
+ namespace JSX {
153
+ interface IntrinsicElements extends CustomElements {}
154
+ }
155
+ export interface CSSProperties extends CustomCssProperties {}
156
+ }
157
+
158
+ declare module 'preact' {
159
+ namespace JSX {
160
+ interface IntrinsicElements extends CustomElements {}
161
+ }
162
+ export interface CSSProperties extends CustomCssProperties {}
163
+ }
164
+
165
+ declare module '@builder.io/qwik' {
166
+ namespace JSX {
167
+ interface IntrinsicElements extends CustomElements {}
168
+ }
169
+ export interface CSSProperties extends CustomCssProperties {}
170
+ }
171
+
172
+ declare module '@stencil/core' {
173
+ namespace JSX {
174
+ interface IntrinsicElements extends CustomElements {}
175
+ }
176
+ export interface CSSProperties extends CustomCssProperties {}
177
+ }
178
+
179
+ declare module 'hono/jsx' {
180
+ namespace JSX {
181
+ interface IntrinsicElements extends CustomElements {}
182
+ }
183
+ export interface CSSProperties extends CustomCssProperties {}
184
+ }
185
+
186
+ declare module 'react-native' {
187
+ namespace JSX {
188
+ interface IntrinsicElements extends CustomElements {}
189
+ }
190
+ export interface CSSProperties extends CustomCssProperties {}
191
+ }
192
+
193
+ declare global {
194
+ namespace JSX {
195
+ interface IntrinsicElements extends CustomElements {}
196
+ }
197
+ export interface CSSProperties extends CustomCssProperties {}
198
+ }
@@ -171,7 +171,10 @@
171
171
  },
172
172
  {
173
173
  "kind": "method",
174
- "name": "setupGauge"
174
+ "name": "setupGauge",
175
+ "type": {
176
+ "text": "setupGauge() => void"
177
+ }
175
178
  },
176
179
  {
177
180
  "kind": "method",
@@ -196,7 +199,10 @@
196
199
  "text": "boolean"
197
200
  }
198
201
  }
199
- ]
202
+ ],
203
+ "type": {
204
+ "text": "getGaugeWidth(gaugeSize?: { width: number, height: number }, includeLabelHeight: boolean = true) => string"
205
+ }
200
206
  },
201
207
  {
202
208
  "kind": "method",
@@ -213,7 +219,10 @@
213
219
  "text": "{ width: number, height: number }"
214
220
  }
215
221
  }
216
- ]
222
+ ],
223
+ "type": {
224
+ "text": "shouldShowLabel(gaugeSize: { width: number, height: number }) => boolean"
225
+ }
217
226
  },
218
227
  {
219
228
  "kind": "method",
@@ -230,7 +239,10 @@
230
239
  "text": "number"
231
240
  }
232
241
  }
233
- ]
242
+ ],
243
+ "type": {
244
+ "text": "getLabelSize(width: number) => \"s\" | \"m\" | \"l\" | \"xl\""
245
+ }
234
246
  },
235
247
  {
236
248
  "kind": "method",
@@ -242,7 +254,10 @@
242
254
  "text": "AttributeRef"
243
255
  }
244
256
  }
245
- ]
257
+ ],
258
+ "type": {
259
+ "text": "loadData(attrRef: AttributeRef) => void"
260
+ }
246
261
  },
247
262
  {
248
263
  "kind": "method",
@@ -251,6 +266,9 @@
251
266
  "type": {
252
267
  "text": "OrGaugeConfig"
253
268
  }
269
+ },
270
+ "type": {
271
+ "text": "getDefaultConfig() => OrGaugeConfig"
254
272
  }
255
273
  }
256
274
  ],
@@ -340,7 +358,9 @@
340
358
  "package": "lit"
341
359
  },
342
360
  "tagName": "or-gauge",
343
- "customElement": true
361
+ "customElement": true,
362
+ "modulePath": "src/index.ts",
363
+ "definitionPath": "src/index.ts"
344
364
  }
345
365
  ],
346
366
  "exports": [