Skip to content

Commit c927649

Browse files
committed
Release 6.2: API updates & localization pack
Bump project to v6.2 and implement API changes and localization packaging. - Xcode project: increment CURRENT_PROJECT_VERSION and MARKETING_VERSION to 6.2; set DEVELOPMENT_TEAM. - SwiftNEW API: simplify initializer by accepting direct values (no .constant bindings), add presentation modes (.sheet / .fullScreenCover / .embed) and specialEffect (.christmas) support; adapt button/history text color to background brightness. - Demo updates: ContentView previews updated to use new API, localization-aware remote URLs, and new previews (Full Screen Cover, Embed, Christmas Effect). - Localized data: update data.json for en/ja/ko/zh-Hans/zh-Hant to include 6.2 release notes and preserve 6.1 entry; generate packed_data.json with Script/pack_json.py. - Docs: README updated to reflect API changes, new options and usage examples. - Dependencies: update SwiftGlass in Package.resolved to revision b117299... and version 26.0.1. - Source changes: add Color extension and make supporting changes in SwiftNEW implementation and HistorySheet to support new features.
1 parent 5572786 commit c927649

File tree

16 files changed

+1834
-111
lines changed

16 files changed

+1834
-111
lines changed

Demo/What's New?.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@
313313
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
314314
CODE_SIGN_ENTITLEMENTS = "What's New?/What_s_New_.entitlements";
315315
CODE_SIGN_STYLE = Automatic;
316-
CURRENT_PROJECT_VERSION = 16;
316+
CURRENT_PROJECT_VERSION = 17;
317317
DEVELOPMENT_ASSET_PATHS = "\"What's New?/Preview Content\"";
318-
DEVELOPMENT_TEAM = "";
318+
DEVELOPMENT_TEAM = 9PAHLTG8AD;
319319
ENABLE_HARDENED_RUNTIME = YES;
320320
ENABLE_PREVIEWS = YES;
321321
GENERATE_INFOPLIST_FILE = YES;
@@ -327,7 +327,7 @@
327327
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
328328
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
329329
MACOSX_DEPLOYMENT_TARGET = 14.0;
330-
MARKETING_VERSION = 6.1;
330+
MARKETING_VERSION = 6.2;
331331
PRODUCT_BUNDLE_IDENTIFIER = media.1998.WhatsNew;
332332
PRODUCT_NAME = "$(TARGET_NAME)";
333333
SDKROOT = auto;
@@ -350,9 +350,9 @@
350350
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
351351
CODE_SIGN_ENTITLEMENTS = "What's New?/What_s_New_.entitlements";
352352
CODE_SIGN_STYLE = Automatic;
353-
CURRENT_PROJECT_VERSION = 16;
353+
CURRENT_PROJECT_VERSION = 17;
354354
DEVELOPMENT_ASSET_PATHS = "\"What's New?/Preview Content\"";
355-
DEVELOPMENT_TEAM = "";
355+
DEVELOPMENT_TEAM = 9PAHLTG8AD;
356356
ENABLE_HARDENED_RUNTIME = YES;
357357
ENABLE_PREVIEWS = YES;
358358
GENERATE_INFOPLIST_FILE = YES;
@@ -364,7 +364,7 @@
364364
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
365365
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
366366
MACOSX_DEPLOYMENT_TARGET = 14.0;
367-
MARKETING_VERSION = 6.1;
367+
MARKETING_VERSION = 6.2;
368368
PRODUCT_BUNDLE_IDENTIFIER = media.1998.WhatsNew;
369369
PRODUCT_NAME = "$(TARGET_NAME)";
370370
SDKROOT = auto;

Demo/What's New?/ContentView.swift

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,44 @@ struct ContentView : View {
2424
@Previewable @State var showNew: Bool = false
2525
List {
2626
Section(header: Text("Compatible with Toolbar / List")) {
27-
SwiftNEW(show: $showNew, size: .constant("mini"), glass: .constant(false))
27+
SwiftNEW(show: $showNew, size: "mini", glass: false)
2828
}
2929
}
3030
}
3131

3232
#Preview("Invisible") {
3333
@Previewable @State var showNew: Bool = true
34-
SwiftNEW(show: $showNew, size: .constant("invisible"))
34+
SwiftNEW(show: $showNew, size: "invisible")
3535
}
3636

37-
// Remote (>3.0.0) - Firebase Real Time Database Demo (Compatible with json format)
37+
// Remote (>3.0.0) - Firebase Real Time Database Demo / Any JSON URL
3838
#Preview("Remote") {
3939
@Previewable @State var showNew: Bool = false
40-
SwiftNEW(show: $showNew, labelImage: .constant("icloud"), data: .constant("https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty"))
40+
let lang = Bundle.main.preferredLocalizations.first ?? "en"
41+
SwiftNEW(show: $showNew, labelImage: "icloud", data: "https://testground-a937f-default-rtdb.firebaseio.com/\(lang).json?print=pretty")
4142
}
4243

