@asteby/metacore-runtime-react 53.2.0 → 53.3.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 (38) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/license/index.d.ts +3 -1
  6. package/dist/license/index.d.ts.map +1 -1
  7. package/dist/license/index.js +3 -1
  8. package/dist/license/license-expiry-banner.d.ts +8 -1
  9. package/dist/license/license-expiry-banner.d.ts.map +1 -1
  10. package/dist/license/license-expiry-banner.js +96 -54
  11. package/dist/license/license-gate.d.ts +14 -4
  12. package/dist/license/license-gate.d.ts.map +1 -1
  13. package/dist/license/license-gate.js +75 -63
  14. package/dist/license/license-status-badge.d.ts.map +1 -1
  15. package/dist/license/license-status-badge.js +8 -9
  16. package/dist/license/messages.d.ts +29 -0
  17. package/dist/license/messages.d.ts.map +1 -0
  18. package/dist/license/messages.js +159 -0
  19. package/dist/license/types.d.ts +30 -7
  20. package/dist/license/types.d.ts.map +1 -1
  21. package/dist/license/types.js +20 -6
  22. package/dist/license/use-license-t.d.ts +11 -0
  23. package/dist/license/use-license-t.d.ts.map +1 -0
  24. package/dist/license/use-license-t.js +18 -0
  25. package/dist/license/view.d.ts +40 -0
  26. package/dist/license/view.d.ts.map +1 -0
  27. package/dist/license/view.js +62 -0
  28. package/package.json +1 -1
  29. package/src/__tests__/license-states.test.tsx +381 -0
  30. package/src/index.ts +13 -0
  31. package/src/license/index.ts +19 -0
  32. package/src/license/license-expiry-banner.tsx +155 -94
  33. package/src/license/license-gate.tsx +210 -147
  34. package/src/license/license-status-badge.tsx +8 -10
  35. package/src/license/messages.ts +185 -0
  36. package/src/license/types.ts +38 -6
  37. package/src/license/use-license-t.ts +23 -0
  38. package/src/license/view.ts +93 -0
