reburn-ui 0.1.4 → 0.1.6
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/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,13 +12,8 @@ import { generateIconComponent } from './utils/generateIconComponent.js';
|
|
|
12
12
|
import { serializeIconAttributes } from './utils/serializeIconAttributes.js';
|
|
13
13
|
const NAME = 'vite-plugin-icon-markup';
|
|
14
14
|
function isInstalledAsPackage() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
15
|
+
const local = process.env.LOCAL_REBURN_UI_INSTALLED;
|
|
16
|
+
return !Boolean(local);
|
|
22
17
|
}
|
|
23
18
|
const asPackage = isInstalledAsPackage();
|
|
24
19
|
export function icon_plugin() {
|
|
@@ -22,10 +22,11 @@ function minifySVGBody(svg_content) {
|
|
|
22
22
|
export async function generateIconComponent(name, data, asPackage) {
|
|
23
23
|
const component_name = generateComponentName(name);
|
|
24
24
|
const svg_content = minifySVGBody(data.body);
|
|
25
|
-
const iconContainerPath = asPackage ? 'reburn-ui
|
|
25
|
+
const iconContainerPath = asPackage ? 'reburn-ui' : '$lib/icons';
|
|
26
|
+
const iconPath = asPackage ? '{IconContainer}' : 'IconContainer';
|
|
26
27
|
const component_code = `<script lang="ts">
|
|
27
|
-
import
|
|
28
|
-
import type { IconContainerProps } from '${iconContainerPath}
|
|
28
|
+
import ${iconPath} from '${iconContainerPath}';
|
|
29
|
+
import type { IconContainerProps } from '${iconContainerPath}';
|
|
29
30
|
|
|
30
31
|
let { size = '100%', ...props }: IconContainerProps = $props();
|
|
31
32
|
</script>
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reburn-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"analyze": "ANALYZE=true vite build",
|
|
8
8
|
"dev": "vite dev",
|
|
9
|
-
"build": "vite build
|
|
9
|
+
"build": "vite build",
|
|
10
10
|
"preview": "vite preview",
|
|
11
11
|
"prepare": "svelte-kit sync || echo ''",
|
|
12
12
|
"prepack": "bun vite build && bun svelte-kit sync && bun svelte-package && bun publint",
|
|
@@ -25,7 +25,13 @@
|
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
|
-
"svelte": "./dist/index.js"
|
|
28
|
+
"svelte": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./tools": {
|
|
32
|
+
"types": "./dist/tools/index.d.ts",
|
|
33
|
+
"svelte": "./dist/tools/index.js",
|
|
34
|
+
"default": "./dist/tools/index.js"
|
|
29
35
|
},
|
|
30
36
|
"./styles/baseline.css": "./dist/styles/baseline.css",
|
|
31
37
|
"./styles/default-css-variables.css": "./dist/styles/default-css-variables.css",
|