sunpeak 0.3.4 → 0.3.5

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/README.md CHANGED
@@ -39,6 +39,13 @@ Requirements: React (18+), Tailwind 4
39
39
  pnpm add sunpeak
40
40
  ```
41
41
 
42
+ When using `ChatGPTSimulator`, import the styles in your entry file:
43
+
44
+ ```tsx
45
+ import 'sunpeak/style.css';
46
+ import { ChatGPTSimulator } from 'sunpeak';
47
+ ```
48
+
42
49
  ## Key Features
43
50
  - 📺 ChatGPT simulator for local UI component development.
44
51
  - 📚 Pre-built component library built on [openai/apps-sdk-ui](https://github.com/openai/apps-sdk-ui).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunpeak",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "The ChatGPT Apps UI SDK. Build and test your ChatGPT App UI locally with OpenAI apps-sdk-ui components.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,7 +1,7 @@
1
1
  import { StrictMode } from 'react';
2
2
  import { createRoot } from 'react-dom/client';
3
3
  import { ChatGPTSimulator } from 'sunpeak';
4
- import { App } from '@/App';
4
+ import { App } from '../src/App';
5
5
 
6
6
  const toolOutput = {
7
7
  places: [
@@ -1,4 +1,4 @@
1
- import '@/styles/globals.css';
1
+ import './styles/globals.css';
2
2
 
3
3
  import { useWidgetProps } from 'sunpeak';
4
4
  import { OpenAICarousel, OpenAICard } from './components';
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
  import { Button } from "@openai/apps-sdk-ui/components/Button"
3
- import { cn } from "@/lib/index"
3
+ import { cn } from "../lib/index"
4
4
 
5
5
  export interface OpenAIButtonProps {
6
6
  isPrimary?: boolean
@@ -4,7 +4,7 @@ import { WheelGesturesPlugin } from "embla-carousel-wheel-gestures"
4
4
  import { ArrowLeft, ArrowRight } from "@openai/apps-sdk-ui/components/Icon"
5
5
  import { useWidgetState, useDisplayMode } from "sunpeak"
6
6
  import { Button } from "@openai/apps-sdk-ui/components/Button"
7
- import { cn } from "@/lib/index"
7
+ import { cn } from "../lib/index"
8
8
 
9
9
  export interface OpenAICarouselState extends Record<string, unknown> {
10
10
  currentIndex?: number
@@ -1,5 +1,6 @@
1
1
  @import "tailwindcss";
2
2
  @import "@openai/apps-sdk-ui/css";
3
+ @import "sunpeak/style.css";
3
4
 
4
5
  /* Required for Tailwind to find class references in Apps SDK UI components. */
5
6
  @source "../node_modules/@openai/apps-sdk-ui";
@@ -24,7 +24,9 @@
24
24
 
25
25
  "baseUrl": ".",
26
26
  "paths": {
27
- "@/*": ["./src/*"]
27
+ "sunpeak": ["../src/index.ts"],
28
+ "sunpeak/*": ["../src/*"],
29
+ "~/*": ["../src/*"]
28
30
  }
29
31
  },
30
32
  "include": ["src", "dev"],
@@ -35,7 +35,8 @@ export default defineConfig({
35
35
  },
36
36
  resolve: {
37
37
  alias: {
38
- '@': path.resolve(__dirname, './src'),
38
+ 'sunpeak': path.resolve(__dirname, '../src'),
39
+ '~': path.resolve(__dirname, '../src'),
39
40
  },
40
41
  conditions: ['style', 'import', 'module', 'browser', 'default'],
41
42
  },
@@ -11,7 +11,6 @@ export default defineConfig({
11
11
  plugins: [react(), tailwindcss()],
12
12
  resolve: {
13
13
  alias: {
14
- '@': path.resolve(__dirname, './src'),
15
14
  // In workspace dev mode, use local sunpeak source
16
15
  ...(isTemplate && {
17
16
  'sunpeak': parentSrc,
@@ -9,7 +9,8 @@ export default defineConfig({
9
9
  },
10
10
  resolve: {
11
11
  alias: {
12
- '@': path.resolve(__dirname, './src'),
12
+ 'sunpeak': path.resolve(__dirname, '../src'),
13
+ '~': path.resolve(__dirname, '../src'),
13
14
  },
14
15
  },
15
16
  });