@wereform/pkgm-wire 1.0.0 → 1.0.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.
- package/README.md +207 -18
- package/package.json +1 -1
- package/src/components/WireTextArea.jsx +0 -0
package/README.md
CHANGED
|
@@ -1,28 +1,217 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @wereform/pkgm-wire
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Wire UI components and layouts for short-form text content in the WeReform / BEGENONE platform.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package provides building blocks for rendering, composing, and viewing “Wires” — lightweight, text-first posts with optional media, metadata, and interactions. It is designed for mobile-first usage with React Native and integrates seamlessly with shared menu and interaction components.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Creating and deleting wires
|
|
11
|
-
- Displaying like counts and comments
|
|
12
|
-
- Basic interactions (likes, replies)
|
|
9
|
+
## Install
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npm install @wereform/pkgm-wire
|
|
13
|
+
# or
|
|
14
|
+
yarn add @wereform/pkgm-wire
|
|
15
|
+
# or
|
|
16
|
+
pnpm add @wereform/pkgm-wire
|
|
17
|
+
```
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
- 🧵 Thread-style replies
|
|
18
|
-
- 💬 Comment & like logic
|
|
19
|
-
- 📄 Clean and scrollable feed interface
|
|
19
|
+
---
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## What this package gives you
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
- Wire UI components:
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
- Channel metadata header for wires
|
|
26
|
+
- Compact wire card layout
|
|
27
|
+
- Full wire view layout
|
|
28
|
+
- Wire upload / composer layout
|
|
26
29
|
|
|
27
|
-
-
|
|
28
|
-
|
|
30
|
+
- Features:
|
|
31
|
+
|
|
32
|
+
- Multiline text rendering with line preservation
|
|
33
|
+
- Media attachment support (images + videos)
|
|
34
|
+
- Thumbnail generation for video attachments
|
|
35
|
+
- Interaction menu integration (like, comment, share, more)
|
|
36
|
+
|
|
37
|
+
- Built for:
|
|
38
|
+
|
|
39
|
+
- React Native / Expo
|
|
40
|
+
- Text-centric social feeds
|
|
41
|
+
- Composition with shared UI and menu packages
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Exports
|
|
46
|
+
|
|
47
|
+
From `@wereform/pkgm-wire` you can import:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import {
|
|
51
|
+
WireChannelMetadata,
|
|
52
|
+
WireCardLayout,
|
|
53
|
+
WireUploadLayout,
|
|
54
|
+
WireViewLayout,
|
|
55
|
+
} from "@wereform/pkgm-wire";
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Core components
|
|
61
|
+
|
|
62
|
+
## WireChannelMetadata
|
|
63
|
+
|
|
64
|
+
Displays channel-level metadata for a wire post.
|
|
65
|
+
|
|
66
|
+
### Props
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
WireChannelMetadata({
|
|
70
|
+
channelLogo,
|
|
71
|
+
userName,
|
|
72
|
+
subscribersCount,
|
|
73
|
+
timeAgo,
|
|
74
|
+
viewsText,
|
|
75
|
+
containerStyles,
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `channelLogo` Channel profile image URL
|
|
80
|
+
- `userName` Channel or user display name
|
|
81
|
+
- `subscribersCount` Subscriber count text
|
|
82
|
+
- `timeAgo` Relative publish time
|
|
83
|
+
- `viewsText` View count text
|
|
84
|
+
- `containerStyles` Optional style overrides
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## WireCardLayout
|
|
89
|
+
|
|
90
|
+
Compact wire preview card used in feeds and lists.
|
|
91
|
+
|
|
92
|
+
### Props
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
WireCardLayout({
|
|
96
|
+
content,
|
|
97
|
+
channelLogo,
|
|
98
|
+
userName,
|
|
99
|
+
subscribersCount,
|
|
100
|
+
timeAgo,
|
|
101
|
+
viewsText,
|
|
102
|
+
onPress,
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- Truncates long wire content
|
|
107
|
+
- Preserves line breaks
|
|
108
|
+
- Displays “See more” affordance
|
|
109
|
+
- Integrates interaction menu
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## WireUploadLayout
|
|
114
|
+
|
|
115
|
+
Composer layout for creating and publishing new wires.
|
|
116
|
+
|
|
117
|
+
### Props
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
WireUploadLayout({
|
|
121
|
+
profilePic,
|
|
122
|
+
userName,
|
|
123
|
+
onPressVideoUploadScreen,
|
|
124
|
+
onPressWireUpload,
|
|
125
|
+
});
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- Supports:
|
|
129
|
+
|
|
130
|
+
- Multiline text input
|
|
131
|
+
- Image and video attachments
|
|
132
|
+
- Multiple media selection
|
|
133
|
+
- Automatic video thumbnail generation
|
|
134
|
+
|
|
135
|
+
- Returns wire text and heading via callback
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## WireViewLayout
|
|
140
|
+
|
|
141
|
+
Full wire detail view for reading and interacting with a single wire.
|
|
142
|
+
|
|
143
|
+
### Props
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
WireViewLayout({
|
|
147
|
+
content,
|
|
148
|
+
channelLogo,
|
|
149
|
+
userName,
|
|
150
|
+
subscribersCount,
|
|
151
|
+
timeAgo,
|
|
152
|
+
viewsText,
|
|
153
|
+
isItMe,
|
|
154
|
+
onPressDeleteButton,
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- Renders full wire content with preserved formatting
|
|
159
|
+
- Shows interaction menu
|
|
160
|
+
- Conditionally exposes delete action for owner
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Typical usage
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
<WireCardLayout
|
|
168
|
+
content={wire.text}
|
|
169
|
+
userName={wire.user.name}
|
|
170
|
+
subscribersCount={wire.subscribers}
|
|
171
|
+
timeAgo={wire.timeAgo}
|
|
172
|
+
viewsText={wire.views}
|
|
173
|
+
/>
|
|
174
|
+
|
|
175
|
+
<WireUploadLayout
|
|
176
|
+
userName="Areesh"
|
|
177
|
+
onPressWireUpload={(text, heading) => createWire(text, heading)}
|
|
178
|
+
/>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Design philosophy
|
|
184
|
+
|
|
185
|
+
- Text-first, lightweight content
|
|
186
|
+
- UI-only package
|
|
187
|
+
- No API calls or persistence logic
|
|
188
|
+
- Preserves author formatting and intent
|
|
189
|
+
- Designed to scale with feeds and detail views
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## License
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
MIT License
|
|
197
|
+
|
|
198
|
+
Copyright (c) 2025 WeReform / BEGENONE
|
|
199
|
+
|
|
200
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
201
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
202
|
+
in the Software without restriction, including without limitation the rights
|
|
203
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
204
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
205
|
+
furnished to do so, subject to the following conditions:
|
|
206
|
+
|
|
207
|
+
The above copyright notice and this permission notice shall be included in
|
|
208
|
+
all copies or substantial portions of the Software.
|
|
209
|
+
|
|
210
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
211
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
212
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
213
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
214
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
215
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
216
|
+
THE SOFTWARE.
|
|
217
|
+
```
|
package/package.json
CHANGED
|
File without changes
|