@@ -0,0 +1,381 @@
1
+ // @vitest-environment happy-dom
2
+ //
3
+ // Estados de licencia, de punta a punta en el SDK (genérico: sin marca ni vertical):
4
+ // vigente, por vencer, en gracia, vencida (solo lectura con exportación),
5
+ // desactivada, hub caído (opera con lease), sin licencia, clonada.
6
+ // Cada estado se prueba con su texto EXACTO en español y en inglés, con el
7
+ // contacto del vendedor cuando la licencia lo trae, y el modal con encabezado y
8
+ // pie fijos (solo el cuerpo se desplaza).
9
+ import { afterEach, describe, expect, it, vi } from 'vitest'
10
+ import { cleanup, render, screen, fireEvent, waitFor, within } from '@testing-library/react'
11
+
12
+ let LANG = 'es'
13
+ vi.mock('react-i18next', () => ({
14
+ useTranslation: () => ({
15
+ i18n: { language: LANG },
16
+ t: (k: string, opts?: Record<string, unknown>) => {
17
+ let s = (opts?.defaultValue as string) ?? k
18
+ for (const [key, v] of Object.entries(opts ?? {})) {
19
+ if (key === 'defaultValue') continue
20
+ s = s.replace(new RegExp(`{{\\s*${key}\\s*}}`, 'g'), String(v))
21
+ }
22
+ return s
23
+ },
24
+ }),
25
+ }))
26
+
27
+ afterEach(() => {
28
+ cleanup()
29
+ localStorage.clear()
30
+ LANG = 'es'
31
+ })
32
+
33
+ import {
34
+ LicenseGate,
35
+ LicenseExpiryBanner,
36
+ LicenseStatusBadge,
37
+ LICENSE_MESSAGES,
38
+ registerLicenseMessages,
39
+ deriveLicenseView,
40
+ isLicenseBlocking,
41
+ isLicenseReadOnly,
42
+ type LicenseState,
43
+ } from '../license'
44
+
45
+ function make(p: Partial<LicenseState>): LicenseState {
46
+ return {
47
+ enforced: true,
48
+ configured: true,
49
+ valid: false,
50
+ status: 'missing',
51
+ entitlements: [],
52
+ wildcard: false,
53
+ stale: false,
54
+ in_grace: false,
55
+ days_remaining: 0,
56
+ ...p,
57
+ }
58
+ }
59
+
60
+ const SELLER = { name: 'Distribuidora Norte', email: 'ventas@norte.mx', phone: '+52 55 0000 0000' }
61
+ const CHILD = <div>contenido protegido</div>
62
+ const noop = () => Promise.resolve()
63
+
64
+ describe('deriveLicenseView: una sola verdad para cada estado', () => {
65
+ it('sin enforcement o sin estado no hay vista', () => {
66
+ expect(deriveLicenseView(undefined)).toBeUndefined()
67
+ expect(deriveLicenseView(make({ enforced: false, status: 'expired' }))).toBeUndefined()
68
+ })
69
+
70
+ const cases: Array<[string, Partial<LicenseState>, Record<string, unknown>]> = [
71
+ ['vigente', { status: 'valid', valid: true, days_remaining: 200 }, { condition: 'valid', blocking: false, readOnly: false }],
72
+ ['por vencer', { status: 'valid', valid: true, days_remaining: 9 }, { condition: 'expiring', blocking: false, readOnly: false }],
73
+ ['en gracia', { status: 'grace', in_grace: true, days_remaining: 4 }, { condition: 'grace', blocking: false, readOnly: false }],
74
+ ['vencida, política clásica', { status: 'expired' }, { condition: 'expired', blocking: true, readOnly: false }],
75
+ ['vencida, solo lectura', { status: 'expired', on_expiry: 'read_only' }, { condition: 'expired', blocking: false, readOnly: true }],
76
+ ['desactivada, sin plazo', { status: 'revoked' }, { condition: 'revoked', blocking: true, readOnly: false }],
77
+ ['desactivada, con plazo de aviso', { status: 'revoked', in_grace: true }, { condition: 'revoked', blocking: false, readOnly: true }],
78
+ ['hub caído con lease', { status: 'stale', stale: true, valid: true }, { condition: 'hub_unreachable', blocking: false, ownerOnly: true }],
79
+ ['sin licencia', { status: 'missing' }, { condition: 'missing', blocking: true }],
80
+ ['no válida', { status: 'invalid' }, { condition: 'invalid', blocking: true }],
81
+ ]
82
+ it.each(cases)('%s', (_n, partial, expected) => {
83
+ expect(deriveLicenseView(make(partial))).toMatchObject(expected)
84
+ })
85
+
86
+ it('clonada se suma a cualquier estado y no bloquea', () => {
87
+ const v = deriveLicenseView(make({ status: 'valid', valid: true, days_remaining: 100, notices: ['clone_suspected'] }))
88
+ expect(v).toMatchObject({ condition: 'valid', cloned: true, blocking: false })
89
+ })
90
+
91
+ it('los helpers siguen al estado: solo lectura nunca bloquea; revocada sin plazo sí', () => {
92
+ expect(isLicenseBlocking(make({ status: 'expired', on_expiry: 'read_only' }))).toBe(false)
93
+ expect(isLicenseReadOnly(make({ status: 'expired', on_expiry: 'read_only' }))).toBe(true)
94
+ expect(isLicenseBlocking(make({ status: 'revoked' }))).toBe(true)
95
+ expect(isLicenseReadOnly(make({ status: 'valid', valid: true, on_expiry: 'read_only' }))).toBe(false)
96
+ })
97
+ })
98
+
99
+ describe('banner: texto exacto por estado (es)', () => {
100
+ const txt = (s: Partial<LicenseState>, props: Record<string, unknown> = {}) => {
101
+ const { container } = render(<LicenseExpiryBanner state={make(s)} {...props} />)
102
+ return Array.from(container.querySelectorAll('[role="alert"]')).map((n) => n.textContent ?? '')
103
+ }
104
+
105
+ it('por vencer', () => {
106
+ expect(txt({ status: 'valid', valid: true, days_remaining: 7 })[0]).toContain('Tu licencia vence en 7 días.')
107
+ })
108
+ it('por vencer mañana y hoy', () => {
109
+ expect(txt({ status: 'valid', valid: true, days_remaining: 1 })[0]).toContain('Tu licencia vence mañana.')
110
+ cleanup()
111
+ expect(txt({ status: 'valid', valid: true, days_remaining: 0 })[0]).toContain('Tu licencia vence hoy.')
112
+ })
113
+ it('vigente no muestra nada', () => {
114
+ expect(txt({ status: 'valid', valid: true, days_remaining: 120 })).toEqual([])
115
+ })
116
+ it('en gracia con fecha', () => {
117
+ expect(txt({ status: 'grace', in_grace: true, days_remaining: 5, expires_at: '2026-10-01T00:00:00Z' })[0]).toContain(
118
+ 'Tu licencia venció el 1 de octubre de 2026. Tienes 5 días para renovarla antes de que se bloqueen los cambios.',
119
+ )
120
+ })
121
+ it('vencida en solo lectura, con exportación y contacto del vendedor', () => {
122
+ const onExport = vi.fn()
123
+ const [m] = txt(
124
+ { status: 'expired', on_expiry: 'read_only', expires_at: '2026-10-01T00:00:00Z', seller: SELLER },
125
+ { onExport },
126
+ )
127
+ expect(m).toContain(
128
+ 'Tu licencia venció el 1 de octubre de 2026. Tu información sigue disponible para consultar y exportar; renueva para volver a registrar cambios.',
129
+ )
130
+ expect(m).toContain('Contacto: Distribuidora Norte · ventas@norte.mx · +52 55 0000 0000')
131
+ fireEvent.click(screen.getByText('Exportar mis datos'))
132
+ expect(onExport).toHaveBeenCalled()
133
+ // En solo lectura el aviso es fijo.
134
+ expect(screen.queryByTitle('Descartar')).toBeNull()
135
+ })
136
+ it('el botón de exportar solo aparece en solo lectura', () => {
137
+ txt({ status: 'grace', in_grace: true, days_remaining: 3 }, { onExport: () => {} })
138
+ expect(screen.queryByText('Exportar mis datos')).toBeNull()
139
+ })
140
+ it('desactivada con plazo nombra al vendedor', () => {
141
+ const [m] = txt({ status: 'revoked', in_grace: true, grace_until: '2026-10-23T00:00:00Z', seller: SELLER })
142
+ expect(m).toContain(
143
+ 'Distribuidora Norte desactivó esta licencia. Tu información sigue disponible para consultar y exportar hasta el 23 de octubre de 2026.',
144
+ )
145
+ })
146
+ it('desactivada sin vendedor dice "Tu proveedor"', () => {
147
+ const [m] = txt({ status: 'revoked', in_grace: true })
148
+ expect(m).toContain('Tu proveedor desactivó esta licencia. Tu información sigue disponible para consultar y exportar.')
149
+ })
150
+ it('hub caído: el dueño lo ve; los demás usuarios no', () => {
151
+ const stale = { status: 'stale', stale: true, valid: true, last_checked_at: '2026-10-10T08:00:00Z' } as const
152
+ expect(txt(stale, { isOwner: true })[0]).toContain('No pudimos contactar al servidor de licencias desde el 10 de octubre de 2026. Seguimos funcionando.')
153
+ cleanup()
154
+ expect(txt(stale, { isOwner: false })).toEqual([])
155
+ cleanup()
156
+ // Sin informar el rol, tampoco se muestra (default seguro).
157
+ expect(txt(stale)).toEqual([])
158
+ })
159
+ it('clonada: solo el dueño, con el nombre del vendedor', () => {
160
+ const s = { status: 'valid', valid: true, days_remaining: 300, notices: ['clone_suspected'], seller: SELLER } as const
161
+ expect(txt(s, { isOwner: true })[0]).toContain('Detectamos esta licencia activa en otro servidor. Si no fue a propósito, avisa a Distribuidora Norte.')
162
+ cleanup()
163
+ expect(txt(s, { isOwner: false })).toEqual([])
164
+ cleanup()
165
+ expect(txt({ ...s, seller: undefined }, { isOwner: true })[0]).toContain('avisa a tu proveedor.')
166
+ })
167
+ it('clonada y por vencer se muestran juntas', () => {
168
+ const rows = txt({ status: 'valid', valid: true, days_remaining: 5, notices: ['clone_suspected'] }, { isOwner: true })
169
+ expect(rows).toHaveLength(2)
170
+ })
171
+ it('descartar un aviso menor no oculta la fila de clonado, que no se descarta', () => {
172
+ const st = { status: 'valid', valid: true, days_remaining: 5, notices: ['clone_suspected'] } as const
173
+ const { container } = render(<LicenseExpiryBanner state={make(st)} isOwner />)
174
+ fireEvent.click(screen.getByTitle('Descartar')) // solo hay un botón: el de la fila principal
175
+ const rows = Array.from(container.querySelectorAll('[role="alert"]')).map((n) => n.textContent ?? '')
176
+ expect(rows).toHaveLength(1)
177
+ expect(rows[0]).toContain('otro servidor')
178
+ expect(screen.queryByTitle('Descartar')).toBeNull()
179
+ })
180
+ })
181
+
182
+ describe('banner: inglés', () => {
183
+ it('textos exactos en inglés', () => {
184
+ LANG = 'en-US'
185
+ const { container } = render(
186
+ <LicenseExpiryBanner
187
+ state={make({ status: 'expired', on_expiry: 'read_only', expires_at: '2026-10-01T00:00:00Z', seller: SELLER })}
188
+ onExport={() => {}}
189
+ />,
190
+ )
191
+ const m = container.textContent ?? ''
192
+ expect(m).toContain('Your license expired on October 1, 2026. Your data is still available to view and export; renew to record changes again.')
193
+ expect(m).toContain('Contact: Distribuidora Norte · ventas@norte.mx · +52 55 0000 0000')
194
+ expect(screen.getByText('Export my data')).toBeTruthy()
195
+ cleanup()
196
+ const g = render(<LicenseExpiryBanner state={make({ status: 'grace', in_grace: true, days_remaining: 5, expires_at: '2026-10-01T00:00:00Z' })} />)
197
+ expect(g.container.textContent).toContain('Your license expired on October 1, 2026. You have 5 days to renew it before changes are blocked.')
198
+ })
199
+ })
200
+
201
+ describe('gate: modal con encabezado y pie fijos', () => {
202
+ it('vencida con solo lectura abre la app, no el modal', () => {
203
+ render(
204
+ <LicenseGate state={make({ status: 'expired', on_expiry: 'read_only' })} onActivate={noop} onExport={() => {}}>
205
+ {CHILD}
206
+ </LicenseGate>,
207
+ )
208
+ expect(screen.queryByRole('dialog')).toBeNull()
209
+ expect(screen.getByText('contenido protegido')).toBeTruthy()
210
+ expect(screen.getByText('Exportar mis datos')).toBeTruthy()
211
+ })
212
+
213
+ it('vencida sin solo lectura (instancias sin enlace de activación) sigue bloqueando como antes', () => {
214
+ render(
215
+ <LicenseGate state={make({ status: 'expired' })} onActivate={noop}>
216
+ {CHILD}
217
+ </LicenseGate>,
218
+ )
219
+ expect(screen.getByRole('dialog')).toBeTruthy()
220
+ expect(screen.getByText('Tu licencia venció')).toBeTruthy()
221
+ })
222
+
223
+ it('desactivada sin plazo: modal con título, texto y contacto del vendedor', () => {
224
+ render(
225
+ <LicenseGate state={make({ status: 'revoked', seller: SELLER })} onActivate={noop}>
226
+ {CHILD}
227
+ </LicenseGate>,
228
+ )
229
+ const dlg = screen.getByRole('dialog')
230
+ expect(within(dlg).getByText('Licencia desactivada')).toBeTruthy()
231
+ expect(within(dlg).getByText('Distribuidora Norte desactivó la licencia de esta instancia.')).toBeTruthy()
232
+ expect(dlg.querySelector('[data-license-part="seller"]')?.textContent).toContain('ventas@norte.mx')
233
+ })
234
+
235
+ it('sin licencia: textos en inglés', () => {
236
+ LANG = 'en'
237
+ render(
238
+ <LicenseGate state={make({ status: 'missing' })} onActivate={noop}>
239
+ {CHILD}
240
+ </LicenseGate>,
241
+ )
242
+ expect(screen.getByText('Activate your license')).toBeTruthy()
243
+ expect(screen.getByText("This instance doesn't have an active license yet.")).toBeTruthy()
244
+ expect(screen.getByText('Activate license')).toBeTruthy()
245
+ })
246
+
247
+ it('encabezado y pie fijos; solo el cuerpo se desplaza; el botón activa el formulario', async () => {
248
+ const onActivate = vi.fn().mockResolvedValue(undefined)
249
+ render(
250
+ <LicenseGate state={make({ status: 'missing' })} onActivate={onActivate}>
251
+ {CHILD}
252
+ </LicenseGate>,
253
+ )
254
+ const dlg = screen.getByRole('dialog')
255
+ const header = dlg.querySelector('[data-license-part="header"]') as HTMLElement
256
+ const body = dlg.querySelector('[data-license-part="body"]') as HTMLElement
257
+ const footer = dlg.querySelector('[data-license-part="footer"]') as HTMLElement
258
+ expect(header && body && footer).toBeTruthy()
259
+ expect(header.className).toContain('shrink-0')
260
+ expect(footer.className).toContain('shrink-0')
261
+ expect(body.className).toContain('overflow-y-auto')
262
+ expect(body.className).toContain('min-h-0')
263
+ // El contenedor limita su alto: sin eso el cuerpo no podría desplazarse.
264
+ expect(header.parentElement!.className).toContain('max-h-[')
265
+ expect(header.parentElement!.className).toContain('flex-col')
266
+ // El botón vive en el pie (fuera del cuerpo que se desplaza) y envía el formulario.
267
+ const btn = within(footer).getByText('Activar licencia').closest('button')!
268
+ expect(body.contains(btn)).toBe(false)
269
+ expect(btn.getAttribute('form')).toBe('license-gate-form')
270
+ fireEvent.change(screen.getByLabelText('Clave o token de licencia'), { target: { value: ' lic_x ' } })
271
+ fireEvent.click(btn)
272
+ await waitFor(() => expect(onActivate).toHaveBeenCalledWith('lic_x'))
273
+ })
274
+
275
+ it('con enlaces de activación cambia la etiqueta del campo', () => {
276
+ render(
277
+ <LicenseGate state={make({ status: 'missing' })} onActivate={noop} acceptsActivationLink>
278
+ {CHILD}
279
+ </LicenseGate>,
280
+ )
281
+ expect(screen.getByLabelText('Enlace, código o clave de licencia')).toBeTruthy()
282
+ })
283
+
284
+ it('un error con código del hub muestra el texto localizado de ese caso', async () => {
285
+ const err = Object.assign(new Error('license rejected: 409'), { code: 'activation_used' })
286
+ render(
287
+ <LicenseGate state={make({ status: 'missing' })} onActivate={vi.fn().mockRejectedValue(err)} acceptsActivationLink>
288
+ {CHILD}
289
+ </LicenseGate>,
290
+ )
291
+ fireEvent.change(screen.getByLabelText('Enlace, código o clave de licencia'), { target: { value: 'acs_x' } })
292
+ fireEvent.click(screen.getByText('Activar licencia'))
293
+ await waitFor(() =>
294
+ expect(screen.getByText('Este enlace ya se usó en otro servidor. Pide uno nuevo a tu proveedor.')).toBeTruthy(),
295
+ )
296
+ })
297
+
298
+ it('un error sin código muestra el mensaje del backend', async () => {
299
+ render(
300
+ <LicenseGate state={make({ status: 'missing' })} onActivate={vi.fn().mockRejectedValue(new Error('boom'))}>
301
+ {CHILD}
302
+ </LicenseGate>,
303
+ )
304
+ fireEvent.change(screen.getByLabelText('Clave o token de licencia'), { target: { value: 'x' } })
305
+ fireEvent.click(screen.getByText('Activar licencia'))
306
+ await waitFor(() => expect(screen.getByText('boom')).toBeTruthy())
307
+ })
308
+
309
+ it('vencida con exportación ofrece el botón en el pie del modal', () => {
310
+ const onExport = vi.fn()
311
+ render(
312
+ <LicenseGate state={make({ status: 'expired' })} onActivate={noop} onExport={onExport}>
313
+ {CHILD}
314
+ </LicenseGate>,
315
+ )
316
+ const footer = screen.getByRole('dialog').querySelector('[data-license-part="footer"]') as HTMLElement
317
+ fireEvent.click(within(footer).getByText('Exportar mis datos'))
318
+ expect(onExport).toHaveBeenCalled()
319
+ })
320
+
321
+ it('hub caído no estorba a un usuario que no es el dueño', () => {
322
+ render(
323
+ <LicenseGate state={make({ status: 'stale', stale: true, valid: true })} onActivate={noop} isOwner={false}>
324
+ {CHILD}
325
+ </LicenseGate>,
326
+ )
327
+ expect(screen.queryByRole('alert')).toBeNull()
328
+ expect(screen.queryByRole('dialog')).toBeNull()
329
+ })
330
+ })
331
+
332
+ describe('copy: sin eco de instrucciones', () => {
333
+ const ECHO = /\b(pega|pegar|pegue|ingresa|introduce|paste|enter your|type your)\b/i
334
+
335
+ it('ningún texto de estado (título, descripción, aviso) manda a pegar o escribir algo', () => {
336
+ const stateKeys = (m: Record<string, string>) =>
337
+ Object.entries(m).filter(([k]) => /\.(description|title)|_description|_title|banner\./.test(k) && !/placeholder|label|activate/.test(k))
338
+ for (const lang of ['es', 'en'] as const) {
339
+ for (const [k, v] of stateKeys(LICENSE_MESSAGES[lang])) {
340
+ expect(v, `${lang} ${k}`).not.toMatch(ECHO)
341
+ if (/description|banner\./.test(k)) expect(v, `${lang} ${k}`).not.toContain('lic_')
342
+ }
343
+ }
344
+ })
345
+
346
+ it('es y en tienen exactamente las mismas claves', () => {
347
+ expect(Object.keys(LICENSE_MESSAGES.en).sort()).toEqual(Object.keys(LICENSE_MESSAGES.es).sort())
348
+ })
349
+
350
+ it('cada texto con variable usa las mismas variables en es y en en', () => {
351
+ const vars = (s: string) => (s.match(/{{\s*\w+\s*}}/g) ?? []).map((x) => x.replace(/\s/g, '')).sort()
352
+ for (const k of Object.keys(LICENSE_MESSAGES.es)) {
353
+ expect(vars(LICENSE_MESSAGES.en[k]), k).toEqual(vars(LICENSE_MESSAGES.es[k]))
354
+ }
355
+ })
356
+ })
357
+
358
+ describe('insignia y registro i18n', () => {
359
+ it('la insignia de desactivada existe en es y en', () => {
360
+ render(<LicenseStatusBadge status="revoked" />)
361
+ expect(screen.getByText('Desactivada')).toBeTruthy()
362
+ cleanup()
363
+ LANG = 'en'
364
+ render(<LicenseStatusBadge status="revoked" />)
365
+ expect(screen.getByText('Deactivated')).toBeTruthy()
366
+ })
367
+
368
+ it('registerLicenseMessages siembra es/en sin pisar lo que el host ya definió', () => {
369
+ const calls: Array<[string, string, Record<string, unknown>, boolean | undefined, boolean | undefined]> = []
370
+ registerLicenseMessages({
371
+ addResourceBundle: (lng, ns, res, deep, overwrite) => {
372
+ calls.push([lng, ns, res as Record<string, unknown>, deep, overwrite])
373
+ },
374
+ })
375
+ expect(calls.map((c) => c[0]).sort()).toEqual(['en', 'es'])
376
+ for (const c of calls) expect(c[4]).toBe(false) // overwrite=false: el host manda
377
+ const es = calls.find((c) => c[0] === 'es')![2] as { license: { gate: { title: string } } }
378
+ expect(es.license.gate.title).toBe('Activa tu licencia')
379
+ expect(() => registerLicenseMessages(undefined)).not.toThrow()
380
+ })
381
+ })
package/src/index.ts CHANGED
@@ -11,14 +11,27 @@ export {
11
11
  LicenseStatusBadge,
12
12
  isLicenseOperable,
13
13
  isLicenseBlocking,
14
+ isLicenseReadOnly,
14
15
  isPresetEntitled,
15
16
  isTrialExpired,
17
+ deriveLicenseView,
18
+ isLicenseCloned,
19
+ sellerContactLine,
20
+ CLONE_NOTICE,
21
+ LICENSE_MESSAGES,
22
+ registerLicenseMessages,
16
23
  type LicenseGateProps,
17
24
  type LicenseExpiryBannerProps,
18
25
  type LicenseStatusBadgeProps,
19
26
  type LicenseState,
20
27
  type LicenseStatus,
28
+ type LicenseSeller,
29
+ type LicenseOnExpiry,
21
30
  type LicenseBranding,
31
+ type LicenseView,
32
+ type LicenseCondition,
33
+ type LicenseSeverity,
34
+ type LicenseLang,
22
35
  } from './license'
23
36
  export * from './options-context'
24
37
  export {
@@ -13,9 +13,28 @@ export {
13
13
  export {
14
14
  isLicenseOperable,
15
15
  isLicenseBlocking,
16
+ isLicenseReadOnly,
16
17
  isPresetEntitled,
17
18
  isTrialExpired,
18
19
  type LicenseState,
19
20
  type LicenseStatus,
21
+ type LicenseSeller,
22
+ type LicenseOnExpiry,
20
23
  type LicenseBranding,
21
24
  } from './types'
25
+ export {
26
+ deriveLicenseView,
27
+ isLicenseCloned,
28
+ sellerContactLine,
29
+ CLONE_NOTICE,
30
+ type LicenseView,
31
+ type LicenseCondition,
32
+ type LicenseSeverity,
33
+ } from './view'
34
+ export {
35
+ LICENSE_MESSAGES,
36
+ registerLicenseMessages,
37
+ formatLicenseDate,
38
+ licenseLang,
39
+ type LicenseLang,
40
+ } from './messages'