Skip to content

Commit db86b17

Browse files
committed
v6.3 Draft 1: add search, heading/icon styles and particles
Bump demo project to 6.3 and add release features: update project version/marketing version, set DEVELOPMENT_TEAM and CFBundleDisplayName, and add XROS target. Add localized 6.3 changelog entries for all supported locales and add a preview for the new particles special effect. Introduce headingStyle and iconStyle APIs (SwiftNEWHeadingStyle, SwiftNEWIconStyle) with Bundle.appName helper, expose bindings/initializers throughout SwiftNEW, and update README/CONFIGURATION docs. Implement in-sheet search (UI + filtering), a search button, and layout/typography refinements for current and history sheets. Refactor icon rendering into iconBadge supporting .filled and .plain styles, and other minor UI adjustments.
1 parent 799a478 commit db86b17

18 files changed

Lines changed: 616 additions & 139 deletions

File tree

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
3A46CBB2285444CC00BE79A3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A46CBB1285444CC00BE79A3 /* ContentView.swift */; };
1313
3A46CBB4285444CD00BE79A3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3A46CBB3285444CD00BE79A3 /* Assets.xcassets */; };
1414
3A46CBB8285444CD00BE79A3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3A46CBB7285444CD00BE79A3 /* Preview Assets.xcassets */; };
15+
3A46CBBE285444CC00BE79A3 /* ContentView+Previews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A46CBBF285444CC00BE79A3 /* ContentView+Previews.swift */; };
1516
3AB7E09128630E380059EEFE /* SwiftNEW in Frameworks */ = {isa = PBXBuildFile; productRef = 3AB7E09028630E380059EEFE /* SwiftNEW */; };
1617
3AE0026A2962DD540055979A /* data.json in Resources */ = {isa = PBXBuildFile; fileRef = 3AE0026C2962DD540055979A /* data.json */; };
1718
/* End PBXBuildFile section */
@@ -26,6 +27,7 @@
2627
3A46CBB3285444CD00BE79A3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2728
3A46CBB5285444CD00BE79A3 /* What_s_New_.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = What_s_New_.entitlements; sourceTree = "<group>"; };
2829
3A46CBB7285444CD00BE79A3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
30+
3A46CBBF285444CC00BE79A3 /* ContentView+Previews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContentView+Previews.swift"; sourceTree = "<group>"; };
2931
3A46CBC4285447F600BE79A3 /* SwiftNEW */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SwiftNEW; path = ../../../SwiftNEW; sourceTree = "<group>"; };
3032
3AE0026B2962DD540055979A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = en; path = en.lproj/data.json; sourceTree = "<group>"; };
3133
3AE0026D2962DD810055979A /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "zh-Hant"; path = "zh-Hant.lproj/data.json"; sourceTree = "<group>"; };
@@ -66,6 +68,7 @@
6668
children = (
6769
3A46CBAF285444CC00BE79A3 /* What_s_New_App.swift */,
6870
3A46CBB1285444CC00BE79A3 /* ContentView.swift */,
71+
3A46CBBF285444CC00BE79A3 /* ContentView+Previews.swift */,
6972
3AE0026C2962DD540055979A /* data.json */,
7073
3A46CBB3285444CD00BE79A3 /* Assets.xcassets */,
7174
3A46CBB5285444CD00BE79A3 /* What_s_New_.entitlements */,
@@ -173,6 +176,7 @@
173176
buildActionMask = 2147483647;
174177
files = (
175178
3A46CBB2285444CC00BE79A3 /* ContentView.swift in Sources */,
179+
3A46CBBE285444CC00BE79A3 /* ContentView+Previews.swift in Sources */,
176180
3A46CBB0285444CC00BE79A3 /* What_s_New_App.swift in Sources */,
177181
);
178182
runOnlyForDeploymentPostprocessing = 0;
@@ -313,12 +317,13 @@
313317
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
314318
CODE_SIGN_ENTITLEMENTS = "What's New?/What_s_New_.entitlements";
315319
CODE_SIGN_STYLE = Automatic;
316-
CURRENT_PROJECT_VERSION = 17;
320+
CURRENT_PROJECT_VERSION = 18;
317321
DEVELOPMENT_ASSET_PATHS = "\"What's New?/Preview Content\"";
318322
DEVELOPMENT_TEAM = "";
319323
ENABLE_HARDENED_RUNTIME = YES;
320324
ENABLE_PREVIEWS = YES;
321325
GENERATE_INFOPLIST_FILE = YES;
326+
INFOPLIST_KEY_CFBundleDisplayName = Demo;
322327
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
323328
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
324329
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
@@ -327,7 +332,7 @@
327332
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
328333
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
329334
MACOSX_DEPLOYMENT_TARGET = 14.0;
330-
MARKETING_VERSION = 6.2;
335+
MARKETING_VERSION = 6.3;
331336
PRODUCT_BUNDLE_IDENTIFIER = media.1998.WhatsNew;
332337
PRODUCT_NAME = "$(TARGET_NAME)";
333338
SDKROOT = auto;
@@ -340,6 +345,7 @@
340345
TARGETED_DEVICE_FAMILY = "1,2,3,7";
341346
TVOS_DEPLOYMENT_TARGET = 17.0;
342347
VISIONOS_DEPLOYMENT_TARGET = 1.0;
348+
XROS_DEPLOYMENT_TARGET = 1.0;
343349
};
344350
name = Debug;
345351
};
@@ -350,12 +356,13 @@
350356
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
351357
CODE_SIGN_ENTITLEMENTS = "What's New?/What_s_New_.entitlements";
352358
CODE_SIGN_STYLE = Automatic;
353-
CURRENT_PROJECT_VERSION = 17;
359+
CURRENT_PROJECT_VERSION = 18;
354360
DEVELOPMENT_ASSET_PATHS = "\"What's New?/Preview Content\"";
355361
DEVELOPMENT_TEAM = "";
356362
ENABLE_HARDENED_RUNTIME = YES;
357363
ENABLE_PREVIEWS = YES;
358364
GENERATE_INFOPLIST_FILE = YES;
365+
INFOPLIST_KEY_CFBundleDisplayName = Demo;
359366
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
360367
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
361368
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
@@ -364,7 +371,7 @@
364371
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
365372
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
366373
MACOSX_DEPLOYMENT_TARGET = 14.0;
367-
MARKETING_VERSION = 6.2;
374+
MARKETING_VERSION = 6.3;
368375
PRODUCT_BUNDLE_IDENTIFIER = media.1998.WhatsNew;
369376
PRODUCT_NAME = "$(TARGET_NAME)";
370377
SDKROOT = auto;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// ContentView+Previews.swift
3+
// What's New?
4+
//
5+
6+
import SwiftUI
7+
import SwiftNEW
8+
9+
#Preview("Default") {
10+
ContentView()
11+
}
12+
13+
// Mini (Toolbar / List only)
14+
#Preview("Mini") {
15+
@Previewable @State var showNew: Bool = false
16+
List {
17+
Section(header: Text("Compatible with Toolbar / List")) {
18+
SwiftNEW(show: $showNew, size: "mini", glass: false)
19+
}
20+
}
21+
}
22+
23+
#Preview("Invisible") {
24+
@Previewable @State var showNew: Bool = true
25+
SwiftNEW(show: $showNew, size: "invisible")
26+
}
27+
28+
// Remote (>3.0.0) - Firebase Real Time Database Demo / Any JSON URL
29+
#Preview("Remote") {
30+
@Previewable @State var showNew: Bool = false
31+
let lang = Bundle.main.preferredLocalizations.first ?? "en"
32+
SwiftNEW(show: $showNew, labelImage: "icloud", data: "https://testground-a937f-default-rtdb.firebaseio.com/\(lang).json?print=pretty")
33+
}
34+
35+
// Drop (>3.4.0) - Recommended trigger with Remote Notification
36+
#Preview("Drop") {
37+
@Previewable @State var showNew: Bool = false
38+
let lang = Bundle.main.preferredLocalizations.first ?? "en"
39+
SwiftNEW(show: $showNew, label: "Notification", labelImage: "bell.badge", data: "https://testground-a937f-default-rtdb.firebaseio.com/\(lang).json?print=pretty", showDrop: true)
40+
}
41+
42+
// Full Screen Cover (>6.2.0) - Presentation option
43+
#Preview("Full Screen Cover") {
44+
@Previewable @State var showNew: Bool = false
45+
SwiftNEW(show: $showNew, presentation: .fullScreenCover)
46+
}
47+
48+
// Embed (>6.2.0) - Render content directly
49+
#Preview("Embed") {
50+
@Previewable @State var showNew: Bool = true
51+
SwiftNEW(show: $showNew, presentation: .embed)
52+
}
53+
54+
// Special Effect - Christmas snow effect
55+
#Preview("Christmas Effect") {
56+
@Previewable @State var showNew: Bool = false
57+
SwiftNEW(show: $showNew, specialEffect: .christmas)
58+
}
59+
60+
// Special Effect (>6.3.0) - Floating particles
61+
#Preview("Particles Effect") {
62+
@Previewable @State var showNew: Bool = false
63+
SwiftNEW(show: $showNew, specialEffect: .particles)
64+
}

