nako-mascot 1.0.0 → 1.2.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 CHANGED
@@ -1,20 +1,20 @@
1
1
  # Nako.
2
2
 
3
- Komponen web `nako-mascot` dengan 26 animasi semi-3D. Paket ESM ini hanya untuk proyek milik pemilik Nako. atau pihak yang diberi izin tertulis. Paket disiapkan untuk publikasi sebagai `nako-mascot`; panduan registry berikut berlaku setelah versi tersebut terbit.
3
+ Komponen web `nako-mascot` dengan 36 animasi semi-3D. Paket ESM ini hanya untuk proyek milik pemilik Nako. atau pihak yang diberi izin tertulis. Paket disiapkan untuk publikasi sebagai `nako-mascot`; panduan registry berikut berlaku setelah versi tersebut terbit.
4
4
 
5
5
  ## Pasang melalui npm atau Bun
6
6
 
7
- Setelah `nako-mascot@1.0.0` tersedia di registry npm:
7
+ Setelah `nako-mascot@1.2.0` tersedia di registry npm:
8
8
 
9
9
  ```sh
10
- npm install nako-mascot@1.0.0
10
+ npm install nako-mascot@1.2.0
11
11
  npx --no-install nako-assets
12
12
  ```
13
13
 
14
14
  Dengan Bun:
15
15
 
16
16
  ```sh
17
- bun add nako-mascot@1.0.0
17
+ bun add nako-mascot@1.2.0
18
18
  bunx --no-install nako-assets
19
19
  ```
20
20
 
@@ -22,17 +22,17 @@ Keduanya mengambil paket dari registry npm yang sama. `nako-assets` menyalin ase
22
22
 
23
23
  ## Pasang dari arsip lokal
24
24
 
25
- Salin `nako-mascot-1.0.0.tgz` ke folder `vendor/` di proyek pemakai. Sertakan arsip dan lockfile saat build/deploy agar pemasangan tidak bergantung pada path laptop pengembang.
25
+ Salin `nako-mascot-1.2.0.tgz` ke folder `vendor/` di proyek pemakai. Sertakan arsip dan lockfile saat build/deploy agar pemasangan tidak bergantung pada path laptop pengembang.
26
26
 
27
27
  ```sh
28
- npm install ./vendor/nako-mascot-1.0.0.tgz
28
+ npm install ./vendor/nako-mascot-1.2.0.tgz
29
29
  npx --no-install nako-assets
30
30
  ```
31
31
 
32
32
  Dengan Bun:
33
33
 
34
34
  ```sh
35
- bun add ./vendor/nako-mascot-1.0.0.tgz
35
+ bun add ./vendor/nako-mascot-1.2.0.tgz
36
36
  bunx --no-install nako-assets
37
37
  ```
38
38
 
@@ -88,18 +88,21 @@ await defineNakoMascot();
88
88
  const nako = document.querySelector('nako-mascot');
89
89
  await nako.ready;
90
90
  await nako.play('assistant-wave');
91
+ await nako.play('review-8'); // rating 8 dari 10
91
92
  await nako.playMode('loading');
92
93
  await nako.playAll();
93
94
  nako.pause();
94
95
  nako.resume();
