sportfi-kit 1.0.5 → 1.0.7

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/dist/cli/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { cac } from 'cac';
3
3
  import chalk from 'chalk';
4
- import { createCommand } from './commands/create';
5
- import { initCommand } from './commands/init';
6
- import { addExampleCommand } from './commands/add-example';
4
+ import { createCommand } from './commands/create.js';
5
+ import { initCommand } from './commands/init.js';
6
+ import { addExampleCommand } from './commands/add-example.js';
7
7
  const cli = cac('sportfi-kit');
8
8
  cli
9
9
  .command('create <app-name>', 'Scaffold a new SportFi mini-app')
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { X } from 'lucide-react';
3
- import { closeSociosMiniApp } from '../utils/detectSociosBrowser';
3
+ import { closeSociosMiniApp } from '../utils/detectSociosBrowser.js';
4
4
  /**
5
5
  * CloseMiniAppButton - Standard 'X' button to exit the mini-app environment.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { motion, AnimatePresence } from 'framer-motion';
3
- import { useSportFiConnect } from '../hooks/useSportFiConnect';
3
+ import { useSportFiConnect } from '../hooks/useSportFiConnect.js';
4
4
  /**
5
5
  * ConnectButton - The primary entry point for wallet connection.
6
6
  * Enhanced with Framer Motion for a premium feel.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useFanTokenBalance } from '../hooks/useFanTokenBalance';
2
+ import { useFanTokenBalance } from '../hooks/useFanTokenBalance.js';
3
3
  /**
4
4
  * FanTokenGate - Content gating based on Fan Token ownership.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useMiniAppContext } from '../provider/SportFiKitProvider';
2
+ import { useMiniAppContext } from '../provider/SportFiKitProvider.js';
3
3
  /**
4
4
  * SafeAreaWrapper - Handles layout padding for notched mobile devices in Socios/Telegram browsers.
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Share2 } from 'lucide-react';
3
- import { detectSociosBrowser } from '../utils/detectSociosBrowser';
3
+ import { detectSociosBrowser } from '../utils/detectSociosBrowser.js';
4
4
  /**
5
5
  * ShareToSociosButton - Specialized button to share dApp content within Socios.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { useAccount, useDisconnect } from 'wagmi';
2
2
  import { useAppKit } from '@reown/appkit/react';
3
- import { useMiniAppContext } from '../provider/SportFiKitProvider';
3
+ import { useMiniAppContext } from '../provider/SportFiKitProvider.js';
4
4
  /**
5
5
  * Hook to manage SportFi connection and authentication.
6
6
  * Wraps Wagmi and Reown AppKit with environment context.
@@ -1,15 +1,15 @@
1
- export * from './provider/SportFiKitProvider';
2
- export * from './hooks/useSportFiConnect';
3
- export * from './hooks/useFanTokenBalance';
4
- export * from './hooks/useSimpleVote';
5
- export * from './hooks/usePythSportsFeed';
6
- export * from './components/ConnectButton';
7
- export * from './components/FanTokenGate';
8
- export * from './components/PredictionCard';
9
- export * from './components/ShareToSociosButton';
10
- export * from './components/CloseMiniAppButton';
11
- export * from './components/SafeAreaWrapper';
12
- export * from './utils/detectSociosBrowser';
13
- export * from './utils/telegramMiniAppSupport';
14
- export * from './types';
1
+ export * from './provider/SportFiKitProvider.js';
2
+ export * from './hooks/useSportFiConnect.js';
3
+ export * from './hooks/useFanTokenBalance.js';
4
+ export * from './hooks/useSimpleVote.js';
5
+ export * from './hooks/usePythSportsFeed.js';
6
+ export * from './components/ConnectButton.js';
7
+ export * from './components/FanTokenGate.js';
8
+ export * from './components/PredictionCard.js';
9
+ export * from './components/ShareToSociosButton.js';
10
+ export * from './components/CloseMiniAppButton.js';
11
+ export * from './components/SafeAreaWrapper.js';
12
+ export * from './utils/detectSociosBrowser.js';
13
+ export * from './utils/telegramMiniAppSupport.js';
14
+ export * from './types/index.js';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,14 +1,14 @@
1
- export * from './provider/SportFiKitProvider';
2
- export * from './hooks/useSportFiConnect';
3
- export * from './hooks/useFanTokenBalance';
4
- export * from './hooks/useSimpleVote';
5
- export * from './hooks/usePythSportsFeed';
6
- export * from './components/ConnectButton';
7
- export * from './components/FanTokenGate';
8
- export * from './components/PredictionCard';
9
- export * from './components/ShareToSociosButton';
10
- export * from './components/CloseMiniAppButton';
11
- export * from './components/SafeAreaWrapper';
12
- export * from './utils/detectSociosBrowser';
13
- export * from './utils/telegramMiniAppSupport';
14
- export * from './types';
1
+ export * from './provider/SportFiKitProvider.js';
2
+ export * from './hooks/useSportFiConnect.js';
3
+ export * from './hooks/useFanTokenBalance.js';
4
+ export * from './hooks/useSimpleVote.js';
5
+ export * from './hooks/usePythSportsFeed.js';
6
+ export * from './components/ConnectButton.js';
7
+ export * from './components/FanTokenGate.js';
8
+ export * from './components/PredictionCard.js';
9
+ export * from './components/ShareToSociosButton.js';
10
+ export * from './components/CloseMiniAppButton.js';
11
+ export * from './components/SafeAreaWrapper.js';
12
+ export * from './utils/detectSociosBrowser.js';
13
+ export * from './utils/telegramMiniAppSupport.js';
14
+ export * from './types/index.js';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SportFiConfig, MiniAppContextType } from '../types';
2
+ import { SportFiConfig, MiniAppContextType } from '../types/index.js';
3
3
  /**
4
4
  * SportFiKitProvider - The one-line entry point for SportFi Kit.
5
5
  * Handles Reown AppKit, Wagmi, and environment detection.
@@ -1 +1 @@
1
- {"version":3,"file":"SportFiKitProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/SportFiKitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAK9E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAqC7D;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAqDA,CAAC;AAEF,eAAO,MAAM,iBAAiB,0BAI7B,CAAC"}
1
+ {"version":3,"file":"SportFiKitProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/SportFiKitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAK9E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAqCtE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAqDA,CAAC;AAEF,eAAO,MAAM,iBAAiB,0BAI7B,CAAC"}
@@ -4,8 +4,8 @@ import { createAppKit } from '@reown/appkit/react';
4
4
  import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
5
5
  import { WagmiProvider } from 'wagmi';
6
6
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
7
- import { detectSociosBrowser } from '../utils/detectSociosBrowser';
8
- import { isTelegramMiniApp, initTelegramWebApp } from '../utils/telegramMiniAppSupport';
7
+ import { detectSociosBrowser } from '../utils/detectSociosBrowser.js';
8
+ import { isTelegramMiniApp, initTelegramWebApp } from '../utils/telegramMiniAppSupport.js';
9
9
  // Define Chiliz Chains
10
10
  const chilizMainnet = {
11
11
  id: 88888,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sportfi-kit",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/chiliz/sportfi-kit.git"
@@ -10,9 +10,17 @@
10
10
  },
11
11
  "homepage": "https://www.sportfikit.online",
12
12
  "description": "SportFi Kit - Modern React component library + CLI for building fan engagement mini-apps on Chiliz Chain.",
13
+ "type": "module",
13
14
  "main": "./dist/src/index.js",
14
- "module": "./dist/src/index.mjs",
15
+ "module": "./dist/src/index.js",
15
16
  "types": "./dist/src/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/src/index.d.ts",
20
+ "import": "./dist/src/index.js",
21
+ "default": "./dist/src/index.js"
22
+ }
23
+ },
16
24
  "bin": {
17
25
  "sportfi-kit": "./dist/cli/index.js"
18
26
  },