@stackvibe-studio/motion 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 StackVibe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ import type { HTMLMotionProps } from 'motion/react';
2
+ import type { ReactNode } from 'react';
3
+ export interface SpotlightCardProps extends HTMLMotionProps<'div'> {
4
+ children: ReactNode;
5
+ glowColor?: string;
6
+ intensity?: number;
7
+ }
8
+ export declare function SpotlightCard({ children, glowColor, intensity, style, className, ...props }: SpotlightCardProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface TextRevealProps extends HTMLAttributes<HTMLHeadingElement> {
3
+ as?: 'h1' | 'h2' | 'h3' | 'p' | 'span';
4
+ }
5
+ export declare function TextReveal({ as: Component, children, className, ...props }: TextRevealProps): import("react").JSX.Element;
package/dist/index.cjs ADDED
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ SpotlightCard: () => SpotlightCard,
24
+ TextReveal: () => TextReveal
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/components/spotlight-card.tsx
29
+ var import_react = require("motion/react");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ function SpotlightCard({
32
+ children,
33
+ glowColor = "#8b5cf6",
34
+ intensity = 0.6,
35
+ style,
36
+ className = "",
37
+ ...props
38
+ }) {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
40
+ import_react.motion.div,
41
+ {
42
+ ...props,
43
+ whileHover: { scale: 1.01, y: -4 },
44
+ transition: { type: "spring", stiffness: 180, damping: 18 },
45
+ className: ["relative overflow-hidden rounded-3xl", className].join(" "),
46
+ style: {
47
+ ...style,
48
+ background: "linear-gradient(135deg, rgba(15,23,42,0.78), rgba(15,23,42,0.42))"
49
+ },
50
+ children: [
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ import_react.motion.div,
53
+ {
54
+ "aria-hidden": "true",
55
+ className: "pointer-events-none absolute inset-0 opacity-90",
56
+ style: {
57
+ background: `radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 50%), ${glowColor}${Math.round(
58
+ intensity * 255
59
+ ).toString(16).padStart(2, "0")}, rgba(255,255,255,0) 38%)`
60
+ }
61
+ }
62
+ ),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative z-10", children })
64
+ ]
65
+ }
66
+ );
67
+ }
68
+
69
+ // src/components/text-reveal.tsx
70
+ var import_react2 = require("motion/react");
71
+ var import_jsx_runtime2 = require("react/jsx-runtime");
72
+ function TextReveal({
73
+ as: Component = "h1",
74
+ children,
75
+ className = "",
76
+ ...props
77
+ }) {
78
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
79
+ import_react2.motion.div,
80
+ {
81
+ initial: { opacity: 0, y: 18 },
82
+ animate: { opacity: 1, y: 0 },
83
+ transition: { duration: 0.5, ease: "easeOut" },
84
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ...props, className, children })
85
+ }
86
+ );
87
+ }
88
+ // Annotate the CommonJS export names for ESM import in node:
89
+ 0 && (module.exports = {
90
+ SpotlightCard,
91
+ TextReveal
92
+ });
@@ -0,0 +1,2 @@
1
+ export * from './components/spotlight-card';
2
+ export * from './components/text-reveal';
package/dist/index.js ADDED
@@ -0,0 +1,64 @@
1
+ // src/components/spotlight-card.tsx
2
+ import { motion } from "motion/react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ function SpotlightCard({
5
+ children,
6
+ glowColor = "#8b5cf6",
7
+ intensity = 0.6,
8
+ style,
9
+ className = "",
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsxs(
13
+ motion.div,
14
+ {
15
+ ...props,
16
+ whileHover: { scale: 1.01, y: -4 },
17
+ transition: { type: "spring", stiffness: 180, damping: 18 },
18
+ className: ["relative overflow-hidden rounded-3xl", className].join(" "),
19
+ style: {
20
+ ...style,
21
+ background: "linear-gradient(135deg, rgba(15,23,42,0.78), rgba(15,23,42,0.42))"
22
+ },
23
+ children: [
24
+ /* @__PURE__ */ jsx(
25
+ motion.div,
26
+ {
27
+ "aria-hidden": "true",
28
+ className: "pointer-events-none absolute inset-0 opacity-90",
29
+ style: {
30
+ background: `radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 50%), ${glowColor}${Math.round(
31
+ intensity * 255
32
+ ).toString(16).padStart(2, "0")}, rgba(255,255,255,0) 38%)`
33
+ }
34
+ }
35
+ ),
36
+ /* @__PURE__ */ jsx("div", { className: "relative z-10", children })
37
+ ]
38
+ }
39
+ );
40
+ }
41
+
42
+ // src/components/text-reveal.tsx
43
+ import { motion as motion2 } from "motion/react";
44
+ import { jsx as jsx2 } from "react/jsx-runtime";
45
+ function TextReveal({
46
+ as: Component = "h1",
47
+ children,
48
+ className = "",
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsx2(
52
+ motion2.div,
53
+ {
54
+ initial: { opacity: 0, y: 18 },
55
+ animate: { opacity: 1, y: 0 },
56
+ transition: { duration: 0.5, ease: "easeOut" },
57
+ children: /* @__PURE__ */ jsx2(Component, { ...props, className, children })
58
+ }
59
+ );
60
+ }
61
+ export {
62
+ SpotlightCard,
63
+ TextReveal
64
+ };
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@stackvibe-studio/motion",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Motion primitives for StackVibe UI.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/StackVibe-Studio/stackvibe-ui.git"
9
+ },
10
+ "homepage": "https://stackvibe-studio.github.io/stackvibe-ui/",
11
+ "bugs": {
12
+ "url": "https://github.com/StackVibe-Studio/stackvibe-ui/issues"
13
+ },
14
+ "license": "MIT",
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.cjs"
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
25
+ "sideEffects": false,
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "registry": "https://registry.npmjs.org/"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "peerDependencies": {
34
+ "react": ">=18.0.0",
35
+ "react-dom": ">=18.0.0"
36
+ },
37
+ "dependencies": {
38
+ "gsap": "^3.13.1",
39
+ "motion": "^12.23.12"
40
+ },
41
+ "devDependencies": {
42
+ "@types/react": "^19.0.0",
43
+ "@types/react-dom": "^19.0.0",
44
+ "tsup": "^8.1.0",
45
+ "typescript": "^5.7.0"
46
+ },
47
+ "scripts": {
48
+ "build": "tsup src/index.ts --format esm,cjs --clean && tsc --project tsconfig.json --emitDeclarationOnly",
49
+ "typecheck": "tsc --noEmit"
50
+ }
6
51
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.