@openremote/or-translate 1.24.0 → 1.24.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.
@@ -1,4 +1,3 @@
1
-
2
1
  import type { i18next, translate, OrTranslate } from "./lib/index.d.ts";
3
2
 
4
3
  /**
@@ -27,7 +26,6 @@ export type ScopedElements<
27
26
  };
28
27
 
29
28
  type BaseProps<T extends HTMLElement> = {
30
-
31
29
  /** Content added between the opening and closing tags of the element */
32
30
  children?: any;
33
31
  /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
@@ -50,6 +48,8 @@ type BaseProps<T extends HTMLElement> = {
50
48
  key?: string | number;
51
49
  /** Specifies the language of the element. */
52
50
  lang?: string;
51
+ /** Defines the element's semantic role for accessibility APIs. */
52
+ role?: string;
53
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
54
  part?: string;
55
55
  /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
@@ -70,84 +70,111 @@ type BaseProps<T extends HTMLElement> = {
70
70
  popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
71
71
  /** Specifies the action to be performed on a popover element being controlled by a control element. */
72
72
  popovertargetaction?: "show" | "hide" | "toggle";
73
-
74
- } ;
75
-
76
- type BaseEvents = {
77
-
78
-
79
73
  };
80
74
 
81
-
75
+ type BaseEvents = {};
82
76
 
83
77
  export type OrTranslateProps = {
84
78
  /** */
85
- "value"?: OrTranslate['value'];
79
+ value?: OrTranslate["value"];
86
80
  /** */
87
- "options"?: OrTranslate['options'];
88
-
81
+ options?: OrTranslate["options"];
82
+ };
89
83
 
90
- }
84
+ export type OrTranslateSolidJsProps = {
85
+ /** */
86
+ "prop:value"?: OrTranslate["value"];
87
+ /** */
88
+ "prop:options"?: OrTranslate["options"];
91
89
 
92
- export type CustomElements = {
90
+ /** Set the innerHTML of the element */
91
+ innerHTML?: string;
92
+ /** Set the textContent of the element */
93
+ textContent?: string | number;
94
+ };
93
95
 
96
+ export type CustomElements = {
97
+ /**
98
+ *
99
+ *
100
+ * ## Attributes & Properties
101
+ *
102
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
103
+ *
104
+ * - `value`: undefined
105
+ * - `options`: undefined
106
+ */
107
+ "or-translate": Partial<
108
+ OrTranslateProps & BaseProps<OrTranslate> & BaseEvents
109
+ >;
110
+ };
94
111
 
112
+ export type CustomElementsSolidJs = {
95
113
  /**
96
- *
97
- *
98
- * ## Attributes & Properties
99
- *
100
- * Component attributes and properties that can be applied to the element or by using JavaScript.
101
- *
102
- * - `value`: undefined
103
- * - `options`: undefined
104
- */
105
- "or-translate": Partial<OrTranslateProps & BaseProps<OrTranslate> & BaseEvents>;
106
- }
114
+ *
115
+ *
116
+ * ## Attributes & Properties
117
+ *
118
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
119
+ *
120
+ * - `value`: undefined
121
+ * - `options`: undefined
122
+ */
123
+ "or-translate": Partial<
124
+ OrTranslateProps &
125
+ OrTranslateSolidJsProps &
126
+ BaseProps<OrTranslate> &
127
+ BaseEvents
128
+ >;
129
+ };
107
130
 
108
- export type CustomCssProperties = {
131
+ export type CustomCssProperties = {};
109
132
 
133
+ declare module "react" {
134
+ namespace JSX {
135
+ interface IntrinsicElements extends CustomElements {}
136
+ }
137
+ export interface CSSProperties extends CustomCssProperties {}
110
138
  }
111
139
 
112
-
113
- declare module 'react' {
140
+ declare module "preact" {
114
141
  namespace JSX {
115
142
  interface IntrinsicElements extends CustomElements {}
116
143
  }
117
144
  export interface CSSProperties extends CustomCssProperties {}
118
145
  }
119
146
 
120
- declare module 'preact' {
147
+ declare module "@builder.io/qwik" {
121
148
  namespace JSX {
122
149
  interface IntrinsicElements extends CustomElements {}
123
150
  }
124
151
  export interface CSSProperties extends CustomCssProperties {}
125
152
  }
126
153
 
127
- declare module '@builder.io/qwik' {
154
+ declare module "@stencil/core" {
128
155
  namespace JSX {
129
156
  interface IntrinsicElements extends CustomElements {}
130
157
  }
131
158
  export interface CSSProperties extends CustomCssProperties {}
132
159
  }
133
160
 
134
- declare module '@stencil/core' {
161
+ declare module "hono/jsx" {
135
162
  namespace JSX {
136
163
  interface IntrinsicElements extends CustomElements {}
137
164
  }
138
165
  export interface CSSProperties extends CustomCssProperties {}
139
166
  }
140
167
 
141
- declare module 'hono/jsx' {
168
+ declare module "react-native" {
142
169
  namespace JSX {
143
170
  interface IntrinsicElements extends CustomElements {}
144
171
  }
145
172
  export interface CSSProperties extends CustomCssProperties {}
146
173
  }
147
174
 
148
- declare module 'react-native' {
175
+ declare module "solid-js" {
149
176
  namespace JSX {
150
- interface IntrinsicElements extends CustomElements {}
177
+ interface IntrinsicElements extends CustomElementsSolidJs {}
151
178
  }
152
179
  export interface CSSProperties extends CustomCssProperties {}
153
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openremote/or-translate",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "description": "Provides a web component for translations using i18next",
5
5
  "customElements": "custom-elements.json",
6
6
  "main": "dist/umd/index.bundle.js",
@@ -26,6 +26,9 @@
26
26
  "i18next": "^21.5.3",
27
27
  "lit": "^3.3.1"
28
28
  },
29
+ "devDependencies": {
30
+ "@openremote/util": "1.24.1"
31
+ },
29
32
  "publishConfig": {
30
33
  "access": "public"
31
34
  }