@owlmeans/web-auth-token 0.1.18-rc.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.
Files changed (121) hide show
  1. package/README.md +82 -0
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/web-auth-token/SKILL.md +128 -0
  4. package/build/@/components/ui/alert.d.ts +10 -0
  5. package/build/@/components/ui/alert.d.ts.map +1 -0
  6. package/build/@/components/ui/alert.js +26 -0
  7. package/build/@/components/ui/alert.js.map +1 -0
  8. package/build/@/components/ui/badge.d.ts +10 -0
  9. package/build/@/components/ui/badge.d.ts.map +1 -0
  10. package/build/@/components/ui/badge.js +23 -0
  11. package/build/@/components/ui/badge.js.map +1 -0
  12. package/build/@/components/ui/button.d.ts +11 -0
  13. package/build/@/components/ui/button.d.ts.map +1 -0
  14. package/build/@/components/ui/button.js +32 -0
  15. package/build/@/components/ui/button.js.map +1 -0
  16. package/build/@/components/ui/card.d.ts +10 -0
  17. package/build/@/components/ui/card.d.ts.map +1 -0
  18. package/build/@/components/ui/card.js +25 -0
  19. package/build/@/components/ui/card.js.map +1 -0
  20. package/build/@/components/ui/dialog.d.ts +17 -0
  21. package/build/@/components/ui/dialog.d.ts.map +1 -0
  22. package/build/@/components/ui/dialog.js +36 -0
  23. package/build/@/components/ui/dialog.js.map +1 -0
  24. package/build/@/components/ui/input.d.ts +4 -0
  25. package/build/@/components/ui/input.d.ts.map +1 -0
  26. package/build/@/components/ui/input.js +7 -0
  27. package/build/@/components/ui/input.js.map +1 -0
  28. package/build/@/components/ui/label.d.ts +5 -0
  29. package/build/@/components/ui/label.d.ts.map +1 -0
  30. package/build/@/components/ui/label.js +8 -0
  31. package/build/@/components/ui/label.js.map +1 -0
  32. package/build/@/components/ui/select.d.ts +16 -0
  33. package/build/@/components/ui/select.d.ts.map +1 -0
  34. package/build/@/components/ui/select.js +38 -0
  35. package/build/@/components/ui/select.js.map +1 -0
  36. package/build/@/components/ui/table.d.ts +11 -0
  37. package/build/@/components/ui/table.d.ts.map +1 -0
  38. package/build/@/components/ui/table.js +28 -0
  39. package/build/@/components/ui/table.js.map +1 -0
  40. package/build/@/lib/utils.d.ts +3 -0
  41. package/build/@/lib/utils.d.ts.map +1 -0
  42. package/build/@/lib/utils.js +6 -0
  43. package/build/@/lib/utils.js.map +1 -0
  44. package/build/components/connected.d.ts +16 -0
  45. package/build/components/connected.d.ts.map +1 -0
  46. package/build/components/connected.js +14 -0
  47. package/build/components/connected.js.map +1 -0
  48. package/build/components/index.d.ts +3 -0
  49. package/build/components/index.d.ts.map +1 -0
  50. package/build/components/index.js +3 -0
  51. package/build/components/index.js.map +1 -0
  52. package/build/components/panel.d.ts +11 -0
  53. package/build/components/panel.d.ts.map +1 -0
  54. package/build/components/panel.js +119 -0
  55. package/build/components/panel.js.map +1 -0
  56. package/build/consts.d.ts +19 -0
  57. package/build/consts.d.ts.map +1 -0
  58. package/build/consts.js +19 -0
  59. package/build/consts.js.map +1 -0
  60. package/build/helpers.d.ts +18 -0
  61. package/build/helpers.d.ts.map +1 -0
  62. package/build/helpers.js +45 -0
  63. package/build/helpers.js.map +1 -0
  64. package/build/hooks/use-access-tokens.d.ts +11 -0
  65. package/build/hooks/use-access-tokens.d.ts.map +1 -0
  66. package/build/hooks/use-access-tokens.js +74 -0
  67. package/build/hooks/use-access-tokens.js.map +1 -0
  68. package/build/i18n/be.json +51 -0
  69. package/build/i18n/de.json +51 -0
  70. package/build/i18n/en.json +51 -0
  71. package/build/i18n/es.json +51 -0
  72. package/build/i18n/pl.json +51 -0
  73. package/build/i18n/ru.json +51 -0
  74. package/build/i18n/uk.json +51 -0
  75. package/build/i18n.d.ts +2 -0
  76. package/build/i18n.d.ts.map +1 -0
  77. package/build/i18n.js +17 -0
  78. package/build/i18n.js.map +1 -0
  79. package/build/index.d.ts +8 -0
  80. package/build/index.d.ts.map +1 -0
  81. package/build/index.js +7 -0
  82. package/build/index.js.map +1 -0
  83. package/build/types.d.ts +54 -0
  84. package/build/types.d.ts.map +1 -0
  85. package/build/types.js +2 -0
  86. package/build/types.js.map +1 -0
  87. package/build/utils.d.ts +13 -0
  88. package/build/utils.d.ts.map +1 -0
  89. package/build/utils.js +14 -0
  90. package/build/utils.js.map +1 -0
  91. package/components.json +21 -0
  92. package/package.json +68 -0
  93. package/src/@/components/ui/alert.tsx +70 -0
  94. package/src/@/components/ui/badge.tsx +47 -0
  95. package/src/@/components/ui/button.tsx +60 -0
  96. package/src/@/components/ui/card.tsx +93 -0
  97. package/src/@/components/ui/dialog.tsx +147 -0
  98. package/src/@/components/ui/input.tsx +22 -0
  99. package/src/@/components/ui/label.tsx +23 -0
  100. package/src/@/components/ui/select.tsx +184 -0
  101. package/src/@/components/ui/table.tsx +115 -0
  102. package/src/@/globals.css +57 -0
  103. package/src/@/lib/utils.ts +6 -0
  104. package/src/components/connected.tsx +34 -0
  105. package/src/components/index.ts +2 -0
  106. package/src/components/panel.tsx +310 -0
  107. package/src/consts.ts +21 -0
  108. package/src/helpers.ts +50 -0
  109. package/src/hooks/use-access-tokens.ts +83 -0
  110. package/src/i18n/be.json +51 -0
  111. package/src/i18n/de.json +51 -0
  112. package/src/i18n/en.json +51 -0
  113. package/src/i18n/es.json +51 -0
  114. package/src/i18n/pl.json +51 -0
  115. package/src/i18n/ru.json +51 -0
  116. package/src/i18n/uk.json +51 -0
  117. package/src/i18n.ts +18 -0
  118. package/src/index.ts +7 -0
  119. package/src/types.ts +59 -0
  120. package/src/utils.ts +14 -0
  121. package/tsconfig.json +14 -0
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Zugriffstoken",
4
+ "description": "Langlebige Token, mit denen ein Skript oder eine Integration die API in Ihrem Namen aufruft.",
5
+ "create": "Token erstellen",
6
+ "empty": "Noch keine Zugriffstoken vorhanden.",
7
+ "col": {
8
+ "display": "Token",
9
+ "name": "Name",
10
+ "created": "Erstellt",
11
+ "last-used": "Zuletzt verwendet",
12
+ "expires": "Läuft ab",
13
+ "status": "Status"
14
+ },
15
+ "never": "Nie",
16
+ "never-used": "Nie verwendet",
17
+ "status": {
18
+ "active": "Aktiv",
19
+ "expired": "Abgelaufen",
20
+ "revoked": "Widerrufen"
21
+ },
22
+ "revoke": "Widerrufen",
23
+ "revoke-confirm": {
24
+ "title": "Dieses Token widerrufen?",
25
+ "description": "Alles, was es noch verwendet, funktioniert sofort nicht mehr. Das lässt sich nicht rückgängig machen.",
26
+ "cancel": "Abbrechen",
27
+ "confirm": "Widerrufen"
28
+ },
29
+ "dialog": {
30
+ "title": "Zugriffstoken erstellen",
31
+ "description": "Benennen Sie es nach dem Einsatzort, damit Sie Ihre Token später auseinanderhalten.",
32
+ "name-label": "Name",
33
+ "name-placeholder": "CI-Deployment",
34
+ "expiry-label": "Läuft ab",
35
+ "expiry": {
36
+ "30": "In 30 Tagen",
37
+ "90": "In 90 Tagen",
38
+ "365": "In einem Jahr",
39
+ "never": "Nie"
40
+ },
41
+ "create": "Erstellen",
42
+ "cancel": "Abbrechen",
43
+ "issued-title": "Ihr neues Zugriffstoken",
44
+ "issued-note": "Kopieren Sie es jetzt – es wird nur dieses eine Mal angezeigt.",
45
+ "copy": "Kopieren",
46
+ "copied": "Kopiert",
47
+ "done": "Fertig"
48
+ },
49
+ "error": "Etwas ist schiefgelaufen"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Access tokens",
4
+ "description": "Long-lived tokens that let a script or an integration call the API on your behalf.",
5
+ "create": "Create token",
6
+ "empty": "No access tokens yet.",
7
+ "col": {
8
+ "display": "Token",
9
+ "name": "Name",
10
+ "created": "Created",
11
+ "last-used": "Last used",
12
+ "expires": "Expires",
13
+ "status": "Status"
14
+ },
15
+ "never": "Never",
16
+ "never-used": "Never used",
17
+ "status": {
18
+ "active": "Active",
19
+ "expired": "Expired",
20
+ "revoked": "Revoked"
21
+ },
22
+ "revoke": "Revoke",
23
+ "revoke-confirm": {
24
+ "title": "Revoke this token?",
25
+ "description": "Anything still using it stops working immediately. This cannot be undone.",
26
+ "cancel": "Cancel",
27
+ "confirm": "Revoke"
28
+ },
29
+ "dialog": {
30
+ "title": "Create an access token",
31
+ "description": "Name it after where you will use it, so you can tell your tokens apart later.",
32
+ "name-label": "Name",
33
+ "name-placeholder": "CI deployment",
34
+ "expiry-label": "Expires",
35
+ "expiry": {
36
+ "30": "In 30 days",
37
+ "90": "In 90 days",
38
+ "365": "In a year",
39
+ "never": "Never"
40
+ },
41
+ "create": "Create",
42
+ "cancel": "Cancel",
43
+ "issued-title": "Your new access token",
44
+ "issued-note": "Copy it now — this is the only time it is shown.",
45
+ "copy": "Copy",
46
+ "copied": "Copied",
47
+ "done": "Done"
48
+ },
49
+ "error": "Something went wrong"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Tokens de acceso",
4
+ "description": "Tokens de larga duración con los que un script o una integración llama a la API en tu nombre.",
5
+ "create": "Crear token",
6
+ "empty": "Aún no hay tokens de acceso.",
7
+ "col": {
8
+ "display": "Token",
9
+ "name": "Nombre",
10
+ "created": "Creado",
11
+ "last-used": "Último uso",
12
+ "expires": "Caduca",
13
+ "status": "Estado"
14
+ },
15
+ "never": "Nunca",
16
+ "never-used": "Sin usar",
17
+ "status": {
18
+ "active": "Activo",
19
+ "expired": "Caducado",
20
+ "revoked": "Revocado"
21
+ },
22
+ "revoke": "Revocar",
23
+ "revoke-confirm": {
24
+ "title": "¿Revocar este token?",
25
+ "description": "Todo lo que aún lo use dejará de funcionar de inmediato. Esta acción no se puede deshacer.",
26
+ "cancel": "Cancelar",
27
+ "confirm": "Revocar"
28
+ },
29
+ "dialog": {
30
+ "title": "Crear un token de acceso",
31
+ "description": "Ponle el nombre del lugar donde lo vas a usar, para distinguir tus tokens más adelante.",
32
+ "name-label": "Nombre",
33
+ "name-placeholder": "Despliegue de CI",
34
+ "expiry-label": "Caduca",
35
+ "expiry": {
36
+ "30": "En 30 días",
37
+ "90": "En 90 días",
38
+ "365": "En un año",
39
+ "never": "Nunca"
40
+ },
41
+ "create": "Crear",
42
+ "cancel": "Cancelar",
43
+ "issued-title": "Tu nuevo token de acceso",
44
+ "issued-note": "Cópialo ahora: es la única vez que se muestra.",
45
+ "copy": "Copiar",
46
+ "copied": "Copiado",
47
+ "done": "Listo"
48
+ },
49
+ "error": "Algo ha salido mal"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Tokeny dostępu",
4
+ "description": "Długoterminowe tokeny, dzięki którym skrypt lub integracja wywołuje API w Twoim imieniu.",
5
+ "create": "Utwórz token",
6
+ "empty": "Nie masz jeszcze żadnych tokenów dostępu.",
7
+ "col": {
8
+ "display": "Token",
9
+ "name": "Nazwa",
10
+ "created": "Utworzono",
11
+ "last-used": "Ostatnio użyto",
12
+ "expires": "Wygasa",
13
+ "status": "Status"
14
+ },
15
+ "never": "Nigdy",
16
+ "never-used": "Nieużywany",
17
+ "status": {
18
+ "active": "Aktywny",
19
+ "expired": "Wygasł",
20
+ "revoked": "Unieważniony"
21
+ },
22
+ "revoke": "Unieważnij",
23
+ "revoke-confirm": {
24
+ "title": "Unieważnić ten token?",
25
+ "description": "Wszystko, co go jeszcze używa, natychmiast przestanie działać. Tej operacji nie można cofnąć.",
26
+ "cancel": "Anuluj",
27
+ "confirm": "Unieważnij"
28
+ },
29
+ "dialog": {
30
+ "title": "Utwórz token dostępu",
31
+ "description": "Nazwij go zgodnie z miejscem użycia, aby później odróżnić swoje tokeny.",
32
+ "name-label": "Nazwa",
33
+ "name-placeholder": "Wdrożenie CI",
34
+ "expiry-label": "Wygasa",
35
+ "expiry": {
36
+ "30": "Za 30 dni",
37
+ "90": "Za 90 dni",
38
+ "365": "Za rok",
39
+ "never": "Nigdy"
40
+ },
41
+ "create": "Utwórz",
42
+ "cancel": "Anuluj",
43
+ "issued-title": "Twój nowy token dostępu",
44
+ "issued-note": "Skopiuj go teraz — pokazujemy go tylko ten jeden raz.",
45
+ "copy": "Kopiuj",
46
+ "copied": "Skopiowano",
47
+ "done": "Gotowe"
48
+ },
49
+ "error": "Coś poszło nie tak"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Токены доступа",
4
+ "description": "Долгоживущие токены, с которыми скрипт или интеграция обращается к API от вашего имени.",
5
+ "create": "Создать токен",
6
+ "empty": "Токенов доступа пока нет.",
7
+ "col": {
8
+ "display": "Токен",
9
+ "name": "Название",
10
+ "created": "Создан",
11
+ "last-used": "Последнее использование",
12
+ "expires": "Истекает",
13
+ "status": "Статус"
14
+ },
15
+ "never": "Никогда",
16
+ "never-used": "Не использовался",
17
+ "status": {
18
+ "active": "Активен",
19
+ "expired": "Истёк",
20
+ "revoked": "Отозван"
21
+ },
22
+ "revoke": "Отозвать",
23
+ "revoke-confirm": {
24
+ "title": "Отозвать этот токен?",
25
+ "description": "Всё, что его ещё использует, сразу перестанет работать. Отменить это нельзя.",
26
+ "cancel": "Отмена",
27
+ "confirm": "Отозвать"
28
+ },
29
+ "dialog": {
30
+ "title": "Создание токена доступа",
31
+ "description": "Назовите его по месту использования, чтобы позже отличать свои токены друг от друга.",
32
+ "name-label": "Название",
33
+ "name-placeholder": "Деплой CI",
34
+ "expiry-label": "Истекает",
35
+ "expiry": {
36
+ "30": "Через 30 дней",
37
+ "90": "Через 90 дней",
38
+ "365": "Через год",
39
+ "never": "Никогда"
40
+ },
41
+ "create": "Создать",
42
+ "cancel": "Отмена",
43
+ "issued-title": "Ваш новый токен доступа",
44
+ "issued-note": "Скопируйте его сейчас — больше он не будет показан.",
45
+ "copy": "Копировать",
46
+ "copied": "Скопировано",
47
+ "done": "Готово"
48
+ },
49
+ "error": "Что-то пошло не так"
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "panel": {
3
+ "title": "Токени доступу",
4
+ "description": "Довготривалі токени, з якими скрипт або інтеграція звертається до API від вашого імені.",
5
+ "create": "Створити токен",
6
+ "empty": "Токенів доступу ще немає.",
7
+ "col": {
8
+ "display": "Токен",
9
+ "name": "Назва",
10
+ "created": "Створено",
11
+ "last-used": "Востаннє використано",
12
+ "expires": "Спливає",
13
+ "status": "Статус"
14
+ },
15
+ "never": "Ніколи",
16
+ "never-used": "Не використовувався",
17
+ "status": {
18
+ "active": "Активний",
19
+ "expired": "Сплив",
20
+ "revoked": "Відкликаний"
21
+ },
22
+ "revoke": "Відкликати",
23
+ "revoke-confirm": {
24
+ "title": "Відкликати цей токен?",
25
+ "description": "Усе, що його ще використовує, одразу перестане працювати. Скасувати це неможливо.",
26
+ "cancel": "Скасувати",
27
+ "confirm": "Відкликати"
28
+ },
29
+ "dialog": {
30
+ "title": "Створення токена доступу",
31
+ "description": "Назвіть його за місцем використання, щоб згодом розрізняти свої токени.",
32
+ "name-label": "Назва",
33
+ "name-placeholder": "Розгортання CI",
34
+ "expiry-label": "Спливає",
35
+ "expiry": {
36
+ "30": "Через 30 днів",
37
+ "90": "Через 90 днів",
38
+ "365": "Через рік",
39
+ "never": "Ніколи"
40
+ },
41
+ "create": "Створити",
42
+ "cancel": "Скасувати",
43
+ "issued-title": "Ваш новий токен доступу",
44
+ "issued-note": "Скопіюйте його зараз — більше він не відображатиметься.",
45
+ "copy": "Копіювати",
46
+ "copied": "Скопійовано",
47
+ "done": "Готово"
48
+ },
49
+ "error": "Щось пішло не так"
50
+ }
51
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":""}
package/build/i18n.js ADDED
@@ -0,0 +1,17 @@
1
+ import { addI18nLib } from '@owlmeans/i18n';
2
+ import { AUTH_TOKEN_I18N } from './consts.js';
3
+ import en from './i18n/en.json' with { type: 'json' };
4
+ import pl from './i18n/pl.json' with { type: 'json' };
5
+ import ru from './i18n/ru.json' with { type: 'json' };
6
+ import be from './i18n/be.json' with { type: 'json' };
7
+ import uk from './i18n/uk.json' with { type: 'json' };
8
+ import es from './i18n/es.json' with { type: 'json' };
9
+ import de from './i18n/de.json' with { type: 'json' };
10
+ addI18nLib('en', AUTH_TOKEN_I18N, en);
11
+ addI18nLib('pl', AUTH_TOKEN_I18N, pl);
12
+ addI18nLib('ru', AUTH_TOKEN_I18N, ru);
13
+ addI18nLib('be', AUTH_TOKEN_I18N, be);
14
+ addI18nLib('uk', AUTH_TOKEN_I18N, uk);
15
+ addI18nLib('es', AUTH_TOKEN_I18N, es);
16
+ addI18nLib('de', AUTH_TOKEN_I18N, de);
17
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AACrD,OAAO,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAErD,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AACrC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './consts.js';
2
+ export * from './utils.js';
3
+ export * from './helpers.js';
4
+ export * from './hooks/use-access-tokens.js';
5
+ export * from './components/index.js';
6
+ export * from './i18n.js';
7
+ export type * from './types.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA;AACzB,mBAAmB,YAAY,CAAA"}
package/build/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export * from './consts.js';
2
+ export * from './utils.js';
3
+ export * from './helpers.js';
4
+ export * from './hooks/use-access-tokens.js';
5
+ export * from './components/index.js';
6
+ export * from './i18n.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA"}
@@ -0,0 +1,54 @@
1
+ import type { AccessTokenView, CreateAccessToken, IssuedAccessToken } from '@owlmeans/auth-token';
2
+ /**
3
+ * The token surface, as a function of what it is given.
4
+ *
5
+ * The panel performs NO I/O: it renders what it is handed and reports what the user pressed. That
6
+ * is what lets an application mount it against its own transport — a manager facade that proxies
7
+ * the token routes, a mocked list in a harness — without the component knowing. All the I/O lives
8
+ * in {@link UseAccessTokens}.
9
+ */
10
+ export interface AccessTokensPanelProps {
11
+ items: AccessTokenView[];
12
+ /**
13
+ * The one moment the plaintext exists in the browser. While it is set the create dialog shows
14
+ * the shown-once step instead of the form; clearing it is `onDismissIssued`.
15
+ */
16
+ issued: IssuedAccessToken | null;
17
+ loading?: boolean;
18
+ error?: Error | null;
19
+ onCreate: (body: CreateAccessToken) => Promise<void>;
20
+ onRevoke: (id: string) => Promise<void>;
21
+ onDismissIssued: () => void;
22
+ /**
23
+ * A line shown beside the freshly issued token telling the reader what to do with it — a curl
24
+ * example, an environment-variable name. Already translated by whoever supplies it, because only
25
+ * the application knows what its own API is called.
26
+ */
27
+ usageHint?: string;
28
+ }
29
+ /** What {@link useAccessTokens} returns — the I/O half of the same surface. */
30
+ export interface UseAccessTokens {
31
+ items: AccessTokenView[];
32
+ issued: IssuedAccessToken | null;
33
+ loading: boolean;
34
+ error: Error | null;
35
+ reload: () => Promise<void>;
36
+ create: (body: CreateAccessToken) => Promise<void>;
37
+ revoke: (id: string) => Promise<void>;
38
+ dismissIssued: () => void;
39
+ }
40
+ /**
41
+ * The three entrypoint aliases the hook addresses.
42
+ *
43
+ * `makeAuthTokenEntrypoints` names them from the `authToken` tree by default, which is what the
44
+ * hook falls back to — but an application that mounted the same routes under its own aliases (a
45
+ * manager facade in front of the token service, say) passes its own here.
46
+ */
47
+ export interface AccessTokensAliases {
48
+ list: string;
49
+ create: string;
50
+ revoke: string;
51
+ }
52
+ /** What a row's badge says. Derived per render — see `tokenStatus`. */
53
+ export type AccessTokenStatus = 'active' | 'expired' | 'revoked';
54
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EACtD,MAAM,sBAAsB,CAAA;AAE7B;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB;;;OAGG;IACH,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,uEAAuE;AACvE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA"}
package/build/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * The class-name merger every component in this package is written against, exported so a
4
+ * consuming application doesn't declare its own copy.
5
+ *
6
+ * This is deliberately NOT a re-export of `@/lib/utils`. That specifier is left verbatim in the
7
+ * build and resolves to the CONSUMER's vendored file, so re-exporting it would hand an app back
8
+ * its own function and fail outright wherever the `@` alias isn't configured. The vendored copy
9
+ * under `src/@/lib/` stays exactly as shadcn emits it, because the package's own components must
10
+ * keep resolving through the `@` contract.
11
+ */
12
+ export declare const cn: (...inputs: ClassValue[]) => string;
13
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;GASG;AACH,eAAO,MAAM,EAAE,cAAe,UAAU,EAAE,KAAG,MAA+B,CAAA"}
package/build/utils.js ADDED
@@ -0,0 +1,14 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ /**
4
+ * The class-name merger every component in this package is written against, exported so a
5
+ * consuming application doesn't declare its own copy.
6
+ *
7
+ * This is deliberately NOT a re-export of `@/lib/utils`. That specifier is left verbatim in the
8
+ * build and resolves to the CONSUMER's vendored file, so re-exporting it would hand an app back
9
+ * its own function and fail outright wherever the `@` alias isn't configured. The vendored copy
10
+ * under `src/@/lib/` stays exactly as shadcn emits it, because the package's own components must
11
+ * keep resolving through the `@` contract.
12
+ */
13
+ export const cn = (...inputs) => twMerge(clsx(inputs));
14
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAoB,EAAU,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/@/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "ui": "@/components/ui",
17
+ "utils": "@/lib/utils",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ }
21
+ }
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@owlmeans/web-auth-token",
3
+ "version": "0.1.18-rc.1",
4
+ "license": "MIT",
5
+ "description": "The browser half of long-lived access tokens (API keys) — the token management panel, its headless hook and its translations.",
6
+ "type": "module",
7
+ "scripts": {
8
+ "build": "tsc -b",
9
+ "dev": "sleep 384 && nodemon -e ts,tsx,json --watch src --exec \"tsc -p ./tsconfig.json\"",
10
+ "watch": "tsc -b -w --preserveWatchOutput --pretty",
11
+ "test": "bun test ./tests"
12
+ },
13
+ "main": "build/index.js",
14
+ "module": "build/index.js",
15
+ "types": "build/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./build/index.js",
19
+ "require": "./build/index.js",
20
+ "default": "./build/index.js",
21
+ "module": "./build/index.js",
22
+ "types": "./build/index.d.ts"
23
+ }
24
+ },
25
+ "dependencies": {
26
+ "@owlmeans/auth-token": "^0.1.18-rc.1",
27
+ "@owlmeans/client": "^0.1.18-rc.17",
28
+ "@owlmeans/client-entrypoint": "^0.1.18-rc.14",
29
+ "@owlmeans/client-i18n": "^0.1.18-rc.16",
30
+ "@owlmeans/context": "^0.1.18-rc.9",
31
+ "@owlmeans/entrypoint": "^0.1.18-rc.12",
32
+ "@owlmeans/error": "^0.1.18-rc.9",
33
+ "@owlmeans/i18n": "^0.1.18-rc.9"
34
+ },
35
+ "peerDependencies": {
36
+ "@radix-ui/react-dialog": "*",
37
+ "@radix-ui/react-label": "*",
38
+ "@radix-ui/react-select": "*",
39
+ "@radix-ui/react-slot": "*",
40
+ "class-variance-authority": "*",
41
+ "clsx": "*",
42
+ "lucide-react": "*",
43
+ "react": "*",
44
+ "react-dom": "*",
45
+ "tailwind-merge": "*",
46
+ "tailwindcss": "*"
47
+ },
48
+ "devDependencies": {
49
+ "@owlmeans/dep-config": "workspace:*",
50
+ "@radix-ui/react-dialog": "^1.1.15",
51
+ "@radix-ui/react-label": "^2.1.0",
52
+ "@radix-ui/react-select": "^2.2.6",
53
+ "@radix-ui/react-slot": "^1.1.0",
54
+ "@types/bun": "^1.4.0",
55
+ "@types/react": "^19.2.17",
56
+ "@types/react-dom": "^19.2.3",
57
+ "class-variance-authority": "^0.7.0",
58
+ "clsx": "^2.1.0",
59
+ "lucide-react": "^1.31.0",
60
+ "nodemon": "^3.1.14",
61
+ "tailwind-merge": "^3.6.0",
62
+ "tailwindcss": "^4.0.0",
63
+ "typescript": "^7.0.2"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public"
67
+ }
68
+ }
@@ -0,0 +1,70 @@
1
+ // shadcn alert — sourced from shadcn (new-york) 2026-05-23
2
+ // Extended with a `success` variant on top of the default `default` / `destructive`.
3
+ import * as React from 'react'
4
+ import { cva, type VariantProps } from 'class-variance-authority'
5
+
6
+ import { cn } from '@/lib/utils'
7
+
8
+ const alertVariants = cva(
9
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: "bg-card text-card-foreground",
14
+ destructive:
15
+ "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
16
+ success:
17
+ "text-success bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-success/90",
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ },
23
+ }
24
+ )
25
+
26
+ function Alert({
27
+ className,
28
+ variant,
29
+ ...props
30
+ }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
31
+ return (
32
+ <div
33
+ data-slot="alert"
34
+ role="alert"
35
+ className={cn(alertVariants({ variant }), className)}
36
+ {...props}
37
+ />
38
+ )
39
+ }
40
+
41
+ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
42
+ return (
43
+ <div
44
+ data-slot="alert-title"
45
+ className={cn(
46
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
47
+ className
48
+ )}
49
+ {...props}
50
+ />
51
+ )
52
+ }
53
+
54
+ function AlertDescription({
55
+ className,
56
+ ...props
57
+ }: React.ComponentProps<"div">) {
58
+ return (
59
+ <div
60
+ data-slot="alert-description"
61
+ className={cn(
62
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
63
+ className
64
+ )}
65
+ {...props}
66
+ />
67
+ )
68
+ }
69
+
70
+ export { Alert, AlertTitle, AlertDescription }