@liorian/sdk 0.28.0-alpha.56010ca
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 +483 -0
- package/package.json +94 -0
- package/schemas/module.schema.json +818 -0
- package/src/application/index.ts +3 -0
- package/src/application/module-instance.ts +36 -0
- package/src/application/service/auth-api-service.ts +291 -0
- package/src/application/service/auth-user.service.ts +108 -0
- package/src/application/service/index.ts +12 -0
- package/src/application/service/module-activation-api.service.ts +105 -0
- package/src/application/service/notifications-api-service.ts +38 -0
- package/src/application/service/notifications-push.service.ts +299 -0
- package/src/application/service/notifications-socket-service.ts +76 -0
- package/src/application/service/organizations-api-service.ts +104 -0
- package/src/application/service/otp-api-service.ts +11 -0
- package/src/application/service/storage-api-service.ts +77 -0
- package/src/application/service/storefront-api.service.ts +72 -0
- package/src/application/service/user-preferences-api.service.ts +57 -0
- package/src/domain/config/app.config.ts +35 -0
- package/src/domain/config/auth.config.ts +30 -0
- package/src/domain/config/index.ts +4 -0
- package/src/domain/config/logo.config.ts +17 -0
- package/src/domain/entities/activities.interface.ts +18 -0
- package/src/domain/entities/catalog.interface.ts +96 -0
- package/src/domain/entities/index.ts +13 -0
- package/src/domain/entities/media.ts +22 -0
- package/src/domain/entities/module-activation.interface.ts +173 -0
- package/src/domain/entities/module.interface.ts +101 -0
- package/src/domain/entities/notification.interface.ts +23 -0
- package/src/domain/entities/objectable.type.ts +3 -0
- package/src/domain/entities/organization.interface.ts +81 -0
- package/src/domain/entities/user-auth.interface.ts +17 -0
- package/src/domain/entities/user-phone.interface.ts +11 -0
- package/src/domain/entities/user-profile.interface.ts +23 -0
- package/src/domain/entities/user.interface.ts +79 -0
- package/src/domain/enums/coloring.enum.ts +6 -0
- package/src/domain/enums/domains.enum.ts +282 -0
- package/src/domain/enums/index.ts +8 -0
- package/src/domain/enums/module-category.enum.ts +57 -0
- package/src/domain/enums/module.enum.ts +97 -0
- package/src/domain/enums/routine.enum.ts +12 -0
- package/src/domain/enums/user-profile.enum.ts +25 -0
- package/src/domain/enums/user-status.enum.ts +7 -0
- package/src/domain/index.ts +6 -0
- package/src/domain/typing/auth-caches.ts +12 -0
- package/src/domain/typing/auth-oauth.types.ts +172 -0
- package/src/domain/typing/devise.ts +2 -0
- package/src/domain/typing/index.ts +10 -0
- package/src/domain/typing/response.ts +30 -0
- package/src/domain/typing/routine.types.ts +113 -0
- package/src/domain/typing/session.interface.ts +28 -0
- package/src/domain/typing/statisticals.ts +11 -0
- package/src/domain/typing/user-media-upload.ts +9 -0
- package/src/domain/typing/values.ts +6 -0
- package/src/index.tsx +168 -0
- package/src/infrastructure/capabilities/cache-storage/capability.ts +129 -0
- package/src/infrastructure/capabilities/cache-storage/enum.ts +5 -0
- package/src/infrastructure/capabilities/cache-storage/index.ts +4 -0
- package/src/infrastructure/capabilities/cache-storage/types.ts +13 -0
- package/src/infrastructure/capabilities/index.ts +3 -0
- package/src/infrastructure/capabilities/stackable/capability.ts +55 -0
- package/src/infrastructure/capabilities/stackable/index.ts +3 -0
- package/src/infrastructure/capabilities/stackable/types.ts +24 -0
- package/src/infrastructure/common-classname.constant.ts +4 -0
- package/src/infrastructure/data/countries.ts +208 -0
- package/src/infrastructure/data/gender.ts +5 -0
- package/src/infrastructure/data/index.ts +3 -0
- package/src/infrastructure/dataset/index.ts +3 -0
- package/src/infrastructure/dataset/sign-in.dataset.ts +21 -0
- package/src/infrastructure/dataset/sign-up.dataset.ts +64 -0
- package/src/infrastructure/hooks/index.ts +10 -0
- package/src/infrastructure/hooks/use-activity-lock-draft.ts +69 -0
- package/src/infrastructure/hooks/use-auth.ts +24 -0
- package/src/infrastructure/hooks/use-elastic-interaction.ts +180 -0
- package/src/infrastructure/hooks/use-is-desktop.ts +25 -0
- package/src/infrastructure/hooks/use-is-tauri.ts +17 -0
- package/src/infrastructure/hooks/use-mobile.ts +19 -0
- package/src/infrastructure/hooks/use-notifications.ts +128 -0
- package/src/infrastructure/hooks/use-recent-colors.ts +113 -0
- package/src/infrastructure/hooks/use-recent-modules.ts +76 -0
- package/src/infrastructure/index.tsx +11 -0
- package/src/infrastructure/library/design-system.ts +95 -0
- package/src/infrastructure/library/index.tsx +5 -0
- package/src/infrastructure/library/motion-utils.ts +77 -0
- package/src/infrastructure/library/motion.tsx +31 -0
- package/src/infrastructure/library/scroll-progress.tsx +93 -0
- package/src/infrastructure/providers/auth-guard.provider.tsx +47 -0
- package/src/infrastructure/providers/auth.provider.tsx +168 -0
- package/src/infrastructure/providers/index.tsx +8 -0
- package/src/infrastructure/providers/module-usage.provider.tsx +95 -0
- package/src/infrastructure/providers/modules-guard.provider.tsx +64 -0
- package/src/infrastructure/providers/modules-routines.provider.tsx +33 -0
- package/src/infrastructure/providers/modules-switcher.provider.tsx +25 -0
- package/src/infrastructure/providers/query.provider.tsx +27 -0
- package/src/infrastructure/routines/__tests__/routine.test.ts +368 -0
- package/src/infrastructure/routines/index.tsx +3 -0
- package/src/infrastructure/routines/routine.hook.ts +121 -0
- package/src/infrastructure/routines/routine.ts +283 -0
- package/src/infrastructure/routines/routine.tsx +283 -0
- package/src/infrastructure/stores/activity-lock.store.ts +22 -0
- package/src/infrastructure/stores/auth-user-connected.store.ts +24 -0
- package/src/infrastructure/stores/dataset.store.ts +106 -0
- package/src/infrastructure/stores/index.ts +6 -0
- package/src/infrastructure/stores/module.store.ts +266 -0
- package/src/infrastructure/stores/upload.store.ts +198 -0
- package/src/infrastructure/utilities/access-label.util.ts +158 -0
- package/src/infrastructure/utilities/activities.util.tsx +54 -0
- package/src/infrastructure/utilities/activity-lock.service.ts +263 -0
- package/src/infrastructure/utilities/activity-tracker.service.ts +205 -0
- package/src/infrastructure/utilities/api-service.ts +237 -0
- package/src/infrastructure/utilities/auth-logout.util.ts +23 -0
- package/src/infrastructure/utilities/classname.util.ts +7 -0
- package/src/infrastructure/utilities/encryption.service.ts +125 -0
- package/src/infrastructure/utilities/form-snapshot.service.ts +304 -0
- package/src/infrastructure/utilities/format.util.ts +40 -0
- package/src/infrastructure/utilities/index.tsx +23 -0
- package/src/infrastructure/utilities/media-label.service.ts +47 -0
- package/src/infrastructure/utilities/modules.ts +11 -0
- package/src/infrastructure/utilities/permission.util.ts +22 -0
- package/src/infrastructure/utilities/push-permission.util.ts +43 -0
- package/src/infrastructure/utilities/route-access.ts +38 -0
- package/src/infrastructure/utilities/socket-service.ts +123 -0
- package/src/infrastructure/utilities/sso-auth.util.ts +188 -0
- package/src/infrastructure/utilities/stringable.util.ts +16 -0
- package/src/infrastructure/utilities/strings.util.ts +18 -0
- package/src/infrastructure/utilities/tauri.util.ts +15 -0
- package/src/infrastructure/utilities/utils.ts +6 -0
- package/src/infrastructure/utilities/values.ts +5 -0
- package/src/presentation/8starlabs-ui/button.tsx +94 -0
- package/src/presentation/8starlabs-ui/flip-clock.tsx +368 -0
- package/src/presentation/8starlabs-ui/heatmap.tsx +430 -0
- package/src/presentation/8starlabs-ui/hooks/index.tsx +2 -0
- package/src/presentation/8starlabs-ui/hooks/use-mobile.ts +21 -0
- package/src/presentation/8starlabs-ui/index.tsx +20 -0
- package/src/presentation/8starlabs-ui/json-viewer.tsx +972 -0
- package/src/presentation/8starlabs-ui/marquee.tsx +134 -0
- package/src/presentation/8starlabs-ui/partition-bar.tsx +198 -0
- package/src/presentation/8starlabs-ui/scroll-fade.tsx +158 -0
- package/src/presentation/8starlabs-ui/status-indicator.tsx +86 -0
- package/src/presentation/8starlabs-ui/system-banner.tsx +50 -0
- package/src/presentation/8starlabs-ui/timeline.tsx +576 -0
- package/src/presentation/8starlabs-ui/transport-badge.tsx +249 -0
- package/src/presentation/8starlabs-ui/ui/copy-button.tsx +60 -0
- package/src/presentation/8starlabs-ui/ui/index.tsx +2 -0
- package/src/presentation/analytics-section.tsx +85 -0
- package/src/presentation/app-sidebar.tsx +234 -0
- package/src/presentation/charts/area-widget.chart-skeleton.tsx +61 -0
- package/src/presentation/charts/area-widget.chart.tsx +128 -0
- package/src/presentation/charts/chart-widgets.types.ts +81 -0
- package/src/presentation/charts/index.tsx +16 -0
- package/src/presentation/charts/line-widget.chart-skeleton.tsx +64 -0
- package/src/presentation/charts/line-widget.chart.tsx +105 -0
- package/src/presentation/charts/pie-widget.chart-skeleton.tsx +56 -0
- package/src/presentation/charts/pie-widget.chart.tsx +168 -0
- package/src/presentation/charts/radar-widget.chart-skeleton.tsx +67 -0
- package/src/presentation/charts/radar-widget.chart.tsx +80 -0
- package/src/presentation/charts/radial-stacked-widget.chart-skeleton.tsx +66 -0
- package/src/presentation/charts/radial-stacked-widget.chart.tsx +120 -0
- package/src/presentation/charts/radial-widget.chart-skeleton.tsx +61 -0
- package/src/presentation/charts/radial-widget.chart.tsx +87 -0
- package/src/presentation/charts/tooltip-widget.chart-skeleton.tsx +64 -0
- package/src/presentation/charts/tooltip-widget.chart.tsx +89 -0
- package/src/presentation/components/activity-actions.tsx +20 -0
- package/src/presentation/components/activity-container.tsx +55 -0
- package/src/presentation/components/activity-content.tsx +20 -0
- package/src/presentation/components/activity-descriptor-parser.tsx +37 -0
- package/src/presentation/components/activity-header.tsx +20 -0
- package/src/presentation/components/activity-loader.tsx +19 -0
- package/src/presentation/components/activity-title.tsx +32 -0
- package/src/presentation/components/activity.tsx +22 -0
- package/src/presentation/components/auth/index.tsx +4 -0
- package/src/presentation/components/auth/sso-callback.view.tsx +44 -0
- package/src/presentation/components/auth/sso-disconnect.view.tsx +41 -0
- package/src/presentation/components/auth/sso-sign-in.view.tsx +29 -0
- package/src/presentation/components/auth-lock-screen.tsx +309 -0
- package/src/presentation/components/auth-session.view.tsx +17 -0
- package/src/presentation/components/data-table.tsx +814 -0
- package/src/presentation/components/dynamic-icon.tsx +16 -0
- package/src/presentation/components/floating-upload.tsx +291 -0
- package/src/presentation/components/index.tsx +40 -0
- package/src/presentation/components/local-time.tsx +170 -0
- package/src/presentation/components/markdown-parser.tsx +201 -0
- package/src/presentation/components/message-scroller.tsx +131 -0
- package/src/presentation/components/module-first-access-config.view.tsx +181 -0
- package/src/presentation/components/module-first-access-pending.view.tsx +38 -0
- package/src/presentation/components/module-guard.tsx +34 -0
- package/src/presentation/components/modules-first-access.guard.tsx +88 -0
- package/src/presentation/components/modules-guard-forbidden.tsx +46 -0
- package/src/presentation/components/notification-details.modal.tsx +145 -0
- package/src/presentation/components/notification-item.tsx +127 -0
- package/src/presentation/components/notifications-popover.tsx +128 -0
- package/src/presentation/components/push-notifications.provider.tsx +65 -0
- package/src/presentation/components/upload-progress-dialog.tsx +140 -0
- package/src/presentation/components/waiting-bar.tsx +22 -0
- package/src/presentation/components/waiting-section.tsx +15 -0
- package/src/presentation/components/waiting.tsx +14 -0
- package/src/presentation/data-grid/data-grid-empty.tsx +24 -0
- package/src/presentation/data-grid/data-grid-search-engine.tsx +32 -0
- package/src/presentation/data-grid/data-grid.tsx +892 -0
- package/src/presentation/data-grid/index.tsx +4 -0
- package/src/presentation/form-screen.tsx +95 -0
- package/src/presentation/icons/custom.tsx +20 -0
- package/src/presentation/icons/glyphIcons.tsx +53 -0
- package/src/presentation/icons/icons.enum.ts +4 -0
- package/src/presentation/icons/icons.util.ts +6 -0
- package/src/presentation/icons/index.tsx +8 -0
- package/src/presentation/icons/lucide.tsx +17 -0
- package/src/presentation/icons/remix.tsx +33 -0
- package/src/presentation/icons/types.ts +27 -0
- package/src/presentation/index.tsx +45 -0
- package/src/presentation/modals/components/ModalBox.tsx +74 -0
- package/src/presentation/modals/components/ModalPortal.tsx +31 -0
- package/src/presentation/modals/components/ModalStepper.tsx +319 -0
- package/src/presentation/modals/components/ModalWrapper.tsx +65 -0
- package/src/presentation/modals/components/index.tsx +5 -0
- package/src/presentation/modals/hooks/index.ts +2 -0
- package/src/presentation/modals/hooks/useModal.ts +38 -0
- package/src/presentation/modals/index.tsx +5 -0
- package/src/presentation/modals/stores/index.ts +2 -0
- package/src/presentation/modals/stores/useModalStore.ts +90 -0
- package/src/presentation/modals/types/index.ts +2 -0
- package/src/presentation/modals/types/modal.type.ts +33 -0
- package/src/presentation/module-menubar.tsx +300 -0
- package/src/presentation/module-widget.tsx +233 -0
- package/src/presentation/nav-documents.tsx +89 -0
- package/src/presentation/nav-main.tsx +62 -0
- package/src/presentation/nav-secondary.tsx +41 -0
- package/src/presentation/nav-user.tsx +109 -0
- package/src/presentation/permission-action-badge.tsx +35 -0
- package/src/presentation/reui/index.tsx +3 -0
- package/src/presentation/reui/stepper.tsx +508 -0
- package/src/presentation/reui/timeline.tsx +226 -0
- package/src/presentation/sheets/index.tsx +2 -0
- package/src/presentation/sheets/legacy-sheet-header.tsx +0 -0
- package/src/presentation/sheets/legacy-sheet.tsx +37 -0
- package/src/presentation/size.enum.ts +19 -0
- package/src/presentation/system/index.tsx +3 -0
- package/src/presentation/system/logo.theme.tsx +21 -0
- package/src/presentation/system/types.ts +10 -0
- package/src/presentation/theme/index.tsx +6 -0
- package/src/presentation/theme/prefer-color-scheme.tsx +50 -0
- package/src/presentation/theme/switch-color-scheme.tsx +16 -0
- package/src/presentation/theme/theme-switcher-button.tsx +20 -0
- package/src/presentation/theme/theme.enum.ts +4 -0
- package/src/presentation/theme/theme.store.ts +87 -0
- package/src/presentation/themes/index.tsx +2 -0
- package/src/presentation/themes/katon/dashboard-layout.tsx +1080 -0
- package/src/presentation/themes/katon/edge-section.tsx +19 -0
- package/src/presentation/themes/katon/header-menubar.tsx +270 -0
- package/src/presentation/themes/katon/header-modules-available.tsx +44 -0
- package/src/presentation/themes/katon/header-modules-recents.tsx +52 -0
- package/src/presentation/themes/katon/header-modules-store.tsx +25 -0
- package/src/presentation/themes/katon/header-options.tsx +13 -0
- package/src/presentation/themes/katon/header-organization-select.tsx +146 -0
- package/src/presentation/themes/katon/header-routines.tsx +74 -0
- package/src/presentation/themes/katon/header-tasks-connected-user.tsx +150 -0
- package/src/presentation/themes/katon/index.tsx +16 -0
- package/src/presentation/themes/katon/main-wrapper.tsx +34 -0
- package/src/presentation/themes/katon/module-item-link.tsx +32 -0
- package/src/presentation/themes/katon/view-frame.tsx +25 -0
- package/src/presentation/themes/katon/view-helmet.tsx +53 -0
- package/src/presentation/themes/katon/view-status.tsx +32 -0
- package/src/presentation/themes/katon/view-wrapper.tsx +15 -0
- package/src/presentation/themes/katon/view.tsx +42 -0
- package/src/presentation/ui/accordion-multiselect.tsx +206 -0
- package/src/presentation/ui/accordion.tsx +81 -0
- package/src/presentation/ui/alert-dialog.tsx +199 -0
- package/src/presentation/ui/alert.tsx +76 -0
- package/src/presentation/ui/aspect-ratio.tsx +11 -0
- package/src/presentation/ui/attachment.tsx +204 -0
- package/src/presentation/ui/avatar.tsx +112 -0
- package/src/presentation/ui/badge.tsx +49 -0
- package/src/presentation/ui/breadcrumb.tsx +122 -0
- package/src/presentation/ui/bubble.tsx +125 -0
- package/src/presentation/ui/button-group.tsx +83 -0
- package/src/presentation/ui/button.tsx +87 -0
- package/src/presentation/ui/calendar.tsx +222 -0
- package/src/presentation/ui/card.tsx +106 -0
- package/src/presentation/ui/carousel.tsx +242 -0
- package/src/presentation/ui/chart.tsx +373 -0
- package/src/presentation/ui/checkbox.tsx +33 -0
- package/src/presentation/ui/clickable.tsx +58 -0
- package/src/presentation/ui/collapsible.tsx +33 -0
- package/src/presentation/ui/color-swatch-selector.tsx +81 -0
- package/src/presentation/ui/combobox.tsx +299 -0
- package/src/presentation/ui/command.tsx +195 -0
- package/src/presentation/ui/context-menu.tsx +263 -0
- package/src/presentation/ui/dialog.tsx +168 -0
- package/src/presentation/ui/direction.tsx +22 -0
- package/src/presentation/ui/drawer.tsx +134 -0
- package/src/presentation/ui/dropdown-menu.tsx +269 -0
- package/src/presentation/ui/empty.tsx +104 -0
- package/src/presentation/ui/field.tsx +238 -0
- package/src/presentation/ui/granularity-selector.tsx +58 -0
- package/src/presentation/ui/hover-card.tsx +44 -0
- package/src/presentation/ui/index.tsx +74 -0
- package/src/presentation/ui/input-group.tsx +156 -0
- package/src/presentation/ui/input-otp.tsx +87 -0
- package/src/presentation/ui/input.tsx +19 -0
- package/src/presentation/ui/item.tsx +196 -0
- package/src/presentation/ui/kpi-card.tsx +203 -0
- package/src/presentation/ui/label-selector.tsx +100 -0
- package/src/presentation/ui/label.tsx +24 -0
- package/src/presentation/ui/legacy-birth-date-input.tsx +43 -0
- package/src/presentation/ui/legacy-color-picker/index.tsx +42 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.content.tsx +37 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.context.tsx +42 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.hex-input.tsx +97 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.picker.tsx +266 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.presets.ts +22 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.quick-list.tsx +49 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.recent.tsx +43 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.swatches.tsx +111 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.trigger.tsx +128 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.tsx +110 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.types.ts +1 -0
- package/src/presentation/ui/legacy-color-picker/legacy-color-picker.utils.ts +114 -0
- package/src/presentation/ui/legacy-country-input.tsx +171 -0
- package/src/presentation/ui/legacy-gender-input.tsx +22 -0
- package/src/presentation/ui/legacy-input.tsx +106 -0
- package/src/presentation/ui/legacy-phone-input.tsx +213 -0
- package/src/presentation/ui/legacy-select-input.tsx +114 -0
- package/src/presentation/ui/legacy-text-area.tsx +111 -0
- package/src/presentation/ui/list-items.tsx +59 -0
- package/src/presentation/ui/marker.tsx +69 -0
- package/src/presentation/ui/media-player/index.tsx +12 -0
- package/src/presentation/ui/media-player/media-player.context.tsx +36 -0
- package/src/presentation/ui/media-player/media-player.tsx +167 -0
- package/src/presentation/ui/media-player/player-controls.tsx +207 -0
- package/src/presentation/ui/media-player/players/audio-player.tsx +78 -0
- package/src/presentation/ui/media-player/players/index.tsx +4 -0
- package/src/presentation/ui/media-player/players/video-player.tsx +193 -0
- package/src/presentation/ui/media-player/players/voice-note-player.tsx +108 -0
- package/src/presentation/ui/media-player/use-media-player.hook.ts +263 -0
- package/src/presentation/ui/menubar.tsx +281 -0
- package/src/presentation/ui/message.tsx +92 -0
- package/src/presentation/ui/navigation-menu.tsx +172 -0
- package/src/presentation/ui/pagination.tsx +129 -0
- package/src/presentation/ui/popover.tsx +89 -0
- package/src/presentation/ui/progress.tsx +31 -0
- package/src/presentation/ui/resizable.tsx +50 -0
- package/src/presentation/ui/select.tsx +192 -0
- package/src/presentation/ui/separator.tsx +28 -0
- package/src/presentation/ui/sheet.tsx +147 -0
- package/src/presentation/ui/sidebar.tsx +702 -0
- package/src/presentation/ui/skeleton.tsx +13 -0
- package/src/presentation/ui/slide-to-confirm.tsx +129 -0
- package/src/presentation/ui/slider.tsx +59 -0
- package/src/presentation/ui/sonner.tsx +58 -0
- package/src/presentation/ui/switch.tsx +33 -0
- package/src/presentation/ui/table.tsx +116 -0
- package/src/presentation/ui/tabs.tsx +90 -0
- package/src/presentation/ui/text-gradient.tsx +84 -0
- package/src/presentation/ui/textarea.tsx +18 -0
- package/src/presentation/ui/timeline-steps.tsx +235 -0
- package/src/presentation/ui/toggle-group.tsx +89 -0
- package/src/presentation/ui/toggle.tsx +47 -0
- package/src/presentation/ui/tooltip.tsx +57 -0
- package/src/presentation/uploading/index.tsx +3 -0
- package/src/presentation/uploading/media-upload-field.tsx +152 -0
- package/src/presentation/uploading/storage-media.tsx +210 -0
- package/src/styles.css +403 -0
- package/src/themes.css +1038 -0
package/README.md
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
# `@liorian/sdk`
|
|
2
|
+
|
|
3
|
+
Design system, shell applicatif et socle partagé du monorepo **Liorian**.
|
|
4
|
+
|
|
5
|
+
Le package concentre l'ensemble des briques réutilisables utilisées par les hôtes frontend du
|
|
6
|
+
monorepo (`frontend/liorian-socle`, `frontend/liorian-auth`, `frontend/liorian-connect`,
|
|
7
|
+
`frontend/liorian-console`, `frontend/liorian-store`) ainsi que par les modules externes
|
|
8
|
+
déclarés par les applications : primitives UI (style shadcn), thème **Katon**, composants
|
|
9
|
+
composés (`DataGrid`, modales, sheets, lecteur multimédia…), providers, hooks, stores zustand,
|
|
10
|
+
routines, services API, domaines, enums et utilitaires.
|
|
11
|
+
|
|
12
|
+
| | |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Nom du package | `@liorian/sdk` |
|
|
15
|
+
| Chemin | `packages/sdk/` |
|
|
16
|
+
| Type | ESM (`type: module`), TypeScript natif |
|
|
17
|
+
| Point d'entrée | `src/index.tsx` (+ exports par sous-chemin `@liorian/sdk/<chemin>` ) |
|
|
18
|
+
| License | MIT |
|
|
19
|
+
| Peer deps | `react >= 19`, `react-dom >= 19`, `next >= 16` (optionnel) |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Sommaire
|
|
24
|
+
|
|
25
|
+
- [Pourquoi ce package ?](#pourquoi-ce-package-)
|
|
26
|
+
- [Installation](#installation)
|
|
27
|
+
- [Conventions d'import](#conventions-dimport)
|
|
28
|
+
- [Structure du package](#structure-du-package)
|
|
29
|
+
- [UI primitives (`presentation/ui`)](#ui-primitives--presentationui-)
|
|
30
|
+
- [Composants composés (`presentation/components`)](#composants-composés--presentationcomponents-)
|
|
31
|
+
- [DataGrid](#datagrid)
|
|
32
|
+
- [Modales & sheets](#modales--sheets)
|
|
33
|
+
- [Lecteur multimédia](#lecteur-multimédia)
|
|
34
|
+
- [Thème Katon](#thème-katon)
|
|
35
|
+
- [Design tokens & motion](#design-tokens--motion)
|
|
36
|
+
- [Providers, hooks & stores](#providers-hooks--stores)
|
|
37
|
+
- [Routines](#routines)
|
|
38
|
+
- [Services API & utilitaires](#services-api--utilitaires)
|
|
39
|
+
- [Domaine & types partagés](#domaine--types-partagés)
|
|
40
|
+
- [Styles globaux](#styles-globaux)
|
|
41
|
+
- [Développement](#développement)
|
|
42
|
+
- [Publication npm](#publication-npm)
|
|
43
|
+
- [Changelog](#changelog)
|
|
44
|
+
- [License](#license)
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Pourquoi ce package ?
|
|
49
|
+
|
|
50
|
+
Avant ce package, chaque hôte frontend dupliquait son design system, ses stores et ses services.
|
|
51
|
+
`@liorian/sdk` centralise ces briques pour garantir :
|
|
52
|
+
|
|
53
|
+
- **Cohérence visuelle** : une seule source de vérité pour les primitives UI, les tokens et le thème ;
|
|
54
|
+
- **Réutilisabilité** : les modules métier (modules externes, apps) consomment le même socle sans
|
|
55
|
+
dépendre d'un hôte précis ;
|
|
56
|
+
- **Maintenabilité** : un seul endroit pour corriger/étendre le design system, les stores et les
|
|
57
|
+
services partagés ;
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
### Dans le monorepo (bundler / Turbopack / Next.js)
|
|
64
|
+
|
|
65
|
+
Le package est référencé via le protocole workspace de Bun :
|
|
66
|
+
|
|
67
|
+
```jsonc
|
|
68
|
+
// package.json d'un hôte frontend
|
|
69
|
+
{
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@liorian/sdk": "workspace:*"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Le TS `paths` résout les sous-chemins vers le source :
|
|
77
|
+
|
|
78
|
+
```jsonc
|
|
79
|
+
// tsconfig.json d'un hôte
|
|
80
|
+
{
|
|
81
|
+
"compilerOptions": {
|
|
82
|
+
"paths": {
|
|
83
|
+
"@liorian/sdk": ["../../packages/sdk/src/index.ts"],
|
|
84
|
+
"@liorian/sdk/*": ["../../packages/sdk/src/*"]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Depuis npm (consommateur externe)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm install @liorian/sdk
|
|
94
|
+
# ou avec Bun
|
|
95
|
+
bun add @liorian/sdk
|
|
96
|
+
# ou avec Yarn pnpm...
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Peer dependencies requises :
|
|
100
|
+
|
|
101
|
+
| Peer | Contrainte |
|
|
102
|
+
|---|---|
|
|
103
|
+
| `react` | `>= 19` |
|
|
104
|
+
| `react-dom` | `>= 19` |
|
|
105
|
+
| `next` | `>= 16` *(optionnelle, utilisée pour les composants app-router)* |
|
|
106
|
+
|
|
107
|
+
Le package est publié en TypeScript natif (source) ; votre builder doit supporter la
|
|
108
|
+
transpilation TypeScript (Next.js/Turbopack, Vite, Bun…).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Conventions d'import
|
|
113
|
+
|
|
114
|
+
**Règle d'or : privilégier les imports par sous-chemin** `@liorian/sdk/<chemin>` plutôt que le
|
|
115
|
+
barrel racine. Le barrel `@liorian/sdk` est réservé aux utilitaires transverses (`cn`,
|
|
116
|
+
`CommonClassName`), au thème, aux données et aux tokens.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import {cn} from "@liorian/sdk";
|
|
120
|
+
import {useIsMobile} from "@liorian/sdk/infrastructure/hooks/use-mobile";
|
|
121
|
+
import {Button} from "@liorian/sdk/presentation/ui/button";
|
|
122
|
+
import {DataGrid, DataGridColumnDef} from "@liorian/sdk/presentation/data-grid/data-grid";
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Les sous-chemins correspondent à l'arborescence `src/` :
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
@liorian/sdk/presentation/ui/button → packages/sdk/src/presentation/ui/button
|
|
129
|
+
@liorian/sdk/infrastructure/stores/module.store → packages/sdk/src/infrastructure/stores/module.store
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Structure du package
|
|
135
|
+
|
|
136
|
+
`@liorian/sdk` suit une organisation par couches, calquée sur l'architecture du monorepo :
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
packages/sdk/src/
|
|
140
|
+
├── index.ts # barrel (utilitaires, hooks, thème, SSO…)
|
|
141
|
+
├── styles.css # styles globaux du design system
|
|
142
|
+
├── themes.css # variables / feuilles du thème (claires & sombres)
|
|
143
|
+
├── application/
|
|
144
|
+
│ └── service/ # services appelants l'API (AuthApiService, Notifications…)
|
|
145
|
+
├── domain/
|
|
146
|
+
│ ├── config/ # AppConfig, AuthConfig, LogoConfig
|
|
147
|
+
│ ├── entities/ # interfaces partagées (user, module, organization, notification…)
|
|
148
|
+
│ ├── enums/ # enum modules, rôles, statuts…
|
|
149
|
+
│ └── typing/ # types OAuth/MFA, réponses, caches…
|
|
150
|
+
├── infrastructure/
|
|
151
|
+
│ ├── capabilities/
|
|
152
|
+
│ ├── common-classname.constant.ts
|
|
153
|
+
│ ├── data/ # constantes (pays, genres…)
|
|
154
|
+
│ ├── dataset/ # types DataSet (upload / métadonnées)
|
|
155
|
+
│ ├── hooks/ # use-mobile, use-is-desktop, use-auth, use-notifications…
|
|
156
|
+
│ ├── library/ # design tokens & utilitaires motion (GSAP)
|
|
157
|
+
│ ├── providers/ # QueryProvider, AuthProvider, ModulesGuardProvider…
|
|
158
|
+
│ ├── routines/ # classe Routine<T>, routine.hook, routine.tsx
|
|
159
|
+
│ ├── stores/ # stores zustand (module, auth-user-connected, dataset, upload)
|
|
160
|
+
│ └── utilities/ # api-service, socket-service, permission, format, ss o-auth…
|
|
161
|
+
└── presentation/
|
|
162
|
+
├── 8starlabs-ui/ # ligne graphique annexe (ui + hooks)
|
|
163
|
+
├── charts/ # widgets graphiques (line, pie, area, radar, radial…)
|
|
164
|
+
├── components/ # composants composés (data-table, waiting*, markdown-parser…)
|
|
165
|
+
├── data-grid/ # DataGrid + moteur de recherche + état vide
|
|
166
|
+
├── form-screen.tsx # écran de formulaire (auth, onboarding)
|
|
167
|
+
├── icons/ # wrappers d'icônes (lucide, remix, custom)
|
|
168
|
+
├── modals/ # ModalPortal & co (components, hooks, stores, types)
|
|
169
|
+
├── reui/ # couche réutilisable annexe
|
|
170
|
+
├── sheets/ # sheets (legacy + composants)
|
|
171
|
+
├── system/
|
|
172
|
+
├── theme/ # préférence de thème, switch color scheme
|
|
173
|
+
├── themes/katon/ # layout Katon (View, Wrapper, Header, Main, Footer, dashboard)
|
|
174
|
+
└── ui/ # UI primitives (style shadcn)
|
|
175
|
+
└── media-player/ # lecteur multimédia unifié
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## UI primitives (`presentation/ui`)
|
|
181
|
+
|
|
182
|
+
Composants de base de style shadcn. **Ne pas recréer une primitive existante** : réutilisez et
|
|
183
|
+
étendez via `className` + `cn`.
|
|
184
|
+
|
|
185
|
+
- **Formulaire** : `button`, `button-group`, `input`, `input-group`, `input-otp`, `textarea`,
|
|
186
|
+
`label`, `select`, `checkbox`, `switch`, `toggle`, `toggle-group`, `field`, `slider`, `progress`,
|
|
187
|
+
`slide-to-confirm`, `legacy-*` (`legacy-input`, `legacy-select-input`, `legacy-text-area`,
|
|
188
|
+
`legacy-phone-input`, `legacy-country-input`, `legacy-gender-input`, `legacy-birth-date-input`).
|
|
189
|
+
- **Feedback** : `alert`, `alert-dialog`, `badge`, `sonner` (toasts), `empty`, `skeleton`,
|
|
190
|
+
`kpi-card`.
|
|
191
|
+
- **Surcouches** : `dialog`, `drawer`, `sheet`, `dropdown-menu`, `context-menu`, `popover`,
|
|
192
|
+
`hover-card`, `tooltip`.
|
|
193
|
+
- **Navigation** : `tabs`, `accordion`, `accordion-multiselect`, `breadcrumb`, `pagination`,
|
|
194
|
+
`menubar`, `navigation-menu`, `sidebar`, `table`, `aspect-ratio`, `resizable`.
|
|
195
|
+
- **Choix / sélection** : `calendar`, `combobox`, `command`, `carousel`, `color-swatch-selector`,
|
|
196
|
+
`granularity-selector`, `label-selector`, `list-items`, `item`.
|
|
197
|
+
- **Média / contenu** : `avatar`, `attachment`, `bubble`, `message`, `marker`, `text-gradient`,
|
|
198
|
+
`direction`, `clickable`, `timeline-steps`.
|
|
199
|
+
|
|
200
|
+
Exemple d'utilisation :
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import {Button} from "@liorian/sdk/presentation/ui/button";
|
|
204
|
+
import {Card, CardContent, CardHeader, CardTitle} from "@liorian/sdk/presentation/ui/card";
|
|
205
|
+
|
|
206
|
+
<Card>
|
|
207
|
+
<CardHeader><CardTitle>Organisation</CardTitle></CardHeader>
|
|
208
|
+
<CardContent>
|
|
209
|
+
<Button>Enregistrer</Button>
|
|
210
|
+
</CardContent>
|
|
211
|
+
</Card>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Composants composés (`presentation/components`)
|
|
217
|
+
|
|
218
|
+
Composants complexes construits sur les primitives :
|
|
219
|
+
|
|
220
|
+
- `data-table` — table de données générique ;
|
|
221
|
+
- `animated-content`, `waiting`, `waiting-activity`, `waiting-bar`, `waiting-section` — états de
|
|
222
|
+
chargement/transition ;
|
|
223
|
+
- `markdown-parser`, `message-scroller` — rendu markdown et flux de messages ;
|
|
224
|
+
- `notifications-popover`, `notification-item`, `notification-details.modal`,
|
|
225
|
+
`push-notifications.provider` — centre de notifications ;
|
|
226
|
+
- `floating-upload`, `upload-progress-dialog` — upload flottant avec suivi de progression ;
|
|
227
|
+
- `module-guard`, `modules-guard-forbidden`, `modules-first-access.guard`,
|
|
228
|
+
`module-first-access-config.view`, `module-first-access-pending.view` — garde d'accès aux modules ;
|
|
229
|
+
- `dynamic-icon` — rendu d'icône résolu dynamiquement ;
|
|
230
|
+
- `local-time` — date/heure localisée ;
|
|
231
|
+
- `auth-lock-screen`, `auth-session.view`, `auth/*` — écrans du flux SSO ;
|
|
232
|
+
- `activity-descriptor-parser` — parsing des descripteurs d'activité.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## DataGrid
|
|
237
|
+
|
|
238
|
+
La `DataGrid` (`@liorian/sdk/presentation/data-grid/data-grid`) est le composant central des
|
|
239
|
+
listes métier (pages modules du manager). Elle embarque colonnes typées, tri, pagination, sélection,
|
|
240
|
+
bulk actions et un moteur de recherche (`data-grid-search-engine`), plus un état vide
|
|
241
|
+
(`data-grid-empty`).
|
|
242
|
+
|
|
243
|
+
```tsx
|
|
244
|
+
import {DataGrid, DataGridColumnDef} from "@liorian/sdk/presentation/data-grid/data-grid";
|
|
245
|
+
|
|
246
|
+
const columns: DataGridColumnDef<OrgRow>[] = [
|
|
247
|
+
{accessorKey: "name", header: "Nom"},
|
|
248
|
+
{accessorKey: "membersCount", header: "Membres"},
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
<DataGrid columns={columns} data={rows} searchPlaceholder="Rechercher une organisation…" />;
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Voir le skill `liorian-socle` pour les conventions d'usage détaillées.
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Modales & sheets
|
|
259
|
+
|
|
260
|
+
- **Modales** : `@liorian/sdk/presentation/modals/...` — `ModalPortal`, steppers
|
|
261
|
+
(`useModalStepper`) et stores associés (dossier `hooks/`, `stores/`, `types/`).
|
|
262
|
+
- **Sheets** : `@liorian/sdk/presentation/sheets/...` — panneaux latéraux (`legacy-sheet`,
|
|
263
|
+
`legacy-sheet-header`) et composants modernes.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Lecteur multimédia
|
|
268
|
+
|
|
269
|
+
`MediaPlayer` (`@liorian/sdk/presentation/ui/media-player`) : lecteur audio/vidéo unifié avec
|
|
270
|
+
3 apparences — `voice-note`, `audio`, `video` —, flux live **HLS** (hls.js chargé dynamiquement),
|
|
271
|
+
clavier YouTube + ARIA complet. **Ne pas recréer** de lecteur `<audio>`/`<video>` natif ni de
|
|
272
|
+
lib tierce : utiliser `MediaPlayer` ou ses briques (`useMediaPlayer`, `PlayerScrubber`,
|
|
273
|
+
`usePlayer()`).
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Thème Katon
|
|
278
|
+
|
|
279
|
+
Le thème courant vit dans `presentation/themes/katon/` et fournit les composants de structure :
|
|
280
|
+
|
|
281
|
+
- `View`, `Wrapper`, `Main`, `Footer` — squelette de page ;
|
|
282
|
+
- `Header` + variantes (`header-menubar`, `header-modules-available`, `header-modules-recents`,
|
|
283
|
+
`header-modules-store`, `header-organization-select`, `header-routines`, `header-options`,
|
|
284
|
+
`header-tasks-connected-user`) ;
|
|
285
|
+
- `dashboard-layout` — layout de dashboard complet avec metrics, stats, tables et section grid ;
|
|
286
|
+
- `edge-section`, `main-wrapper`, `module-item-link`.
|
|
287
|
+
|
|
288
|
+
Le switch clair/sombre est géré par `presentation/theme/` : `useThemePreferColorSchemeStore`,
|
|
289
|
+
`ThemePreferColorSchemeProvider`, `SwitchColorScheme`, `ThemeSwitcherButton`.
|
|
290
|
+
|
|
291
|
+
```tsx
|
|
292
|
+
import {ThemePreferColorSchemeProvider, ThemeSwitcherButton} from "@liorian/sdk";
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Design tokens & motion
|
|
298
|
+
|
|
299
|
+
`@liorian/sdk/infrastructure/library/design-system` et `motion-utils` exposent les tokens de
|
|
300
|
+
design et les utilitaires d'animation (GSAP). Importables depuis le barrel racine :
|
|
301
|
+
|
|
302
|
+
```ts
|
|
303
|
+
import {cn} from "@liorian/sdk";
|
|
304
|
+
import {motionVariants, transitionEasing} from "@liorian/sdk/infrastructure/library/motion-utils";
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Providers, hooks & stores
|
|
310
|
+
|
|
311
|
+
### Providers (`infrastructure/providers/`)
|
|
312
|
+
|
|
313
|
+
| Provider | Rôle |
|
|
314
|
+
|---|---|
|
|
315
|
+
| `QueryProvider` | Provider react-query global |
|
|
316
|
+
| `AuthProvider` / `AuthGuard` | Sessions SSO : vérification et rafraîchissement du token |
|
|
317
|
+
| `ModulesGuardProvider` | Garde d'accès et cartographie des domaines par module |
|
|
318
|
+
| `ModulesSwitcherProvider` | Changement de module courant |
|
|
319
|
+
| `ModulesRoutinesProvider` | Routines exposées par les modules |
|
|
320
|
+
| `module-usage.provider` | Suivi d'usage des modules |
|
|
321
|
+
|
|
322
|
+
### Hooks (`infrastructure/hooks/`)
|
|
323
|
+
|
|
324
|
+
`use-auth`, `use-notifications`, `use-mobile`, `use-is-desktop`, `use-is-tauri`,
|
|
325
|
+
`use-activity-lock-draft`, `use-elastic-interaction`, `use-recent-colors`, `use-recent-modules`.
|
|
326
|
+
|
|
327
|
+
### Stores zustand (`infrastructure/stores/`)
|
|
328
|
+
|
|
329
|
+
`module.store` (modules & activations), `auth-user-connected.store` (utilisateur connecté),
|
|
330
|
+
`dataset.store`, `upload.store`.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Routines
|
|
335
|
+
|
|
336
|
+
L'infrastructure `infrastructure/routines/` définit la classe `Routine<T>` et ses helpers React :
|
|
337
|
+
|
|
338
|
+
- `routine.ts` — classe de base ;
|
|
339
|
+
- `routine.hook.ts` — hook de consommation ;
|
|
340
|
+
- `routine.tsx` — composant d'exécution.
|
|
341
|
+
|
|
342
|
+
Les routines permettent d'exécuter des tâches déclaratives (actions de module) depuis le shell
|
|
343
|
+
manager. Reprendre la même source de vérité côté SDK et côté manager.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Services API & utilitaires
|
|
348
|
+
|
|
349
|
+
### Services (`application/service/`)
|
|
350
|
+
|
|
351
|
+
- `AuthApiService`, `AuthUserService` — auth, MFA/OTP/OAuth (consomme `@liorian/api-core`) ;
|
|
352
|
+
- `ModuleStoreApiService`, `ModuleActivationApiService` — catalogue de modules & activations ;
|
|
353
|
+
- `OrganizationsApiService` — organisations ;
|
|
354
|
+
- `NotificationsApiService`, `NotificationsPushService`, `NotificationsSocketService` — notifications ;
|
|
355
|
+
- `OtpApiService`, `StorageApiService`, `UserPreferencesApiService`.
|
|
356
|
+
|
|
357
|
+
### Utilitaires (`infrastructure/utilities/`)
|
|
358
|
+
|
|
359
|
+
- `api-service.ts` — client HTTP de base ;
|
|
360
|
+
- `socket-service.ts` — client socket ;
|
|
361
|
+
- `permission.util`, `format.util`, `strings.util`, `classname.util` (`cn`/`CommonClassName`) ;
|
|
362
|
+
- `encryption.service`, `activity-tracker.service`, `activity-lock.service` (verrouillage d'écran),
|
|
363
|
+
`form-snapshot.service` (brouillons de formulaire au verrouillage) ;
|
|
364
|
+
- `sso-auth.util`, `auth-logout.util`, `route-access` (accès par route), `media-label.service`,
|
|
365
|
+
`push-permission.util`, `tauri.util`, `modules.ts`.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Domaine & types partagés
|
|
370
|
+
|
|
371
|
+
- **Config** : `AppConfig` (multi-hôtes par service : `AUTH`, `CONNECT`, `CORE_API`, `MANAGER`…),
|
|
372
|
+
`AuthConfig`, `LogoConfig`.
|
|
373
|
+
- **Enums** : `domains.enum` (`ModuleDomain`), `module.enum`, `module-category.enum`, `routine.enum`,
|
|
374
|
+
`user-profile.enum`, `user-status.enum`, `coloring.enum`.
|
|
375
|
+
- **Entités** : `user`, `user-profile`, `organization`, `module` / `module-store` /
|
|
376
|
+
`module-activation`, `notification`, `activity`, `media`.
|
|
377
|
+
- **Typings** : `auth-oauth.types` (OAuth/MFA), `auth-caches`, `session.interface`, `response`,
|
|
378
|
+
`devise`, `statisticals`, `user-media-upload`, `values`, `routine.types`.
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Styles globaux
|
|
383
|
+
|
|
384
|
+
- `styles.css` — styles du design system (à importer une fois par hôte) ;
|
|
385
|
+
- `themes.css` — variables du thème (mode clair/sombre).
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
import "@liorian/sdk/styles.css";
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Le champ `sideEffects` du `package.json` garantit que les CSS ne sont jamais tree-shakées.
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Développement
|
|
396
|
+
|
|
397
|
+
### Typecheck
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
bun run --cwd packages/sdk typecheck
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Version & changelog
|
|
404
|
+
|
|
405
|
+
Chaque changement de code dans le package doit :
|
|
406
|
+
|
|
407
|
+
1. Mettre à jour `CHANGELOG.md` (format : changelog conventionnel, sections `Added` / `Changed` /
|
|
408
|
+
`Fixed` / `Removed`) ;
|
|
409
|
+
2. Bumper la version dans `packages/sdk/package.json` (SemVer, suivant les conventions
|
|
410
|
+
[`liorian-commit`](../../.agents/skills/liorian-commit/SKILL.md)) et synchroniser les autres
|
|
411
|
+
packages si nécessaire.
|
|
412
|
+
|
|
413
|
+
### Conventions
|
|
414
|
+
|
|
415
|
+
Voir les skills du workspace : `liorian-core` (design system) et `liorian-conventions`
|
|
416
|
+
(commits, versioning, style TypeScript strict, messages en français).
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Publication npm
|
|
421
|
+
|
|
422
|
+
La publication sur npmjs est automatisée par le workflow GitHub
|
|
423
|
+
`.github/workflows/publish-sdk.yml` du monorepo.
|
|
424
|
+
|
|
425
|
+
### Déclencheurs
|
|
426
|
+
|
|
427
|
+
- **Push sur une branche gérée** touchant au moins un fichier de `packages/sdk/**` (une publication
|
|
428
|
+
n'est déclenchée que s'il y a eu des changements du package) ;
|
|
429
|
+
- **Déclenchement manuel** (`workflow_dispatch`) sur une branche gérée.
|
|
430
|
+
|
|
431
|
+
### Versioning par branche
|
|
432
|
+
|
|
433
|
+
Le dist-tag npm et la version publiée dépendent de la branche d'origine :
|
|
434
|
+
|
|
435
|
+
| Branche | Dist-tag npm | Version publiée |
|
|
436
|
+
|---|---|---|
|
|
437
|
+
| `main` | `latest` | version du `package.json` (ex. `0.20.0`) |
|
|
438
|
+
| `alpha` | `alpha` | `<version>-alpha.<sha court>` (pré-release) |
|
|
439
|
+
| `beta` | `beta` | `<version>-beta.<sha court>` (pré-release) |
|
|
440
|
+
| `rc` | `rc` | `<version>-rc.<sha court>` (pré-release) |
|
|
441
|
+
| `nightly` | `nightly` | `<version>-nightly.<sha court>` (build quotidien) |
|
|
442
|
+
|
|
443
|
+
Toute autre branche n'est pas publiée. Les versions pré-release intègrent le SHA court du commit
|
|
444
|
+
(`0.20.0-beta.1a2b3c4`), ce qui garantit l'unicité de chaque publication et l'absence de collision
|
|
445
|
+
de version. Aucune pré-release n'écrase le dist-tag `latest`.
|
|
446
|
+
|
|
447
|
+
Consommation selon le canal voulu :
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
npm install @liorian/sdk # dernière release stable (latest)
|
|
451
|
+
npm install @liorian/sdk@beta # dernière pré-release beta
|
|
452
|
+
npm install @liorian/sdk@nightly # dernier build nightly
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Processus de publication
|
|
456
|
+
|
|
457
|
+
```text
|
|
458
|
+
push <branche gérée> packages/sdk/** (ou manuel)
|
|
459
|
+
│
|
|
460
|
+
▼
|
|
461
|
+
┌────────────────────────┐ ┌──────────────────────────────────────────────┐
|
|
462
|
+
│ Job resolve │ ──►│ Job publish (skip si version déjà publiée) │
|
|
463
|
+
│ branche → dist-tag │ │ bun install → typecheck → npm publish --tag │
|
|
464
|
+
│ version pre-release │ │ --provenance → dist-tag cible │
|
|
465
|
+
└────────────────────────┘ └──────────────────────────────────────────────┘
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### Prérequis
|
|
469
|
+
|
|
470
|
+
Configurer le secret `NPM_TOKEN` du dépôt GitHub (avec droits de publication sur l'organisation
|
|
471
|
+
`@liorian`).
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## Changelog
|
|
476
|
+
|
|
477
|
+
Toutes les évolutions sont documentées dans [`CHANGELOG.md`](./CHANGELOG.md).
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## License
|
|
482
|
+
|
|
483
|
+
MIT.
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@liorian/sdk",
|
|
3
|
+
"version": "0.28.0-alpha.56010ca",
|
|
4
|
+
"description": "Core package for the Liorian (application shell, domain, infrastructure, UI design system).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"provenance": false
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": [
|
|
12
|
+
"**/*.css"
|
|
13
|
+
],
|
|
14
|
+
"main": "src/index.tsx",
|
|
15
|
+
"module": "src/index.tsx",
|
|
16
|
+
"types": "./src/index.tsx",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./src/index.tsx",
|
|
19
|
+
"./application": "./src/application/index.ts",
|
|
20
|
+
"./application/*": "./src/application/*",
|
|
21
|
+
"./domain": "./src/domain/index.ts",
|
|
22
|
+
"./domain/*": "./src/domain/*",
|
|
23
|
+
"./infrastructure": "./src/infrastructure/index.tsx",
|
|
24
|
+
"./infrastructure/*": "./src/infrastructure/*",
|
|
25
|
+
"./presentation": "./src/presentation/index.tsx",
|
|
26
|
+
"./presentation/*": "./src/presentation/*",
|
|
27
|
+
"./styles.css": "./src/styles.css",
|
|
28
|
+
"./themes.css": "./src/themes.css"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"src",
|
|
32
|
+
"schemas",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"typecheck": "tsc --noEmit"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"next": ">=16",
|
|
40
|
+
"react": ">=19",
|
|
41
|
+
"react-dom": ">=19"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"next": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@base-ui/react": "^1.6.0",
|
|
50
|
+
"@dnd-kit/core": "^6.3.1",
|
|
51
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
52
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
53
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
54
|
+
"@gsap/react": "^2.1.2",
|
|
55
|
+
"@radix-ui/react-accordion": "^1.2.14",
|
|
56
|
+
"@radix-ui/react-checkbox": "^1.3.5",
|
|
57
|
+
"@radix-ui/react-radio-group": "^1.4.1",
|
|
58
|
+
"@radix-ui/react-slot": "^1.3.0",
|
|
59
|
+
"@remixicon/react": "^4.9.0",
|
|
60
|
+
"@shadcn/react": "^0.2.0",
|
|
61
|
+
"@tabler/icons-react": "^3.44.0",
|
|
62
|
+
"@tanstack/react-query": "^5.101.2",
|
|
63
|
+
"@tanstack/react-table": "^8.21.3",
|
|
64
|
+
"@tauri-apps/plugin-notification": "^2.3.3",
|
|
65
|
+
"axios": "^1.18.1",
|
|
66
|
+
"class-variance-authority": "^0.7.1",
|
|
67
|
+
"clsx": "^2.1.1",
|
|
68
|
+
"cmdk": "^1.1.1",
|
|
69
|
+
"date-fns": "^4.4.0",
|
|
70
|
+
"embla-carousel-react": "^8.6.0",
|
|
71
|
+
"gsap": "^3.15.0",
|
|
72
|
+
"hls.js": "^1.7.1",
|
|
73
|
+
"input-otp": "^1.4.2",
|
|
74
|
+
"lucide-react": "^1.21.0",
|
|
75
|
+
"radix-ui": "^1.6.0",
|
|
76
|
+
"react-day-picker": "^10.0.1",
|
|
77
|
+
"react-resizable-panels": "^4.12.1",
|
|
78
|
+
"recharts": "3.8.0",
|
|
79
|
+
"sonner": "^2.0.7",
|
|
80
|
+
"tailwind-merge": "^3.6.0",
|
|
81
|
+
"vaul": "^1.1.2",
|
|
82
|
+
"zod": "^4.4.3",
|
|
83
|
+
"zustand": "^5.0.14"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/node": "^25.9.3",
|
|
87
|
+
"@types/react": "^19.2.17",
|
|
88
|
+
"@types/react-dom": "^19.2.3",
|
|
89
|
+
"next": "^16.0.0",
|
|
90
|
+
"react": "^19.0.0",
|
|
91
|
+
"react-dom": "^19.0.0",
|
|
92
|
+
"typescript": "^5"
|
|
93
|
+
}
|
|
94
|
+
}
|