@community-release/nx-ui 0.0.15 → 0.0.17
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addTemplate, addPlugin, addComponentsDir, addComponent } from '@nuxt/kit';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
|
|
4
5
|
const defaultStyle = {
|
|
5
6
|
"content-width": "1400px",
|
|
@@ -122,7 +123,7 @@ const readComponentsProps = (resolve, srcDir, options = {}) => {
|
|
|
122
123
|
let files = fs.readdirSync(dirComponents, { recursive: true });
|
|
123
124
|
files = files.filter((v) => v.indexOf("props.json") !== -1);
|
|
124
125
|
for (let file of files) {
|
|
125
|
-
const componentName = file.split(
|
|
126
|
+
const componentName = file.split(path.sep)[0];
|
|
126
127
|
const propsJSON = fs.readFileSync(resolve(dirComponents, file), { encoding: "utf-8" });
|
|
127
128
|
const props = JSON.parse(propsJSON);
|
|
128
129
|
result[componentName] = props;
|
|
@@ -168,6 +169,7 @@ const module = defineNuxtModule({
|
|
|
168
169
|
getContents: () => generateComponentsDefaults(options)
|
|
169
170
|
});
|
|
170
171
|
const componentsProps = readComponentsProps(resolve, srcDir, options);
|
|
172
|
+
console.log("nx-ui componentsProps", componentsProps);
|
|
171
173
|
for (let componentName in componentsProps) {
|
|
172
174
|
addTemplate({
|
|
173
175
|
filename: `ui.${componentName}.mjs`,
|
|
@@ -65,7 +65,7 @@ export const useMapStore: import("pinia").StoreDefinition<"map", {
|
|
|
65
65
|
* Set map coord
|
|
66
66
|
* @param {MapCoord} v
|
|
67
67
|
*/
|
|
68
|
-
setCoord(v:
|
|
68
|
+
setCoord(v: MapCoord): void;
|
|
69
69
|
/**
|
|
70
70
|
* Enable/disable device zoom, if call withour params then toggle current state
|
|
71
71
|
* @param {boolean=} v
|
|
@@ -110,5 +110,5 @@ export type MapCoord = any[];
|
|
|
110
110
|
* Map Marker
|
|
111
111
|
*/
|
|
112
112
|
export type MapMarker = {
|
|
113
|
-
coord:
|
|
113
|
+
coord: MapCoord;
|
|
114
114
|
};
|