@kakarot2905/quizzie-module 0.1.0 → 0.1.1

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 (3) hide show
  1. package/README.md +4 -2
  2. package/loader.d.ts +11 -0
  3. package/package.json +15 -3
package/README.md CHANGED
@@ -10,6 +10,8 @@ npm install @kakarot2905/quizzie-module
10
10
 
11
11
  ## Usage in any web app
12
12
 
13
+ Render directly in plain HTML with an ES module script:
14
+
13
15
  ```html
14
16
  <div id="quiz-root"></div>
15
17
  <script type="module">
@@ -27,7 +29,7 @@ npm install @kakarot2905/quizzie-module
27
29
  1. Install the package:
28
30
 
29
31
  ```bash
30
- npm install @sudhakar2905/quizzie-module
32
+ npm install @kakarot2905/quizzie-module
31
33
  ```
32
34
 
33
35
  2. Load and render the custom element in a React component:
@@ -74,7 +76,7 @@ Then you can render it directly:
74
76
 
75
77
  ```tsx
76
78
  import { useEffect } from "react";
77
- import { loadQuizzieModule } from "@sudhakar2905/quizzie-module";
79
+ import { loadQuizzieModule } from "@kakarot2905/quizzie-module";
78
80
 
79
81
  export default function QuizzieEmbed() {
80
82
  useEffect(() => {
package/loader.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export interface LoadQuizzieModuleOptions {
2
+ baseUrl?: string;
3
+ }
4
+
5
+ export declare function loadQuizzieModule(options?: LoadQuizzieModuleOptions): Promise<void>;
6
+ export declare const elementTag: string;
7
+ export declare const manifest: {
8
+ elementTag: string;
9
+ js: string[];
10
+ css: string[];
11
+ };
package/package.json CHANGED
@@ -1,17 +1,29 @@
1
1
  {
2
2
  "name": "@kakarot2905/quizzie-module",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Quizzie embeddable quiz module as a Web Component",
5
5
  "type": "module",
6
6
  "main": "./loader.js",
7
7
  "module": "./loader.js",
8
+ "types": "./loader.d.ts",
9
+ "unpkg": "./loader.js",
10
+ "jsdelivr": "./loader.js",
8
11
  "exports": {
9
- ".": "./loader.js",
10
- "./loader": "./loader.js",
12
+ ".": {
13
+ "types": "./loader.d.ts",
14
+ "import": "./loader.js",
15
+ "default": "./loader.js"
16
+ },
17
+ "./loader": {
18
+ "types": "./loader.d.ts",
19
+ "import": "./loader.js",
20
+ "default": "./loader.js"
21
+ },
11
22
  "./manifest": "./manifest.json"
12
23
  },
13
24
  "files": [
14
25
  "*.js",
26
+ "*.d.ts",
15
27
  "*.css",
16
28
  "*.json",
17
29
  "3rdpartylicenses.txt",