4344
// Drop (>3.4.0) - Recommended trigger with Remote Notification
4445
#Preview("Drop") {
4546
@Previewable @State var showNew: Bool = false
46-
SwiftNEW(show: $showNew, label: .constant("Notification"), labelImage: .constant("bell.badge"), data: .constant("https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty"), showDrop: .constant(true))
47+
let lang = Bundle.main.preferredLocalizations.first ?? "en"
48+
SwiftNEW(show: $showNew, label: "Notification", labelImage: "bell.badge", data: "https://testground-a937f-default-rtdb.firebaseio.com/\(lang).json?print=pretty", showDrop: true)
49+
}
50+
51+
// Full Screen Cover (>6.2.0) - Presentation option
52+
#Preview("Full Screen Cover") {
53+
@Previewable @State var showNew: Bool = false
54+
SwiftNEW(show: $showNew, presentation: .fullScreenCover)
55+
}
56+
57+
// Embed (>6.2.0) - Render content directly
58+
#Preview("Embed") {
59+
@Previewable @State var showNew: Bool = true
60+
SwiftNEW(show: $showNew, presentation: .embed)
61+
}
62+
63+
// Special Effect - Christmas snow effect
64+
#Preview("Christmas Effect") {
65+
@Previewable @State var showNew: Bool = false
66+
SwiftNEW(show: $showNew, specialEffect: .christmas)
4767
}

Demo/What's New?/en.lproj/data.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
[
22
{
3-
"version": "6.1",
4-
"subVersion": "6.1.0",
3+
"version": "6.2",
4+
"subVersion": "6.2.0",
55
"new": [
66
{
7-
"icon": "hammer",
8-
"title": "Project",
9-
"subtitle": "Restructure",
10-
"body": "Seperate files and folders for better maintenance."
7+
"icon": "rectangle.split.3x3",
8+
"title": "Presentation",
9+
"subtitle": "Options",
10+
"body": "Support for sheet, fullScreenCover, and embed modes."
11+
},
12+
{
13+
"icon": "paintpalette",
14+
"title": "Adaptive",
15+
"subtitle": "Text Color",
16+
"body": "Button and history text color automatically adapts to background brightness."
17+
},
18+
{
19+
"icon": "wand.and.stars",
20+
"title": "Simplified",
21+
"subtitle": "Initializer",
22+
"body": "Direct values no longer require .constant wrapper binding."
1123
},
1224
{
1325
"icon": "macpro.gen3.server",
@@ -23,6 +35,18 @@
2335
}
2436
]
2537
},
38+
{
39+
"version": "6.1",
40+
"subVersion": "6.1.0",
41+
"new": [
42+
{
43+
"icon": "hammer",
44+
"title": "Project",
45+
"subtitle": "Restructure",
46+
"body": "Seperate files and folders for better maintenance."
47+
}
48+
]
49+
},
2650
{
2751
"version": "6.0",
2852
"subVersion": "6.0.0",
@@ -239,4 +263,4 @@
239263
}
240264
]
241265
}
242-
]
266+
]

Demo/What's New?/ja.lproj/data.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
[
22
{
3-
"version": "6.1",
4-
"subVersion": "6.1.0",
3+
"version": "6.2",
4+
"subVersion": "6.2.0",
55
"new": [
66
{
7-
"icon": "hammer",
8-
"title": "プロジェクト",
9-
"subtitle": "リストラクチャ",
10-
"body": "より良いメンテナンスのためのファイルとフォルダの分離。"
7+
"icon": "rectangle.split.3x3",
8+
"title": "プレゼンテーション",
9+
"subtitle": "オプション",
10+
"body": "シート、フルスクリーンカバー、及び埋め込みモードの対応。"
11+
},
12+
{
13+
"icon": "paintpalette",
14+
"title": "適応型",
15+
"subtitle": "テキスト色",
16+
"body": "ボタンと履歴のテキスト色が背景の明るさに応じて自動的に切り替わります。"
17+
},
18+
{
19+
"icon": "wand.and.stars",
20+
"title": "簡易化された",
21+
"subtitle": "イニシャライザ",
22+
"body": "直接の値を指定する際に .constant ラッパーが不要になりました。"
1123
},
1224
{
1325
"icon": "macpro.gen3.server",
@@ -23,6 +35,18 @@
2335
}
2436
]
2537
},
38+
{
39+
"version": "6.1",
40+
"subVersion": "6.1.0",
41+
"new": [
42+
{
43+
"icon": "hammer",
44+
"title": "プロジェクト",
45+
"subtitle": "リストラクチャ",
46+
"body": "より良いメンテナンスのためのファイルとフォルダの分離。"
47+
}
48+
]
49+
},
2650
{
2751
"version": "6.0",
2852
"subVersion": "6.0.0",
@@ -239,4 +263,4 @@
239263
}
240264
]
241265
}
242-
]
266+
]

