Skip to content

Commit f3084b7

Browse files
committed
braking changes
1 parent ccb8c06 commit f3084b7

12 files changed

Lines changed: 1648 additions & 130 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ DerivedData/
4545
# OS files
4646
.DS_Store
4747
Thumbs.db
48+
49+
docs/.nojekyll
50+

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ All notable changes to GuideKit will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows semantic versioning.
66

7-
## [Unreleased]
7+
## [1.0.0] - 2026-07-22
8+
9+
### Changed
10+
11+
- Expanded the README with the same installation, full-screen parent setup, target-bounds callback, persistence, customization, and API guidance used by the website.
12+
- Replaced public arrow dash interval arrays with named presets directly in `GuideKitArrowLineStyle`: `Dotted`, `ShortDash`, `MediumDash`, `LongDash`, and `DashDot`.
13+
- Renamed the generic `Dashed` line style to `SpacedDash` to describe its visible spacing and distinguish it from the length-based dash presets.
14+
- Replaced public floating-point pixel sizes with integer styling values that GuideKit converts internally.
15+
- Replaced the separate single-phrase `descriptionHighlight` option with the unified `descriptionHighlights` list.
16+
- Changed `arrowHeadAngleDegrees` from a public `Float` to an `Int`, with conversion handled internally.
817

918
## [0.1.0] - 2026-07-16
1019

README.md

Lines changed: 462 additions & 46 deletions
Large diffs are not rendered by default.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group = "io.github.tharukack"
12-
version = "0.1.3"
12+
version = "1.0.0"
1313

