troncell-vue-component 1.0.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.
Files changed (114) hide show
  1. package/README.md +144 -0
  2. package/dist/index.cjs +742 -0
  3. package/dist/index.mjs +10142 -0
  4. package/dist/troncell-vue-component.css +1 -0
  5. package/dist/types/components/3DCardComp/component/CardBody.vue.d.ts +21 -0
  6. package/dist/types/components/3DCardComp/component/CardContainer.vue.d.ts +27 -0
  7. package/dist/types/components/3DCardComp/component/Cardltem.vue.d.ts +89 -0
  8. package/dist/types/components/3DCardComp/component/card-3d.d.ts +4 -0
  9. package/dist/types/components/3DCardComp/component/useMouseState.d.ts +4 -0
  10. package/dist/types/components/3DCardComp/index.vue.d.ts +50 -0
  11. package/dist/types/components/AnimatedTestimonialsComp/component/AnimatedTestimonials.vue.d.ts +39 -0
  12. package/dist/types/components/AnimatedTestimonialsComp/index.vue.d.ts +53 -0
  13. package/dist/types/components/AuroraComp/component/Aurora.vue.d.ts +23 -0
  14. package/dist/types/components/AuroraComp/index.vue.d.ts +35 -0
  15. package/dist/types/components/BendingGalleryComp/component/BendingGallery.vue.d.ts +19 -0
  16. package/dist/types/components/BendingGalleryComp/index.vue.d.ts +35 -0
  17. package/dist/types/components/BentoGridComp/component/BentoGrid.vue.d.ts +21 -0
  18. package/dist/types/components/BentoGridComp/component/BentoGridltem.vue.d.ts +24 -0
  19. package/dist/types/components/BentoGridComp/index.vue.d.ts +33 -0
  20. package/dist/types/components/Carousel3DComp/component/Carousel3D.vue.d.ts +18 -0
  21. package/dist/types/components/Carousel3DComp/index.vue.d.ts +27 -0
  22. package/dist/types/components/ContainerScrollComp/component/ContainerScroll.vue.d.ts +22 -0
  23. package/dist/types/components/ContainerScrollComp/component/ContainerScrollCard.vue.d.ts +23 -0
  24. package/dist/types/components/ContainerScrollComp/component/ContainerScrollTitle.vue.d.ts +21 -0
  25. package/dist/types/components/ContainerScrollComp/index.vue.d.ts +37 -0
  26. package/dist/types/components/DirectionAwareHoverComp/component/DirectionAwareHover.vue.d.ts +31 -0
  27. package/dist/types/components/DirectionAwareHoverComp/index.vue.d.ts +42 -0
  28. package/dist/types/components/DockComp/component/Dock.vue.d.ts +35 -0
  29. package/dist/types/components/DockComp/component/DockSeparator.vue.d.ts +2 -0
  30. package/dist/types/components/DockComp/component/Docklcon.vue.d.ts +21 -0
  31. package/dist/types/components/DockComp/component/index.d.ts +3 -0
  32. package/dist/types/components/DockComp/component/injectionKeys.d.ts +7 -0
  33. package/dist/types/components/DockComp/component/types.d.ts +2 -0
  34. package/dist/types/components/DockComp/index.vue.d.ts +27 -0
  35. package/dist/types/components/DomeGalleryComp/component/DomeGallery.vue.d.ts +49 -0
  36. package/dist/types/components/DomeGalleryComp/index.vue.d.ts +53 -0
  37. package/dist/types/components/ExpandableGalleryComp/component/ExpandableGallery.vue.d.ts +7 -0
  38. package/dist/types/components/ExpandableGalleryComp/index.vue.d.ts +17 -0
  39. package/dist/types/components/FluidCursorComp/component/FluidCursor.vue.d.ts +42 -0
  40. package/dist/types/components/FluidCursorComp/index.vue.d.ts +23 -0
  41. package/dist/types/components/IButtonComp/index.vue.d.ts +55 -0
  42. package/dist/types/components/IInputComp/index.vue.d.ts +28 -0
  43. package/dist/types/components/IconCloudComp/component/IconCloud.vue.d.ts +5 -0
  44. package/dist/types/components/IconCloudComp/component/index.d.ts +14 -0
  45. package/dist/types/components/IconCloudComp/index.vue.d.ts +29 -0
  46. package/dist/types/components/InfiniteGridComp/component/DisposalManager.d.ts +121 -0
  47. package/dist/types/components/InfiniteGridComp/component/EventHandler.d.ts +126 -0
  48. package/dist/types/components/InfiniteGridComp/component/GridManager.d.ts +191 -0
  49. package/dist/types/components/InfiniteGridComp/component/InfiniteGrid.vue.d.ts +16 -0
  50. package/dist/types/components/InfiniteGridComp/component/InfiniteGridClass.d.ts +382 -0
  51. package/dist/types/components/InfiniteGridComp/component/PostProcessShader.d.ts +116 -0
  52. package/dist/types/components/InfiniteGridComp/component/createTexture.d.ts +99 -0
  53. package/dist/types/components/InfiniteGridComp/component/shaders.d.ts +4 -0
  54. package/dist/types/components/InfiniteGridComp/component/types.d.ts +122 -0
  55. package/dist/types/components/InfiniteGridComp/index.vue.d.ts +47 -0
  56. package/dist/types/components/InfiniteMenuComp/component/InfiniteMenu.vue.d.ts +13 -0
  57. package/dist/types/components/InfiniteMenuComp/index.vue.d.ts +33 -0
  58. package/dist/types/components/InspiraImageParticlesComp/component/inspiraImageParticles.d.ts +107 -0
  59. package/dist/types/components/InspiraImageParticlesComp/index.vue.d.ts +24 -0
  60. package/dist/types/components/InteractiveGridPatternComp/component/InteractiveGridPattern.vue.d.ts +14 -0
  61. package/dist/types/components/InteractiveGridPatternComp/index.vue.d.ts +29 -0
  62. package/dist/types/components/LightningComp/component/Lightning.vue.d.ts +17 -0
  63. package/dist/types/components/LightningComp/index.vue.d.ts +35 -0
  64. package/dist/types/components/LinkPreviewComp/component/LinkPreview.vue.d.ts +19 -0
  65. package/dist/types/components/LinkPreviewComp/index.vue.d.ts +11 -0
  66. package/dist/types/components/MagnifyingGlassComp/component/Beams.vue.d.ts +2 -0
  67. package/dist/types/components/MagnifyingGlassComp/component/Lens.vue.d.ts +45 -0
  68. package/dist/types/components/MagnifyingGlassComp/component/Rays.vue.d.ts +5 -0
  69. package/dist/types/components/MagnifyingGlassComp/index.vue.d.ts +41 -0
  70. package/dist/types/components/MarqueeComp/component/Marquee.vue.d.ts +28 -0
  71. package/dist/types/components/MarqueeComp/component/ReviewCard.vue.d.ts +8 -0
  72. package/dist/types/components/MarqueeComp/index.vue.d.ts +42 -0
  73. package/dist/types/components/MeteorsComp/component/Meteors.vue.d.ts +16 -0
  74. package/dist/types/components/MeteorsComp/index.vue.d.ts +45 -0
  75. package/dist/types/components/Navigation.vue.d.ts +2 -0
  76. package/dist/types/components/PhotoGalleryComp/component/PhotoGallery.vue.d.ts +9 -0
  77. package/dist/types/components/PhotoGalleryComp/index.vue.d.ts +38 -0
  78. package/dist/types/components/RegistrationFormComp/index.vue.d.ts +15 -0
  79. package/dist/types/components/RippleButtonComp/component/RippleButton.vue.d.ts +35 -0
  80. package/dist/types/components/RippleButtonComp/index.vue.d.ts +35 -0
  81. package/dist/types/components/RollingGalleryComp/component/RollingGallery.vue.d.ts +29 -0
  82. package/dist/types/components/RollingGalleryComp/index.vue.d.ts +45 -0
  83. package/dist/types/components/ScratchToRevealComp/component/ScratchToReveal.vue.d.ts +37 -0
  84. package/dist/types/components/ScratchToRevealComp/index.vue.d.ts +37 -0
  85. package/dist/types/components/ScrollIslandComp/component/AnimatedCircularProgressBar.vue.d.ts +22 -0
  86. package/dist/types/components/ScrollIslandComp/component/ScrollIsland.vue.d.ts +19 -0
  87. package/dist/types/components/ScrollIslandComp/index.vue.d.ts +41 -0
  88. package/dist/types/components/SparkElementComp/component/Sparkles.vue.d.ts +20 -0
  89. package/dist/types/components/SparkElementComp/index.vue.d.ts +13 -0
  90. package/dist/types/components/SparklesTextComp/component/SparklesText.vue.d.ts +17 -0
  91. package/dist/types/components/SparklesTextComp/index.vue.d.ts +13 -0
  92. package/dist/types/components/SplineComp/component/ParentSize.vue.d.ts +55 -0
  93. package/dist/types/components/SplineComp/component/Spline.vue.d.ts +67 -0
  94. package/dist/types/components/SplineComp/index.vue.d.ts +41 -0
  95. package/dist/types/components/StackComp/component/Stack.vue.d.ts +36 -0
  96. package/dist/types/components/StackComp/index.vue.d.ts +49 -0
  97. package/dist/types/components/TargetCursorComp/component/TargetCursor.vue.d.ts +15 -0
  98. package/dist/types/components/TargetCursorComp/index.vue.d.ts +50 -0
  99. package/dist/types/components/TestimonialSliderComp/component/TestimonialSlider.vue.d.ts +19 -0
  100. package/dist/types/components/TestimonialSliderComp/index.vue.d.ts +35 -0
  101. package/dist/types/components/Text3dComp/component/Text3d.vue.d.ts +40 -0
  102. package/dist/types/components/Text3dComp/index.vue.d.ts +33 -0
  103. package/dist/types/components/TextGenerateEffectComp/component/TextGenerateEffect.vue.d.ts +16 -0
  104. package/dist/types/components/TextGenerateEffectComp/index.vue.d.ts +29 -0
  105. package/dist/types/components/TimelineComp/component/Timeline.vue.d.ts +37 -0
  106. package/dist/types/components/TimelineComp/index.vue.d.ts +41 -0
  107. package/dist/types/components/TracingBeamComp/component/TracingBeam.vue.d.ts +27 -0
  108. package/dist/types/components/TracingBeamComp/index.vue.d.ts +47 -0
  109. package/dist/types/index.d.ts +42 -0
  110. package/dist/types/utils/lib/utils.d.ts +3 -0
  111. package/dist/types/utils/sensing-sample-sdk-quorra-1.0.d.ts +67 -0
  112. package/dist/types/utils/sensing-sample-sdk-webview-1.0.d.ts +45 -0
  113. package/dist/types/utils/useDynamicComponents.d.ts +42 -0
  114. package/package.json +83 -0
