@kitschpatrol/tweakpane-plugin-file-import 1.1.2-beta.2 → 1.2.0-fork.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.
@@ -1 +1 @@
1
- import{ClassName as e,createPlugin as t,CompositeConstraint as i,parseRecord as n}from"@tweakpane/core";const a=e("ctn"),o=e("input"),s=e("btn");class r{constructor(e,t){this.element=e.createElement("div"),this.container=e.createElement("div"),this.container.classList.add(a()),t.viewProps.bindClassModifiers(this.container),this.input=e.createElement("input"),this.input.classList.add(o()),this.input.setAttribute("type","file"),this.input.setAttribute("accept",t.filetypes?t.filetypes.join(","):"*"),this.input.style.height=`calc(20px * ${t.lineCount})`,this.fileIcon=e.createElement("div"),this.fileIcon.classList.add(a("icon")),this.text=e.createElement("span"),this.text.classList.add(a("text")),this.warning=e.createElement("span"),this.warning.classList.add(a("warning")),this.warning.innerHTML=t.invalidFiletypeMessage,this.warning.style.display="none",this.deleteButton=e.createElement("button"),this.deleteButton.classList.add(s("b")),this.deleteButton.innerHTML="Delete",this.deleteButton.style.display="none",this.container.appendChild(this.input),this.container.appendChild(this.fileIcon),this.element.appendChild(this.container),this.element.appendChild(this.warning),this.element.appendChild(this.deleteButton)}changeDraggingState(e){var t,i;e?null===(t=this.container)||void 0===t||t.classList.add(a("input_area_dragging")):null===(i=this.container)||void 0===i||i.classList.remove(a("input_area_dragging"))}}class l{constructor(e,t){this.value=t.value,this.viewProps=t.viewProps,this.view=new r(e,{viewProps:this.viewProps,value:t.value,invalidFiletypeMessage:t.invalidFiletypeMessage,lineCount:t.lineCount,filetypes:t.filetypes}),this.config=t,this.onFile=this.onFile.bind(this),this.onDrop=this.onDrop.bind(this),this.onDragOver=this.onDragOver.bind(this),this.onDragLeave=this.onDragLeave.bind(this),this.onDeleteClick=this.onDeleteClick.bind(this),this.view.input.addEventListener("change",this.onFile),this.view.element.addEventListener("drop",this.onDrop),this.view.element.addEventListener("dragover",this.onDragOver),this.view.element.addEventListener("dragleave",this.onDragLeave),this.view.deleteButton.addEventListener("click",this.onDeleteClick),this.value.emitter.on("change",(()=>this.handleValueChange())),this.viewProps.handleDispose((()=>{this.view.input.removeEventListener("change",this.onFile),this.view.element.removeEventListener("drop",this.onDrop),this.view.element.removeEventListener("dragover",this.onDragOver),this.view.element.removeEventListener("dragleave",this.onDragLeave),this.view.deleteButton.removeEventListener("click",this.onDeleteClick)}))}onFile(e){const t=this.view.input;if(t.files&&t.files.length>0){const e=t.files[0];this.isFileValid(e)?this.value.setRawValue(e):this.showWarning()}}showWarning(){this.view.warning.style.display="block",setTimeout((()=>{this.view.warning.style.display="none"}),5e3)}isFileValid(e){var t;const i=this.config.filetypes,n="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());return!(i&&i.length>0&&!i.includes(n)&&n)}onDeleteClick(){this.value.rawValue&&(this.value.setRawValue(null),this.view.input.value="",this.view.warning.style.display="none")}onDragOver(e){e.preventDefault(),this.view.changeDraggingState(!0)}onDragLeave(){this.view.changeDraggingState(!1)}onDrop(e){if(e instanceof DragEvent&&(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files)){const t=e.dataTransfer.files;if(1==t.length){const e=t.item(0);e&&(this.isFileValid(e)?this.value.setRawValue(e):this.showWarning())}}this.view.changeDraggingState(!1)}handleValueChange(){const e=this.value.rawValue,t=this.view.container,i=this.view.text,n=this.view.fileIcon,a=this.view.deleteButton;e?(i.textContent=e.name,t.appendChild(i),t.contains(n)&&t.removeChild(n),this.view.warning.style.display="none",a.style.display="block",t.style.border="unset"):(i.textContent="",t.appendChild(n),t.removeChild(i),this.view.warning.style.display="none",a.style.display="none",t.style.border="1px dashed #717070")}}const h="file-input",p='.tp-ctnv{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:rgba(0,0,0,0);border-width:0;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0;outline:none;padding:0}.tp-ctnv{background-color:var(--in-bg);border-radius:var(--bld-br);box-sizing:border-box;color:var(--in-fg);font-family:inherit;height:var(--cnt-usz);line-height:var(--cnt-usz);min-width:0;width:100%}.tp-ctnv:hover{background-color:var(--in-bg-h)}.tp-ctnv:focus{background-color:var(--in-bg-f)}.tp-ctnv:active{background-color:var(--in-bg-a)}.tp-ctnv:disabled{opacity:.5}.tp-ctnv{cursor:pointer;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;height:100%;width:100%;border:1px dashed #717070;border-radius:5px}.tp-ctnv.tp-v-disabled{opacity:.5}.tp-ctnv_input_area_dragging{border:1px dashed #6774ff;background-color:rgba(88,88,185,.231372549)}.tp-ctnv_warning{color:var(--in-fg);bottom:2px;display:inline-block;font-size:.9em;height:-moz-max-content;height:max-content;line-height:1.5;opacity:.5;white-space:normal;width:-moz-max-content;width:max-content;word-wrap:break-word;text-align:right;width:100%;margin-top:var(--cnt-vp)}.tp-ctnv_text{color:var(--in-fg);bottom:2px;display:inline-block;font-size:.9em;height:-moz-max-content;height:max-content;line-height:.9;margin:.2rem;max-height:100%;max-width:100%;opacity:.5;position:absolute;right:2px;text-align:right;white-space:normal;width:-moz-max-content;width:max-content;word-wrap:break-word}.tp-ctnv_frac{background-color:var(--in-fg);border-radius:1px;height:2px;left:50%;margin-top:-1px;position:absolute;top:50%}.tp-ctnv_icon{box-sizing:border-box;position:absolute;display:block;transform:scale(var(--ggs, 1));width:16px;height:6px;border:2px solid;border-top:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;margin-top:8px;opacity:.5}.tp-ctnv_icon::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border-left:2px solid;border-top:2px solid;transform:rotate(45deg);left:2px;bottom:4px}.tp-ctnv_icon::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:10px;background:currentColor;left:5px;bottom:3px}.tp-btnv_b{margin-top:10px}.tp-inputv{opacity:0}',d=[t({id:"file-input",type:"input",accept(e,t){if("string"!=typeof e)return null;const i=n(t,(e=>({view:e.required.constant("file-input"),invalidFiletypeMessage:e.optional.string,lineCount:e.optional.number,filetypes:e.optional.array(e.required.string)})));return i?{initialValue:e,params:i}:null},binding:{reader:e=>e=>e instanceof File?e:null,constraint:e=>new i([]),writer:e=>(e,t)=>{e.write(t)}},controller(e){var t,i;return new l(e.document,{value:e.value,viewProps:e.viewProps,invalidFiletypeMessage:null!==(t=e.params.invalidFiletypeMessage)&&void 0!==t?t:"Unaccepted file type.",lineCount:null!==(i=e.params.lineCount)&&void 0!==i?i:3,filetypes:e.params.filetypes})}})];export{p as css,h as id,d as plugins};
1
+ import{ClassName as e,createPlugin as t,CompositeConstraint as i,parseRecord as n}from"@tweakpane/core";const a=e("ctn"),o=e("input"),s=e("btn");class r{constructor(e,t){this.element=e.createElement("div"),this.container=e.createElement("div"),this.container.classList.add(a()),t.viewProps.bindClassModifiers(this.container),this.input=e.createElement("input"),this.input.classList.add(o()),this.input.setAttribute("type","file"),this.input.setAttribute("accept",t.filetypes?t.filetypes.join(","):"*"),this.input.style.height=`calc(20px * ${t.lineCount})`,this.fileIcon=e.createElement("div"),this.fileIcon.classList.add(a("icon")),this.text=e.createElement("span"),this.text.classList.add(a("text")),this.warning=e.createElement("span"),this.warning.classList.add(a("warning")),this.warning.innerHTML=t.invalidFiletypeMessage,this.warning.style.display="none",this.deleteButton=e.createElement("button"),this.deleteButton.classList.add(s("b")),this.deleteButton.innerHTML="Delete",this.deleteButton.style.display="none",this.container.appendChild(this.input),this.container.appendChild(this.fileIcon),this.element.appendChild(this.container),this.element.appendChild(this.warning),this.element.appendChild(this.deleteButton)}changeDraggingState(e){var t,i;e?null===(t=this.container)||void 0===t||t.classList.add(a("input_area_dragging")):null===(i=this.container)||void 0===i||i.classList.remove(a("input_area_dragging"))}}class l{constructor(e,t){this.value=t.value,this.viewProps=t.viewProps,this.view=new r(e,{viewProps:this.viewProps,value:t.value,invalidFiletypeMessage:t.invalidFiletypeMessage,lineCount:t.lineCount,filetypes:t.filetypes}),this.config=t,this.onFile=this.onFile.bind(this),this.onDrop=this.onDrop.bind(this),this.onDragOver=this.onDragOver.bind(this),this.onDragLeave=this.onDragLeave.bind(this),this.onDeleteClick=this.onDeleteClick.bind(this),this.view.input.addEventListener("change",this.onFile),this.view.element.addEventListener("drop",this.onDrop),this.view.element.addEventListener("dragover",this.onDragOver),this.view.element.addEventListener("dragleave",this.onDragLeave),this.view.deleteButton.addEventListener("click",this.onDeleteClick),this.value.emitter.on("change",()=>this.handleValueChange()),this.viewProps.handleDispose(()=>{this.view.input.removeEventListener("change",this.onFile),this.view.element.removeEventListener("drop",this.onDrop),this.view.element.removeEventListener("dragover",this.onDragOver),this.view.element.removeEventListener("dragleave",this.onDragLeave),this.view.deleteButton.removeEventListener("click",this.onDeleteClick)})}onFile(e){const t=this.view.input;if(t.files&&t.files.length>0){const e=t.files[0];this.isFileValid(e)?this.value.setRawValue(e):this.showWarning()}}showWarning(){this.view.warning.style.display="block",setTimeout(()=>{this.view.warning.style.display="none"},5e3)}isFileValid(e){var t;const i=this.config.filetypes,n="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());return!(i&&i.length>0&&!i.includes(n)&&n)}onDeleteClick(){this.value.rawValue&&(this.value.setRawValue(null),this.view.input.value="",this.view.warning.style.display="none")}onDragOver(e){e.preventDefault(),this.view.changeDraggingState(!0)}onDragLeave(){this.view.changeDraggingState(!1)}onDrop(e){if(e instanceof DragEvent&&(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files)){const t=e.dataTransfer.files;if(1==t.length){const e=t.item(0);e&&(this.isFileValid(e)?this.value.setRawValue(e):this.showWarning())}}this.view.changeDraggingState(!1)}handleValueChange(){const e=this.value.rawValue,t=this.view.container,i=this.view.text,n=this.view.fileIcon,a=this.view.deleteButton;e?(i.textContent=e.name,t.appendChild(i),t.contains(n)&&t.removeChild(n),this.view.warning.style.display="none",a.style.display="block",t.style.border="unset"):(i.textContent="",t.appendChild(n),t.removeChild(i),this.view.warning.style.display="none",a.style.display="none",t.style.border="1px dashed #717070")}}const h="file-input",p='.tp-ctnv{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:rgba(0,0,0,0);border-width:0;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0;outline:none;padding:0}.tp-ctnv{background-color:var(--in-bg);border-radius:var(--bld-br);box-sizing:border-box;color:var(--in-fg);font-family:inherit;height:var(--cnt-usz);line-height:var(--cnt-usz);min-width:0;width:100%}.tp-ctnv:hover{background-color:var(--in-bg-h)}.tp-ctnv:focus{background-color:var(--in-bg-f)}.tp-ctnv:active{background-color:var(--in-bg-a)}.tp-ctnv:disabled{opacity:.5}.tp-ctnv{cursor:pointer;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;height:100%;width:100%;border:1px dashed #717070;border-radius:5px}.tp-ctnv.tp-v-disabled{opacity:.5}.tp-ctnv_input_area_dragging{border:1px dashed #6774ff;background-color:rgba(88,88,185,.231372549)}.tp-ctnv_warning{color:var(--in-fg);bottom:2px;display:inline-block;font-size:.9em;height:-moz-max-content;height:max-content;line-height:1.5;opacity:.5;white-space:normal;width:-moz-max-content;width:max-content;word-wrap:break-word;text-align:right;width:100%;margin-top:var(--cnt-vp)}.tp-ctnv_text{color:var(--in-fg);bottom:2px;display:inline-block;font-size:.9em;height:-moz-max-content;height:max-content;line-height:.9;margin:.2rem;max-height:100%;max-width:100%;opacity:.5;position:absolute;right:2px;text-align:right;white-space:normal;width:-moz-max-content;width:max-content;word-wrap:break-word}.tp-ctnv_frac{background-color:var(--in-fg);border-radius:1px;height:2px;left:50%;margin-top:-1px;position:absolute;top:50%}.tp-ctnv_icon{box-sizing:border-box;position:absolute;display:block;transform:scale(var(--ggs, 1));width:16px;height:6px;border:2px solid;border-top:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;margin-top:8px;opacity:.5}.tp-ctnv_icon::after{content:"";display:block;box-sizing:border-box;position:absolute;width:8px;height:8px;border-left:2px solid;border-top:2px solid;transform:rotate(45deg);left:2px;bottom:4px}.tp-ctnv_icon::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:10px;background:currentColor;left:5px;bottom:3px}.tp-btnv_b{margin-top:10px}.tp-inputv{opacity:0}',d=[t({id:"file-input",type:"input",accept(e,t){if("string"!=typeof e)return null;const i=n(t,e=>({view:e.required.constant("file-input"),invalidFiletypeMessage:e.optional.string,lineCount:e.optional.number,filetypes:e.optional.array(e.required.string)}));return i?{initialValue:e,params:i}:null},binding:{reader:e=>e=>e instanceof File?e:null,constraint:e=>new i([]),writer:e=>(e,t)=>{e.write(t)}},controller(e){var t,i;return new l(e.document,{value:e.value,viewProps:e.viewProps,invalidFiletypeMessage:null!==(t=e.params.invalidFiletypeMessage)&&void 0!==t?t:"Unaccepted file type.",lineCount:null!==(i=e.params.lineCount)&&void 0!==i?i:3,filetypes:e.params.filetypes})}})];export{p as css,h as id,d as plugins};
@@ -1,4 +1,8 @@
1
+ MIT License
2
+
1
3
  Copyright (c) 2021 cocopon <cocopon@me.com>
4
+ Copyright (c) 2023-2026 Luís Arteiro
5
+ Copyright (c) 2024-2026 Eric Mika (fork modifications)
2
6
 
3
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
8
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,18 +1,31 @@
1
1
  {
2
2
  "name": "@kitschpatrol/tweakpane-plugin-file-import",
3
- "version": "1.1.2-beta.2",
3
+ "version": "1.2.0-fork.1",
4
4
  "type": "module",
5
- "description": "A fork of tweakpane-plugin-file-import with build optimizations.",
5
+ "description": "Fork of tweakpane-plugin-file-import with build optimizations.",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/kitschpatrol/tweakpane-plugin-image.git"
8
+ "url": "git+https://github.com/kitschpatrol/tweakpane-plugin-file-import.git"
9
9
  },
10
10
  "homepage": "https://github.com/kitschpatrol/tweakpane-plugin-file-import",
11
- "author": "LuchoTurtle",
11
+ "author": "Luís Arteiro",
12
+ "maintainers": [
13
+ {
14
+ "name": "Eric Mika",
15
+ "email": "eric@ericmika.com",
16
+ "url": "https://ericmika.com"
17
+ }
18
+ ],
12
19
  "license": "MIT",
13
20
  "engines": {
14
21
  "node": ">=18.0.0"
15
22
  },
23
+ "devEngines": {
24
+ "runtime": {
25
+ "name": "node",
26
+ "version": "^24.16.0 || >=26.3.0"
27
+ }
28
+ },
16
29
  "main": "dist/tweakpane-plugin-file-import.js",
17
30
  "types": "dist/types/index.d.ts",
18
31
  "files": [
@@ -30,52 +43,50 @@
30
43
  "@tweakpane/core": "^2.0.5"
31
44
  },
32
45
  "devDependencies": {
33
- "@eslint/eslintrc": "^3.3.0",
34
- "@eslint/js": "^9.21.0",
35
- "@rollup/plugin-alias": "^5.1.1",
36
- "@rollup/plugin-node-resolve": "^15.3.1",
37
- "@rollup/plugin-replace": "^6.0.2",
38
- "@rollup/plugin-terser": "^0.4.4",
39
- "@rollup/plugin-typescript": "^12.1.2",
40
- "@typescript-eslint/eslint-plugin": "^8.26.0",
41
- "@typescript-eslint/parser": "^8.26.0",
42
- "autoprefixer": "^10.4.20",
43
- "bumpp": "^10.0.3",
44
- "eslint": "^9.21.0",
45
- "eslint-config-prettier": "^9.1.0",
46
- "eslint-plugin-prettier": "^5.2.3",
47
- "eslint-plugin-simple-import-sort": "^12.1.1",
46
+ "@eslint/eslintrc": "^3.3.7",
47
+ "@eslint/js": "^10.0.1",
48
+ "@rollup/plugin-node-resolve": "^16.0.3",
49
+ "@rollup/plugin-replace": "^6.0.3",
50
+ "@rollup/plugin-terser": "^1.0.0",
51
+ "@rollup/plugin-typescript": "^12.3.0",
52
+ "@typescript-eslint/eslint-plugin": "^8.71.2",
53
+ "@typescript-eslint/parser": "^8.71.2",
54
+ "autoprefixer": "^10.6.1",
55
+ "bumpp": "^12.3.0",
56
+ "eslint": "^10.12.0",
57
+ "eslint-config-prettier": "^10.1.8",
58
+ "eslint-plugin-prettier": "^5.5.7",
59
+ "eslint-plugin-simple-import-sort": "^14.0.0",
48
60
  "http-server": "^14.1.1",
49
- "npm-run-all": "^4.1.5",
50
- "onchange": "^7.1.0",
51
- "postcss": "^8.5.3",
52
- "prettier": "^3.5.3",
53
- "prettier-plugin-pkg": "^0.18.1",
54
- "release-it": "^17.11.0",
55
- "rimraf": "^6.0.1",
56
- "rollup": "^4.34.9",
61
+ "mdat": "^3.6.2",
62
+ "postcss": "^8.5.30",
63
+ "prettier": "^3.9.10",
64
+ "prettier-plugin-pkg": "^0.22.1",
65
+ "rollup": "^4.64.6",
57
66
  "rollup-plugin-cleanup": "3.2.1",
58
- "sass": "^1.85.1",
59
- "typescript": "^5.8.2"
67
+ "sass": "^1.105.1",
68
+ "shx": "^0.4.0",
69
+ "tslib": "^2.8.1",
70
+ "typescript": "~6.0.3"
60
71
  },
61
72
  "publishConfig": {
62
73
  "access": "public"
63
74
  },
64
75
  "scripts": {
65
- "build": "run-p build:*",
76
+ "build": "pnpm run '/^build:/'",
66
77
  "build:dev": "rollup --config rollup.config.js",
67
78
  "build:dts": "tsc --project tsconfig-dts.json",
68
79
  "build:prod": "rollup --config rollup.config.js --environment BUILD:production",
69
- "clean": "rimraf dist",
70
- "format": "run-p format:*",
80
+ "clean": "shx rm -rf dist",
81
+ "clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX",
82
+ "format": "pnpm run '/^format:/'",
83
+ "format:readme": "mdat expand",
71
84
  "format:scss": "prettier --parser scss --write \"src/sass/**/*.scss\"",
72
85
  "format:ts": "eslint --fix \"src/**/*.ts\"",
73
- "release": "bumpp --commit 'Release: %s' --tag '%s' && pnpm run build && pnpm publish --tag latest --otp $(op read 'op://Personal/Npmjs/one-time password?attribute=otp')",
86
+ "release": "pnpm test && pnpm build && bumpp --preid fork --commit 'Release: %s' --tag '%s' && NPM_TOKEN=$(op read 'op://Personal/npm/token') pnpm publish --tag latest",
74
87
  "server": "http-server -c-1 -o /test/browser.html",
75
- "start": "run-p watch server",
76
- "test": "eslint \"src/**/*.ts\"",
77
- "watch": "run-p watch:*",
78
- "watch:sass": "onchange --initial --kill \"src/sass/**/*.scss\" -- npm run build:dev",
79
- "watch:ts": "onchange --initial --kill \"src/**/*.ts\" -- rollup --config rollup.config.js"
88
+ "start": "pnpm run '/^(watch|server)$/'",
89
+ "test": "eslint \"src/**/*.ts\" && mdat check",
90
+ "watch": "rollup --config rollup.config.js --watch --no-watch.clearScreen"
80
91
  }
81
92
  }
@@ -1,10 +1,26 @@
1
+ <!-- title -->
2
+
1
3
  # @kitschpatrol/tweakpane-plugin-file-import
2
4
 
3
- [![NPM Package @kitschpatrol/tweakpane-plugin-file-import](https://img.shields.io/npm/v/@kitschpatrol/tweakpane-plugin-file-import.svg)](https://npmjs.com/package/@kitschpatrol/tweakpane-plugin-file-import)
5
+ <!-- /title -->
6
+
7
+ <!-- badges({ npmDownloads: true }) -->
8
+
9
+ [![NPM Package @kitschpatrol/tweakpane-plugin-file-import](https://img.shields.io/npm/v/@kitschpatrol/tweakpane-plugin-file-import.svg)](https://www.npmjs.com/package/@kitschpatrol/tweakpane-plugin-file-import)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit)
11
+ [![NPM Downloads @kitschpatrol/tweakpane-plugin-file-import](https://img.shields.io/npm/dm/@kitschpatrol/tweakpane-plugin-file-import)](https://www.npmjs.com/package/@kitschpatrol/tweakpane-plugin-file-import)
12
+
13
+ <!-- /badges -->
14
+
15
+ <!-- description -->
16
+
17
+ **Fork of tweakpane-plugin-file-import with build optimizations.**
18
+
19
+ <!-- /description -->
4
20
 
5
21
  ## Overview
6
22
 
7
- **This is a fork of [LuchoTurtle](https://github.com/LuchoTurtle)'s [tweakpane-plugin-file-import](https://github.com/LuchoTurtle/tweakpane-plugin-file-import) with externalized dependencies.**
23
+ This is a fork of [Luís Arteiro](https://github.com/LuchoTurtle)'s [tweakpane-plugin-file-import](https://github.com/LuchoTurtle/tweakpane-plugin-file-import) with externalized dependencies.
8
24
 
9
25
  This allows for smaller bundled file sizes in projects using multiple Tweakpane plugins.
10
26
 
@@ -16,11 +32,11 @@ For most use cases, you probably don't want this fork!
16
32
 
17
33
  The [Rollup](https://rollupjs.org) configuration provided in the [Tweakpane plugin template](https://github.com/tweakpane/plugin-template) does not externalize [`@tweakpane/core`](https://github.com/cocopon/tweakpane/tree/main/packages/core) as a production dependency.
18
34
 
19
- Instead, it gets built into the single-file plugin artifact, which is what's published to NPM and imported by plugin consumers. This makes it easy to import as an ES module from a URL, but means that larger projects importing multiple Tweakpane plugins end up with duplicate copies of the `@tweakpane/core` code, adding about ~100 Kb to the final minified build for each plugin after the first.
35
+ Instead, it gets built into the single-file plugin artifact, which is what's published to NPM and imported by plugin consumers. This makes it easy to import as an ES module from a URL, but means that larger projects importing multiple Tweakpane plugins end up with duplicate copies of the `@tweakpane/core` code, adding about \~100 Kb to the final minified build for each plugin after the first.
20
36
 
21
- Externalizing this dependency allows build tools like [vite](https://vitejs.dev) to share a single instance of the `@tweakpane/core` code across multiple plugins.
37
+ Externalizing this dependency allows build tools like [vite](https://vite.dev) to share a single instance of the `@tweakpane/core` code across multiple plugins.
22
38
 
23
- If you're not using a bundler, direct ESM imports from URLs can still work by defining the `@tweakpane/core` dependency in an [importmap](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap).
39
+ If you're not using a bundler, direct ESM imports from URLs can still work by defining the `@tweakpane/core` dependency in an [importmap](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap).
24
40
 
25
41
  ## Implementation notes
26
42
 
@@ -28,4 +44,10 @@ PNPM is used as the package manager.
28
44
 
29
45
  ## Versioning
30
46
 
31
- In addition to the dependency externalization change, this fork also includes assorted dependency updates. In an effort to stay in sync with future upstream versions, intra-minor-version releases of the fork are tagged as "betas" of what would / will be the next patch release upstream.
47
+ In addition to the dependency externalization change, this fork also includes dependency updates. In an effort to stay in sync with future upstream versions, release version numbers are tagged with a "fork" suffix and an incrementing number.
48
+
49
+ ## License
50
+
51
+ Original plugin: [MIT](license.txt) © Luís Arteiro
52
+
53
+ Fork modifications: [MIT](license.txt) © [Eric Mika](https://ericmika.com)