Demo/What's New?/ContentView.swift

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,54 +14,3 @@ struct ContentView : View {
1414
SwiftNEW(show: $showNew)
1515
}
1616
}
17-
18-
#Preview("Default") {
19-
ContentView()
20-
}
21-
22-
// Mini (Toolbar / List only)
23-
#Preview("Mini") {
24-
@Previewable @State var showNew: Bool = false
25-
List {
26-
Section(header: Text("Compatible with Toolbar / List")) {
27-
SwiftNEW(show: $showNew, size: "mini", glass: false)
28-
}
29-
}
30-
}
31-
32-
#Preview("Invisible") {
33-
@Previewable @State var showNew: Bool = true
34-
SwiftNEW(show: $showNew, size: "invisible")
35-
}
36-
37-
// Remote (>3.0.0) - Firebase Real Time Database Demo / Any JSON URL
38-
#Preview("Remote") {
39-
@Previewable @State var showNew: Bool = false
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")
42-
}
43-
44-
// Drop (>3.4.0) - Recommended trigger with Remote Notification
45-
#Preview("Drop") {
46-
@Previewable @State var showNew: Bool = false
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)
67-
}

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,70 @@
11
[
2+
{
3+
"version": "6.3",
4+
"subVersion": "6.3.0",
5+
"new": [
6+
{
7+
"icon": "sparkles",
8+
"title": "Floating",
9+
"subtitle": "Particles",
10+
"body": "New special effect option with smooth animation."
11+
},
12+
{
13+
"icon": "number",
14+
"title": "Optional",
15+
"subtitle": "Build Number",
16+
"body": "Configurable build number display alongside the version."
17+
},
18+
{
19+
"icon": "snowflake",
20+
"title": "Optimized",
21+
"subtitle": "Snowfall",
22+
"body": "Reimplemented with Canvas and TimelineView for smoother performance."
23+
},
24+
{
25+
"icon": "bolt",
26+
"title": "Modern",
27+
"subtitle": "Networking",
28+
"body": "Powered by Swift Concurrency and Sendable models."
29+
},
30+
{
31+
"icon": "lock.shield",
32+
"title": "Sendable",
33+
"subtitle": "Models",
34+
"body": "Thread-safe data models for Swift Concurrency."
35+
},
36+
{
37+
"icon": "speedometer",
38+
"title": "Faster",
39+
"subtitle": "Mesh BG",
40+
"body": "MeshView uses drawingGroup for smoother rendering."
41+
},
42+
{
43+
"icon": "tray.and.arrow.down",
44+
"title": "Local Data",
45+
"subtitle": "Loading",
46+
"body": "Optimized loading from bundled JSON files."
47+
},
48+
{
49+
"icon": "text.alignleft",
50+
"title": "Full",
51+
"subtitle": "Body Text",
52+
"body": "Removed line limits so longer descriptions render fully."
53+
},
54+
{
55+
"icon": "tag",
56+
"title": "Version",
57+
"subtitle": "Badges",
58+
"body": "Refined dimensions and padding in the History view."
59+
},
60+
{
61+
"icon": "doc.text",
62+
"title": "Reorganized",
63+
"subtitle": "Docs",
64+
"body": "Split into CONFIGURATION, CONTRIBUTING, and PLATFORM guides."
65+
}
66+
]
67+
},
268
{
369
"version": "6.2",
470
"subVersion": "6.2.0",

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,70 @@
11
[
2+
{
3+
"version": "6.3",
4+
"subVersion": "6.3.0",
5+
"new": [
6+
{
7+
"icon": "sparkles",
8+
"title": "フローティング",
9+
"subtitle": "パーティクル",
10+
"body": "新しい特殊エフェクト。滑らかなアニメーション。"
11+
},
12+
{
13+
"icon": "number",
14+
"title": "オプションの",
15+
"subtitle": "ビルド番号",
16+
"body": "バージョンと並べてビルド番号を表示できます。"
17+
},
18+
{
19+
"icon": "snowflake",
20+
"title": "最適化された",
21+
"subtitle": "降雪エフェクト",
22+
"body": "Canvas と TimelineView で再実装し、より滑らかに。"
23+
},
24+
{
25+
"icon": "bolt",
26+
"title": "モダンな",
27+
"subtitle": "ネットワーキング",
28+
"body": "Swift Concurrency と Sendable モデルを採用。"
29+
},
30+
{
31+
"icon": "lock.shield",
32+
"title": "Sendable",
33+
"subtitle": "モデル",
34+
"body": "Swift Concurrency 対応のスレッドセーフなモデル。"
35+
},
36+
{
37+
"icon": "speedometer",
38+
"title": "高速化",
39+
"subtitle": "メッシュ背景",
40+
"body": "MeshView を drawingGroup で最適化し描画がより滑らかに。"
41+
},
42+
{
43+
"icon": "tray.and.arrow.down",
44+
"title": "ローカルデータ",
45+
"subtitle": "読み込み",
46+
"body": "バンドル JSON の読み込みを最適化。"
47+
},
48+
{
49+
"icon": "text.alignleft",
50+
"title": "完全な",
51+
"subtitle": "本文",
52+
"body": "行数制限を撤廃し、長い説明文も全文表示。"
53+
},
54+
{
55+
"icon": "tag",
56+
"title": "バージョン",
57+
"subtitle": "バッジ",
58+
"body": "履歴ビューのバージョンバッジのサイズと余白を調整。"
59+
},
60+
{
61+
"icon": "doc.text",
62+
"title": "ドキュメント",
63+
"subtitle": "再構成",
64+
"body": "CONFIGURATION・CONTRIBUTING・PLATFORM に分割。"
65+
}
66+
]
67+
},
268
{
369
"version": "6.2",
470
"subVersion": "6.2.0",

0 commit comments

Comments
 (0)