@jjlmoya/utils-social 1.9.0 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-social",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -10,7 +10,8 @@
10
10
  "./entries": "./src/entries.ts"
11
11
  },
12
12
  "files": [
13
- "src"
13
+ "src",
14
+ "scripts"
14
15
  ],
15
16
  "publishConfig": {
16
17
  "access": "public"
@@ -29,7 +30,8 @@
29
30
  "postversion": "git push && git push --tags",
30
31
  "patch": "npm version patch",
31
32
  "minor": "npm version minor",
32
- "major": "npm version major"
33
+ "major": "npm version major",
34
+ "postinstall": "node scripts/postinstall.mjs"
33
35
  },
34
36
  "lint-staged": {
35
37
  "*.{ts,tsx,astro}": [
@@ -0,0 +1,27 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, readdirSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const libDir = dirname(fileURLToPath(import.meta.url));
6
+ const toolsDir = join(libDir, '../src/tool');
7
+
8
+ const inNodeModules = libDir.includes('node_modules');
9
+ if (!inNodeModules) process.exit(0);
10
+
11
+ const projectRoot = join(libDir, '../../../..');
12
+ const categoryKey = JSON.parse(readFileSync(join(libDir, '../package.json'), 'utf8')).name.replace('@jjlmoya/utils-', '');
13
+ const destDir = join(projectRoot, `public/styles/lib/${categoryKey}`);
14
+
15
+ mkdirSync(destDir, { recursive: true });
16
+
17
+ const tools = readdirSync(toolsDir, { withFileTypes: true }).filter(d => d.isDirectory());
18
+ for (const tool of tools) {
19
+ const toolDir = join(toolsDir, tool.name);
20
+ let files;
21
+ try { files = readdirSync(toolDir).filter(f => f.endsWith('.css')); }
22
+ catch { continue; }
23
+ for (const file of files) {
24
+ writeFileSync(join(destDir, file), readFileSync(join(toolDir, file)));
25
+ console.log(`[@jjlmoya/utils-${categoryKey}] copied ${file}`);
26
+ }
27
+ }
@@ -116,131 +116,3 @@ const t = (ui ?? {}) as RedditFormatterUI;
116
116
  init();
117
117
  </script>
118
118
 
119
- <style>
120
- .rdf-root {
121
- --bg: rgba(255, 255, 255, 0.4);
122
- --border: rgba(255, 255, 255, 0.6);
123
- --label: #334155;
124
- --textarea-bg: #fff;
125
- --textarea-border: #ddd;
126
- --textarea-text: #111;
127
- --controls-bg: rgba(255, 255, 255, 0.7);
128
- --controls-border: #eaeaea;
129
- --checkbox-color: #444;
130
-
131
- padding: 2rem;
132
- background: var(--bg);
133
- backdrop-filter: blur(12px);
134
- -webkit-backdrop-filter: blur(12px);
135
- border-radius: 16px;
136
- border: 1px solid var(--border);
137
- box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
138
- }
139
-
140
- :global(.theme-dark) .rdf-root {
141
- --bg: rgba(15, 23, 42, 0.6);
142
- --border: rgba(255, 255, 255, 0.08);
143
- --label: #94a3b8;
144
- --textarea-bg: #0f172a;
145
- --textarea-border: rgba(255, 255, 255, 0.1);
146
- --textarea-text: #f1f5f9;
147
- --controls-bg: rgba(255, 255, 255, 0.03);
148
- --controls-border: rgba(255, 255, 255, 0.08);
149
- --checkbox-color: #94a3b8;
150
- }
151
-
152
- .rdf-grid {
153
- display: flex;
154
- flex-direction: column;
155
- gap: 1.5rem;
156
- }
157
-
158
- .rdf-panel {
159
- display: flex;
160
- flex-direction: column;
161
- gap: 0.5rem;
162
- }
163
-
164
- .rdf-label {
165
- font-weight: 600;
166
- color: var(--label);
167
- font-size: 0.95rem;
168
- }
169
-
170
- .rdf-textarea {
171
- width: 100%;
172
- min-height: 220px;
173
- padding: 1rem;
174
- border-radius: 8px;
175
- border: 1px solid var(--textarea-border);
176
- background: var(--textarea-bg);
177
- font-size: 1rem;
178
- color: var(--textarea-text);
179
- resize: vertical;
180
- transition: border-color 0.2s;
181
- line-height: 1.6;
182
- box-sizing: border-box;
183
- }
184
-
185
- .rdf-textarea:focus {
186
- outline: none;
187
- border-color: #ff4500;
188
- box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
189
- }
190
-
191
- .rdf-controls {
192
- display: flex;
193
- flex-direction: column;
194
- gap: 0.75rem;
195
- background: var(--controls-bg);
196
- padding: 1.5rem;
197
- border-radius: 8px;
198
- border: 1px solid var(--controls-border);
199
- }
200
-
201
- .rdf-checkbox-group {
202
- display: grid;
203
- grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
204
- gap: 0.75rem;
205
- margin-top: 0.25rem;
206
- }
207
-
208
- .rdf-checkbox-label {
209
- display: flex;
210
- align-items: center;
211
- gap: 0.75rem;
212
- cursor: pointer;
213
- font-size: 0.95rem;
214
- color: var(--checkbox-color);
215
- font-weight: 500;
216
- }
217
-
218
- .rdf-checkbox-label input[type='checkbox'] {
219
- width: 1.25rem;
220
- height: 1.25rem;
221
- accent-color: #ff4500;
222
- cursor: pointer;
223
- flex-shrink: 0;
224
- }
225
-
226
- .rdf-output-header {
227
- display: flex;
228
- justify-content: space-between;
229
- align-items: center;
230
- }
231
-
232
- .rdf-copy-btn {
233
- background: #ff4500;
234
- color: #fff;
235
- border: none;
236
- padding: 0.6rem 1.25rem;
237
- border-radius: 6px;
238
- font-weight: 600;
239
- font-size: 0.9rem;
240
- cursor: pointer;
241
- transition: background-color 0.2s, transform 0.1s;
242
- }
243
-
244
- .rdf-copy-btn:hover { background: #e03d00; }
245
- .rdf-copy-btn:active { transform: scale(0.97); }
246
- </style>
@@ -0,0 +1,126 @@
1
+ .rdf-root {
2
+ --bg: rgba(255, 255, 255, 0.4);
3
+ --border: rgba(255, 255, 255, 0.6);
4
+ --label: #334155;
5
+ --textarea-bg: #fff;
6
+ --textarea-border: #ddd;
7
+ --textarea-text: #111;
8
+ --controls-bg: rgba(255, 255, 255, 0.7);
9
+ --controls-border: #eaeaea;
10
+ --checkbox-color: #444;
11
+
12
+ padding: 2rem;
13
+ background: var(--bg);
14
+ backdrop-filter: blur(12px);
15
+ -webkit-backdrop-filter: blur(12px);
16
+ border-radius: 16px;
17
+ border: 1px solid var(--border);
18
+ box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
19
+ }
20
+
21
+ :global(.theme-dark) .rdf-root {
22
+ --bg: rgba(15, 23, 42, 0.6);
23
+ --border: rgba(255, 255, 255, 0.08);
24
+ --label: #94a3b8;
25
+ --textarea-bg: #0f172a;
26
+ --textarea-border: rgba(255, 255, 255, 0.1);
27
+ --textarea-text: #f1f5f9;
28
+ --controls-bg: rgba(255, 255, 255, 0.03);
29
+ --controls-border: rgba(255, 255, 255, 0.08);
30
+ --checkbox-color: #94a3b8;
31
+ }
32
+
33
+ .rdf-grid {
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 1.5rem;
37
+ }
38
+
39
+ .rdf-panel {
40
+ display: flex;
41
+ flex-direction: column;
42
+ gap: 0.5rem;
43
+ }
44
+
45
+ .rdf-label {
46
+ font-weight: 600;
47
+ color: var(--label);
48
+ font-size: 0.95rem;
49
+ }
50
+
51
+ .rdf-textarea {
52
+ width: 100%;
53
+ min-height: 220px;
54
+ padding: 1rem;
55
+ border-radius: 8px;
56
+ border: 1px solid var(--textarea-border);
57
+ background: var(--textarea-bg);
58
+ font-size: 1rem;
59
+ color: var(--textarea-text);
60
+ resize: vertical;
61
+ transition: border-color 0.2s;
62
+ line-height: 1.6;
63
+ box-sizing: border-box;
64
+ }
65
+
66
+ .rdf-textarea:focus {
67
+ outline: none;
68
+ border-color: #ff4500;
69
+ box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
70
+ }
71
+
72
+ .rdf-controls {
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: 0.75rem;
76
+ background: var(--controls-bg);
77
+ padding: 1.5rem;
78
+ border-radius: 8px;
79
+ border: 1px solid var(--controls-border);
80
+ }
81
+
82
+ .rdf-checkbox-group {
83
+ display: grid;
84
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
85
+ gap: 0.75rem;
86
+ margin-top: 0.25rem;
87
+ }
88
+
89
+ .rdf-checkbox-label {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 0.75rem;
93
+ cursor: pointer;
94
+ font-size: 0.95rem;
95
+ color: var(--checkbox-color);
96
+ font-weight: 500;
97
+ }
98
+
99
+ .rdf-checkbox-label input[type='checkbox'] {
100
+ width: 1.25rem;
101
+ height: 1.25rem;
102
+ accent-color: #ff4500;
103
+ cursor: pointer;
104
+ flex-shrink: 0;
105
+ }
106
+
107
+ .rdf-output-header {
108
+ display: flex;
109
+ justify-content: space-between;
110
+ align-items: center;
111
+ }
112
+
113
+ .rdf-copy-btn {
114
+ background: #ff4500;
115
+ color: #fff;
116
+ border: none;
117
+ padding: 0.6rem 1.25rem;
118
+ border-radius: 6px;
119
+ font-weight: 600;
120
+ font-size: 0.9rem;
121
+ cursor: pointer;
122
+ transition: background-color 0.2s, transform 0.1s;
123
+ }
124
+
125
+ .rdf-copy-btn:hover { background: #e03d00; }
126
+ .rdf-copy-btn:active { transform: scale(0.97); }