@effect-app/vue-components 2.6.2 → 2.7.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.
Files changed (35) hide show
  1. package/dist/types/components/OmegaForm/InputProps.d.ts +10 -4
  2. package/dist/types/components/OmegaForm/OmegaTaggedUnion.vue.d.ts +9 -13
  3. package/dist/types/components/OmegaForm/OmegaTaggedUnionInternal.vue.d.ts +2 -9
  4. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +2 -1
  5. package/dist/vue-components.es10.js +203 -148
  6. package/dist/vue-components.es12.js +137 -115
  7. package/dist/vue-components.es22.js +1 -1
  8. package/dist/vue-components.es23.js +1 -1
  9. package/dist/vue-components.es36.js +1 -1
  10. package/dist/vue-components.es40.js +4 -23
  11. package/dist/vue-components.es41.js +23 -5
  12. package/dist/vue-components.es42.js +5 -21
  13. package/dist/vue-components.es43.js +16 -25
  14. package/dist/vue-components.es44.js +23 -15
  15. package/dist/vue-components.es45.js +17 -7
  16. package/dist/vue-components.es46.js +12 -5
  17. package/dist/vue-components.es47.js +5 -19
  18. package/dist/vue-components.es48.js +19 -9
  19. package/dist/vue-components.es49.js +9 -31
  20. package/dist/vue-components.es50.js +25 -42
  21. package/dist/vue-components.es51.js +38 -16
  22. package/dist/vue-components.es52.js +26 -11
  23. package/dist/vue-components.es53.js +11 -4
  24. package/dist/vue-components.es54.js +1 -1
  25. package/dist/vue-components.es56.js +1 -1
  26. package/dist/vue-components.es58.js +3 -3
  27. package/dist/vue-components.es59.js +1 -1
  28. package/dist/vue-components.es8.js +29 -36
  29. package/dist/vue-components.es9.js +7 -6
  30. package/package.json +3 -3
  31. package/src/components/OmegaForm/InputProps.ts +17 -8
  32. package/src/components/OmegaForm/OmegaFormStuff.ts +52 -0
  33. package/src/components/OmegaForm/OmegaTaggedUnion.vue +16 -35
  34. package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +2 -1
  35. package/src/components/OmegaForm/useOmegaForm.ts +123 -10
@@ -1,139 +1,139 @@
1
- import { S as n, Option as M } from "effect-app";
2
- import { getMetadataFromSchema as _ } from "@effect-app/vue/form";
3
- import { useIntl as w, getTransformationFrom as N } from "./vue-components.es3.js";
4
- const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKeyword" || i === n.Null.ast), d = (e) => !e || !n.AST.isUnion(e) ? !1 : e.types.find((i) => i._tag === "UndefinedKeyword") ? "undefined" : e.types.find((i) => i === n.Null.ast) ? "null" : !1, L = (e) => {
1
+ import { S as n, Option as L } from "effect-app";
2
+ import { getMetadataFromSchema as w } from "@effect-app/vue/form";
3
+ import { useIntl as N, getTransformationFrom as M } from "./vue-components.es3.js";
4
+ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKeyword" || i === n.Null.ast), d = (e) => !e || !n.AST.isUnion(e) ? !1 : e.types.find((i) => i._tag === "UndefinedKeyword") ? "undefined" : e.types.find((i) => i === n.Null.ast) ? "null" : !1, _ = (e) => {
5
5
  const i = [];
6
6
  for (const t of e)
7
7
  if (n.AST.isUnion(t)) {
8
- const g = L(t.types);
9
- i.push(...g);
8
+ const c = _(t.types);
9
+ i.push(...c);
10
10
  } else
11
11
  i.push(t);
12
12
  return i;
