@coffer-org/plugin-garden 1.1.0
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 +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/plant/index.d.ts +3 -0
- package/dist/plant/index.d.ts.map +1 -0
- package/dist/plant/index.js +47 -0
- package/dist/plant/index.js.map +1 -0
- package/package.json +22 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAIA,wBAUG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineVault } from '@coffer-org/sdk/vault';
|
|
2
|
+
import { definePlugin } from '@coffer-org/sdk/plugin';
|
|
3
|
+
import plant from './plant/index.js';
|
|
4
|
+
export default definePlugin({
|
|
5
|
+
id: 'garden',
|
|
6
|
+
version: '1.0.0',
|
|
7
|
+
dependsOn: [],
|
|
8
|
+
vaults: [
|
|
9
|
+
{
|
|
10
|
+
meta: defineVault({ id: 'garden', label: 'garden.vault.label', icon: 'lucide:sprout' }),
|
|
11
|
+
modules: [plant],
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAErC,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,EAAE;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YACvF,OAAO,EAAE,CAAC,KAAK,CAAC;SACjB;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plant/index.ts"],"names":[],"mappings":";AAWA,wBAoCG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineModule } from '@coffer-org/sdk/module';
|
|
2
|
+
import { field } from '@coffer-org/sdk/fields';
|
|
3
|
+
const LOCATIONS = [
|
|
4
|
+
{ value: 'windowsill', title: 'garden.plant.options.location.windowsill' },
|
|
5
|
+
{ value: 'balcony', title: 'garden.plant.options.location.balcony' },
|
|
6
|
+
{ value: 'hanging', title: 'garden.plant.options.location.hanging' },
|
|
7
|
+
{ value: 'floor', title: 'garden.plant.options.location.floor' },
|
|
8
|
+
{ value: 'other', title: 'garden.plant.options.location.other' },
|
|
9
|
+
];
|
|
10
|
+
export default defineModule({
|
|
11
|
+
module: 'plant',
|
|
12
|
+
vault: 'garden',
|
|
13
|
+
label: 'garden.plant.label',
|
|
14
|
+
icon: 'lucide:sprout',
|
|
15
|
+
claude: `Рослина в домі. title — назва. variety — сорт/підвид. location — де стоїть.
|
|
16
|
+
wateringDays — інтервал поливу (дні). lastWatered — дата останнього поливу.
|
|
17
|
+
fertilizerDays — інтервал підживлення. lastFertilized — остання дата.
|
|
18
|
+
planted — дата посадки/придбання.`,
|
|
19
|
+
views: {
|
|
20
|
+
table: ['variety', 'location', 'wateringDays', 'lastWatered'],
|
|
21
|
+
},
|
|
22
|
+
fields: [
|
|
23
|
+
field.title({ key: 'name', label: 'core.fields.name' }),
|
|
24
|
+
field.image({ key: 'logo', label: 'garden.plant.fields.logo' }),
|
|
25
|
+
field.string({ key: 'variety', label: 'garden.plant.fields.variety', config: { max: 100 } }),
|
|
26
|
+
field.select({ key: 'location', label: 'garden.plant.fields.location', options: LOCATIONS }),
|
|
27
|
+
field.select({
|
|
28
|
+
key: 'sunlight',
|
|
29
|
+
label: 'garden.plant.fields.sunlight',
|
|
30
|
+
options: [
|
|
31
|
+
{ value: 'shade', title: 'garden.plant.options.sunlight.shade' },
|
|
32
|
+
{ value: 'partial', title: 'garden.plant.options.sunlight.partial' },
|
|
33
|
+
{ value: 'indirect', title: 'garden.plant.options.sunlight.indirect' },
|
|
34
|
+
{ value: 'direct', title: 'garden.plant.options.sunlight.direct' },
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
field.string({ key: 'pot', label: 'garden.plant.fields.pot', config: { max: 100 } }),
|
|
38
|
+
field.date({ key: 'planted', label: 'garden.plant.fields.planted', min: '2000-01-01', max: 'today' }),
|
|
39
|
+
field.int({ key: 'wateringDays', label: 'garden.plant.fields.wateringDays', config: { min: 1, max: 365 } }),
|
|
40
|
+
field.date({ key: 'lastWatered', label: 'garden.plant.fields.lastWatered', max: 'today' }),
|
|
41
|
+
field.int({ key: 'fertilizerDays', label: 'garden.plant.fields.fertilizerDays', config: { min: 1, max: 365 } }),
|
|
42
|
+
field.date({ key: 'lastFertilized', label: 'garden.plant.fields.lastFertilized', max: 'today' }),
|
|
43
|
+
field.text({ key: 'notes', label: 'garden.plant.fields.notes', max: 500 }),
|
|
44
|
+
field.tags({ key: 'tags', label: 'garden.plant.fields.tags' }),
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,MAAM,SAAS,GAAG;IAChB,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAA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|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@coffer-org/plugin-garden",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -b tsconfig.build.json",
|
|
16
|
+
"prepack": "npm run build && node ../../scripts/swap-exports.mjs dist",
|
|
17
|
+
"postpack": "node ../../scripts/swap-exports.mjs src"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@coffer-org/sdk": "^1.1.0"
|
|
21
|
+
}
|
|
22
|
+
}
|