95
96
  ```
96
97
 
97
- Mode: `idle`, `loading`, `transaction`, `arcade`, `assistant`. `animation` memilih satu gerakan; `showcase` memutar katalog. Atribut `animation` lebih diprioritaskan daripada mode/showcase.
98
+ Mode: `idle`, `loading`, `transaction`, `arcade`, `assistant`, `review`. `animation` memilih satu gerakan; `showcase` memutar katalog. Atribut `animation` lebih diprioritaskan daripada mode/showcase.
98
99
 
99
100
  Pause, reduced motion, tab tersembunyi, serta keluar viewport ditangani oleh komponen. Mode transaksi tidak menampilkan sukses otomatis; `transaction-success` hanya dipicu setelah aplikasi memastikan transaksi sukses.
100
101
 
102
+ Pose rating tersedia sebagai `review-1` sampai `review-10`. Pilih pose sesuai nilai rating aplikasi menggunakan `play()` atau atribut `animation`. Mode `review` memutar seluruh pose rating untuk pratinjau.
103
+
101
104
  ## Aset dan lisensi
102
105
 
103
- 26 atlas 512 px / 805 frame, total sekitar 14.63 MiB. Arsip mengandung semua aset untuk disalin saat build, tetapi browser tidak mengunduh semuanya sekaligus. Dua atlas yang sudah didekode membutuhkan sekitar 64 MiB. Paket tidak membawa model hero 3D, audio, atau logo.
106
+ 36 atlas 512 px / 1125 frame, total sekitar 20.5 MiB. Arsip mengandung semua aset untuk disalin saat build, tetapi browser tidak mengunduh semuanya sekaligus. Dua atlas yang sudah didekode membutuhkan sekitar 64 MiB. Paket tidak membawa model hero 3D, audio, atau logo.
104
107
 
105
108
  Paket dikonfigurasi untuk akses publik melalui registry npm. Akses publik memungkinkan pengunduhan paket; izin penggunaan Nako. tetap mengikuti lisensi khusus di `LICENSE.txt`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Nako.",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "motionVersion": "semi3d-1",
5
5
  "frameSize": 512,
6
6
  "default": "idle-breathe",
@@ -1148,6 +1148,466 @@
1148
1148
  ],
1149
1149
  "sprite": "sprites/assistant-explain.webp?v=0f90bc9fb744",
1150
1150
  "poster": "posters/assistant-explain.webp?v=6936f48693f7"
1151
+ },
1152
+ "review-1": {
1153
+ "id": "review-1",
1154
+ "label": "Bintang 1 · Kecewa berat",
1155
+ "group": "review",
1156
+ "loop": true,
1157
+ "frames": 32,
1158
+ "columns": 8,
1159
+ "rows": 4,
1160
+ "durations": [
1161
+ 50,
1162
+ 50,
1163
+ 50,
1164
+ 50,
1165
+ 50,
1166
+ 50,
1167
+ 50,
1168
+ 50,
1169
+ 50,
1170
+ 50,
1171
+ 50,
1172
+ 50,
1173
+ 50,
1174
+ 50,
1175
+ 50,
1176
+ 50,
1177
+ 50,
1178
+ 50,
1179
+ 50,
1180
+ 50,
1181
+ 50,
1182
+ 50,
1183
+ 50,
1184
+ 50,
1185
+ 50,
1186
+ 50,
1187
+ 50,
1188
+ 50,
1189
+ 50,
1190
+ 50,
1191
+ 50,
1192
+ 50
1193
+ ],
1194
+ "rating": 1,
1195
+ "sprite": "sprites/review-1.webp?v=4c09cd7c398c",
1196
+ "poster": "posters/review-1.webp?v=717b4beb8b70"
1197
+ },
1198
+ "review-2": {
1199
+ "id": "review-2",
1200
+ "label": "Bintang 2 · Kurang puas",
1201
+ "group": "review",
1202
+ "loop": true,
1203
+ "frames": 32,
1204
+ "columns": 8,
1205
+ "rows": 4,
1206
+ "durations": [
1207
+ 50,
1208
+ 50,
1209
+ 50,
1210
+ 50,
1211
+ 50,
1212
+ 50,
1213
+ 50,
1214
+ 50,
1215
+ 50,
1216
+ 50,
1217
+ 50,
1218
+ 50,
1219
+ 50,
1220
+ 50,
1221
+ 50,
1222
+ 50,
1223
+ 50,
1224
+ 50,
1225
+ 50,
1226
+ 50,
1227
+ 50,
1228
+ 50,
1229
+ 50,
1230
+ 50,
1231
+ 50,
1232
+ 50,
1233
+ 50,
1234
+ 50,
1235
+ 50,
1236
+ 50,
1237
+ 50,
1238
+ 50
1239
+ ],
1240
+ "rating": 2,
1241
+ "sprite": "sprites/review-2.webp?v=d144e71d83be",
1242
+ "poster": "posters/review-2.webp?v=e8c68ff236f4"
1243
+ },
1244
+ "review-3": {
1245
+ "id": "review-3",
1246
+ "label": "Bintang 3 · Ragu-ragu",
1247
+ "group": "review",
1248
+ "loop": true,
1249
+ "frames": 32,
1250
+ "columns": 8,
1251
+ "rows": 4,
1252
+ "durations": [
1253
+ 50,
1254
+ 50,
1255
+ 50,
1256
+ 50,
1257
+ 50,
1258
+ 50,
1259
+ 50,
1260
+ 50,
1261
+ 50,
1262
+ 50,
1263
+ 50,
1264
+ 50,
1265
+ 50,
1266
+ 50,
1267
+ 50,
1268
+ 50,
1269
+ 50,
1270
+ 50,
1271
+ 50,
1272
+ 50,
1273
+ 50,
1274
+ 50,
1275
+ 50,
1276
+ 50,
1277
+ 50,
1278
+ 50,
1279
+ 50,
1280
+ 50,
1281
+ 50,
1282
+ 50,
1283
+ 50,
1284
+ 50
1285
+ ],
1286
+ "rating": 3,
1287
+ "sprite": "sprites/review-3.webp?v=0d871ec79d93",
1288
+ "poster": "posters/review-3.webp?v=b2109754407f"
1289
+ },
1290
+ "review-4": {
1291
+ "id": "review-4",
1292
+ "label": "Bintang 4 · Lumayan",
1293
+ "group": "review",
1294
+ "loop": true,
1295
+ "frames": 32,
1296
+ "columns": 8,
1297
+ "rows": 4,
1298
+ "durations": [
1299
+ 50,
1300
+ 50,
1301
+ 50,
1302
+ 50,
1303
+ 50,
1304
+ 50,
1305
+ 50,
1306
+ 50,
1307
+ 50,
1308
+ 50,
1309
+ 50,
1310
+ 50,
1311
+ 50,
1312
+ 50,
1313
+ 50,
1314
+ 50,
1315
+ 50,
1316
+ 50,
1317
+ 50,
1318
+ 50,
1319
+ 50,
1320
+ 50,
1321
+ 50,
1322
+ 50,
1323
+ 50,
1324
+ 50,
1325
+ 50,
1326
+ 50,
1327
+ 50,
1328
+ 50,
1329
+ 50,
1330
+ 50
1331
+ ],
1332
+ "rating": 4,
1333
+ "sprite": "sprites/review-4.webp?v=a911a8af90c0",
1334
+ "poster": "posters/review-4.webp?v=e0d643d54c79"
1335
+ },
1336
+ "review-5": {
1337
+ "id": "review-5",
1338
+ "label": "Bintang 5 · Cukup oke",
1339
+ "group": "review",
1340
+ "loop": true,
1341
+ "frames": 32,
1342
+ "columns": 8,
1343
+ "rows": 4,
1344
+ "durations": [
1345
+ 50,
1346
+ 50,
1347
+ 50,
1348
+ 50,
1349
+ 50,
1350
+ 50,
1351
+ 50,
1352
+ 50,
1353
+ 50,
1354
+ 50,
1355
+ 50,
1356
+ 50,
1357
+ 50,
1358
+ 50,
1359
+ 50,
1360
+ 50,
1361
+ 50,
1362
+ 50,
1363
+ 50,
1364
+ 50,
1365
+ 50,
1366
+ 50,
1367
+ 50,
1368
+ 50,
1369
+ 50,
1370
+ 50,
1371
+ 50,
1372
+ 50,
1373
+ 50,
1374
+ 50,
1375
+ 50,
1376
+ 50
1377
+ ],
1378
+ "rating": 5,
1379
+ "sprite": "sprites/review-5.webp?v=62f37bbbd11a",
1380
+ "poster": "posters/review-5.webp?v=71f6779bfac6"
1381
+ },
1382
+ "review-6": {
1383
+ "id": "review-6",
1384
+ "label": "Bintang 6 · Bagus",
1385
+ "group": "review",
1386
+ "loop": true,
1387
+ "frames": 32,
1388
+ "columns": 8,
1389
+ "rows": 4,
1390
+ "durations": [
1391
+ 50,
1392
+ 50,
1393
+ 50,
1394
+ 50,
1395
+ 50,
1396
+ 50,
1397
+ 50,
1398
+ 50,
1399
+ 50,
1400
+ 50,
1401
+ 50,
1402
+ 50,
1403
+ 50,
1404
+ 50,
1405
+ 50,
1406
+ 50,
1407
+ 50,
1408
+ 50,
1409
+ 50,
1410
+ 50,
1411
+ 50,
1412
+ 50,
1413
+ 50,
1414
+ 50,
1415
+ 50,
1416
+ 50,
1417
+ 50,
1418
+ 50,
1419
+ 50,
1420
+ 50,
1421
+ 50,
1422
+ 50
1423
+ ],
1424
+ "rating": 6,
1425
+ "sprite": "sprites/review-6.webp?v=b3e531e3bef1",
1426
+ "poster": "posters/review-6.webp?v=f4cbdab56adb"
1427
+ },
1428
+ "review-7": {
1429
+ "id": "review-7",
1430
+ "label": "Bintang 7 · Suka",
1431
+ "group": "review",
1432
+ "loop": true,
1433
+ "frames": 32,
1434
+ "columns": 8,
1435
+ "rows": 4,
1436
+ "durations": [
1437
+ 50,
1438
+ 50,
1439
+ 50,
1440
+ 50,
1441
+ 50,
1442
+ 50,
1443
+ 50,
1444
+ 50,
1445
+ 50,
1446
+ 50,
1447
+ 50,
1448
+ 50,
1449
+ 50,
1450
+ 50,
1451
+ 50,
1452
+ 50,
1453
+ 50,
1454
+ 50,
1455
+ 50,
1456
+ 50,
1457
+ 50,
1458
+ 50,
1459
+ 50,
1460
+ 50,
1461
+ 50,
1462
+ 50,
1463
+ 50,
1464
+ 50,
1465
+ 50,
1466
+ 50,
1467
+ 50,
1468
+ 50
1469
+ ],
1470
+ "rating": 7,
1471
+ "sprite": "sprites/review-7.webp?v=987d0ce5c931",
1472
+ "poster": "posters/review-7.webp?v=778ef9b81d4d"
1473
+ },
1474
+ "review-8": {
1475
+ "id": "review-8",
1476
+ "label": "Bintang 8 · Senang banget",
1477
+ "group": "review",
1478
+ "loop": true,
1479
+ "frames": 32,
1480
+ "columns": 8,
1481
+ "rows": 4,
1482
+ "durations": [
1483
+ 50,
1484
+ 50,
1485
+ 50,
1486
+ 50,
1487
+ 50,
1488
+ 50,
1489
+ 50,
1490
+ 50,
1491
+ 50,
1492
+ 50,
1493
+ 50,
1494
+ 50,
1495
+ 50,
1496
+ 50,
1497
+ 50,
1498
+ 50,
1499
+ 50,
1500
+ 50,
1501
+ 50,
1502
+ 50,
1503
+ 50,
1504
+ 50,
1505
+ 50,
1506
+ 50,
1507
+ 50,
1508
+ 50,
1509
+ 50,
1510
+ 50,
1511
+ 50,
1512
+ 50,
1513
+ 50,
1514
+ 50
1515
+ ],
1516
+ "rating": 8,
1517
+ "sprite": "sprites/review-8.webp?v=cf9a85bdac72",
1518
+ "poster": "posters/review-8.webp?v=c9b2c78f3319"
1519
+ },
1520
+ "review-9": {
1521
+ "id": "review-9",
1522
+ "label": "Bintang 9 · Luar biasa",
1523
+ "group": "review",
1524
+ "loop": true,
1525
+ "frames": 32,
1526
+ "columns": 8,
1527
+ "rows": 4,
1528
+ "durations": [
1529
+ 50,
1530
+ 50,
1531
+ 50,
1532
+ 50,
1533
+ 50,
1534
+ 50,
1535
+ 50,
1536
+ 50,
1537
+ 50,
1538
+ 50,
1539
+ 50,
1540
+ 50,
1541
+ 50,
1542
+ 50,
1543
+ 50,
1544
+ 50,
1545
+ 50,
1546
+ 50,
1547
+ 50,
1548
+ 50,
1549
+ 50,
1550
+ 50,
1551
+ 50,
1552
+ 50,
1553
+ 50,
1554
+ 50,
1555
+ 50,
1556
+ 50,
1557
+ 50,
1558
+ 50,
1559
+ 50,
1560
+ 50
1561
+ ],
1562
+ "rating": 9,
1563
+ "sprite": "sprites/review-9.webp?v=a228def7571a",
1564
+ "poster": "posters/review-9.webp?v=ac0f18a1b1d7"
1565
+ },
1566
+ "review-10": {
1567
+ "id": "review-10",
1568
+ "label": "Bintang 10 · Sempurna!",
1569
+ "group": "review",
1570
+ "loop": true,
1571
+ "frames": 32,
1572
+ "columns": 8,
1573
+ "rows": 4,
1574
+ "durations": [
1575
+ 50,
1576
+ 50,
1577
+ 50,
1578
+ 50,
1579
+ 50,
1580
+ 50,
1581
+ 50,
1582
+ 50,
1583
+ 50,
1584
+ 50,
1585
+ 50,
1586
+ 50,
1587
+ 50,
1588
+ 50,
1589
+ 50,
1590
+ 50,
1591
+ 50,
1592
+ 50,
1593
+ 50,
1594
+ 50,
1595
+ 50,
1596
+ 50,
1597
+ 50,
1598
+ 50,
1599
+ 50,
1600
+ 50,
1601
+ 50,
1602
+ 50,
1603
+ 50,
1604
+ 50,
1605
+ 50,
1606
+ 50
1607
+ ],
1608
+ "rating": 10,
1609
+ "sprite": "sprites/review-10.webp?v=cc00c888da6e",
1610
+ "poster": "posters/review-10.webp?v=92346c08b483"
1151
1611
  }
1152
1612
  },
1153
1613
  "renderStyle": "semi3d"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type NakoAnimation = "idle-breathe" | "idle-blink" | "idle-tail-sway" | "idle-sit" | "idle-scarf" | "idle-yawn" | "arcade-run" | "arcade-jump" | "arcade-dash" | "arcade-win" | "arcade-retry" | "loading-breathe" | "loading-look" | "loading-tail" | "loading-wings" | "loading-stretch" | "transaction-wait" | "transaction-check" | "transaction-long" | "transaction-success" | "transaction-help" | "assistant-wave" | "assistant-listen" | "assistant-think" | "assistant-type" | "assistant-explain";
2
- export type NakoMode = 'idle' | 'loading' | 'transaction' | 'arcade' | 'assistant';
1
+ export type NakoAnimation = "idle-breathe" | "idle-blink" | "idle-tail-sway" | "idle-sit" | "idle-scarf" | "idle-yawn" | "arcade-run" | "arcade-jump" | "arcade-dash" | "arcade-win" | "arcade-retry" | "loading-breathe" | "loading-look" | "loading-tail" | "loading-wings" | "loading-stretch" | "transaction-wait" | "transaction-check" | "transaction-long" | "transaction-success" | "transaction-help" | "assistant-wave" | "assistant-listen" | "assistant-think" | "assistant-type" | "assistant-explain" | "review-1" | "review-2" | "review-3" | "review-4" | "review-5" | "review-6" | "review-7" | "review-8" | "review-9" | "review-10";
2
+ export type NakoMode = 'idle' | 'loading' | 'transaction' | 'arcade' | 'assistant' | 'review';
3
3
  export interface NakoElement extends HTMLElement {
4
4
  ready: Promise<void>;
5
5
  play(id: NakoAnimation): Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nako-mascot",
3
- "version": "1.0.0",
4
- "description": "Komponen web Nako. dengan 26 animasi semi-3D untuk proyek pemilik Nako.",
3
+ "version": "1.2.0",
4
+ "description": "Komponen web Nako. dengan 36 animasi semi-3D untuk proyek pemilik Nako.",
5
5
  "homepage": "https://nako.nanaaja.web.id",
6
6
  "publishConfig": {
7
7
  "access": "public",
package/runtime.js CHANGED
@@ -1,7 +1,8 @@
1
- /* Nako. SDK v1.0.0 — penggunaan khusus proyek pemilik; lihat /license. */
1
+ /* Nako. SDK — penggunaan khusus proyek pemilik; lihat /license. */
2
2
  const DEFAULT_BASE = new URL('/nako/', document.baseURI);
3
3
  const manifests = new Map();
4
4
  const modes = {
5
+ review: Array.from({length:10}, (_, i) => `review-${i+1}`),
5
6
  idle: ['idle-breathe', 'idle-blink', 'idle-tail-sway', 'idle-sit', 'idle-scarf', 'idle-yawn'],
6
7
  loading: ['loading-breathe', 'loading-look', 'loading-tail', 'loading-wings', 'loading-stretch'],
7
8
  transaction: ['transaction-wait', 'transaction-check', 'transaction-long', 'transaction-help'],