13
- }, m = ({ meta: e = {}, parent: i = "", property: t, propertySignatures: g }, a = {}) => {
13
+ }, u = ({ meta: e = {}, parent: i = "", property: t, propertySignatures: c }, o = {}) => {
14
14
  if (t && t._tag === "Transformation")
15
- return m({
15
+ return u({
16
16
  parent: i,
17
17
  meta: e,
18
18
  property: t.from
19
19
  });
20
20
  if (t?._tag === "TypeLiteral" && "propertySignatures" in t)
21
- return m({
21
+ return u({
22
22
  meta: e,
23
23
  propertySignatures: t.propertySignatures
24
24
  });
25
- if (g) {
26
- for (const r of g) {
27
- const o = i ? `${i}.${r.name.toString()}` : r.name.toString(), s = d(r.type);
28
- let l;
29
- e._isNullableDiscriminatedUnion && r.name.toString() === "_tag" || e.required === !1 ? l = !1 : l = !s;
30
- const T = r.type;
25
+ if (c) {
26
+ for (const r of c) {
27
+ const p = i ? `${i}.${r.name.toString()}` : r.name.toString(), s = d(r.type);
28
+ let a;
29
+ e._isNullableDiscriminatedUnion && r.name.toString() === "_tag" || e.required === !1 ? a = !1 : a = !s;
30
+ const f = r.type;
31
31
  if (n.AST.isUnion(r.type)) {
32
- const c = L(r.type.types).filter(
33
- (p) => p._tag !== "UndefinedKeyword" && p !== n.Null.ast
34
- ).map(N);
35
- if (c.some(
36
- (p) => "propertySignatures" in p
32
+ const S = _(r.type.types).filter(
33
+ (l) => l._tag !== "UndefinedKeyword" && l !== n.Null.ast
34
+ ).map(M);
35
+ if (S.some(
36
+ (l) => "propertySignatures" in l
37
37
  )) {
38
38
  if (!s) {
39
- const p = m({
40
- parent: o,
39
+ const l = u({
40
+ parent: p,
41
41
  property: r.type,
42
- meta: { required: l, nullableOrUndefined: s }
42
+ meta: { required: a, nullableOrUndefined: s }
43
43
  });
44
- a[o] = p;
44
+ o[p] = l;
45
45
  }
46
- for (const p of c)
47
- if ("propertySignatures" in p) {
48
- const u = s && c.length > 1;
46
+ for (const l of S)
47
+ if ("propertySignatures" in l) {
48
+ const m = s && S.length > 1;
49
49
  Object.assign(
50
- a,
51
- m({
52
- parent: o,
53
- propertySignatures: p.propertySignatures,
54
- meta: u ? { _isNullableDiscriminatedUnion: !0 } : {}
50
+ o,
51
+ u({
52
+ parent: p,
53
+ propertySignatures: l.propertySignatures,
54
+ meta: m ? { _isNullableDiscriminatedUnion: !0 } : {}
55
55
  })
56
56
  );
57
57
  }
58
58
  } else {
59
- const p = c.filter(n.AST.isTupleType);
60
- if (p.length > 0) {
61
- const u = p[0];
62
- if (a[o] = {
59
+ const l = S.filter(n.AST.isTupleType);
60
+ if (l.length > 0) {
61
+ const m = l[0];
62
+ if (o[p] = {
63
63
  type: "multiple",
64
- members: u.elements,
65
- rest: u.rest,
66
- required: l,
64
+ members: m.elements,
65
+ rest: m.rest,
66
+ required: a,
67
67
  nullableOrUndefined: s
68
- }, u.rest && u.rest.length > 0) {
69
- const S = u.rest[0];
70
- if (S.type._tag === "TypeLiteral" && "propertySignatures" in S.type)
71
- for (const f of S.type.propertySignatures) {
72
- const b = `${o}.${f.name.toString()}`, h = m({
73
- parent: b,
74
- property: f.type,
68
+ }, m.rest && m.rest.length > 0) {
69
+ const T = m.rest[0];
70
+ if (T.type._tag === "TypeLiteral" && "propertySignatures" in T.type)
71
+ for (const g of T.type.propertySignatures) {
72
+ const h = `${p}.${g.name.toString()}`, v = u({
73
+ parent: h,
74
+ property: g.type,
75
75
  meta: {
76
- required: !d(f.type),
77
- nullableOrUndefined: d(f.type)
76
+ required: !d(g.type),
77
+ nullableOrUndefined: d(g.type)
78
78
  }
79
79
  });
80
- if (h && typeof h == "object" && "type" in h && (a[b] = h, h.type === "multiple" && n.AST.isTupleType(f.type) && f.type.rest && f.type.rest.length > 0)) {
81
- const U = f.type.rest[0];
80
+ if (v && typeof v == "object" && "type" in v && (o[h] = v, v.type === "multiple" && n.AST.isTupleType(g.type) && g.type.rest && g.type.rest.length > 0)) {
81
+ const U = g.type.rest[0];
82
82
  if (U.type._tag === "TypeLiteral" && "propertySignatures" in U.type)
83
- for (const v of U.type.propertySignatures) {
84
- const A = `${b}.${v.name.toString()}`, x = m({
83
+ for (const x of U.type.propertySignatures) {
84
+ const A = `${h}.${x.name.toString()}`, O = u({
85
85
  parent: A,
86
- property: v.type,
86
+ property: x.type,
87
87
  meta: {
88
- required: !d(v.type),
89
- nullableOrUndefined: d(v.type)
88
+ required: !d(x.type),
89
+ nullableOrUndefined: d(x.type)
90
90
  }
91
91
  });
92
- x && typeof x == "object" && "type" in x && (a[A] = x);
92
+ O && typeof O == "object" && "type" in O && (o[A] = O);
93
93
  }
94
94
  }
95
95
  }
96
96
  }
97
97
  } else {
98
- const u = m({
99
- parent: o,
98
+ const m = u({
99
+ parent: p,
100
100
  property: r.type,
101
- meta: { required: l, nullableOrUndefined: s }
101
+ meta: { required: a, nullableOrUndefined: s }
102
102
  });
103
- a[o] = u;
103
+ o[p] = m;
104
104
  }
105
105
  }
106
- } else if ("propertySignatures" in T)
106
+ } else if ("propertySignatures" in f)
107
107
  Object.assign(
108
- a,
109
- m({
110
- parent: o,
111
- propertySignatures: T.propertySignatures,
112
- meta: { required: l, nullableOrUndefined: s }
108
+ o,
109
+ u({
110
+ parent: p,
111
+ propertySignatures: f.propertySignatures,
112
+ meta: { required: a, nullableOrUndefined: s }
113
113
  })
114
114
  );
115
115
  else if (n.AST.isTupleType(r.type))
116
116
  if (r.type.rest.length > 0 && r.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in r.type.rest[0].type) {
117
- const c = r.type.rest[0].type;
118
- if (c._tag === "TypeLiteral" && "propertySignatures" in c)
119
- for (const y of c.propertySignatures) {
120
- const p = `${o}.${y.name.toString()}`;
117
+ const S = r.type.rest[0].type;
118
+ if (S._tag === "TypeLiteral" && "propertySignatures" in S)
119
+ for (const y of S.propertySignatures) {
120
+ const l = `${p}.${y.name.toString()}`;
121
121
  if (n.AST.isTupleType(y.type) && y.type.rest.length > 0) {
122
- const u = y.type.rest[0].type;
123
- if (u._tag === "TypeLiteral" && "propertySignatures" in u)
124
- for (const S of u.propertySignatures) {
125
- const f = `${p}.${S.name.toString()}`, b = m({
126
- parent: f,
127
- property: S.type,
122
+ const m = y.type.rest[0].type;
123
+ if (m._tag === "TypeLiteral" && "propertySignatures" in m)
124
+ for (const T of m.propertySignatures) {
125
+ const g = `${l}.${T.name.toString()}`, h = u({
126
+ parent: g,
127
+ property: T.type,
128
128
  meta: {
129
- required: !d(S.type),
130
- nullableOrUndefined: d(S.type)
129
+ required: !d(T.type),
130
+ nullableOrUndefined: d(T.type)
131
131
  }
132
132
  });
133
- a[f] = b;
133
+ o[g] = h;
134
134
  }
135
135
  else
136
- a[p] = {
136
+ o[l] = {
137
137
  type: "multiple",
138
138
  members: y.type.elements,
139
139
  rest: y.type.rest,
@@ -141,61 +141,61 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
141
141
  nullableOrUndefined: d(y.type)
142
142
  };
143
143
  } else {
144
- const u = m({
145
- parent: p,
144
+ const m = u({
145
+ parent: l,
146
146
  property: y.type,
147
147
  meta: {
148
148
  required: !d(y.type),
149
149
  nullableOrUndefined: d(y.type)
150
150
  }
151
151
  });
152
- a[p] = u;
152
+ o[l] = m;
153
153
  }
154
154
  }
155
155
  } else
156
- a[o] = {
156
+ o[p] = {
157
157
  type: "multiple",
158
158
  members: r.type.elements,
159
159
  rest: r.type.rest,
160
- required: l,
160
+ required: a,
161
161
  nullableOrUndefined: s
162
162
  };
163
163
  else {
164
- const O = m({
165
- parent: o,
164
+ const b = u({
165
+ parent: p,
166
166
  property: r.type,
167
167
  meta: {
168
168
  // an empty string is valid for a S.String field, so we should not mark it as required
169
169
  // TODO: handle this better via the createMeta minLength parsing
170
- required: l && (r.type._tag !== "StringKeyword" || _(r.type).minLength),
170
+ required: a && (r.type._tag !== "StringKeyword" || w(r.type).minLength),
171
171
  nullableOrUndefined: s
172
172
  }
173
173
  });
174
- a[o] = O;
174
+ o[p] = b;
175
175
  }
176
176
  }
177
- return a;
177
+ return o;
178
178
  }
179
179
  if (t) {
180
180
  const r = E(t);
181
181
  if (Object.hasOwnProperty.call(e, "required") || (e.required = !r), n.AST.isUnion(t)) {
182
- const s = L(t.types), l = s.find(
183
- (T) => T._tag !== "UndefinedKeyword" && T !== n.Null.ast
182
+ const s = _(t.types), a = s.find(
183
+ (f) => f._tag !== "UndefinedKeyword" && f !== n.Null.ast
184
184
  );
185
- return "propertySignatures" in l ? m({
186
- propertySignatures: l.propertySignatures,
185
+ return "propertySignatures" in a ? u({
186
+ propertySignatures: a.propertySignatures,
187
187
  parent: i,
188
188
  meta: e
189
189
  }) : s.every(n.AST.isLiteral) ? {
190
190
  ...e,
191
191
  type: "select",
192
- members: s.map((T) => T.literal)
192
+ members: s.map((f) => f.literal)
193
193
  } : {
194
194
  ...e,
195
- ...m({
195
+ ...u({
196
196
  parent: i,
197
197
  meta: e,
198
- property: l
198
+ property: a
199
199
  })
200
200
  };
201
201
  }
@@ -206,11 +206,11 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
206
206
  members: t.elements,
207
207
  rest: t.rest
208
208
  };
209
- const o = n.AST.getAnnotation(
209
+ const p = n.AST.getAnnotation(
210
210
  t,
211
211
  n.AST.JSONSchemaAnnotationId
212
- ).pipe(M.getOrElse(() => ({})));
213
- return e = { ...e, ...o }, "from" in t ? m({
212
+ ).pipe(L.getOrElse(() => ({})));
213
+ return e = { ...e, ...p }, "from" in t ? u({
214
214
  parent: i,
215
215
  meta: e,
216
216
  property: t.from
@@ -218,34 +218,56 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
218
218
  t,
219
219
  n.AST.TitleAnnotationId
220
220
  ).pipe(
221
- M.getOrElse(() => "unknown")
221
+ L.getOrElse(() => "unknown")
222
222
  ), e);
223
223
  }
224
- return a;
224
+ return o;
225
225
  }, q = (e) => {
226
226
  const i = e.ast, t = {};
227
227
  if (i._tag === "Transformation" || i._tag === "Refinement")
228
228
  return q(n.make(i.from));
229
+ if (i._tag === "Union") {
230
+ const r = (i.types || []).filter((s) => s._tag !== "UndefinedKeyword" && s !== n.Null.ast).map(M);
231
+ if (r.every((s) => s._tag === "TypeLiteral" && "propertySignatures" in s) && r.length > 0) {
232
+ const s = [];
233
+ for (const a of r)
234
+ if ("propertySignatures" in a) {
235
+ const f = a.propertySignatures.find(
236
+ (S) => S.name.toString() === "_tag"
237
+ );
238
+ f && n.AST.isLiteral(f.type) && s.push(f.type.literal);
239
+ const b = u({
240
+ propertySignatures: a.propertySignatures
241
+ });
242
+ Object.assign(t, b);
243
+ }
244
+ return s.length > 0 && (t._tag = {
245
+ type: "select",
246
+ members: s,
247
+ required: !0
248
+ }), t;
249
+ }
250
+ }
229
251
  if ("propertySignatures" in i) {
230
- const g = m({
252
+ const c = u({
231
253
  propertySignatures: i.propertySignatures
232
254
  });
233
- if (Object.values(g).every((r) => r && "type" in r))
234
- return g;
235
- const a = (r, o = "") => {
255
+ if (Object.values(c).every((r) => r && "type" in r))
256
+ return c;
257
+ const o = (r, p = "") => {
236
258
  for (const s in r) {
237
- const l = o ? `${o}.${s}` : s;
238
- r[s] && typeof r[s] == "object" && "type" in r[s] ? t[l] = r[s] : r[s] && typeof r[s] == "object" && a(r[s], l);
259
+ const a = p ? `${p}.${s}` : s;
260
+ r[s] && typeof r[s] == "object" && "type" in r[s] ? t[a] = r[s] : r[s] && typeof r[s] == "object" && o(r[s], a);
239
261
  }
240
262
  };
241
- a(g);
263
+ o(c);
242
264
  }
243
265
  return t;
244
- }, P = (e) => n.extend(e, n.Struct({})), F = (e) => {
266
+ }, P = (e) => n.extend(e, n.Struct({})), j = (e) => {
245
267
  const i = q(e);
246
268
  return { schema: e, meta: i };
247
- }, j = (e) => {
248
- const { trans: i } = w();
269
+ }, F = (e) => {
270
+ const { trans: i } = N();
249
271
  let t;
250
272
  switch (e.type) {
251
273
  case "string":
@@ -352,10 +374,10 @@ const E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKe
352
374
  "url"
353
375
  ], R = (e) => k.includes(e) ? e : "text";
354
376
  export {
355
- m as createMeta,
377
+ u as createMeta,
356
378
  P as duplicateSchema,
357
- j as generateInputStandardSchemaFromFieldMeta,
358
- F as generateMetaFromSchema,
379
+ F as generateInputStandardSchemaFromFieldMeta,
380
+ j as generateMetaFromSchema,
359
381
  R as getInputType,
360
382
  D as nullableInput
361
383
  };
@@ -1,4 +1,4 @@
1
- import { TraceAPI as r } from "./vue-components.es51.js";
1
+ import { TraceAPI as r } from "./vue-components.es52.js";
2
2
  var t = r.getInstance();
3
3
  export {
4
4
  t as trace
@@ -1,4 +1,4 @@
1
- import { ContextAPI as t } from "./vue-components.es50.js";
1
+ import { ContextAPI as t } from "./vue-components.es51.js";
2
2
  var o = t.getInstance();
3
3
  export {
4
4
  o as context
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, createElementBlock as d, openBlock as u, withModifiers as f, createElementVNode as l, unref as s, renderSlot as a } from "vue";
2
2
  import { useStore as b } from "@tanstack/vue-form";
3
3
  import { usePreventClose as p } from "./vue-components.es11.js";
4
- import { getOmegaStore as c } from "./vue-components.es52.js";
4
+ import { getOmegaStore as c } from "./vue-components.es53.js";
5
5
  const S = ["disabled"], V = /* @__PURE__ */ m({
6
6
  __name: "OmegaWrapper",
7
7
  props: {
@@ -1,25 +1,6 @@
1
- function a(t) {
2
- return Symbol.for(t);
3
- }
4
- var c = (
5
- /** @class */
6
- /* @__PURE__ */ (function() {
7
- function t(u) {
8
- var e = this;
9
- e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
10
- return e._currentContext.get(n);
11
- }, e.setValue = function(n, r) {
12
- var o = new t(e._currentContext);
13
- return o._currentContext.set(n, r), o;
14
- }, e.deleteValue = function(n) {
15
- var r = new t(e._currentContext);
16
- return r._currentContext.delete(n), r;
17
- };
18
- }
19
- return t;
20
- })()
21
- ), x = new c();
1
+ (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es38.js";
3
+
22
4
  export {
23
- x as ROOT_CONTEXT,
24
- a as createContextKey
5
+ o as default
25
6
  };
@@ -1,7 +1,25 @@
1
- var R;
2
- (function(E) {
3
- E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
4
- })(R || (R = {}));
1
+ function a(t) {
2
+ return Symbol.for(t);
3
+ }
4
+ var c = (
5
+ /** @class */
6
+ /* @__PURE__ */ (function() {
7
+ function t(u) {
8
+ var e = this;
9
+ e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
10
+ return e._currentContext.get(n);
11
+ }, e.setValue = function(n, r) {
12
+ var o = new t(e._currentContext);
13
+ return o._currentContext.set(n, r), o;
14
+ }, e.deleteValue = function(n) {
15
+ var r = new t(e._currentContext);
16
+ return r._currentContext.delete(n), r;
17
+ };
18
+ }
19
+ return t;
20
+ })()
21
+ ), x = new c();
5
22
  export {
6
- R as DiagLogLevel
23
+ x as ROOT_CONTEXT,
24
+ a as createContextKey
7
25
  };
@@ -1,23 +1,7 @@
1
- import { NoopTracer as o } from "./vue-components.es43.js";
2
- var s = new o(), c = (
3
- /** @class */
4
- (function() {
5
- function r(t, e, n, a) {
6
- this._provider = t, this.name = e, this.version = n, this.options = a;
7
- }
8
- return r.prototype.startSpan = function(t, e, n) {
9
- return this._getTracer().startSpan(t, e, n);
10
- }, r.prototype.startActiveSpan = function(t, e, n, a) {
11
- var i = this._getTracer();
12
- return Reflect.apply(i.startActiveSpan, i, arguments);
13
- }, r.prototype._getTracer = function() {
14
- if (this._delegate)
15
- return this._delegate;
16
- var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
17
- return t ? (this._delegate = t, this._delegate) : s;
18
- }, r;
19
- })()
20
- );
1
+ var R;
2
+ (function(E) {
3
+ E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
4
+ })(R || (R = {}));
21
5
  export {
22
- c as ProxyTracer
6
+ R as DiagLogLevel
23
7
  };
@@ -1,32 +1,23 @@
1
- import { ContextAPI as l } from "./vue-components.es50.js";
2
- import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
3
- import { NonRecordingSpan as p } from "./vue-components.es49.js";
4
- import { isSpanContextValid as S } from "./vue-components.es47.js";
5
- var f = l.getInstance(), I = (
1
+ import { NoopTracer as o } from "./vue-components.es44.js";
2
+ var s = new o(), c = (
6
3
  /** @class */
7
4
  (function() {
8
- function t() {
5
+ function r(t, e, n, a) {
6
+ this._provider = t, this.name = e, this.version = n, this.options = a;
9
7
  }
10
- return t.prototype.startSpan = function(u, e, r) {
11
- r === void 0 && (r = f.active());
12
- var i = !!e?.root;
13
- if (i)
14
- return new p();
15
- var n = r && m(r);
16
- return g(n) && S(n) ? new p(n) : new p();
17
- }, t.prototype.startActiveSpan = function(u, e, r, i) {
18
- var n, o, a;
19
- if (!(arguments.length < 2)) {
20
- arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
21
- var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
22
- return f.with(c, a, void 0, s);
23
- }
24
- }, t;
8
+ return r.prototype.startSpan = function(t, e, n) {
9
+ return this._getTracer().startSpan(t, e, n);
10
+ }, r.prototype.startActiveSpan = function(t, e, n, a) {
11
+ var i = this._getTracer();
12
+ return Reflect.apply(i.startActiveSpan, i, arguments);
13
+ }, r.prototype._getTracer = function() {
14
+ if (this._delegate)
15
+ return this._delegate;
16
+ var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
17
+ return t ? (this._delegate = t, this._delegate) : s;
18
+ }, r;
25
19
  })()
26
20
  );
27
- function g(t) {
28
- return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
29
- }
30
21
  export {
31
- I as NoopTracer
22
+ c as ProxyTracer
32
23
  };
@@ -1,24 +1,32 @@
1
- import { ProxyTracer as i } from "./vue-components.es42.js";
2
- import { NoopTracerProvider as n } from "./vue-components.es45.js";
3
- var c = new n(), g = (
1
+ import { ContextAPI as l } from "./vue-components.es51.js";
2
+ import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
3
+ import { NonRecordingSpan as p } from "./vue-components.es50.js";
4
+ import { isSpanContextValid as S } from "./vue-components.es48.js";
5
+ var f = l.getInstance(), I = (
4
6
  /** @class */
5
7
  (function() {
6
8
  function t() {
7
9
  }
8
- return t.prototype.getTracer = function(e, o, a) {
9
- var r;
10
- return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
11
- }, t.prototype.getDelegate = function() {
12
- var e;
13
- return (e = this._delegate) !== null && e !== void 0 ? e : c;
14
- }, t.prototype.setDelegate = function(e) {
15
- this._delegate = e;
16
- }, t.prototype.getDelegateTracer = function(e, o, a) {
17
- var r;
18
- return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
10
+ return t.prototype.startSpan = function(u, e, r) {
11
+ r === void 0 && (r = f.active());
12
+ var i = !!e?.root;
13
+ if (i)
14
+ return new p();
15
+ var n = r && m(r);
16
+ return g(n) && S(n) ? new p(n) : new p();
17
+ }, t.prototype.startActiveSpan = function(u, e, r, i) {
18
+ var n, o, a;
19
+ if (!(arguments.length < 2)) {
20
+ arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
21
+ var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
22
+ return f.with(c, a, void 0, s);
23
+ }
19
24
  }, t;
20
25
  })()
21
26
  );
27
+ function g(t) {
28
+ return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
29
+ }
22
30
  export {
23
- g as ProxyTracerProvider
31
+ I as NoopTracer
24
32
  };
@@ -1,14 +1,24 @@
1
- import { NoopTracer as o } from "./vue-components.es43.js";
2
- var p = (
1
+ import { ProxyTracer as i } from "./vue-components.es43.js";
2
+ import { NoopTracerProvider as n } from "./vue-components.es46.js";
3
+ var c = new n(), g = (
3
4
  /** @class */
4
5
  (function() {
5
- function r() {
6
+ function t() {
6
7
  }
7
- return r.prototype.getTracer = function(e, n, t) {
8
- return new o();
9
- }, r;
8
+ return t.prototype.getTracer = function(e, o, a) {
9
+ var r;
10
+ return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
11
+ }, t.prototype.getDelegate = function() {
12
+ var e;
13
+ return (e = this._delegate) !== null && e !== void 0 ? e : c;
14
+ }, t.prototype.setDelegate = function(e) {
15
+ this._delegate = e;
16
+ }, t.prototype.getDelegateTracer = function(e, o, a) {
17
+ var r;
18
+ return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
19
+ }, t;
10
20
  })()
11
21
  );
12
22
  export {
13
- p as NoopTracerProvider
23
+ g as ProxyTracerProvider
14
24
  };