@rowslint/importer-js 0.0.3 → 0.0.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/dist/main.d.ts +2 -0
- package/dist/models/importer.model.d.ts +3 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/rowslint.js +22 -1
- package/dist/rowslint.umd.js +1 -0
- package/package.json +5 -28
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './importer.model';
|
package/dist/rowslint.js
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
(
|
|
1
|
+
(() => {
|
|
2
|
+
const t = document.createElement("script");
|
|
3
|
+
t.src = "https://cdn.jsdelivr.net/npm/@rowslint/importer@latest/browser/rowslint-element.js", document.head.appendChild(t);
|
|
4
|
+
})();
|
|
5
|
+
const d = (t) => {
|
|
6
|
+
if (!t.apiKey)
|
|
7
|
+
throw new Error(
|
|
8
|
+
"No API key provided to Rowslint. You may have forgotten to provide a valid API key to finish initializing Rowslint."
|
|
9
|
+
);
|
|
10
|
+
const e = document.createElement("rowslint-element");
|
|
11
|
+
e.apiKey = t.apiKey, e.config = t.config, e.file = t.file ?? null, e.showButton = !1, e.addEventListener("import", function n(i) {
|
|
12
|
+
var o;
|
|
13
|
+
const s = i;
|
|
14
|
+
(o = t.onImport) == null || o.call(t, s.detail), l(), window.removeEventListener("import", n, !1);
|
|
15
|
+
}), document.body.appendChild(e);
|
|
16
|
+
}, l = () => {
|
|
17
|
+
const t = document.querySelector("rowslint-button");
|
|
18
|
+
t == null || t.remove();
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
d as launchRowslint
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.rowslint={}))})(this,function(t){"use strict";(()=>{const e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/@rowslint/importer@latest/browser/rowslint-element.js",document.head.appendChild(e)})();const o=e=>{if(!e.apiKey)throw new Error("No API key provided to Rowslint. You may have forgotten to provide a valid API key to finish initializing Rowslint.");const n=document.createElement("rowslint-element");n.apiKey=e.apiKey,n.config=e.config,n.file=e.file??null,n.showButton=!1,n.addEventListener("import",function l(d){var i;const u=d;(i=e.onImport)==null||i.call(e,u.detail),s(),window.removeEventListener("import",l,!1)}),document.body.appendChild(n)},s=()=>{const e=document.querySelector("rowslint-button");e==null||e.remove()};t.launchRowslint=o,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rowslint/importer-js",
|
|
3
|
-
"
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"author": "Mouad Ennaciri",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"dist/models/importer.model.d.ts"
|
|
11
|
-
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc && vite build",
|
|
14
|
-
"postbuild": "cat dist/rowslint.umd.cjs > dist/rowslint.js && del-cli dist/rowslint.umd.cjs",
|
|
15
|
-
"lint": "eslint \"src/**/*.ts\"",
|
|
16
|
-
"format": "prettier . --write",
|
|
17
|
-
"publish": "npm publish --access=public"
|
|
18
|
-
},
|
|
19
|
-
"volta": {
|
|
20
|
-
"node": "20.18.0"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "8.8.1",
|
|
24
|
-
"@typescript-eslint/parser": "8.8.1",
|
|
25
|
-
"del-cli": "6.0.0",
|
|
26
|
-
"eslint": "9.12.0",
|
|
27
|
-
"prettier": "3.3.3",
|
|
28
|
-
"tsx": "4.19.1",
|
|
29
|
-
"typescript": "5.6.3",
|
|
30
|
-
"vite": "5.4.8",
|
|
31
|
-
"vite-plugin-dts": "4.2.3"
|
|
32
|
-
}
|
|
6
|
+
"main": "./dist/importer.js",
|
|
7
|
+
"module": "./dist/importer.js",
|
|
8
|
+
"types": "./dist/main.d.ts",
|
|
9
|
+
"type": "module"
|
|
33
10
|
}
|