designertool 0.23.0 → 0.26.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/README.md +64 -8
- package/dist/composable/featureFlags.d.ts +4 -0
- package/dist/config.d.ts +4 -0
- package/dist/designertool.js +2372 -2349
- package/dist/stores/config-store.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
<h1 align="center">Postcard Designer Tool</h1>
|
|
2
2
|
|
|
3
|
+
## Links
|
|
4
|
+
|
|
5
|
+
- [Repo](https://github.com/webgurus-eu/dmm-designer-web 'dmm-designer-web Repo')
|
|
6
|
+
|
|
7
|
+
- [Live](<Homepage url> 'Live View')
|
|
8
|
+
|
|
9
|
+
- [API](https://dev-designer.directmailmanager.com/api 'API')
|
|
10
|
+
|
|
3
11
|
## User Guide
|
|
4
12
|
|
|
13
|
+
To use the package in your project, before installing you need to first create an .npmrc file using the following details:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
@webgurus-eu:registry=https://npm.pkg.github.com
|
|
17
|
+
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
|
|
18
|
+
```
|
|
19
|
+
|
|
5
20
|
Install the package in your application:
|
|
6
21
|
|
|
7
22
|
```sh
|
|
8
|
-
|
|
23
|
+
npm install designertool
|
|
9
24
|
```
|
|
10
25
|
|
|
11
26
|
Default config:
|
|
@@ -16,6 +31,9 @@ Default config:
|
|
|
16
31
|
"w": 9,
|
|
17
32
|
"h": 6
|
|
18
33
|
},
|
|
34
|
+
"flags": {
|
|
35
|
+
"disable_default_templates": false
|
|
36
|
+
},
|
|
19
37
|
"zoom": 100,
|
|
20
38
|
"backgroundColor": "#ffffff",
|
|
21
39
|
"backgroundImage": null,
|
|
@@ -100,17 +118,52 @@ Default config:
|
|
|
100
118
|
```
|
|
101
119
|
|
|
102
120
|
Use the component in your application:
|
|
103
|
-
|
|
121
|
+
|
|
104
122
|
```js
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
<script setup lang="ts">
|
|
124
|
+
import { PostcardDesigner} from "designer-tool";
|
|
125
|
+
import "designer-tool/dist/index.css";
|
|
126
|
+
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<template>
|
|
130
|
+
<PostcardDesigner />
|
|
131
|
+
</template>
|
|
132
|
+
|
|
111
133
|
```
|
|
112
134
|
|
|
135
|
+
Available functions to modify the default config:
|
|
136
|
+
|
|
137
|
+
- Every option can be modified by calling the init() function except the fonts, which can be extended by calling the addFont() function:
|
|
113
138
|
|
|
139
|
+
```js
|
|
140
|
+
import { init, addFont } from '@webgurus-eu/postcard-designer-tool';
|
|
141
|
+
|
|
142
|
+
init({
|
|
143
|
+
backgroundColor: '#000000',
|
|
144
|
+
return_address: {
|
|
145
|
+
company: '',
|
|
146
|
+
firstname: 'Chuck',
|
|
147
|
+
lastname: 'Norris',
|
|
148
|
+
address1: '420 Forrest St',
|
|
149
|
+
address2: '',
|
|
150
|
+
city: 'Austin',
|
|
151
|
+
state: 'TX',
|
|
152
|
+
zipcode: '34444',
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
addFont([
|
|
157
|
+
{
|
|
158
|
+
name: 'Kablammo',
|
|
159
|
+
link: 'https://fonts.googleapis.com/css?family=Kablammo',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'Bebas Neue',
|
|
163
|
+
link: 'https://fonts.googleapis.com/css?family=Bebas+Neue',
|
|
164
|
+
},
|
|
165
|
+
]);
|
|
166
|
+
```
|
|
114
167
|
|
|
115
168
|
## Built With
|
|
116
169
|
|
|
@@ -119,3 +172,6 @@ After this you can use the postcard-designer custom html element.
|
|
|
119
172
|
- Vite
|
|
120
173
|
- Tailwind
|
|
121
174
|
|
|
175
|
+
## Future Updates
|
|
176
|
+
|
|
177
|
+
- [ ] Conversion Tracking
|