Demo/What's New?/ko.lproj/data.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
[
22
{
3-
"version": "6.1",
4-
"subVersion": "6.1.0",
3+
"version": "6.2",
4+
"subVersion": "6.2.0",
55
"new": [
66
{
7-
"icon": "hammer",
8-
"title": "프로젝트",
9-
"subtitle": "재구성",
10-
"body": "더 나은 유지보수를 위한 파일과 폴더 분리."
7+
"icon": "rectangle.split.3x3",
8+
"title": "프레젠테이션",
9+
"subtitle": "옵션",
10+
"body": "시트, 전체 화면 및 내장 모드 지원."
11+
},
12+
{
13+
"icon": "paintpalette",
14+
"title": "적응형",
15+
"subtitle": "텍스트 색상",
16+
"body": "버튼과 기록 텍스트 색상이 배경 밝기에 따라 자동으로 변경됩니다."
17+
},
18+
{
19+
"icon": "wand.and.stars",
20+
"title": "간소화된",
21+
"subtitle": "이니셜라이저",
22+
"body": "직접 값을 지정할 때 .constant 래퍼가 더 이상 필요하지 않습니다."
1123
},
1224
{
1325
"icon": "macpro.gen3.server",
@@ -23,6 +35,18 @@
2335
}
2436
]
2537
},
38+
{
39+
"version": "6.1",
40+
"subVersion": "6.1.0",
41+
"new": [
42+
{
43+
"icon": "hammer",
44+
"title": "프로젝트",
45+
"subtitle": "재구성",
46+
"body": "더 나은 유지보수를 위한 파일과 폴더 분리."
47+
}
48+
]
49+
},
2650
{
2751
"version": "6.0",
2852
"subVersion": "6.0.0",
@@ -239,4 +263,4 @@
239263
}
240264
]
241265
}
242-
]
266+
]

Demo/What's New?/zh-Hans.lproj/data.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
[
22
{
3-
"version": "6.1",
4-
"subVersion": "6.1.0",
3+
"version": "6.2",
4+
"subVersion": "6.2.0",
55
"new": [
66
{
7-
"icon": "hammer",
8-
"title": "项目",
9-
"subtitle": "重构",
10-
"body": "分离文件和文件夹以便更好地维护。"
7+
"icon": "rectangle.split.3x3",
8+
"title": "呈现方式",
9+
"subtitle": "选项",
10+
"body": "支持表单、全屏覆盖和嵌入模式。"
11+
},
12+
{
13+
"icon": "paintpalette",
14+
"title": "自适应",
15+
"subtitle": "文本颜色",
16+
"body": "按钮和历史记录文本颜色会自动适应背景亮度。"
17+
},
18+
{
19+
"icon": "wand.and.stars",
20+
"title": "简化的",
21+
"subtitle": "构造器",
22+
"body": "直接赋值不再需要 .constant 包装绑定。"
1123
},
1224
{
1325
"icon": "macpro.gen3.server",
@@ -23,6 +35,18 @@
2335
}
2436
]
2537
},
38+
{
39+
"version": "6.1",
40+
"subVersion": "6.1.0",
41+
"new": [
42+
{
43+
"icon": "hammer",
44+
"title": "项目",
45+
"subtitle": "重构",
46+
"body": "分离文件和文件夹以便更好地维护。"
47+
}
48+
]
49+
},
2650
{
2751
"version": "6.0",
2852
"subVersion": "6.0.0",
@@ -239,4 +263,4 @@
239263
}
240264
]
241265
}
242-
]
266+
]

Demo/What's New?/zh-Hant.lproj/data.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
[
22
{
3-
"version": "6.1",
4-
"subVersion": "6.1.0",
3+
"version": "6.2",
4+
"subVersion": "6.2.0",
55
"new": [
66
{
7-
"icon": "hammer",
8-
"title": "專案",
9-
"subtitle": "重構",
10-
"body": "分離檔案和資料夾以便更好地維護。"
7+
"icon": "rectangle.split.3x3",
8+
"title": "呈現方式",
9+
"subtitle": "選項",
10+
"body": "支援表單、全螢幕覆蓋與嵌入模式。"
11+
},
12+
{
13+
"icon": "paintpalette",
14+
"title": "自適應",
15+
"subtitle": "文字顏色",
16+
"body": "按鈕與歷史紀錄文字顏色會自動適應背景亮度。"
17+
},
18+
{
19+
"icon": "wand.and.stars",
20+
"title": "簡化的",
21+
"subtitle": "構造器",
22+
"body": "直接賦值不再需要 .constant 包裝綁定。"
1123
},
1224
{
1325
"icon": "macpro.gen3.server",
@@ -23,6 +35,18 @@
2335
}
2436
]
2537
},
38+
{
39+
"version": "6.1",
40+
"subVersion": "6.1.0",
41+
"new": [
42+
{
43+
"icon": "hammer",
44+
"title": "專案",
45+
"subtitle": "重構",
46+
"body": "分離檔案和資料夾以便更好地維護。"
47+
}
48+
]
49+
},
2650
{
2751
"version": "6.0",
2852
"subVersion": "6.0.0",
@@ -239,4 +263,4 @@
239263
}
240264
]
241265
}
242-
]
266+
]

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)