@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.
- package/README.md +82 -0
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/web-auth-token/SKILL.md +128 -0
- package/build/@/components/ui/alert.d.ts +10 -0
- package/build/@/components/ui/alert.d.ts.map +1 -0
- package/build/@/components/ui/alert.js +26 -0
- package/build/@/components/ui/alert.js.map +1 -0
- package/build/@/components/ui/badge.d.ts +10 -0
- package/build/@/components/ui/badge.d.ts.map +1 -0
- package/build/@/components/ui/badge.js +23 -0
- package/build/@/components/ui/badge.js.map +1 -0
- package/build/@/components/ui/button.d.ts +11 -0
- package/build/@/components/ui/button.d.ts.map +1 -0
- package/build/@/components/ui/button.js +32 -0
- package/build/@/components/ui/button.js.map +1 -0
- package/build/@/components/ui/card.d.ts +10 -0
- package/build/@/components/ui/card.d.ts.map +1 -0
- package/build/@/components/ui/card.js +25 -0
- package/build/@/components/ui/card.js.map +1 -0
- package/build/@/components/ui/dialog.d.ts +17 -0
- package/build/@/components/ui/dialog.d.ts.map +1 -0
- package/build/@/components/ui/dialog.js +36 -0
- package/build/@/components/ui/dialog.js.map +1 -0
- package/build/@/components/ui/input.d.ts +4 -0
- package/build/@/components/ui/input.d.ts.map +1 -0
- package/build/@/components/ui/input.js +7 -0
- package/build/@/components/ui/input.js.map +1 -0
- package/build/@/components/ui/label.d.ts +5 -0
- package/build/@/components/ui/label.d.ts.map +1 -0
- package/build/@/components/ui/label.js +8 -0
- package/build/@/components/ui/label.js.map +1 -0
- package/build/@/components/ui/select.d.ts +16 -0
- package/build/@/components/ui/select.d.ts.map +1 -0
- package/build/@/components/ui/select.js +38 -0
- package/build/@/components/ui/select.js.map +1 -0
- package/build/@/components/ui/table.d.ts +11 -0
- package/build/@/components/ui/table.d.ts.map +1 -0
- package/build/@/components/ui/table.js +28 -0
- package/build/@/components/ui/table.js.map +1 -0
- package/build/@/lib/utils.d.ts +3 -0
- package/build/@/lib/utils.d.ts.map +1 -0
- package/build/@/lib/utils.js +6 -0
- package/build/@/lib/utils.js.map +1 -0
- package/build/components/connected.d.ts +16 -0
- package/build/components/connected.d.ts.map +1 -0
- package/build/components/connected.js +14 -0
- package/build/components/connected.js.map +1 -0
- package/build/components/index.d.ts +3 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/index.js +3 -0
- package/build/components/index.js.map +1 -0
- package/build/components/panel.d.ts +11 -0
- package/build/components/panel.d.ts.map +1 -0
- package/build/components/panel.js +119 -0
- package/build/components/panel.js.map +1 -0
- package/build/consts.d.ts +19 -0
- package/build/consts.d.ts.map +1 -0
- package/build/consts.js +19 -0
- package/build/consts.js.map +1 -0
- package/build/helpers.d.ts +18 -0
- package/build/helpers.d.ts.map +1 -0
- package/build/helpers.js +45 -0
- package/build/helpers.js.map +1 -0
- package/build/hooks/use-access-tokens.d.ts +11 -0
- package/build/hooks/use-access-tokens.d.ts.map +1 -0
- package/build/hooks/use-access-tokens.js +74 -0
- package/build/hooks/use-access-tokens.js.map +1 -0
- package/build/i18n/be.json +51 -0
- package/build/i18n/de.json +51 -0
- package/build/i18n/en.json +51 -0
- package/build/i18n/es.json +51 -0
- package/build/i18n/pl.json +51 -0
- package/build/i18n/ru.json +51 -0
- package/build/i18n/uk.json +51 -0
- package/build/i18n.d.ts +2 -0
- package/build/i18n.d.ts.map +1 -0
- package/build/i18n.js +17 -0
- package/build/i18n.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/build/types.d.ts +54 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/utils.d.ts +13 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +14 -0
- package/build/utils.js.map +1 -0
- package/components.json +21 -0
- package/package.json +68 -0
- package/src/@/components/ui/alert.tsx +70 -0
- package/src/@/components/ui/badge.tsx +47 -0
- package/src/@/components/ui/button.tsx +60 -0
- package/src/@/components/ui/card.tsx +93 -0
- package/src/@/components/ui/dialog.tsx +147 -0
- package/src/@/components/ui/input.tsx +22 -0
- package/src/@/components/ui/label.tsx +23 -0
- package/src/@/components/ui/select.tsx +184 -0
- package/src/@/components/ui/table.tsx +115 -0
- package/src/@/globals.css +57 -0
- package/src/@/lib/utils.ts +6 -0
- package/src/components/connected.tsx +34 -0
- package/src/components/index.ts +2 -0
- package/src/components/panel.tsx +310 -0
- package/src/consts.ts +21 -0
- package/src/helpers.ts +50 -0
- package/src/hooks/use-access-tokens.ts +83 -0
- package/src/i18n/be.json +51 -0
- package/src/i18n/de.json +51 -0
- package/src/i18n/en.json +51 -0
- package/src/i18n/es.json +51 -0
- package/src/i18n/pl.json +51 -0
- package/src/i18n/ru.json +51 -0
- package/src/i18n/uk.json +51 -0
- package/src/i18n.ts +18 -0
- package/src/index.ts +7 -0
- package/src/types.ts +59 -0
- package/src/utils.ts +14 -0
- package/tsconfig.json +14 -0
package/src/i18n/en.json
ADDED
|
@@ -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
|
+
}
|
package/src/i18n/es.json
ADDED
|
@@ -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
|
+
}
|
package/src/i18n/pl.json
ADDED
|
@@ -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
|
+
}
|
package/src/i18n/ru.json
ADDED
|
@@ -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
|
+
}
|
package/src/i18n/uk.json
ADDED
|
@@ -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
|
+
}
|
package/src/i18n.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { addI18nLib } from '@owlmeans/i18n'
|
|
2
|
+
import { AUTH_TOKEN_I18N } from './consts.js'
|
|
3
|
+
|
|
4
|
+
import en from './i18n/en.json' with { type: 'json' }
|
|
5
|
+
import pl from './i18n/pl.json' with { type: 'json' }
|
|
6
|
+
import ru from './i18n/ru.json' with { type: 'json' }
|
|
7
|
+
import be from './i18n/be.json' with { type: 'json' }
|
|
8
|
+
import uk from './i18n/uk.json' with { type: 'json' }
|
|
9
|
+
import es from './i18n/es.json' with { type: 'json' }
|
|
10
|
+
import de from './i18n/de.json' with { type: 'json' }
|
|
11
|
+
|
|
12
|
+
addI18nLib('en', AUTH_TOKEN_I18N, en)
|
|
13
|
+
addI18nLib('pl', AUTH_TOKEN_I18N, pl)
|
|
14
|
+
addI18nLib('ru', AUTH_TOKEN_I18N, ru)
|
|
15
|
+
addI18nLib('be', AUTH_TOKEN_I18N, be)
|
|
16
|
+
addI18nLib('uk', AUTH_TOKEN_I18N, uk)
|
|
17
|
+
addI18nLib('es', AUTH_TOKEN_I18N, es)
|
|
18
|
+
addI18nLib('de', AUTH_TOKEN_I18N, de)
|
package/src/index.ts
ADDED
package/src/types.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccessTokenView, CreateAccessToken, IssuedAccessToken
|
|
3
|
+
} from '@owlmeans/auth-token'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The token surface, as a function of what it is given.
|
|
7
|
+
*
|
|
8
|
+
* The panel performs NO I/O: it renders what it is handed and reports what the user pressed. That
|
|
9
|
+
* is what lets an application mount it against its own transport — a manager facade that proxies
|
|
10
|
+
* the token routes, a mocked list in a harness — without the component knowing. All the I/O lives
|
|
11
|
+
* in {@link UseAccessTokens}.
|
|
12
|
+
*/
|
|
13
|
+
export interface AccessTokensPanelProps {
|
|
14
|
+
items: AccessTokenView[]
|
|
15
|
+
/**
|
|
16
|
+
* The one moment the plaintext exists in the browser. While it is set the create dialog shows
|
|
17
|
+
* the shown-once step instead of the form; clearing it is `onDismissIssued`.
|
|
18
|
+
*/
|
|
19
|
+
issued: IssuedAccessToken | null
|
|
20
|
+
loading?: boolean
|
|
21
|
+
error?: Error | null
|
|
22
|
+
onCreate: (body: CreateAccessToken) => Promise<void>
|
|
23
|
+
onRevoke: (id: string) => Promise<void>
|
|
24
|
+
onDismissIssued: () => void
|
|
25
|
+
/**
|
|
26
|
+
* A line shown beside the freshly issued token telling the reader what to do with it — a curl
|
|
27
|
+
* example, an environment-variable name. Already translated by whoever supplies it, because only
|
|
28
|
+
* the application knows what its own API is called.
|
|
29
|
+
*/
|
|
30
|
+
usageHint?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** What {@link useAccessTokens} returns — the I/O half of the same surface. */
|
|
34
|
+
export interface UseAccessTokens {
|
|
35
|
+
items: AccessTokenView[]
|
|
36
|
+
issued: IssuedAccessToken | null
|
|
37
|
+
loading: boolean
|
|
38
|
+
error: Error | null
|
|
39
|
+
reload: () => Promise<void>
|
|
40
|
+
create: (body: CreateAccessToken) => Promise<void>
|
|
41
|
+
revoke: (id: string) => Promise<void>
|
|
42
|
+
dismissIssued: () => void
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The three entrypoint aliases the hook addresses.
|
|
47
|
+
*
|
|
48
|
+
* `makeAuthTokenEntrypoints` names them from the `authToken` tree by default, which is what the
|
|
49
|
+
* hook falls back to — but an application that mounted the same routes under its own aliases (a
|
|
50
|
+
* manager facade in front of the token service, say) passes its own here.
|
|
51
|
+
*/
|
|
52
|
+
export interface AccessTokensAliases {
|
|
53
|
+
list: string
|
|
54
|
+
create: string
|
|
55
|
+
revoke: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** What a row's badge says. Derived per render — see `tokenStatus`. */
|
|
59
|
+
export type AccessTokenStatus = 'active' | 'expired' | 'revoked'
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { clsx, type ClassValue } from 'clsx'
|
|
2
|
+
import { twMerge } from 'tailwind-merge'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The class-name merger every component in this package is written against, exported so a
|
|
6
|
+
* consuming application doesn't declare its own copy.
|
|
7
|
+
*
|
|
8
|
+
* This is deliberately NOT a re-export of `@/lib/utils`. That specifier is left verbatim in the
|
|
9
|
+
* build and resolves to the CONSUMER's vendored file, so re-exporting it would hand an app back
|
|
10
|
+
* its own function and fail outright wherever the `@` alias isn't configured. The vendored copy
|
|
11
|
+
* under `src/@/lib/` stays exactly as shadcn emits it, because the package's own components must
|
|
12
|
+
* keep resolving through the `@` contract.
|
|
13
|
+
*/
|
|
14
|
+
export const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs))
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"@owlmeans/dep-config/tsconfig.base.json",
|
|
4
|
+
"@owlmeans/dep-config/tsconfig.react.json"
|
|
5
|
+
],
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": ["./src/@/*"]
|
|
9
|
+
},
|
|
10
|
+
"rootDir": "./src/",
|
|
11
|
+
"outDir": "./build/"
|
|
12
|
+
},
|
|
13
|
+
"exclude": ["./dist/**/*", "./build/**/*", "./tests/**/*", "./*.ts"]
|
|
14
|
+
}
|