@yoyaflow/yoya-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yoyaflow/yoya-ui",
3
- "version": "0.1.0",
4
- "description": "A browser-native UI library that replaces React/Vue-style frameworks: declarative HTML authoring, component library, router, i18n and layout, with zero build steps.",
3
+ "version": "0.2.0",
4
+ "description": "A browser-native JS UI library with declarative HTML authoring: component library, router, i18n, theming and layout, works with or without a build tool, SSR-ready.",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "main": "./dist/yoya-ui.umd.js",
package/types/async.d.ts CHANGED
@@ -1,4 +1,12 @@
1
- import type { ChildInput, ElementNode, ElementOptions, SetupCallback, SetupInput } from './core.js';
1
+ import type {
2
+ ChildInput,
3
+ ElementFactory,
4
+ ElementNode,
5
+ ElementOptions,
6
+ SetupCallback,
7
+ SetupInput
8
+ } from './core.js';
9
+ import type { HtmlElementNode } from './html.js';
2
10
 
3
11
  export type DynamicLoaderStatus = 'pending' | 'loading' | 'loaded' | 'error';
4
12
 
@@ -51,8 +59,50 @@ export function preloadDynamicModule(
51
59
  /** Clears the shared module cache (all entries when cacheKey is omitted). */
52
60
  export function clearDynamicModuleCache(cacheKey?: string | null): void;
53
61
 
62
+ export type SkeletonVariant = 'paragraph' | 'avatar' | 'block';
63
+
64
+ /** Loading placeholder with paragraph / avatar / block variants. */
65
+ export class VSkeleton extends HtmlElementNode {
66
+ variant(): SkeletonVariant;
67
+ variant(value: SkeletonVariant): VSkeleton;
68
+ rows(): number;
69
+ rows(value: number): VSkeleton;
70
+ barHeight(): number;
71
+ barHeight(value: number): VSkeleton;
72
+ gap(): number;
73
+ gap(value: number): VSkeleton;
74
+ avatarSize(): number;
75
+ avatarSize(value: number): VSkeleton;
76
+ active(): boolean;
77
+ active(value: boolean): VSkeleton;
78
+ motion(): string;
79
+ motion(value: string): VSkeleton;
80
+ }
81
+
82
+ export const vSkeleton: ElementFactory<VSkeleton>;
83
+
84
+ /** Lazy image with native lazy loading and loading / loaded / error states. */
85
+ export class VLazyImage extends HtmlElementNode {
86
+ src(): string | null;
87
+ src(value: string | null): VLazyImage;
88
+ alt(): string;
89
+ alt(value: string): VLazyImage;
90
+ defer(): boolean;
91
+ defer(value: boolean): VLazyImage;
92
+ state(): 'loading' | 'loaded' | 'error';
93
+ retry(): VLazyImage;
94
+ }
95
+
96
+ export const vLazyImage: ElementFactory<VLazyImage>;
97
+
54
98
  /**
55
99
  * Parent-shortcut surface merged onto HtmlElementNode. vDynamicLoader is
56
100
  * registered on ElementNode and inherited, so it is declared there.
57
101
  */
58
- export interface AsyncParentShortcuts {}
102
+ export interface AsyncParentShortcuts {
103
+ vSkeleton(first?: SetupInput<VSkeleton> | null, callback?: SetupCallback<VSkeleton>): VSkeleton;
104
+ vLazyImage(
105
+ first?: SetupInput<VLazyImage> | null,
106
+ callback?: SetupCallback<VLazyImage>
107
+ ): VLazyImage;
108
+ }
@@ -461,6 +461,27 @@ export const vTimeline: ElementFactory<VTimeline>;
461
461
  export const vTimelineItem: ElementFactory<VTimelineItem>;
462
462
  export const vTrendCard: ElementFactory<VTrendCard>;
463
463
 
464
+ /** Image lightbox with lazy large image, zoom / pan and ESC close. */
465
+ export class VImagePreview extends HtmlElementNode {
466
+ src(): string | null;
467
+ src(value: string | null): VImagePreview;
468
+ thumb(): string | null;
469
+ thumb(value: string | null): VImagePreview;
470
+ alt(): string;
471
+ alt(value: string): VImagePreview;
472
+ zoom(): number;
473
+ zoom(value: number): VImagePreview;
474
+ resetZoom(): VImagePreview;
475
+ state(): 'open' | 'closed';
476
+ open(): VImagePreview;
477
+ close(): VImagePreview;
478
+ toggle(): VImagePreview;
479
+ }
480
+
481
+ export const vImagePreview: ElementFactory<VImagePreview> & {
482
+ (first?: SetupInput<VImagePreview> | null, callback?: SetupCallback<VImagePreview>): VImagePreview;
483
+ };
484
+
464
485
  /** Parent-shortcut surface merged onto HtmlElementNode. */
465
486
  export interface DataDisplayParentShortcuts {
466
487
  vAvatar(first?: SetupInput<VAvatar> | null, callback?: SetupCallback<VAvatar>): VAvatar;
@@ -488,6 +509,10 @@ export interface DataDisplayParentShortcuts {
488
509
  callback?: SetupCallback<VDigitalBoardItem>
489
510
  ): VDigitalBoardItem;
490
511
  vGauge(first?: SetupInput<VGauge> | null, callback?: SetupCallback<VGauge>): VGauge;
512
+ vImagePreview(
513
+ first?: SetupInput<VImagePreview> | null,
514
+ callback?: SetupCallback<VImagePreview>
515
+ ): VImagePreview;
491
516
  vPagination(
492
517
  first?: SetupInput<PaginationComponent> | null,
493
518
  callback?: SetupCallback<PaginationComponent>
@@ -1,4 +1,5 @@
1
1
  import type { ElementFactory, ElementOptions, SetupCallback, SetupInput } from './core.js';
2
+ import type { HtmlElementNode } from './html.js';
2
3
  import type { VButton } from './actions.js';
3
4
 
4
5
  export type GlowMotion = 'auto' | 'sweep' | 'pulse' | 'none' | string;
@@ -29,12 +30,35 @@ export const vGlowButton: ElementFactory<VGlowButton> & {
29
30
  (first?: SetupInput<VGlowButton> | null, callback?: SetupCallback<VGlowButton>): VGlowButton;
30
31
  };
31
32
 
33
+ export type TransitionMotion = 'auto' | 'always';
34
+
35
+ /** Generic enter / leave transition wrapper driven by CSS or Web Animations API. */
36
+ export class VTransition extends HtmlElementNode {
37
+ show(): boolean;
38
+ show(value: boolean): VTransition;
39
+ enter(): VTransition;
40
+ leave(): VTransition;
41
+ toggle(): VTransition;
42
+ motion(): TransitionMotion;
43
+ motion(value: TransitionMotion): VTransition;
44
+ duration(): number;
45
+ duration(value: number): VTransition;
46
+ }
47
+
48
+ export const vTransition: ElementFactory<VTransition> & {
49
+ (first?: SetupInput<VTransition> | null, callback?: SetupCallback<VTransition>): VTransition;
50
+ };
51
+
32
52
  /** Parent-shortcut surface merged onto HtmlElementNode. */
33
53
  export interface EffectsParentShortcuts {
34
54
  vGlowButton(
35
55
  first?: SetupInput<VGlowButton> | null,
36
56
  callback?: SetupCallback<VGlowButton>
37
57
  ): VGlowButton;
58
+ vTransition(
59
+ first?: SetupInput<VTransition> | null,
60
+ callback?: SetupCallback<VTransition>
61
+ ): VTransition;
38
62
  }
39
63
 
40
64
  export type { ElementOptions };
package/types/layout.d.ts CHANGED
@@ -339,6 +339,20 @@ export const vSplitPanel: ElementFactory<VSplitPanel> & {
339
339
  (first?: SetupInput<VSplitPanel> | null, callback?: SetupCallback<VSplitPanel>): VSplitPanel;
340
340
  };
341
341
 
342
+ /** Masonry layout built on CSS multi-columns with configurable columns and gap. */
343
+ export class VMasonry extends HtmlElementNode {
344
+ columns(): number;
345
+ columns(value: number): VMasonry;
346
+ gap(): number;
347
+ gap(value: number): VMasonry;
348
+ minColumnWidth(): number | null;
349
+ minColumnWidth(value: number | null): VMasonry;
350
+ }
351
+
352
+ export const vMasonry: ElementFactory<VMasonry> & {
353
+ (first?: SetupInput<VMasonry> | null, callback?: SetupCallback<VMasonry>): VMasonry;
354
+ };
355
+
342
356
  // ---------------------------------------------------------------------------
343
357
  // Theme shell
344
358
  // ---------------------------------------------------------------------------
@@ -424,6 +438,7 @@ export interface LayoutParentShortcuts {
424
438
  first?: SetupInput<VSplitPanel> | null,
425
439
  callback?: SetupCallback<VSplitPanel>
426
440
  ): VSplitPanel;
441
+ vMasonry(first?: SetupInput<VMasonry> | null, callback?: SetupCallback<VMasonry>): VMasonry;
427
442
  }
428
443
 
429
444
  export type { ElementOptions, SetupInput };