obi-sdk 0.4.1 → 0.4.2

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.
@@ -0,0 +1 @@
1
+ export * from "./session-start-modal";
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from "lit";
2
- import { CourseData } from "./courses/courses";
2
+ import { CourseData } from "../courses/courses";
3
3
  export declare class SessionStartModal extends LitElement {
4
4
  static styles: import("lit").CSSResult;
5
5
  session: CourseData;
@@ -0,0 +1,37 @@
1
+ import type { StoryObj } from '@storybook/web-components-vite';
2
+ import { SessionStartModal } from './session-start-modal';
3
+ declare const meta: {
4
+ title: string;
5
+ tags: string[];
6
+ render: (args: SessionStartModal) => SessionStartModal;
7
+ argTypes: {
8
+ session: {
9
+ control: "object";
10
+ description: string;
11
+ };
12
+ onStart: {
13
+ action: string;
14
+ description: string;
15
+ };
16
+ onClose: {
17
+ action: string;
18
+ description: string;
19
+ };
20
+ };
21
+ args: {
22
+ session: {
23
+ id: string;
24
+ name: string;
25
+ description: string;
26
+ imageSrc: string;
27
+ };
28
+ onStart: (sessionToken: string) => void;
29
+ onClose: () => void;
30
+ };
31
+ };
32
+ export default meta;
33
+ type Story = StoryObj<SessionStartModal>;
34
+ export declare const Primary: Story;
35
+ export declare const LongDescription: Story;
36
+ export declare const ShortTitle: Story;
37
+ export declare const WithCustomImage: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obi-sdk",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "JavaScript SDK for Obi",
5
5
  "type": "module",
6
6
  "main": "dist/obi-sdk.umd.js",
@@ -28,16 +28,19 @@
28
28
  "lit": "^3.0.0",
29
29
  "ts-pattern": "^5.7.0",
30
30
  "zod": "^3.22.0",
31
+ "@obi/obi-client": "0.2.0",
31
32
  "@obi/obi-session": "0.3.0",
32
- "@obi/url-params": "0.2.0",
33
- "@obi/obi-client": "0.2.0"
33
+ "@obi/url-params": "0.2.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
37
37
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
38
38
  },
39
39
  "devDependencies": {
40
+ "@chromatic-com/storybook": "^4.0.0-0",
40
41
  "@eslint/js": "^8.56.0",
42
+ "@storybook/addon-docs": "^9.0.0",
43
+ "@storybook/web-components-vite": "^9.0.0",
41
44
  "@types/node": "^22.15.18",
42
45
  "@types/react": "^18.0.0",
43
46
  "@types/react-dom": "^18.0.0",
@@ -47,10 +50,12 @@
47
50
  "eslint": "^8.45.0",
48
51
  "eslint-config-prettier": "^9.0.0",
49
52
  "eslint-plugin-import": "^2.28.0",
53
+ "eslint-plugin-storybook": "^9.0.0",
50
54
  "prettier": "^3.0.0",
51
55
  "react": "^18.2.0",
52
56
  "react-dom": "^18.2.0",
53
57
  "rimraf": "^6.0.1",
58
+ "storybook": "^9.0.0",
54
59
  "terser": "^5.39.0",
55
60
  "typescript": "^5.8.3",
56
61
  "vite": "^4.5.0"
@@ -65,6 +70,8 @@
65
70
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
66
71
  "preview": "vite preview",
67
72
  "types": "tsc --emitDeclarationOnly",
68
- "clean": "rimraf dist"
73
+ "clean": "rimraf dist",
74
+ "storybook": "storybook dev -p 6006",
75
+ "build-storybook": "storybook build"
69
76
  }
70
77
  }