@teacharium/widget 0.1.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.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
+
14
+ ```js
15
+ export default tseslint.config([
16
+ globalIgnores(['dist']),
17
+ {
18
+ files: ['**/*.{ts,tsx}'],
19
+ extends: [
20
+ // Other configs...
21
+
22
+ // Remove tseslint.configs.recommended and replace with this
23
+ ...tseslint.configs.recommendedTypeChecked,
24
+ // Alternatively, use this for stricter rules
25
+ ...tseslint.configs.strictTypeChecked,
26
+ // Optionally, add this for stylistic rules
27
+ ...tseslint.configs.stylisticTypeChecked,
28
+
29
+ // Other configs...
30
+ ],
31
+ languageOptions: {
32
+ parserOptions: {
33
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
34
+ tsconfigRootDir: import.meta.dirname,
35
+ },
36
+ // other options...
37
+ },
38
+ },
39
+ ])
40
+ ```
41
+
42
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43
+
44
+ ```js
45
+ // eslint.config.js
46
+ import reactX from 'eslint-plugin-react-x'
47
+ import reactDom from 'eslint-plugin-react-dom'
48
+
49
+ export default tseslint.config([
50
+ globalIgnores(['dist']),
51
+ {
52
+ files: ['**/*.{ts,tsx}'],
53
+ extends: [
54
+ // Other configs...
55
+ // Enable lint rules for React
56
+ reactX.configs['recommended-typescript'],
57
+ // Enable lint rules for React DOM
58
+ reactDom.configs.recommended,
59
+ ],
60
+ languageOptions: {
61
+ parserOptions: {
62
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
63
+ tsconfigRootDir: import.meta.dirname,
64
+ },
65
+ // other options...
66
+ },
67
+ },
68
+ ])
69
+ ```
@@ -0,0 +1,323 @@
1
+ import re from "react";
2
+ const ce = (n) => {
3
+ window.TeachariumComponents = window.TeachariumComponents || {}, window.TeachariumComponents[n.name] = n;
4
+ }, le = () => Object.values(window.TeachariumComponents || {}), ie = "player", fe = "footer";
5
+ var p = { exports: {} }, _ = {};
6
+ /**
7
+ * @license React
8
+ * react-jsx-runtime.production.js
9
+ *
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ var I;
16
+ function te() {
17
+ if (I) return _;
18
+ I = 1;
19
+ var n = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
20
+ function s(m, u, c) {
21
+ var E = null;
22
+ if (c !== void 0 && (E = "" + c), u.key !== void 0 && (E = "" + u.key), "key" in u) {
23
+ c = {};
24
+ for (var R in u)
25
+ R !== "key" && (c[R] = u[R]);
26
+ } else c = u;
27
+ return u = c.ref, {
28
+ $$typeof: n,
29
+ type: m,
30
+ key: E,
31
+ ref: u !== void 0 ? u : null,
32
+ props: c
33
+ };
34
+ }
35
+ return _.Fragment = i, _.jsx = s, _.jsxs = s, _;
36
+ }
37
+ var b = {};
38
+ /**
39
+ * @license React
40
+ * react-jsx-runtime.development.js
41
+ *
42
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
43
+ *
44
+ * This source code is licensed under the MIT license found in the
45
+ * LICENSE file in the root directory of this source tree.
46
+ */
47
+ var L;
48
+ function ne() {
49
+ return L || (L = 1, process.env.NODE_ENV !== "production" && (function() {
50
+ function n(e) {
51
+ if (e == null) return null;
52
+ if (typeof e == "function")
53
+ return e.$$typeof === Q ? null : e.displayName || e.name || null;
54
+ if (typeof e == "string") return e;
55
+ switch (e) {
56
+ case v:
57
+ return "Fragment";
58
+ case q:
59
+ return "Profiler";
60
+ case V:
61
+ return "StrictMode";
62
+ case X:
63
+ return "Suspense";
64
+ case B:
65
+ return "SuspenseList";
66
+ case Z:
67
+ return "Activity";
68
+ }
69
+ if (typeof e == "object")
70
+ switch (typeof e.tag == "number" && console.error(
71
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
+ ), e.$$typeof) {
73
+ case U:
74
+ return "Portal";
75
+ case z:
76
+ return (e.displayName || "Context") + ".Provider";
77
+ case J:
78
+ return (e._context.displayName || "Context") + ".Consumer";
79
+ case G:
80
+ var r = e.render;
81
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
82
+ case H:
83
+ return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
84
+ case y:
85
+ r = e._payload, e = e._init;
86
+ try {
87
+ return n(e(r));
88
+ } catch {
89
+ }
90
+ }
91
+ return null;
92
+ }
93
+ function i(e) {
94
+ return "" + e;
95
+ }
96
+ function s(e) {
97
+ try {
98
+ i(e);
99
+ var r = !1;
100
+ } catch {
101
+ r = !0;
102
+ }
103
+ if (r) {
104
+ r = console;
105
+ var t = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
106
+ return t.call(
107
+ r,
108
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
+ o
110
+ ), i(e);
111
+ }
112
+ }
113
+ function m(e) {
114
+ if (e === v) return "<>";
115
+ if (typeof e == "object" && e !== null && e.$$typeof === y)
116
+ return "<...>";
117
+ try {
118
+ var r = n(e);
119
+ return r ? "<" + r + ">" : "<...>";
120
+ } catch {
121
+ return "<...>";
122
+ }
123
+ }
124
+ function u() {
125
+ var e = O.A;
126
+ return e === null ? null : e.getOwner();
127
+ }
128
+ function c() {
129
+ return Error("react-stack-top-frame");
130
+ }
131
+ function E(e) {
132
+ if (g.call(e, "key")) {
133
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
134
+ if (r && r.isReactWarning) return !1;
135
+ }
136
+ return e.key !== void 0;
137
+ }
138
+ function R(e, r) {
139
+ function t() {
140
+ N || (N = !0, console.error(
141
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
+ r
143
+ ));
144
+ }
145
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
146
+ get: t,
147
+ configurable: !0
148
+ });
149
+ }
150
+ function W() {
151
+ var e = n(this.type);
152
+ return C[e] || (C[e] = !0, console.error(
153
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
+ )), e = this.props.ref, e !== void 0 ? e : null;
155
+ }
156
+ function M(e, r, t, o, f, l, w, S) {
157
+ return t = l.ref, e = {
158
+ $$typeof: h,
159
+ type: e,
160
+ key: r,
161
+ props: l,
162
+ _owner: f
163
+ }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
164
+ enumerable: !1,
165
+ get: W
166
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
167
+ configurable: !1,
168
+ enumerable: !1,
169
+ writable: !0,
170
+ value: 0
171
+ }), Object.defineProperty(e, "_debugInfo", {
172
+ configurable: !1,
173
+ enumerable: !1,
174
+ writable: !0,
175
+ value: null
176
+ }), Object.defineProperty(e, "_debugStack", {
177
+ configurable: !1,
178
+ enumerable: !1,
179
+ writable: !0,
180
+ value: w
181
+ }), Object.defineProperty(e, "_debugTask", {
182
+ configurable: !1,
183
+ enumerable: !1,
184
+ writable: !0,
185
+ value: S
186
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
187
+ }
188
+ function j(e, r, t, o, f, l, w, S) {
189
+ var a = r.children;
190
+ if (a !== void 0)
191
+ if (o)
192
+ if (K(a)) {
193
+ for (o = 0; o < a.length; o++)
194
+ P(a[o]);
195
+ Object.freeze && Object.freeze(a);
196
+ } else
197
+ console.error(
198
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
+ );
200
+ else P(a);
201
+ if (g.call(r, "key")) {
202
+ a = n(e);
203
+ var d = Object.keys(r).filter(function(ee) {
204
+ return ee !== "key";
205
+ });
206
+ o = 0 < d.length ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}", F[a + o] || (d = 0 < d.length ? "{" + d.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ `A props object containing a "key" prop is being spread into JSX:
208
+ let props = %s;
209
+ <%s {...props} />
210
+ React keys must be passed directly to JSX without using spread:
211
+ let props = %s;
212
+ <%s key={someKey} {...props} />`,
213
+ o,
214
+ a,
215
+ d,
216
+ a
217
+ ), F[a + o] = !0);
218
+ }
219
+ if (a = null, t !== void 0 && (s(t), a = "" + t), E(r) && (s(r.key), a = "" + r.key), "key" in r) {
220
+ t = {};
221
+ for (var A in r)
222
+ A !== "key" && (t[A] = r[A]);
223
+ } else t = r;
224
+ return a && R(
225
+ t,
226
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
227
+ ), M(
228
+ e,
229
+ a,
230
+ l,
231
+ f,
232
+ u(),
233
+ t,
234
+ w,
235
+ S
236
+ );
237
+ }
238
+ function P(e) {
239
+ typeof e == "object" && e !== null && e.$$typeof === h && e._store && (e._store.validated = 1);
240
+ }
241
+ var T = re, h = Symbol.for("react.transitional.element"), U = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), V = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), z = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), O = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, K = Array.isArray, k = console.createTask ? console.createTask : function() {
242
+ return null;
243
+ };
244
+ T = {
245
+ react_stack_bottom_frame: function(e) {
246
+ return e();
247
+ }
248
+ };
249
+ var N, C = {}, Y = T.react_stack_bottom_frame.bind(
250
+ T,
251
+ c
252
+ )(), $ = k(m(c)), F = {};
253
+ b.Fragment = v, b.jsx = function(e, r, t, o, f) {
254
+ var l = 1e4 > O.recentlyCreatedOwnerStacks++;
255
+ return j(
256
+ e,
257
+ r,
258
+ t,
259
+ !1,
260
+ o,
261
+ f,
262
+ l ? Error("react-stack-top-frame") : Y,
263
+ l ? k(m(e)) : $
264
+ );
265
+ }, b.jsxs = function(e, r, t, o, f) {
266
+ var l = 1e4 > O.recentlyCreatedOwnerStacks++;
267
+ return j(
268
+ e,
269
+ r,
270
+ t,
271
+ !0,
272
+ o,
273
+ f,
274
+ l ? Error("react-stack-top-frame") : Y,
275
+ l ? k(m(e)) : $
276
+ );
277
+ };
278
+ })()), b;
279
+ }
280
+ var D;
281
+ function oe() {
282
+ return D || (D = 1, process.env.NODE_ENV === "production" ? p.exports = te() : p.exports = ne()), p.exports;
283
+ }
284
+ var x = oe();
285
+ const ae = {
286
+ margin: {
287
+ type: "number",
288
+ label: "Margin",
289
+ min: 0,
290
+ max: 100,
291
+ step: 1
292
+ }
293
+ // width: {
294
+ // label: "Width",
295
+ // type: "radio",
296
+ // options: [
297
+ // { label: "Full", value: "full" },
298
+ // { label: "Partial", value: "partial" },
299
+ // ],
300
+ // },
301
+ }, se = ({ margin: n, children: i }) => {
302
+ const s = {};
303
+ return n && (s.padding = `${n}px`), /* @__PURE__ */ x.jsx("div", { style: s, children: i });
304
+ }, de = (n) => {
305
+ const i = n.render;
306
+ return {
307
+ ...n,
308
+ render: (s) => /* @__PURE__ */ x.jsx(se, { ...s, children: /* @__PURE__ */ x.jsx(i, { ...s }) }),
309
+ fields: {
310
+ ...n.fields,
311
+ ...ae
312
+ }
313
+ };
314
+ }, me = "world";
315
+ export {
316
+ fe as EVENT_SOURCE_FOOTER,
317
+ ie as EVENT_SOURCE_PLAYER,
318
+ se as LayoutContainer,
319
+ de as addStandardLayoutOptions,
320
+ le as getWidgets,
321
+ me as hi,
322
+ ce as registerWidget
323
+ };
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@teacharium/widget",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "module": "dist/teacharium-widget.es.js",
9
+ "types": "dist/main.d.ts",
10
+ "dependencies": {
11
+ "@measured/puck": "^0.20.2",
12
+ "react": "^19.1.1",
13
+ "react-dom": "^19.1.1"
14
+ },
15
+ "devDependencies": {
16
+ "@eslint/js": "^9.35.0",
17
+ "@types/react": "^19.1.12",
18
+ "@types/react-dom": "^19.1.9",
19
+ "@vitejs/plugin-react": "^5.0.2",
20
+ "eslint": "^9.35.0",
21
+ "eslint-plugin-react-hooks": "^5.2.0",
22
+ "eslint-plugin-react-refresh": "^0.4.20",
23
+ "globals": "^16.4.0",
24
+ "typescript": "~5.8.3",
25
+ "typescript-eslint": "^8.43.0",
26
+ "vite": "^7.1.5",
27
+ "vite-plugin-dts": "^4.5.4"
28
+ },
29
+ "scripts": {
30
+ "dev": "tsc -b && vite build --watch",
31
+ "build:watch": "tsc -b && vite build --watch",
32
+ "build": "tsc -b && vite build",
33
+ "lint": "eslint ."
34
+ }
35
+ }