@eduboxpro/studio 0.1.32 → 0.1.34

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/index.d.ts CHANGED
@@ -3203,5 +3203,318 @@ declare function loadGoogleFonts(fonts: Array<{
3203
3203
  display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
3204
3204
  }>): void;
3205
3205
 
3206
- export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, ConfirmDialogComponent, ConfirmDialogService, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, ToastComponent, ToastService, TooltipComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
3207
- export type { BadgeColor, BadgeDefaultsConfig, BadgeIconPosition, BadgeRadius, BadgeSize, BadgeVariant, BadgeWrapperPosition, BadgeWrapperSize, BottomNavigationDefaultsConfig, BottomNavigationFabPosition, BottomNavigationItem, BottomNavigationLabelMode, BottomNavigationSize, BottomNavigationVariant, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CardColor, CardDefaultsConfig, CardImagePosition, CardOrientation, CardPadding, CardRadius, CardShadow, CardSize, CardVariant, ChatMessage, ChatSize, ChatUser, ChatVariant, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ColorFormat, ColorPickerDefaultsConfig, ColorPickerSize, ColorPickerVariant, ColorPreset, ColorSwatchGroup, ColorValue, ComponentsConfig, ConfirmDialogConfig, ConfirmDialogVariant, CountryOption, DrawerAnimationEasing, DrawerCloseButtonPosition, DrawerConfig, DrawerDefaultsConfig, DrawerPosition, DrawerRadius, DrawerRole, DrawerShadowSize, DrawerSize, DropdownDefaultsConfig, DropdownItem, DropdownPosition, EmptyStateConfig, HSL, InputDefaultsConfig, InputMode, InputType, InspectorComponentSize, InspectorComponentVariant, InspectorData, InspectorGroup, InspectorGroupDivider, InspectorOption, InspectorParameter, InspectorParameterType, InspectorSection, InspectorSpacing, MaskConfig, MaskPreset, MaskResult, MaskToken, MenuColor, MenuExpandEvent, MenuExpandIconPosition, MenuItem, MenuItemBadgeColor, MenuItemClickEvent, MenuItemCommandEvent, MenuItemIconPosition, MenuItemTarget, MenuItemTooltipPosition, MenuMode, MenuOrientation, MenuRadius, MenuSize, MenuSpacing, MenuVariant, ModalAnimation, ModalDefaultsConfig, ModalPosition, ModalSize, ModalVariant, NavbarColor, NavbarShadow, NavbarSize, NavbarVariant, PaginationPageChangeEvent, PaginationPageSizeChangeEvent, PaginationSize, PaginationVariant, PhoneCountry, PopoverAnimation, PopoverBoundary, PopoverConfig, PopoverDefaultsConfig, PopoverPosition, PopoverSize, PopoverTrigger, PopoverVariant, PopoverWidth, RGB, RadioButtonColor, RadioButtonDefaultsConfig, RadioButtonRadius, RadioButtonSize, RadioButtonVariant, RowAction, RowExpansion, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, SelectionEvent, SelectionMode, SidebarConfig, SidebarDefaultsConfig, SidebarPosition, SidebarSize, SidebarVariant, SortDirection, SortEvent, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TabItem, TableCellContext, TableColumn, TableDefaultsConfig, TableDensity, TableHeaderContext, TableSort, TableState, TableVariant, TabsDefaultsConfig, TabsOrientation, TabsSize, TabsVariant, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode, ToastConfig, ToastMessage, ToastPosition, ToastSeverity, TooltipDefaultsConfig };
3206
+ declare abstract class SignalStore<T> {
3207
+ protected readonly state: WritableSignal<T>;
3208
+ constructor(initialState: T);
3209
+ get$(): Signal<T>;
3210
+ snapshot(): T;
3211
+ protected setState(newState: T): void;
3212
+ protected updateState(updateFn: (state: T) => T): void;
3213
+ protected patchState(partial: Partial<T>): void;
3214
+ protected resetState(initialState: T): void;
3215
+ protected select<R>(selector: (state: T) => R): Signal<R>;
3216
+ protected onStateChange(callback: (state: T) => void): void;
3217
+ protected onStateChangeWithPrevious(callback: (current: T, previous: T) => void): void;
3218
+ protected batchUpdate(updates: Partial<T>[]): void;
3219
+ }
3220
+
3221
+ /**
3222
+ * Block System Types and Interfaces
3223
+ * Core models for dynamic page rendering in EduBox
3224
+ *
3225
+ * @packageDocumentation
3226
+ */
3227
+ type BlockType = 'flex-container' | 'grid-container' | 'div' | 'card' | 'section' | 'text' | 'image' | 'video' | 'html' | 'code' | 'list' | 'navbar' | 'footer' | 'alert' | 'badge' | 'button' | 'link' | 'slider' | 'tabs' | 'accordion' | 'form' | 'input' | 'textarea' | 'select' | 'checkbox' | `studio-${string}`;
3228
+ interface NavigateAction {
3229
+ type: 'navigate';
3230
+ url: string;
3231
+ queryParams?: Record<string, string>;
3232
+ }
3233
+ interface ExternalLinkAction {
3234
+ type: 'external-link';
3235
+ url: string;
3236
+ target?: '_blank' | '_self';
3237
+ }
3238
+ interface ScrollToAction {
3239
+ type: 'scroll-to';
3240
+ targetId: string;
3241
+ behavior?: 'smooth' | 'auto';
3242
+ }
3243
+ interface SubmitFormAction {
3244
+ type: 'submit-form';
3245
+ formId: string;
3246
+ }
3247
+ interface SubmitLeadAction {
3248
+ type: 'submit-lead';
3249
+ endpoint: string;
3250
+ }
3251
+ interface CustomAction {
3252
+ type: 'custom';
3253
+ handler: string;
3254
+ params?: Record<string, unknown>;
3255
+ }
3256
+ type BlockAction = NavigateAction | ExternalLinkAction | ScrollToAction | SubmitFormAction | SubmitLeadAction | CustomAction;
3257
+ type AnimationType = 'fade-in' | 'fade-out' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'scale-in' | 'scale-out' | 'rotate-in' | 'scroll-reveal';
3258
+ interface BlockAnimation {
3259
+ type: AnimationType;
3260
+ duration?: number;
3261
+ delay?: number;
3262
+ easing?: 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
3263
+ trigger?: 'load' | 'hover' | 'in-viewport';
3264
+ once?: boolean;
3265
+ }
3266
+ interface BaseBlock {
3267
+ id?: string;
3268
+ type: BlockType;
3269
+ classes?: string;
3270
+ styles?: Record<string, string>;
3271
+ animation?: BlockAnimation;
3272
+ children?: Block[];
3273
+ condition?: string;
3274
+ }
3275
+ interface FlexContainerBlock extends BaseBlock {
3276
+ type: 'flex-container';
3277
+ children: Block[];
3278
+ }
3279
+ interface GridContainerBlock extends BaseBlock {
3280
+ type: 'grid-container';
3281
+ children: Block[];
3282
+ }
3283
+ interface DivBlock extends BaseBlock {
3284
+ type: 'div';
3285
+ children?: Block[];
3286
+ }
3287
+ interface CardBlock extends BaseBlock {
3288
+ type: 'card';
3289
+ children: Block[];
3290
+ }
3291
+ interface SectionBlock extends BaseBlock {
3292
+ type: 'section';
3293
+ children: Block[];
3294
+ }
3295
+ interface TextBlock extends BaseBlock {
3296
+ type: 'text';
3297
+ tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
3298
+ content: string;
3299
+ children?: never;
3300
+ }
3301
+ interface ImageBlock extends BaseBlock {
3302
+ type: 'image';
3303
+ src: string;
3304
+ alt: string;
3305
+ lazy?: boolean;
3306
+ width?: string | number;
3307
+ height?: string | number;
3308
+ children?: never;
3309
+ }
3310
+ interface VideoBlock extends BaseBlock {
3311
+ type: 'video';
3312
+ src: string;
3313
+ provider?: 'youtube' | 'vimeo' | 'direct';
3314
+ alt?: string;
3315
+ autoplay?: boolean;
3316
+ controls?: boolean;
3317
+ loop?: boolean;
3318
+ muted?: boolean;
3319
+ children?: never;
3320
+ }
3321
+ interface HtmlBlock extends BaseBlock {
3322
+ type: 'html';
3323
+ content: string;
3324
+ sanitize?: boolean;
3325
+ children?: never;
3326
+ }
3327
+ interface CodeBlock extends BaseBlock {
3328
+ type: 'code';
3329
+ code: string;
3330
+ language?: string;
3331
+ showLineNumbers?: boolean;
3332
+ highlightLines?: number[];
3333
+ filename?: string;
3334
+ children?: never;
3335
+ }
3336
+ interface ListBlock extends BaseBlock {
3337
+ type: 'list';
3338
+ listType: 'ul' | 'ol';
3339
+ items: Array<{
3340
+ content: string;
3341
+ children?: Block[];
3342
+ }>;
3343
+ children?: never;
3344
+ }
3345
+ interface NavbarBlock extends BaseBlock {
3346
+ type: 'navbar';
3347
+ logo?: {
3348
+ text?: string;
3349
+ image?: string;
3350
+ href?: string;
3351
+ };
3352
+ links: Array<{
3353
+ label: string;
3354
+ href: string;
3355
+ action?: BlockAction;
3356
+ }>;
3357
+ sticky?: boolean;
3358
+ transparent?: boolean;
3359
+ children?: never;
3360
+ }
3361
+ interface FooterBlock extends BaseBlock {
3362
+ type: 'footer';
3363
+ sections?: Array<{
3364
+ title: string;
3365
+ links: Array<{
3366
+ label: string;
3367
+ href: string;
3368
+ action?: BlockAction;
3369
+ }>;
3370
+ }>;
3371
+ copyright?: string;
3372
+ socialLinks?: Array<{
3373
+ platform: string;
3374
+ url: string;
3375
+ icon?: string;
3376
+ }>;
3377
+ children?: never;
3378
+ }
3379
+ interface ButtonBlock extends BaseBlock {
3380
+ type: 'button';
3381
+ content: string;
3382
+ action?: BlockAction;
3383
+ disabled?: boolean;
3384
+ children?: never;
3385
+ }
3386
+ interface AlertBlock extends BaseBlock {
3387
+ type: 'alert';
3388
+ alertType: 'info' | 'success' | 'warning' | 'error';
3389
+ title?: string;
3390
+ message: string;
3391
+ dismissible?: boolean;
3392
+ children?: never;
3393
+ }
3394
+ interface BadgeBlock extends BaseBlock {
3395
+ type: 'badge';
3396
+ content: string;
3397
+ variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
3398
+ size?: 'sm' | 'md' | 'lg';
3399
+ children?: never;
3400
+ }
3401
+ interface LinkBlock extends BaseBlock {
3402
+ type: 'link';
3403
+ content: string;
3404
+ href: string;
3405
+ target?: '_blank' | '_self';
3406
+ children?: Block[];
3407
+ }
3408
+ interface SliderBlock extends BaseBlock {
3409
+ type: 'slider';
3410
+ slides: Block[];
3411
+ config?: {
3412
+ autoplay?: boolean;
3413
+ interval?: number;
3414
+ loop?: boolean;
3415
+ showControls?: boolean;
3416
+ showIndicators?: boolean;
3417
+ };
3418
+ children?: never;
3419
+ }
3420
+ interface TabsBlock extends BaseBlock {
3421
+ type: 'tabs';
3422
+ tabs: Array<{
3423
+ id: string;
3424
+ label: string;
3425
+ content: Block[];
3426
+ }>;
3427
+ defaultTab?: string;
3428
+ children?: never;
3429
+ }
3430
+ interface AccordionBlock extends BaseBlock {
3431
+ type: 'accordion';
3432
+ items: Array<{
3433
+ id: string;
3434
+ title: string;
3435
+ content: Block[];
3436
+ }>;
3437
+ allowMultiple?: boolean;
3438
+ defaultOpen?: string[];
3439
+ children?: never;
3440
+ }
3441
+ interface FormBlock extends BaseBlock {
3442
+ type: 'form';
3443
+ action?: BlockAction;
3444
+ method?: 'GET' | 'POST';
3445
+ children: Block[];
3446
+ }
3447
+ interface InputBlock extends BaseBlock {
3448
+ type: 'input';
3449
+ name: string;
3450
+ inputType: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
3451
+ placeholder?: string;
3452
+ required?: boolean;
3453
+ validation?: {
3454
+ pattern?: string;
3455
+ min?: number;
3456
+ max?: number;
3457
+ minLength?: number;
3458
+ maxLength?: number;
3459
+ message?: string;
3460
+ };
3461
+ children?: never;
3462
+ }
3463
+ interface TextareaBlock extends BaseBlock {
3464
+ type: 'textarea';
3465
+ name: string;
3466
+ placeholder?: string;
3467
+ required?: boolean;
3468
+ rows?: number;
3469
+ children?: never;
3470
+ }
3471
+ interface SelectBlock extends BaseBlock {
3472
+ type: 'select';
3473
+ name: string;
3474
+ options: Array<{
3475
+ value: string;
3476
+ label: string;
3477
+ }>;
3478
+ required?: boolean;
3479
+ multiple?: boolean;
3480
+ children?: never;
3481
+ }
3482
+ interface CheckboxBlock extends BaseBlock {
3483
+ type: 'checkbox';
3484
+ name: string;
3485
+ label: string;
3486
+ required?: boolean;
3487
+ children?: never;
3488
+ }
3489
+ interface StudioComponentBlock extends BaseBlock {
3490
+ type: `studio-${string}`;
3491
+ props?: Record<string, unknown>;
3492
+ content?: string;
3493
+ action?: BlockAction;
3494
+ }
3495
+ type Block = FlexContainerBlock | GridContainerBlock | DivBlock | CardBlock | SectionBlock | TextBlock | ImageBlock | VideoBlock | HtmlBlock | CodeBlock | ListBlock | NavbarBlock | FooterBlock | ButtonBlock | AlertBlock | BadgeBlock | LinkBlock | SliderBlock | TabsBlock | AccordionBlock | FormBlock | InputBlock | TextareaBlock | SelectBlock | CheckboxBlock | StudioComponentBlock;
3496
+ interface PageMeta {
3497
+ title?: string;
3498
+ description?: string;
3499
+ keywords?: string[];
3500
+ ogImage?: string;
3501
+ }
3502
+ interface PageData {
3503
+ pageId: string;
3504
+ slug: string;
3505
+ meta?: PageMeta;
3506
+ blocks: Block[];
3507
+ publishedAt?: string;
3508
+ version?: number;
3509
+ }
3510
+ declare function isLayoutBlock(block: Block): block is FlexContainerBlock | GridContainerBlock | DivBlock | CardBlock | SectionBlock;
3511
+ declare function isContentBlock(block: Block): block is TextBlock | ImageBlock | VideoBlock | HtmlBlock | CodeBlock | ListBlock;
3512
+ declare function isInteractiveBlock(block: Block): block is ButtonBlock | AlertBlock | BadgeBlock | LinkBlock | SliderBlock | TabsBlock | AccordionBlock;
3513
+ declare function isFormBlock(block: Block): block is FormBlock | InputBlock | TextareaBlock | SelectBlock | CheckboxBlock;
3514
+ declare function isStudioBlock(block: Block): block is StudioComponentBlock;
3515
+ declare function hasChildren(block: Block): block is Block & {
3516
+ children: Block[];
3517
+ };
3518
+
3519
+ export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, ConfirmDialogComponent, ConfirmDialogService, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, SignalStore, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, ToastComponent, ToastService, TooltipComponent, classNames, hasChildren, isContentBlock, isFormBlock, isInteractiveBlock, isLayoutBlock, isSafeUrl, isStudioBlock, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
3520
+ export type { AccordionBlock, AlertBlock, AnimationType, BadgeBlock, BadgeColor, BadgeDefaultsConfig, BadgeIconPosition, BadgeRadius, BadgeSize, BadgeVariant, BadgeWrapperPosition, BadgeWrapperSize, BaseBlock, Block, BlockAction, BlockAnimation, BlockType, BottomNavigationDefaultsConfig, BottomNavigationFabPosition, BottomNavigationItem, BottomNavigationLabelMode, BottomNavigationSize, BottomNavigationVariant, ButtonBlock, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CardBlock, CardColor, CardDefaultsConfig, CardImagePosition, CardOrientation, CardPadding, CardRadius, CardShadow, CardSize, CardVariant, ChatMessage, ChatSize, ChatUser, ChatVariant, CheckboxBlock, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, CodeBlock, ColorConfig, ColorFormat, ColorPickerDefaultsConfig, ColorPickerSize, ColorPickerVariant, ColorPreset, ColorSwatchGroup, ColorValue, ComponentsConfig, ConfirmDialogConfig, ConfirmDialogVariant, CountryOption, CustomAction, DivBlock, DrawerAnimationEasing, DrawerCloseButtonPosition, DrawerConfig, DrawerDefaultsConfig, DrawerPosition, DrawerRadius, DrawerRole, DrawerShadowSize, DrawerSize, DropdownDefaultsConfig, DropdownItem, DropdownPosition, EmptyStateConfig, ExternalLinkAction, FlexContainerBlock, FooterBlock, FormBlock, GridContainerBlock, HSL, HtmlBlock, ImageBlock, InputBlock, InputDefaultsConfig, InputMode, InputType, InspectorComponentSize, InspectorComponentVariant, InspectorData, InspectorGroup, InspectorGroupDivider, InspectorOption, InspectorParameter, InspectorParameterType, InspectorSection, InspectorSpacing, LinkBlock, ListBlock, MaskConfig, MaskPreset, MaskResult, MaskToken, MenuColor, MenuExpandEvent, MenuExpandIconPosition, MenuItem, MenuItemBadgeColor, MenuItemClickEvent, MenuItemCommandEvent, MenuItemIconPosition, MenuItemTarget, MenuItemTooltipPosition, MenuMode, MenuOrientation, MenuRadius, MenuSize, MenuSpacing, MenuVariant, ModalAnimation, ModalDefaultsConfig, ModalPosition, ModalSize, ModalVariant, NavbarBlock, NavbarColor, NavbarShadow, NavbarSize, NavbarVariant, NavigateAction, PageData, PageMeta, PaginationPageChangeEvent, PaginationPageSizeChangeEvent, PaginationSize, PaginationVariant, PhoneCountry, PopoverAnimation, PopoverBoundary, PopoverConfig, PopoverDefaultsConfig, PopoverPosition, PopoverSize, PopoverTrigger, PopoverVariant, PopoverWidth, RGB, RadioButtonColor, RadioButtonDefaultsConfig, RadioButtonRadius, RadioButtonSize, RadioButtonVariant, RowAction, RowExpansion, ScrollToAction, SectionBlock, SelectBlock, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, SelectionEvent, SelectionMode, SidebarConfig, SidebarDefaultsConfig, SidebarPosition, SidebarSize, SidebarVariant, SliderBlock, SortDirection, SortEvent, StudioComponentBlock, StudioConfig, StudioThemeConfig, SubmitFormAction, SubmitLeadAction, SwitchDefaultsConfig, TabItem, TableCellContext, TableColumn, TableDefaultsConfig, TableDensity, TableHeaderContext, TableSort, TableState, TableVariant, TabsBlock, TabsDefaultsConfig, TabsOrientation, TabsSize, TabsVariant, TextBlock, TextareaBlock, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode, ToastConfig, ToastMessage, ToastPosition, ToastSeverity, TooltipDefaultsConfig, VideoBlock };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eduboxpro/studio",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Modern Angular UI library for educational platforms with customizable design system",
5
5
  "keywords": [
6
6
  "angular",