1414
kotlin {
1515
androidTarget {
1.23 MB
Loading

docs/index.html

Lines changed: 579 additions & 0 deletions
Large diffs are not rendered by default.

docs/script.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
const header = document.querySelector('[data-header]');
2+
const nav = document.querySelector('[data-nav]');
3+
const navToggle = document.querySelector('[data-nav-toggle]');
4+
5+
const setHeaderState = () => {
6+
header?.classList.toggle('scrolled', window.scrollY > 16);
7+
};
8+
9+
setHeaderState();
10+
window.addEventListener('scroll', setHeaderState, { passive: true });
11+
12+
navToggle?.addEventListener('click', () => {
13+
const isOpen = nav?.classList.toggle('open') ?? false;
14+
navToggle.setAttribute('aria-expanded', String(isOpen));
15+
navToggle.setAttribute('aria-label', isOpen ? 'Close navigation' : 'Open navigation');
16+
document.body.classList.toggle('nav-open', isOpen);
17+
});
18+
19+
nav?.querySelectorAll('a').forEach((link) => {
20+
link.addEventListener('click', () => {
21+
nav.classList.remove('open');
22+
navToggle?.setAttribute('aria-expanded', 'false');
23+
navToggle?.setAttribute('aria-label', 'Open navigation');
24+
document.body.classList.remove('nav-open');
25+
});
26+
});
27+
28+
const copyText = async (button, text) => {
29+
const label = button.querySelector('[data-copy-label]');
30+
const original = label?.textContent ?? 'Copy';
31+
32+
try {
33+
await navigator.clipboard.writeText(text.trim());
34+
if (label) label.textContent = 'Copied!';
35+
button.classList.add('copied');
36+
} catch {
37+
if (label) label.textContent = 'Select to copy';
38+
}
39+
40+
window.setTimeout(() => {
41+
if (label) label.textContent = original;
42+
button.classList.remove('copied');
43+
}, 1800);
44+
};
45+
46+
document.querySelectorAll('[data-copy], [data-copy-target]').forEach((button) => {
47+
button.addEventListener('click', () => {
48+
const target = button.dataset.copyTarget
49+
? document.querySelector(button.dataset.copyTarget)?.textContent
50+
: button.dataset.copy;
51+
if (target) copyText(button, target);
52+
});
53+
});
54+
55+
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
56+
const reveals = document.querySelectorAll('.reveal');
57+
58+
if (reduceMotion || !('IntersectionObserver' in window)) {
59+
reveals.forEach((element) => element.classList.add('visible'));
60+
} else {
61+
const observer = new IntersectionObserver((entries) => {
62+
entries.forEach((entry) => {
63+
if (entry.isIntersecting) {
64+
entry.target.classList.add('visible');
65+
observer.unobserve(entry.target);
66+
}
67+
});
68+
}, { threshold: 0.12, rootMargin: '0px 0px -35px' });
69+
70+
reveals.forEach((element) => observer.observe(element));
71+
}
72+
73+
document.querySelectorAll('[data-year]').forEach((element) => {
74+
element.textContent = String(new Date().getFullYear());
75+
});

docs/styles.css

Lines changed: 435 additions & 0 deletions
Large diffs are not rendered by default.

sample/composeApp/src/commonMain/kotlin/io/github/tharukack/guidekit/sample/App.kt

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -680,12 +680,12 @@ private fun guideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep> = li
680680
targetBounds = targetBounds[TargetHero],
681681
title = "Start with one composable",
682682
description = "GuideKit draws a coachmark overlay above your existing Compose UI.",
683-
descriptionHighlight = "coachmark overlay",
683+
descriptionHighlights = listOf("coachmark overlay"),
684684
targetHighlight = sampleRoundedTargetHighlight(HeroCardCornerRadius),
685685
arrowConfig = GuideKitArrowConfig(
686686
from = GuideKitAnchor.TopCenter,
687687
to = GuideKitAnchor.BottomCenter,
688-
lineStyle = GuideKitArrowLineStyle.Dashed,
688+
lineStyle = GuideKitArrowLineStyle.SpacedDash,
689689
),
690690
),
691691
GuideKitStep(
@@ -696,7 +696,7 @@ private fun guideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep> = li
696696
targetHighlight = GuideKitTargetHighlightStyle(
697697
shape = GuideKitTargetHighlightShape.RoundedRect,
698698
cornerRadius = 34.dp,
699-
paddingPx = 12f,
699+
padding = 12,
700700
),
701701
),
702702
GuideKitStep(
@@ -710,8 +710,8 @@ private fun guideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep> = li
710710
lineStyle = GuideKitArrowLineStyle.Solid,
711711
arrowHead = GuideKitArrowHead.BothSides,
712712
strokes = listOf(
713-
GuideKitArrowStroke(widthPx = 10f, color = Color.Black.copy(alpha = 0.20f)),
714-
GuideKitArrowStroke(widthPx = 5f, color = Color(0xFFFFC857)),
713+
GuideKitArrowStroke(width = 10, color = Color.Black.copy(alpha = 0.20f)),
714+
GuideKitArrowStroke(width = 5, color = Color(0xFFFFC857)),
715715
),
716716
),
717717
instructionBox = GuideKitInstructionBoxStyle(
@@ -726,11 +726,11 @@ private fun guideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep> = li
726726
descriptionHighlights = listOf("Circular highlights", "compact controls"),
727727
targetHighlight = GuideKitTargetHighlightStyle(
728728
shape = GuideKitTargetHighlightShape.Circle,
729-
paddingPx = 18f,
729+
padding = 18,
730730
glowStrokes = listOf(
731-
GuideKitTargetHighlightStroke(widthPx = 36f, alpha = 0.10f, color = Color(0xFF4DA3FF)),
732-
GuideKitTargetHighlightStroke(widthPx = 18f, alpha = 0.28f, color = Color(0xFF4DA3FF)),
733-
GuideKitTargetHighlightStroke(widthPx = 7f, alpha = 0.58f, color = Color(0xFF4DA3FF)),
731+
GuideKitTargetHighlightStroke(width = 36, alpha = 0.10f, color = Color(0xFF4DA3FF)),
732+
GuideKitTargetHighlightStroke(width = 18, alpha = 0.28f, color = Color(0xFF4DA3FF)),
733+
GuideKitTargetHighlightStroke(width = 7, alpha = 0.58f, color = Color(0xFF4DA3FF)),
734734
),
735735
),
736736
),
@@ -768,7 +768,7 @@ private fun studioGuideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep
768768
targetBounds = targetBounds[StudioTimeline],
769769
title = "Point at wide sections",
770770
description = "Instruction cards can be narrower than the target while the highlight follows the full section.",
771-
descriptionHighlight = "highlight follows the full section",
771+
descriptionHighlights = listOf("highlight follows the full section"),
772772
targetHighlight = studioRoundedTargetHighlight(30.dp),
773773
arrowConfig = GuideKitArrowConfig(
774774
enabled = false
@@ -789,8 +789,7 @@ private fun studioGuideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep
789789
arrowConfig = GuideKitArrowConfig(
790790
from = GuideKitAnchor.TopRight,
791791
to = GuideKitAnchor.TopLeft,
792-
lineStyle = GuideKitArrowLineStyle.Dashed,
793-
dashIntervalsPx = floatArrayOf(12f, 10f),
792+
lineStyle = GuideKitArrowLineStyle.ShortDash,
794793
),
795794
),
796795
GuideKitStep(
@@ -803,11 +802,11 @@ private fun studioGuideSteps(targetBounds: Map<String, Rect>): List<GuideKitStep
803802
),
804803
targetHighlight = GuideKitTargetHighlightStyle(
805804
shape = GuideKitTargetHighlightShape.Circle,
806-
paddingPx = 16f,
805+
padding = 16,
807806
glowStrokes = listOf(
808-
GuideKitTargetHighlightStroke(widthPx = 34f, alpha = 0.12f, color = Color(0xFFFF6B4A)),
809-
GuideKitTargetHighlightStroke(widthPx = 18f, alpha = 0.30f, color = Color(0xFFFF6B4A)),
810-
GuideKitTargetHighlightStroke(widthPx = 7f, alpha = 0.60f, color = Color(0xFFFF6B4A)),
807+
GuideKitTargetHighlightStroke(width = 34, alpha = 0.12f, color = Color(0xFFFF6B4A)),
808+
GuideKitTargetHighlightStroke(width = 18, alpha = 0.30f, color = Color(0xFFFF6B4A)),
809+
GuideKitTargetHighlightStroke(width = 7, alpha = 0.60f, color = Color(0xFFFF6B4A)),
811810
),
812811
),
813812
),
@@ -834,7 +833,7 @@ private fun sampleGuideStyle() = GuideKitStyle(
834833
primaryButtonContentColor = Color(0xFF173B33),
835834
arrowConfig = GuideKitArrowConfig(
836835
minVisibleDistance = 28.dp,
837-
dashIntervalsPx = floatArrayOf(18f, 12f),
836+
lineStyle = GuideKitArrowLineStyle.MediumDash,
838837
strokeCap = StrokeCap.Round,
839838
),
840839
targetHighlight = sampleRoundedTargetHighlight(30.dp),
@@ -857,12 +856,12 @@ private fun studioGuideStyle() = GuideKitStyle(
857856
primaryButtonContentColor = Color(0xFF2D130D),
858857
arrowConfig = GuideKitArrowConfig(
859858
minVisibleDistance = 26.dp,
860-
dashIntervalsPx = floatArrayOf(14f, 10f),
859+
lineStyle = GuideKitArrowLineStyle.ShortDash,
861860
strokeCap = StrokeCap.Round,
862861
strokes = listOf(
863-
GuideKitArrowStroke(widthPx = 9f, color = Color.Black.copy(alpha = 0.22f)),
864-
GuideKitArrowStroke(widthPx = 5.2f, color = Color(0xFFFF6B4A)),
865-
GuideKitArrowStroke(widthPx = 1.6f, color = Color.White.copy(alpha = 0.54f)),
862+
GuideKitArrowStroke(width = 9, color = Color.Black.copy(alpha = 0.22f)),
863+
GuideKitArrowStroke(width = 5, color = Color(0xFFFF6B4A)),
864+
GuideKitArrowStroke(width = 2, color = Color.White.copy(alpha = 0.54f)),
866865
),
867866
),
868867
targetHighlight = studioRoundedTargetHighlight(28.dp),
@@ -883,15 +882,15 @@ private fun studioGuideStyle() = GuideKitStyle(
883882
private fun sampleRoundedTargetHighlight(cornerRadius: Dp) =
884883
GuideKitTargetHighlightStyle(
885884
cornerRadius = cornerRadius,
886-
paddingPx = 10f,
887-
borderWidthPx = 3f,
885+
padding = 10,
886+
borderWidth = 3,
888887
)
889888

890889
private fun studioRoundedTargetHighlight(cornerRadius: Dp) =
891890
GuideKitTargetHighlightStyle(
892891
cornerRadius = cornerRadius,
893-
paddingPx = 11f,
894-
borderWidthPx = 3f,
892+
padding = 11,
893+
borderWidth = 3,
895894
borderColor = Color(0xFFFF6B4A),
896895
innerBorderColor = Color.White.copy(alpha = 0.74f),
897896
)

0 commit comments

Comments
 (0)