@@ -0,0 +1,126 @@
1
+ import { Mesh, Vec2, Raycast } from 'ogl';
2
+ import { Position2D, ScrollState, CardData } from './types';
3
+ /**
4
+ * Interface defining the required properties and methods that the EventHandler
5
+ * needs to access from the main InfiniteGrid class
6
+ */
7
+ export interface EventHandlerHost {
8
+ container: HTMLElement;
9
+ pointer: Vec2;
10
+ raycast: Raycast;
11
+ camera: any;
12
+ renderer: any;
13
+ sceneRenderTarget: any;
14
+ postProcessShader: any;
15
+ scroll: ScrollState;
16
+ isDown: boolean;
17
+ isHoveringCanvas: boolean;
18
+ hasMovedSignificantly: boolean;
19
+ startPosition: Position2D;
20
+ scrollPosition: Position2D;
21
+ scrollTracker: any;
22
+ currentHoveredTileKey: string;
23
+ backgroundMeshMap: Map<string, Mesh>;
24
+ foregroundMeshMap: Map<string, Mesh>;
25
+ options: {
26
+ baseCameraZ: number;
27
+ };
28
+ maxClickMovement: number;
29
+ hoverTransitionDuration: number;
30
+ hoverEase: string;
31
+ initialBackgroundOpacity: number;
32
+ hoveredBackgroundOpacity: number;
33
+ cardData: CardData[];
34
+ updatePositions(): void;
35
+ animateInertiaScroll(vx?: number | string, vy?: number | string): void;
36
+ getTileKeyFromMesh(mesh: Mesh): string;
37
+ getCardDataForTile(groupIndex: number, tileIndex: number): CardData;
38
+ getInteractiveMeshes(): Mesh[];
39
+ updatePointerCoordinates(clientX: number, clientY: number): void;
40
+ performRaycast(): Mesh[];
41
+ fadeInBackground(mesh: Mesh): void;
42
+ fadeOutBackground(mesh: Mesh): void;
43
+ }
44
+ /**
45
+ * EventHandler class manages all user interactions for the infinite grid
46
+ *
47
+ * This class encapsulates event handling logic including:
48
+ * - Mouse and touch input processing
49
+ * - Hover state management with visual feedback
50
+ * - Click detection with drag threshold
51
+ * - Responsive window resize handling
52
+ * - Event listener lifecycle management
53
+ */
54
+ export declare class EventHandler {
55
+ private host;
56
+ private isInitialized;
57
+ /**
58
+ * Creates a new EventHandler instance
59
+ * @param host - The main grid class that provides required properties and methods
60
+ */
61
+ constructor(host: EventHandlerHost);
62
+ /**
63
+ * Initializes event listeners
64
+ * Should be called once after the grid is set up
65
+ */
66
+ initialize(): void;
67
+ /**
68
+ * Handles pointer down events (mouse button press or touch start)
69
+ * Initiates drag interaction and camera zoom
70
+ */
71
+ private onPointerDown;
72
+ /**
73
+ * Handles pointer move events (mouse move or touch move)
74
+ * Processes scrolling or hover states depending on interaction state
75
+ */
76
+ private onPointerMove;
77
+ /**
78
+ * Handles pointer up events (mouse button release or touch end)
79
+ * Ends drag interaction and applies inertia scrolling
80
+ */
81
+ private onPointerUp;
82
+ /**
83
+ * Handles pointer leaving the canvas area
84
+ * Clears hover states when mouse exits
85
+ */
86
+ private onPointerOut;
87
+ /**
88
+ * Handles window resize events
89
+ * Updates camera aspect ratio and renderer size
90
+ */
91
+ private onWindowResize;
92
+ /**
93
+ * Handles hover effects when not dragging
94
+ * Manages background blur fade in/out based on tile intersection
95
+ */
96
+ private handleHover;
97
+ /**
98
+ * Handles mouse click events
99
+ * Processes clicks only if no significant movement occurred
100
+ */
101
+ private handleMouseClick;
102
+ /**
103
+ * Handles touch end events
104
+ * Combines pointer up logic with click detection for touch devices
105
+ */
106
+ private handleTouchEnd;
107
+ /**
108
+ * Performs tile click detection and event dispatching
109
+ * Uses raycasting to determine which tile was clicked
110
+ */
111
+ private performTileClick;
112
+ /**
113
+ * Adds all event listeners to the container and window
114
+ * Should be called once during initialization
115
+ */
116
+ private addEventListeners;
117
+ /**
118
+ * Removes all event listeners
119
+ * Should be called during cleanup/disposal
120
+ */
121
+ removeEventListeners(): void;
122
+ /**
123
+ * Gets the initialization status
124
+ */
125
+ get initialized(): boolean;
126
+ }
@@ -0,0 +1,191 @@
1
+ import { Renderer, Transform, Texture, Mesh } from 'ogl';
2
+ import { CardData, TileGroupData, CardTexturePair } from './types';
3
+ /**
4
+ * Interface defining the required properties and methods that the GridManager
5
+ * needs to access from the main InfiniteGrid class
6
+ */
7
+ export interface GridManagerHost {
8
+ renderer: Renderer | null;
9
+ scene: Transform;
10
+ cardData: CardData[];
11
+ GRID_COLS: number;
12
+ GRID_ROWS: number;
13
+ GRID_WIDTH: number;
14
+ GRID_HEIGHT: number;
15
+ TILE_SIZE: number;
16
+ TILE_SPACE: number;
17
+ initialBackgroundOpacity: number;
18
+ tileGroupsData: TileGroupData[];
19
+ groupObjects: Transform[];
20
+ foregroundMeshMap: Map<string, Mesh>;
21
+ backgroundMeshMap: Map<string, Mesh>;
22
+ cardTextures: CardTexturePair[];
23
+ staticUniforms: Map<string, any>;
24
+ }
25
+ /**
26
+ * GridManager handles all grid creation and management functionality
27
+ *
28
+ * This class encapsulates the complex logic of creating and managing
29
+ * the 3x3 infinite grid system including:
30
+ * - Tile group initialization and positioning
31
+ * - Dynamic tile creation with proper materials
32
+ * - Texture generation from card data
33
+ * - Shader program creation and management
34
+ * - Tile indexing and key management
35
+ *
36
+ * The grid system uses a 3x3 pattern of tile groups where each group
37
+ * contains a configurable number of individual tiles. This creates
38
+ * the illusion of infinite content while maintaining performance.
39
+ */
40
+ export declare class GridManager {
41
+ private host;
42
+ private isInitialized;
43
+ /**
44
+ * Creates a new GridManager instance
45
+ * @param host - The main grid class that provides required properties and methods
46
+ */
47
+ constructor(host: GridManagerHost);
48
+ /**
49
+ * Initializes the complete grid system
50
+ *
51
+ * This method sets up the entire grid in the correct order:
52
+ * 1. Initialize tile group positions
53
+ * 2. Generate textures for all card data
54
+ * 3. Create all tile meshes with proper materials
55
+ *
56
+ * @returns Promise that resolves when all grid setup is complete
57
+ */
58
+ initialize(): Promise<void>;
59
+ /**
60
+ * Initializes the 3x3 grid of tile groups for infinite scrolling
61
+ *
62
+ * Creates 9 tile groups arranged in a 3x3 pattern. Each group contains
63
+ * a grid of tiles. As the user scrolls, groups are repositioned to
64
+ * create the illusion of infinite content.
65
+ */
66
+ private initializeTileGroups;
67
+ /**
68
+ * Creates all tiles for the grid system
69
+ *
70
+ * For each tile group, creates individual tiles with:
71
+ * - Background mesh (for blur effects)
72
+ * - Foreground mesh (for content display)
73
+ * - Proper positioning and parenting
74
+ * - User data for interaction
75
+ */
76
+ private createTiles;
77
+ /**
78
+ * Creates a background mesh for blur effects
79
+ */
80
+ private createBackgroundMesh;
81
+ /**
82
+ * Creates a foreground mesh for content display
83
+ */
84
+ private createForegroundMesh;
85
+ /**
86
+ * Generates a unique tile key for indexing
87
+ * @param groupIndex - The index of the tile group (0-8)
88
+ * @param tileIndex - The index of the tile within the group
89
+ * @returns A unique string key for the tile
90
+ */
91
+ getTileKey(groupIndex: number, tileIndex: number): string;
92
+ /**
93
+ * Calculates the card texture index for a given tile
94
+ * @param groupIndex - The index of the tile group
95
+ * @param tileIndex - The index of the tile within the group
96
+ * @returns The index of the card data to use for this tile
97
+ */
98
+ getCardTextureIndex(groupIndex: number, tileIndex: number): number;
99
+ /**
100
+ * Gets the foreground texture for a specific tile
101
+ * @param groupIndex - The index of the tile group
102
+ * @param tileIndex - The index of the tile within the group
103
+ * @returns The foreground texture or null if not available
104
+ */
105
+ getCardForegroundTexture(groupIndex: number, tileIndex: number): Texture | null;
106
+ /**
107
+ * Gets the background texture for a specific tile
108
+ * @param groupIndex - The index of the tile group
109
+ * @param tileIndex - The index of the tile within the group
110
+ * @returns The background texture or null if not available
111
+ */
112
+ getCardBackgroundTexture(groupIndex: number, tileIndex: number): Texture | null;
113
+ /**
114
+ * Creates a shader program for background tiles (with blur effects)
115
+ * @param groupIndex - The index of the tile group
116
+ * @param tileIndex - The index of the tile within the group
117
+ * @returns A configured Program for background rendering
118
+ */
119
+ private createBackgroundProgram;
120
+ /**
121
+ * Creates a shader program for foreground tiles (content display)
122
+ * @param groupIndex - The index of the tile group
123
+ * @param tileIndex - The index of the tile within the group
124
+ * @returns A configured Program for foreground rendering
125
+ */
126
+ private createForegroundProgram;
127
+ /**
128
+ * Generates textures for all card data
129
+ *
130
+ * Creates both foreground and background textures for each card
131
+ * using the Canvas 2D API. Textures are cached for efficient reuse.
132
+ *
133
+ * @returns Promise that resolves when all textures are generated
134
+ */
135
+ private generateTexturesForCardData;
136
+ /**
137
+ * Extracts tile key from a mesh using its userData
138
+ * @param mesh - The mesh to get the tile key from
139
+ * @returns The tile key or empty string if not found
140
+ */
141
+ getTileKeyFromMesh(mesh: Mesh): string;
142
+ /**
143
+ * Gets the card data for a specific tile
144
+ * @param groupIndex - The group index of the tile
145
+ * @param tileIndex - The tile index within the group
146
+ * @returns The card data for the tile
147
+ */
148
+ getCardDataForTile(groupIndex: number, tileIndex: number): CardData;
149
+ /**
150
+ * Updates card data and regenerates textures
151
+ *
152
+ * This method allows for dynamic content updates by:
153
+ * 1. Updating the card data
154
+ * 2. Regenerating all textures
155
+ * 3. Updating existing tile programs with new textures
156
+ *
157
+ * @param newCardData - The new card data to use
158
+ * @returns Promise that resolves when update is complete
159
+ */
160
+ updateCardData(newCardData: CardData[]): Promise<void>;
161
+ /**
162
+ * Updates all tile textures with newly generated textures
163
+ * This is called after card data changes to refresh the display
164
+ */
165
+ private updateTileTextures;
166
+ /**
167
+ * Gets all interactive meshes (foreground meshes that can be clicked)
168
+ * @returns Array of foreground meshes
169
+ */
170
+ getInteractiveMeshes(): Mesh[];
171
+ /**
172
+ * Clears all grid data and meshes
173
+ * This is useful for cleanup or reinitialization
174
+ */
175
+ clear(): void;
176
+ /**
177
+ * Gets the initialization status
178
+ */
179
+ get initialized(): boolean;
180
+ /**
181
+ * Gets statistics about the current grid
182
+ * @returns Object containing grid statistics
183
+ */
184
+ getGridStats(): {
185
+ totalGroups: number;
186
+ tilesPerGroup: number;
187
+ totalTiles: number;
188
+ totalTextures: number;
189
+ memoryEstimate: string;
190
+ };
191
+ }
@@ -0,0 +1,16 @@
1
+ import { InfiniteGridOptions, CardData } from './types';
2
+ interface Props {
3
+ cardData: CardData[];
4
+ options?: Partial<InfiniteGridOptions>;
5
+ onTilesLoaded?: () => void;
6
+ }
7
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ tileClicked: (...args: any[]) => void;
9
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
10
+ onTileClicked?: ((...args: any[]) => any) | undefined;
11
+ }>, {
12
+ options: Partial<InfiniteGridOptions>;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
14
+ infiniteGridContainer: HTMLDivElement;
15
+ }, HTMLDivElement>;
16
+ export default _default;