@krizaka/ui 0.0.0-stage → 1.1.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/LICENSE +202 -0
- package/README.md +103 -2
- package/dist/index.d.ts +53 -0
- package/dist/index.js +258 -0
- package/dist/index.js.map +1 -0
- package/dist/motion.css +157 -0
- package/dist/native.d.ts +20 -0
- package/dist/native.js +95 -0
- package/dist/native.js.map +1 -0
- package/package.json +90 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://raw.githubusercontent.com/krizaka/.github/main/profile/assets/krizaka.svg" alt="Krizaka" width="72">
|
|
4
|
+
|
|
5
|
+
# @krizaka/ui
|
|
6
|
+
|
|
7
|
+
**The Krizaka brand layer, shared by every product.**
|
|
8
|
+
The animated marks of Krizaka, Orazaka and Orochia, and the Krizaka motion signature — one easing, one way to enter,
|
|
9
|
+
reveal, roll, shine and open.
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/@krizaka/ui)
|
|
12
|
+
[](https://github.com/krizaka/krizaka-ui/actions/workflows/ci.yml)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @krizaka/ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
React 18 or 19. No framework, no CSS library required: the marks carry their own styles, the motion is one CSS file.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## React Native
|
|
27
|
+
|
|
28
|
+
The marks have one geometry; `@krizaka/ui/native` draws it with `react-native-svg` for the apps
|
|
29
|
+
([orochia-mobile](https://github.com/krizaka/orochia-mobile)). The orbit turns and the flame breathes on the native
|
|
30
|
+
driver, and stay still when the system asks to reduce motion. `react-dom`, `react-native` and `react-native-svg` are
|
|
31
|
+
optional peers: a web app never installs the native ones, a native app never installs `react-dom`.
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { OrochiaMark } from "@krizaka/ui/native";
|
|
35
|
+
|
|
36
|
+
<OrochiaMark size={72} title="Orochia" neutral={theme.border} />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## The marks
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo } from "@krizaka/ui";
|
|
43
|
+
|
|
44
|
+
<OrochiaLogo size={36} /> // decorative (aria-hidden)
|
|
45
|
+
<KrizakaLogo size={48} title="Krizaka" /> // an image with an accessible name
|
|
46
|
+
<ProductLogo id="orazaka" animated={false} /> // by id, still
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Neutral strokes follow the host's `--kz-*` tokens when they exist (`--kz-border-strong`, `--kz-text-muted`…) and the
|
|
50
|
+
text colour otherwise, so a mark reads on dark and light surfaces alike. Every instance has its own gradient ids.
|
|
51
|
+
Motion stops with `animated={false}` and always under `prefers-reduced-motion`.
|
|
52
|
+
|
|
53
|
+
## The motion signature
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import "@krizaka/ui/motion.css";
|
|
57
|
+
import { MotionObserver, RotatingWord } from "@krizaka/ui";
|
|
58
|
+
|
|
59
|
+
// once, at the root of the app
|
|
60
|
+
<MotionObserver />
|
|
61
|
+
|
|
62
|
+
<h1>Creators you <RotatingWord words={["love", "follow", "support"]} /></h1>
|
|
63
|
+
<section data-reveal style={{ "--kz-delay": "120ms" }}>…</section>
|
|
64
|
+
<a className="kz-sheen">Get started</a>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
| Class / attribute | What it does |
|
|
68
|
+
| :--- | :--- |
|
|
69
|
+
| `--kz-ease` | The one easing: `cubic-bezier(0.16, 1, 0.3, 1)` |
|
|
70
|
+
| `kz-page` | A page entering (put it on a route wrapper) |
|
|
71
|
+
| `data-reveal` (+ `--kz-delay`) | Rises into place when it enters the viewport (`MotionObserver`) |
|
|
72
|
+
| `RotatingWord` / `kz-word` | A word that rolls through alternatives |
|
|
73
|
+
| `kz-sheen` | A light sweeping across a primary action on hover |
|
|
74
|
+
| `kz-spotlight` | A soft bloom following the pointer across a card |
|
|
75
|
+
| `kz-lift` | A card rising under the pointer |
|
|
76
|
+
| `kz-gradient-text`, `kz-marquee` | Drifting gradient text, endless bands |
|
|
77
|
+
| `kz-overlay`, `kz-dialog`, `kz-pop`, `kz-fade` | Backdrops, dialogs (from the bottom on phones), menus, views swapped in place |
|
|
78
|
+
|
|
79
|
+
With Tailwind CSS v4, give every transition the same easing:
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
@theme inline {
|
|
83
|
+
--default-transition-timing-function: var(--kz-ease);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Develop
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install
|
|
91
|
+
npm run check # type-check, tests, build
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Releases: a `v*` tag publishes to npm from CI with provenance.
|
|
95
|
+
|
|
96
|
+
## Used by
|
|
97
|
+
|
|
98
|
+
[krizaka.com](https://github.com/krizaka/krizaka-com) ·
|
|
99
|
+
[Orochia](https://github.com/krizaka/orochia) (through [`@krizaka/orochia-design-system`](https://github.com/krizaka/orochia-design-system)) ·
|
|
100
|
+
[Orazaka](https://github.com/krizaka/orazaka)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
Apache-2.0 · Part of [Krizaka](https://www.krizaka.com) — open source, closed to compromise.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface MarkProps {
|
|
4
|
+
/** Width and height in pixels. */
|
|
5
|
+
size?: number;
|
|
6
|
+
/** Orbit, pulse and shimmer. Off with `false`; always off under prefers-reduced-motion. */
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
/** An accessible name (the mark becomes an image); without it the mark is decorative. */
|
|
9
|
+
title?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** The Krizaka mark: a hexagonal shield with a neural core, inside slow orbits. Blue accent: `--kz-accent`. */
|
|
14
|
+
declare function KrizakaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
/** The Orazaka mark: three shards orbiting slowly around an amber core that breathes. */
|
|
17
|
+
declare function OrazakaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The Orochia mark: the serpent (Orochi) coiled into an "O" around the flame it guards. The orbit turns, scales slide
|
|
21
|
+
* along the body, the eye and the flame breathe. Below 48 px it crops to the serpent: the orbits would be hairlines.
|
|
22
|
+
*/
|
|
23
|
+
declare function OrochiaLogo({ size, animated, title, className }: MarkProps): react.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type BrandId = "krizaka" | "orazaka" | "orochia";
|
|
26
|
+
/** The mark of a Krizaka brand by id — for navigation, cards and lists driven by data. */
|
|
27
|
+
declare function ProductLogo({ id, ...props }: MarkProps & {
|
|
28
|
+
id: BrandId;
|
|
29
|
+
}): react.JSX.Element;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Mount once at the root of the app. It reveals every `[data-reveal]` element as it enters the viewport — including
|
|
33
|
+
* elements added later, so client-side navigation needs nothing more — and feeds the pointer position to
|
|
34
|
+
* `.kz-spotlight` cards (`--spot-x`, `--spot-y`). One IntersectionObserver, one MutationObserver, one listener.
|
|
35
|
+
* Under prefers-reduced-motion everything is revealed at once.
|
|
36
|
+
*/
|
|
37
|
+
declare function MotionObserver(): null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A word that rolls through alternatives — the Krizaka headline signature. The server render and the first client
|
|
41
|
+
* render show the first word; under prefers-reduced-motion it stays put. Decorative (`aria-hidden`): give the
|
|
42
|
+
* heading a stable accessible label.
|
|
43
|
+
*/
|
|
44
|
+
declare function RotatingWord({ words, interval, className }: {
|
|
45
|
+
words: readonly string[];
|
|
46
|
+
interval?: number;
|
|
47
|
+
className?: string;
|
|
48
|
+
}): react.JSX.Element;
|
|
49
|
+
|
|
50
|
+
/** Joins class names, skipping the falsy ones. */
|
|
51
|
+
declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
52
|
+
|
|
53
|
+
export { type BrandId, KrizakaLogo, type MarkProps, MotionObserver, OrazakaLogo, OrochiaLogo, ProductLogo, RotatingWord, cx };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/marks/shared.ts
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
var neutral = (token, percent) => `var(${token}, color-mix(in srgb, currentColor ${percent}%, transparent))`;
|
|
6
|
+
function useIds(prefix, keys) {
|
|
7
|
+
const uid = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
8
|
+
return Object.fromEntries(keys.map((k) => [k, `${prefix}-${k}-${uid}`]));
|
|
9
|
+
}
|
|
10
|
+
var a11y = (title) => title ? { role: "img", "aria-label": title } : { "aria-hidden": true };
|
|
11
|
+
|
|
12
|
+
// src/marks/KrizakaLogo.tsx
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var CSS = `
|
|
15
|
+
.kzm-spin { transform-origin: 180px 180px; animation: kzm-spin 30s linear infinite; }
|
|
16
|
+
.kzm-pulse { animation: kzm-pulse 4s ease-in-out infinite; }
|
|
17
|
+
@keyframes kzm-spin { to { transform: rotate(360deg); } }
|
|
18
|
+
@keyframes kzm-pulse {
|
|
19
|
+
0%, 100% { filter: drop-shadow(0 0 8px hsla(217, 92%, 60%, .2)) drop-shadow(0 0 24px hsla(217, 92%, 60%, .06)); }
|
|
20
|
+
50% { filter: drop-shadow(0 0 12px hsla(217, 92%, 60%, .35)) drop-shadow(0 0 36px hsla(217, 92%, 60%, .12)); }
|
|
21
|
+
}
|
|
22
|
+
@media (prefers-reduced-motion: reduce) { .kzm-spin, .kzm-pulse { animation: none; } }
|
|
23
|
+
`;
|
|
24
|
+
function KrizakaLogo({ size = 32, animated = true, title, className }) {
|
|
25
|
+
const id = useIds("kzm", ["blue", "steel", "core", "ambient"]);
|
|
26
|
+
const accent = "var(--kz-accent, hsl(217, 92%, 60%))";
|
|
27
|
+
const m = (cls) => animated ? cls : void 0;
|
|
28
|
+
const pulse = (x, y) => ({ className: m("kzm-pulse"), style: { transformOrigin: `${x}px ${y}px` } });
|
|
29
|
+
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 400 400", fill: "none", xmlns: "http://www.w3.org/2000/svg", className, ...a11y(title), children: [
|
|
30
|
+
/* @__PURE__ */ jsx("style", { children: CSS }),
|
|
31
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: id.blue, x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: accent }),
|
|
34
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#60A5FA" })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: id.steel, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
37
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: neutral("--kz-text-secondary", 64) }),
|
|
38
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: neutral("--kz-text-muted", 38) })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ jsxs("radialGradient", { id: id.core, cx: "50%", cy: "50%", r: "50%", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#60A5FA", stopOpacity: "1" }),
|
|
42
|
+
/* @__PURE__ */ jsx("stop", { offset: "35%", stopColor: accent, stopOpacity: "0.7" }),
|
|
43
|
+
/* @__PURE__ */ jsx("stop", { offset: "65%", stopColor: accent, stopOpacity: "0.02" }),
|
|
44
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsxs("radialGradient", { id: id.ambient, cx: "50%", cy: "50%", r: "50%", children: [
|
|
47
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.08" }),
|
|
48
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" })
|
|
49
|
+
] })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ jsxs("g", { transform: "translate(20, 20)", children: [
|
|
52
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "180", r: "170", fill: `url(#${id.ambient})` }),
|
|
53
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "180", r: "160", stroke: neutral("--kz-border-strong", 16), strokeWidth: "1.5", strokeDasharray: "8 8", opacity: "0.6", className: m("kzm-spin") }),
|
|
54
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "180", r: "130", stroke: neutral("--kz-border-default", 10), strokeWidth: "1", opacity: "0.35" }),
|
|
55
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "180", r: "100", stroke: neutral("--kz-border-subtle", 6), strokeWidth: "1", strokeDasharray: "3 6", opacity: "0.3" }),
|
|
56
|
+
/* @__PURE__ */ jsx("line", { x1: "180", y1: "20", x2: "180", y2: "80", stroke: neutral("--kz-border-strong", 16), strokeWidth: "0.5", opacity: "0.2" }),
|
|
57
|
+
/* @__PURE__ */ jsx("line", { x1: "320", y1: "100", x2: "260", y2: "140", stroke: neutral("--kz-border-strong", 16), strokeWidth: "0.5", opacity: "0.2" }),
|
|
58
|
+
/* @__PURE__ */ jsx("line", { x1: "40", y1: "100", x2: "100", y2: "140", stroke: neutral("--kz-border-strong", 16), strokeWidth: "0.5", opacity: "0.2" }),
|
|
59
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "180", r: "55", fill: `url(#${id.core})`, ...pulse(180, 180) }),
|
|
60
|
+
/* @__PURE__ */ jsx("path", { d: "M180,80 L255,120 L255,200 L180,240 L105,200 L105,120 Z", stroke: `url(#${id.blue})`, strokeWidth: "3", strokeLinejoin: "round", opacity: "0.9" }),
|
|
61
|
+
/* @__PURE__ */ jsx("path", { d: "M180,105 L235,133 L235,187 L180,215 L125,187 L125,133 Z", stroke: `url(#${id.steel})`, strokeWidth: "2", strokeLinejoin: "round", opacity: "0.5" }),
|
|
62
|
+
/* @__PURE__ */ jsx("path", { d: "M255,120 L290,85 L310,100", stroke: `url(#${id.blue})`, strokeWidth: "5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
63
|
+
/* @__PURE__ */ jsx("path", { d: "M105,120 L70,85 L50,100", stroke: `url(#${id.steel})`, strokeWidth: "5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
64
|
+
/* @__PURE__ */ jsx("path", { d: "M180,240 L180,280 L200,295", stroke: `url(#${id.steel})`, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.5" }),
|
|
65
|
+
/* @__PURE__ */ jsx("path", { d: "M180,280 L160,295", stroke: `url(#${id.steel})`, strokeWidth: "3", strokeLinecap: "round", opacity: "0.5" }),
|
|
66
|
+
/* @__PURE__ */ jsx("line", { x1: "180", y1: "130", x2: "180", y2: "195", stroke: "#60A5FA", strokeWidth: "1.5", opacity: "0.3" }),
|
|
67
|
+
/* @__PURE__ */ jsx("line", { x1: "145", y1: "160", x2: "215", y2: "160", stroke: "#60A5FA", strokeWidth: "1.5", opacity: "0.3" }),
|
|
68
|
+
[[180, 130], [180, 195], [145, 160], [215, 160]].map(([x, y]) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: "3", fill: "#60A5FA", opacity: "0.5", ...pulse(x, y) }, `${x}-${y}`)),
|
|
69
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "160", r: "18", fill: "#1E40AF", ...pulse(180, 160) }),
|
|
70
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "160", r: "12", fill: "#3B82F6", ...pulse(180, 160) }),
|
|
71
|
+
/* @__PURE__ */ jsx("circle", { cx: "180", cy: "160", r: "5", fill: "#BFDBFE", ...pulse(180, 160) }),
|
|
72
|
+
/* @__PURE__ */ jsx("circle", { cx: "310", cy: "50", r: "2.5", fill: "#60A5FA", opacity: "0.6" }),
|
|
73
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "260", r: "2", fill: neutral("--kz-border-strong", 16), opacity: "0.4" })
|
|
74
|
+
] })
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// src/marks/OrazakaLogo.tsx
|
|
79
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
80
|
+
var CSS2 = `
|
|
81
|
+
.ozm-orbit { transform-box: view-box; transform-origin: 0 0; animation: ozm-orbit 35s linear infinite; }
|
|
82
|
+
.ozm-core { transform-box: fill-box; transform-origin: center; animation: ozm-core 2.5s ease-in-out infinite; }
|
|
83
|
+
@keyframes ozm-orbit { to { transform: rotate(360deg); } }
|
|
84
|
+
@keyframes ozm-core {
|
|
85
|
+
0%, 100% { transform: scale(1); opacity: .9; filter: drop-shadow(0 0 3px #f59e0b); }
|
|
86
|
+
50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px #f59e0b); }
|
|
87
|
+
}
|
|
88
|
+
@media (prefers-reduced-motion: reduce) { .ozm-orbit, .ozm-core { animation: none; } }
|
|
89
|
+
`;
|
|
90
|
+
function OrazakaLogo({ size = 28, animated = true, title, className }) {
|
|
91
|
+
const id = useIds("ozm", ["amber"]);
|
|
92
|
+
return /* @__PURE__ */ jsxs2("svg", { width: size, height: size, viewBox: "-66 -66 132 132", fill: "none", xmlns: "http://www.w3.org/2000/svg", className, ...a11y(title), children: [
|
|
93
|
+
/* @__PURE__ */ jsx2("style", { children: CSS2 }),
|
|
94
|
+
/* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsxs2("linearGradient", { id: id.amber, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
95
|
+
/* @__PURE__ */ jsx2("stop", { offset: "0%", stopColor: "#f59e0b" }),
|
|
96
|
+
/* @__PURE__ */ jsx2("stop", { offset: "100%", stopColor: "#b45309" })
|
|
97
|
+
] }) }),
|
|
98
|
+
/* @__PURE__ */ jsx2("circle", { r: "62", stroke: neutral("--kz-border-strong", 16), strokeWidth: "1.5", strokeDasharray: "6 6", opacity: "0.5" }),
|
|
99
|
+
/* @__PURE__ */ jsx2("circle", { r: "48", stroke: neutral("--kz-border-default", 10), strokeWidth: "1", opacity: "0.3" }),
|
|
100
|
+
/* @__PURE__ */ jsxs2("g", { className: animated ? "ozm-orbit" : void 0, children: [
|
|
101
|
+
/* @__PURE__ */ jsx2("path", { d: "M -24 -41.5 L 0 -55.4 L 24 -41.5 L 24 -24 L 14 -18.2 L 14 -35.7 L 0 -43.8 L -14 -35.7 L -14 -18.2", stroke: neutral("--kz-text-muted", 45), strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
102
|
+
/* @__PURE__ */ jsx2("path", { d: "M -48 0 L -38 17.3 L -14 31.2 L 0 23.1 L -10 17.3 L -24 9.2 L -24 -9.2", stroke: neutral("--kz-text-secondary", 70), strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
103
|
+
/* @__PURE__ */ jsx2("path", { d: "M 48 0 L 38 17.3 L 14 31.2 L 0 23.1 L 10 17.3 L 24 9.2 L 24 -9.2", stroke: `url(#${id.amber})`, strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsx2("circle", { r: "10", fill: `url(#${id.amber})`, className: animated ? "ozm-core" : void 0 })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/marks/orochia-geometry.ts
|
|
110
|
+
var OROCHIA = {
|
|
111
|
+
viewBox: "0 0 400 400",
|
|
112
|
+
croppedViewBox: "86 82 228 228",
|
|
113
|
+
offset: 20,
|
|
114
|
+
body: { x1: 70, y1: 290, x2: 290, y2: 70, stops: [["0%", "#7c3aed"], ["55%", "#d946ef"], ["100%", "#f472b6"]] },
|
|
115
|
+
flameGradient: { stops: [["0%", "#a855f7"], ["100%", "#f9a8d4"]] },
|
|
116
|
+
glow: { color: "#d946ef", opacity: 0.18 },
|
|
117
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
118
|
+
ring: { r: 134, width: 1 },
|
|
119
|
+
arc: "M259.8,142.8 A88,88 0 1 1 142.8,100.2",
|
|
120
|
+
neck: "M142.8,100.2 A88,88 0 0 1 187.7,92.3",
|
|
121
|
+
tail: "M187.7,92.3 A88,88 0 0 1 221.3,102.3",
|
|
122
|
+
scales: { color: "#fdf4ff", opacity: 0.45, width: 3, dash: "2 14" },
|
|
123
|
+
head: { cx: 253.9, cy: 130.1, rx: 13, ry: 20, rotate: -25 },
|
|
124
|
+
tongue: { d: "M245.4,112.0 L242.0,104.8 L235.0,101.5 M242.0,104.8 L244.0,97.3", color: "#f472b6" },
|
|
125
|
+
eye: { cx: 256.3, cy: 123.5, r: 4.5, color: "#fdf4ff" },
|
|
126
|
+
flame: {
|
|
127
|
+
translate: [127, 120],
|
|
128
|
+
scale: 4.4,
|
|
129
|
+
d: "M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/marks/OrochiaLogo.tsx
|
|
134
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
135
|
+
var CSS3 = `
|
|
136
|
+
.orom-spin { transform-origin: 180px 180px; animation: orom-spin 30s linear infinite; }
|
|
137
|
+
.orom-slither { animation: orom-slither 2.4s linear infinite; }
|
|
138
|
+
.orom-pulse { transform-box: view-box; animation: orom-pulse 3.2s ease-in-out infinite; }
|
|
139
|
+
@keyframes orom-spin { to { transform: rotate(360deg); } }
|
|
140
|
+
@keyframes orom-slither { to { stroke-dashoffset: -64; } }
|
|
141
|
+
@keyframes orom-pulse {
|
|
142
|
+
0%, 100% { filter: drop-shadow(0 0 6px hsla(292, 84%, 61%, .25)); opacity: .9; }
|
|
143
|
+
50% { filter: drop-shadow(0 0 14px hsla(292, 84%, 61%, .55)); opacity: 1; }
|
|
144
|
+
}
|
|
145
|
+
@media (prefers-reduced-motion: reduce) { .orom-spin, .orom-slither, .orom-pulse { animation: none; } }
|
|
146
|
+
`;
|
|
147
|
+
function OrochiaLogo({ size = 36, animated = true, title, className }) {
|
|
148
|
+
const id = useIds("orom", ["body", "flame", "glow"]);
|
|
149
|
+
const m = (cls) => animated ? cls : void 0;
|
|
150
|
+
return /* @__PURE__ */ jsxs3("svg", { width: size, height: size, viewBox: size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox, fill: "none", xmlns: "http://www.w3.org/2000/svg", className, ...a11y(title), children: [
|
|
151
|
+
/* @__PURE__ */ jsx3("style", { children: CSS3 }),
|
|
152
|
+
/* @__PURE__ */ jsxs3("defs", { children: [
|
|
153
|
+
/* @__PURE__ */ jsx3("linearGradient", { id: id.body, gradientUnits: "userSpaceOnUse", x1: OROCHIA.body.x1, y1: OROCHIA.body.y1, x2: OROCHIA.body.x2, y2: OROCHIA.body.y2, children: OROCHIA.body.stops.map(([offset, color]) => /* @__PURE__ */ jsx3("stop", { offset, stopColor: color }, offset)) }),
|
|
154
|
+
/* @__PURE__ */ jsx3("linearGradient", { id: id.flame, x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx3("stop", { offset, stopColor: color }, offset)) }),
|
|
155
|
+
/* @__PURE__ */ jsxs3("radialGradient", { id: id.glow, cx: "50%", cy: "50%", r: "50%", children: [
|
|
156
|
+
/* @__PURE__ */ jsx3("stop", { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
157
|
+
/* @__PURE__ */ jsx3("stop", { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: "0" })
|
|
158
|
+
] })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs3("g", { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
161
|
+
/* @__PURE__ */ jsx3("circle", { cx: "180", cy: "180", r: "170", fill: `url(#${id.glow})` }),
|
|
162
|
+
/* @__PURE__ */ jsx3("circle", { className: m("orom-spin"), cx: "180", cy: "180", r: OROCHIA.orbit.r, stroke: neutral("--kz-border-strong", 40), strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: ".6" }),
|
|
163
|
+
/* @__PURE__ */ jsx3("circle", { cx: "180", cy: "180", r: OROCHIA.ring.r, stroke: neutral("--kz-border-default", 30), strokeWidth: OROCHIA.ring.width, opacity: ".35" }),
|
|
164
|
+
/* @__PURE__ */ jsx3("path", { d: OROCHIA.arc, stroke: `url(#${id.body})`, strokeWidth: "22", strokeLinecap: "round" }),
|
|
165
|
+
/* @__PURE__ */ jsx3("path", { className: m("orom-slither"), d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash }),
|
|
166
|
+
/* @__PURE__ */ jsx3("path", { d: OROCHIA.neck, stroke: `url(#${id.body})`, strokeWidth: "14", strokeLinecap: "round" }),
|
|
167
|
+
/* @__PURE__ */ jsx3("path", { d: OROCHIA.tail, stroke: `url(#${id.body})`, strokeWidth: "6", strokeLinecap: "round" }),
|
|
168
|
+
/* @__PURE__ */ jsx3("ellipse", { cx: OROCHIA.head.cx, cy: OROCHIA.head.cy, rx: OROCHIA.head.rx, ry: OROCHIA.head.ry, transform: `rotate(${OROCHIA.head.rotate} ${OROCHIA.head.cx} ${OROCHIA.head.cy})`, fill: `url(#${id.body})` }),
|
|
169
|
+
/* @__PURE__ */ jsx3("path", { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: "3", strokeLinecap: "round" }),
|
|
170
|
+
/* @__PURE__ */ jsx3("circle", { className: m("orom-pulse"), cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
171
|
+
/* @__PURE__ */ jsx3("path", { className: m("orom-pulse"), transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, d: OROCHIA.flame.d, fill: `url(#${id.flame})` })
|
|
172
|
+
] })
|
|
173
|
+
] });
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/marks/ProductLogo.tsx
|
|
177
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
178
|
+
function ProductLogo({ id, ...props }) {
|
|
179
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx4(KrizakaLogo, { ...props });
|
|
180
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx4(OrazakaLogo, { ...props });
|
|
181
|
+
return /* @__PURE__ */ jsx4(OrochiaLogo, { ...props });
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/motion/MotionObserver.tsx
|
|
185
|
+
import { useEffect } from "react";
|
|
186
|
+
function MotionObserver() {
|
|
187
|
+
useEffect(() => {
|
|
188
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
189
|
+
const revealAll = (root) => root.querySelectorAll("[data-reveal]").forEach((el) => el.classList.add("kz-in"));
|
|
190
|
+
revealAll(document);
|
|
191
|
+
const mo2 = new MutationObserver(() => revealAll(document));
|
|
192
|
+
mo2.observe(document.body, { childList: true, subtree: true });
|
|
193
|
+
return () => mo2.disconnect();
|
|
194
|
+
}
|
|
195
|
+
const io = new IntersectionObserver(
|
|
196
|
+
(entries) => {
|
|
197
|
+
for (const entry of entries) {
|
|
198
|
+
if (!entry.isIntersecting) continue;
|
|
199
|
+
entry.target.classList.add("kz-in");
|
|
200
|
+
io.unobserve(entry.target);
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{ rootMargin: "0px 0px -8% 0px", threshold: 0.12 }
|
|
204
|
+
);
|
|
205
|
+
const watch = (root) => root.querySelectorAll("[data-reveal]:not(.kz-in)").forEach((el) => io.observe(el));
|
|
206
|
+
watch(document);
|
|
207
|
+
const mo = new MutationObserver((records) => {
|
|
208
|
+
for (const r of records) r.addedNodes.forEach((n) => n instanceof Element && (n.matches("[data-reveal]") ? io.observe(n) : watch(n)));
|
|
209
|
+
});
|
|
210
|
+
mo.observe(document.body, { childList: true, subtree: true });
|
|
211
|
+
return () => {
|
|
212
|
+
io.disconnect();
|
|
213
|
+
mo.disconnect();
|
|
214
|
+
};
|
|
215
|
+
}, []);
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
const move = (e) => {
|
|
218
|
+
const card = e.target?.closest?.(".kz-spotlight");
|
|
219
|
+
if (!card) return;
|
|
220
|
+
const box = card.getBoundingClientRect();
|
|
221
|
+
card.style.setProperty("--spot-x", `${e.clientX - box.left}px`);
|
|
222
|
+
card.style.setProperty("--spot-y", `${e.clientY - box.top}px`);
|
|
223
|
+
};
|
|
224
|
+
document.addEventListener("pointermove", move, { passive: true });
|
|
225
|
+
return () => document.removeEventListener("pointermove", move);
|
|
226
|
+
}, []);
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// src/motion/RotatingWord.tsx
|
|
231
|
+
import { useEffect as useEffect2, useState } from "react";
|
|
232
|
+
|
|
233
|
+
// src/cx.ts
|
|
234
|
+
function cx(...parts) {
|
|
235
|
+
return parts.filter(Boolean).join(" ");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/motion/RotatingWord.tsx
|
|
239
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
240
|
+
function RotatingWord({ words, interval = 2600, className }) {
|
|
241
|
+
const [i, setI] = useState(0);
|
|
242
|
+
useEffect2(() => {
|
|
243
|
+
if (words.length < 2 || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
244
|
+
const timer = setInterval(() => setI((k) => (k + 1) % words.length), interval);
|
|
245
|
+
return () => clearInterval(timer);
|
|
246
|
+
}, [words.length, interval]);
|
|
247
|
+
return /* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: "kz-rotating", children: /* @__PURE__ */ jsx5("span", { className: cx("kz-word", className), children: words[i] }, i) });
|
|
248
|
+
}
|
|
249
|
+
export {
|
|
250
|
+
KrizakaLogo,
|
|
251
|
+
MotionObserver,
|
|
252
|
+
OrazakaLogo,
|
|
253
|
+
OrochiaLogo,
|
|
254
|
+
ProductLogo,
|
|
255
|
+
RotatingWord,
|
|
256
|
+
cx
|
|
257
|
+
};
|
|
258
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/marks/shared.ts","../src/marks/KrizakaLogo.tsx","../src/marks/OrazakaLogo.tsx","../src/marks/orochia-geometry.ts","../src/marks/OrochiaLogo.tsx","../src/marks/ProductLogo.tsx","../src/motion/MotionObserver.tsx","../src/motion/RotatingWord.tsx","../src/cx.ts"],"sourcesContent":["import { useId } from \"react\";\n\nexport interface MarkProps {\n /** Width and height in pixels. */\n size?: number;\n /** Orbit, pulse and shimmer. Off with `false`; always off under prefers-reduced-motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n className?: string;\n}\n\n/** A neutral stroke: the host's `--kz-*` token when it has one, else the text colour at a low opacity. */\nexport const neutral = (token: string, percent: number) => `var(${token}, color-mix(in srgb, currentColor ${percent}%, transparent))`;\n\n/** Ids unique per instance, so several marks on a page never share a gradient. */\nexport function useIds<K extends string>(prefix: string, keys: readonly K[]): Record<K, string> {\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n return Object.fromEntries(keys.map((k) => [k, `${prefix}-${k}-${uid}`])) as Record<K, string>;\n}\n\nexport const a11y = (title?: string) => (title ? { role: \"img\" as const, \"aria-label\": title } : { \"aria-hidden\": true as const });\n","import { a11y, neutral, useIds, type MarkProps } from \"./shared\";\n\nconst CSS = `\n.kzm-spin { transform-origin: 180px 180px; animation: kzm-spin 30s linear infinite; }\n.kzm-pulse { animation: kzm-pulse 4s ease-in-out infinite; }\n@keyframes kzm-spin { to { transform: rotate(360deg); } }\n@keyframes kzm-pulse {\n 0%, 100% { filter: drop-shadow(0 0 8px hsla(217, 92%, 60%, .2)) drop-shadow(0 0 24px hsla(217, 92%, 60%, .06)); }\n 50% { filter: drop-shadow(0 0 12px hsla(217, 92%, 60%, .35)) drop-shadow(0 0 36px hsla(217, 92%, 60%, .12)); }\n}\n@media (prefers-reduced-motion: reduce) { .kzm-spin, .kzm-pulse { animation: none; } }\n`;\n\n/** The Krizaka mark: a hexagonal shield with a neural core, inside slow orbits. Blue accent: `--kz-accent`. */\nexport function KrizakaLogo({ size = 32, animated = true, title, className }: MarkProps) {\n const id = useIds(\"kzm\", [\"blue\", \"steel\", \"core\", \"ambient\"] as const);\n const accent = \"var(--kz-accent, hsl(217, 92%, 60%))\";\n const m = (cls: string) => (animated ? cls : undefined);\n const pulse = (x: number, y: number) => ({ className: m(\"kzm-pulse\"), style: { transformOrigin: `${x}px ${y}px` } });\n return (\n <svg width={size} height={size} viewBox=\"0 0 400 400\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <style>{CSS}</style>\n <defs>\n <linearGradient id={id.blue} x1=\"0%\" y1=\"100%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={accent} />\n <stop offset=\"100%\" stopColor=\"#60A5FA\" />\n </linearGradient>\n <linearGradient id={id.steel} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={neutral(\"--kz-text-secondary\", 64)} />\n <stop offset=\"100%\" stopColor={neutral(\"--kz-text-muted\", 38)} />\n </linearGradient>\n <radialGradient id={id.core} cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" stopColor=\"#60A5FA\" stopOpacity=\"1\" />\n <stop offset=\"35%\" stopColor={accent} stopOpacity=\"0.7\" />\n <stop offset=\"65%\" stopColor={accent} stopOpacity=\"0.02\" />\n <stop offset=\"100%\" stopColor={accent} stopOpacity=\"0\" />\n </radialGradient>\n <radialGradient id={id.ambient} cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" stopColor={accent} stopOpacity=\"0.08\" />\n <stop offset=\"100%\" stopColor={accent} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n <g transform=\"translate(20, 20)\">\n <circle cx=\"180\" cy=\"180\" r=\"170\" fill={`url(#${id.ambient})`} />\n <circle cx=\"180\" cy=\"180\" r=\"160\" stroke={neutral(\"--kz-border-strong\", 16)} strokeWidth=\"1.5\" strokeDasharray=\"8 8\" opacity=\"0.6\" className={m(\"kzm-spin\")} />\n <circle cx=\"180\" cy=\"180\" r=\"130\" stroke={neutral(\"--kz-border-default\", 10)} strokeWidth=\"1\" opacity=\"0.35\" />\n <circle cx=\"180\" cy=\"180\" r=\"100\" stroke={neutral(\"--kz-border-subtle\", 6)} strokeWidth=\"1\" strokeDasharray=\"3 6\" opacity=\"0.3\" />\n <line x1=\"180\" y1=\"20\" x2=\"180\" y2=\"80\" stroke={neutral(\"--kz-border-strong\", 16)} strokeWidth=\"0.5\" opacity=\"0.2\" />\n <line x1=\"320\" y1=\"100\" x2=\"260\" y2=\"140\" stroke={neutral(\"--kz-border-strong\", 16)} strokeWidth=\"0.5\" opacity=\"0.2\" />\n <line x1=\"40\" y1=\"100\" x2=\"100\" y2=\"140\" stroke={neutral(\"--kz-border-strong\", 16)} strokeWidth=\"0.5\" opacity=\"0.2\" />\n <circle cx=\"180\" cy=\"180\" r=\"55\" fill={`url(#${id.core})`} {...pulse(180, 180)} />\n <path d=\"M180,80 L255,120 L255,200 L180,240 L105,200 L105,120 Z\" stroke={`url(#${id.blue})`} strokeWidth=\"3\" strokeLinejoin=\"round\" opacity=\"0.9\" />\n <path d=\"M180,105 L235,133 L235,187 L180,215 L125,187 L125,133 Z\" stroke={`url(#${id.steel})`} strokeWidth=\"2\" strokeLinejoin=\"round\" opacity=\"0.5\" />\n <path d=\"M255,120 L290,85 L310,100\" stroke={`url(#${id.blue})`} strokeWidth=\"5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M105,120 L70,85 L50,100\" stroke={`url(#${id.steel})`} strokeWidth=\"5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M180,240 L180,280 L200,295\" stroke={`url(#${id.steel})`} strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\" opacity=\"0.5\" />\n <path d=\"M180,280 L160,295\" stroke={`url(#${id.steel})`} strokeWidth=\"3\" strokeLinecap=\"round\" opacity=\"0.5\" />\n <line x1=\"180\" y1=\"130\" x2=\"180\" y2=\"195\" stroke=\"#60A5FA\" strokeWidth=\"1.5\" opacity=\"0.3\" />\n <line x1=\"145\" y1=\"160\" x2=\"215\" y2=\"160\" stroke=\"#60A5FA\" strokeWidth=\"1.5\" opacity=\"0.3\" />\n {[[180, 130], [180, 195], [145, 160], [215, 160]].map(([x, y]) => (\n <circle key={`${x}-${y}`} cx={x} cy={y} r=\"3\" fill=\"#60A5FA\" opacity=\"0.5\" {...pulse(x, y)} />\n ))}\n <circle cx=\"180\" cy=\"160\" r=\"18\" fill=\"#1E40AF\" {...pulse(180, 160)} />\n <circle cx=\"180\" cy=\"160\" r=\"12\" fill=\"#3B82F6\" {...pulse(180, 160)} />\n <circle cx=\"180\" cy=\"160\" r=\"5\" fill=\"#BFDBFE\" {...pulse(180, 160)} />\n <circle cx=\"310\" cy=\"50\" r=\"2.5\" fill=\"#60A5FA\" opacity=\"0.6\" />\n <circle cx=\"50\" cy=\"260\" r=\"2\" fill={neutral(\"--kz-border-strong\", 16)} opacity=\"0.4\" />\n </g>\n </svg>\n );\n}\n","import { a11y, neutral, useIds, type MarkProps } from \"./shared\";\n\nconst CSS = `\n.ozm-orbit { transform-box: view-box; transform-origin: 0 0; animation: ozm-orbit 35s linear infinite; }\n.ozm-core { transform-box: fill-box; transform-origin: center; animation: ozm-core 2.5s ease-in-out infinite; }\n@keyframes ozm-orbit { to { transform: rotate(360deg); } }\n@keyframes ozm-core {\n 0%, 100% { transform: scale(1); opacity: .9; filter: drop-shadow(0 0 3px #f59e0b); }\n 50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px #f59e0b); }\n}\n@media (prefers-reduced-motion: reduce) { .ozm-orbit, .ozm-core { animation: none; } }\n`;\n\n/** The Orazaka mark: three shards orbiting slowly around an amber core that breathes. */\nexport function OrazakaLogo({ size = 28, animated = true, title, className }: MarkProps) {\n const id = useIds(\"ozm\", [\"amber\"] as const);\n return (\n <svg width={size} height={size} viewBox=\"-66 -66 132 132\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <style>{CSS}</style>\n <defs>\n <linearGradient id={id.amber} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0%\" stopColor=\"#f59e0b\" />\n <stop offset=\"100%\" stopColor=\"#b45309\" />\n </linearGradient>\n </defs>\n <circle r=\"62\" stroke={neutral(\"--kz-border-strong\", 16)} strokeWidth=\"1.5\" strokeDasharray=\"6 6\" opacity=\"0.5\" />\n <circle r=\"48\" stroke={neutral(\"--kz-border-default\", 10)} strokeWidth=\"1\" opacity=\"0.3\" />\n <g className={animated ? \"ozm-orbit\" : undefined}>\n <path d=\"M -24 -41.5 L 0 -55.4 L 24 -41.5 L 24 -24 L 14 -18.2 L 14 -35.7 L 0 -43.8 L -14 -35.7 L -14 -18.2\" stroke={neutral(\"--kz-text-muted\", 45)} strokeWidth=\"3.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M -48 0 L -38 17.3 L -14 31.2 L 0 23.1 L -10 17.3 L -24 9.2 L -24 -9.2\" stroke={neutral(\"--kz-text-secondary\", 70)} strokeWidth=\"3.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M 48 0 L 38 17.3 L 14 31.2 L 0 23.1 L 10 17.3 L 24 9.2 L 24 -9.2\" stroke={`url(#${id.amber})`} strokeWidth=\"3.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </g>\n <circle r=\"10\" fill={`url(#${id.amber})`} className={animated ? \"ozm-core\" : undefined} />\n </svg>\n );\n}\n","/**\n * The Orochia mark's geometry — the one description of the serpent and its flame, drawn by the web mark (SVG in the\n * DOM, OrochiaLogo) and the native one (react-native-svg, @krizaka/ui/native). Coordinates are in the 360×360 artwork,\n * placed at (20, 20) in a 400×400 view box; below 48 px the view box crops to the serpent.\n */\nexport const OROCHIA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"86 82 228 228\",\n offset: 20,\n body: { x1: 70, y1: 290, x2: 290, y2: 70, stops: [[\"0%\", \"#7c3aed\"], [\"55%\", \"#d946ef\"], [\"100%\", \"#f472b6\"]] },\n flameGradient: { stops: [[\"0%\", \"#a855f7\"], [\"100%\", \"#f9a8d4\"]] },\n glow: { color: \"#d946ef\", opacity: 0.18 },\n orbit: { r: 160, dash: \"8 8\", width: 1.5 },\n ring: { r: 134, width: 1 },\n arc: \"M259.8,142.8 A88,88 0 1 1 142.8,100.2\",\n neck: \"M142.8,100.2 A88,88 0 0 1 187.7,92.3\",\n tail: \"M187.7,92.3 A88,88 0 0 1 221.3,102.3\",\n scales: { color: \"#fdf4ff\", opacity: 0.45, width: 3, dash: \"2 14\" },\n head: { cx: 253.9, cy: 130.1, rx: 13, ry: 20, rotate: -25 },\n tongue: { d: \"M245.4,112.0 L242.0,104.8 L235.0,101.5 M242.0,104.8 L244.0,97.3\", color: \"#f472b6\" },\n eye: { cx: 256.3, cy: 123.5, r: 4.5, color: \"#fdf4ff\" },\n flame: {\n translate: [127, 120] as const,\n scale: 4.4,\n d: \"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z\",\n },\n} as const;\n","import { a11y, neutral, useIds, type MarkProps } from \"./shared\";\nimport { OROCHIA as G } from \"./orochia-geometry\";\n\nconst CSS = `\n.orom-spin { transform-origin: 180px 180px; animation: orom-spin 30s linear infinite; }\n.orom-slither { animation: orom-slither 2.4s linear infinite; }\n.orom-pulse { transform-box: view-box; animation: orom-pulse 3.2s ease-in-out infinite; }\n@keyframes orom-spin { to { transform: rotate(360deg); } }\n@keyframes orom-slither { to { stroke-dashoffset: -64; } }\n@keyframes orom-pulse {\n 0%, 100% { filter: drop-shadow(0 0 6px hsla(292, 84%, 61%, .25)); opacity: .9; }\n 50% { filter: drop-shadow(0 0 14px hsla(292, 84%, 61%, .55)); opacity: 1; }\n}\n@media (prefers-reduced-motion: reduce) { .orom-spin, .orom-slither, .orom-pulse { animation: none; } }\n`;\n\n/**\n * The Orochia mark: the serpent (Orochi) coiled into an \"O\" around the flame it guards. The orbit turns, scales slide\n * along the body, the eye and the flame breathe. Below 48 px it crops to the serpent: the orbits would be hairlines.\n */\nexport function OrochiaLogo({ size = 36, animated = true, title, className }: MarkProps) {\n const id = useIds(\"orom\", [\"body\", \"flame\", \"glow\"] as const);\n const m = (cls: string) => (animated ? cls : undefined);\n return (\n <svg width={size} height={size} viewBox={size < 48 ? G.croppedViewBox : G.viewBox} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={className} {...a11y(title)}>\n <style>{CSS}</style>\n <defs>\n <linearGradient id={id.body} gradientUnits=\"userSpaceOnUse\" x1={G.body.x1} y1={G.body.y1} x2={G.body.x2} y2={G.body.y2}>\n {G.body.stops.map(([offset, color]) => (\n <stop key={offset} offset={offset} stopColor={color} />\n ))}\n </linearGradient>\n <linearGradient id={id.flame} x1=\"50%\" y1=\"100%\" x2=\"50%\" y2=\"0%\">\n {G.flameGradient.stops.map(([offset, color]) => (\n <stop key={offset} offset={offset} stopColor={color} />\n ))}\n </linearGradient>\n <radialGradient id={id.glow} cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" stopColor={G.glow.color} stopOpacity={G.glow.opacity} />\n <stop offset=\"100%\" stopColor={G.glow.color} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n <g transform={`translate(${G.offset} ${G.offset})`}>\n <circle cx=\"180\" cy=\"180\" r=\"170\" fill={`url(#${id.glow})`} />\n <circle className={m(\"orom-spin\")} cx=\"180\" cy=\"180\" r={G.orbit.r} stroke={neutral(\"--kz-border-strong\", 40)} strokeWidth={G.orbit.width} strokeDasharray={G.orbit.dash} opacity=\".6\" />\n <circle cx=\"180\" cy=\"180\" r={G.ring.r} stroke={neutral(\"--kz-border-default\", 30)} strokeWidth={G.ring.width} opacity=\".35\" />\n <path d={G.arc} stroke={`url(#${id.body})`} strokeWidth=\"22\" strokeLinecap=\"round\" />\n <path className={m(\"orom-slither\")} d={G.arc} stroke={G.scales.color} strokeOpacity={G.scales.opacity} strokeWidth={G.scales.width} strokeLinecap=\"round\" strokeDasharray={G.scales.dash} />\n <path d={G.neck} stroke={`url(#${id.body})`} strokeWidth=\"14\" strokeLinecap=\"round\" />\n <path d={G.tail} stroke={`url(#${id.body})`} strokeWidth=\"6\" strokeLinecap=\"round\" />\n <ellipse cx={G.head.cx} cy={G.head.cy} rx={G.head.rx} ry={G.head.ry} transform={`rotate(${G.head.rotate} ${G.head.cx} ${G.head.cy})`} fill={`url(#${id.body})`} />\n <path d={G.tongue.d} stroke={G.tongue.color} strokeWidth=\"3\" strokeLinecap=\"round\" />\n <circle className={m(\"orom-pulse\")} cx={G.eye.cx} cy={G.eye.cy} r={G.eye.r} fill={G.eye.color} />\n <path className={m(\"orom-pulse\")} transform={`translate(${G.flame.translate[0]} ${G.flame.translate[1]}) scale(${G.flame.scale})`} d={G.flame.d} fill={`url(#${id.flame})`} />\n </g>\n </svg>\n );\n}\n","import { KrizakaLogo } from \"./KrizakaLogo\";\nimport { OrazakaLogo } from \"./OrazakaLogo\";\nimport { OrochiaLogo } from \"./OrochiaLogo\";\nimport type { MarkProps } from \"./shared\";\n\nexport type BrandId = \"krizaka\" | \"orazaka\" | \"orochia\";\n\n/** The mark of a Krizaka brand by id — for navigation, cards and lists driven by data. */\nexport function ProductLogo({ id, ...props }: MarkProps & { id: BrandId }) {\n if (id === \"krizaka\") return <KrizakaLogo {...props} />;\n if (id === \"orazaka\") return <OrazakaLogo {...props} />;\n return <OrochiaLogo {...props} />;\n}\n","import { useEffect } from \"react\";\n\n/**\n * Mount once at the root of the app. It reveals every `[data-reveal]` element as it enters the viewport — including\n * elements added later, so client-side navigation needs nothing more — and feeds the pointer position to\n * `.kz-spotlight` cards (`--spot-x`, `--spot-y`). One IntersectionObserver, one MutationObserver, one listener.\n * Under prefers-reduced-motion everything is revealed at once.\n */\nexport function MotionObserver(): null {\n useEffect(() => {\n if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) {\n const revealAll = (root: ParentNode) => root.querySelectorAll(\"[data-reveal]\").forEach((el) => el.classList.add(\"kz-in\"));\n revealAll(document);\n const mo = new MutationObserver(() => revealAll(document));\n mo.observe(document.body, { childList: true, subtree: true });\n return () => mo.disconnect();\n }\n const io = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (!entry.isIntersecting) continue;\n entry.target.classList.add(\"kz-in\");\n io.unobserve(entry.target);\n }\n },\n { rootMargin: \"0px 0px -8% 0px\", threshold: 0.12 },\n );\n const watch = (root: ParentNode) => root.querySelectorAll(\"[data-reveal]:not(.kz-in)\").forEach((el) => io.observe(el));\n watch(document);\n const mo = new MutationObserver((records) => {\n for (const r of records) r.addedNodes.forEach((n) => n instanceof Element && (n.matches(\"[data-reveal]\") ? io.observe(n) : watch(n)));\n });\n mo.observe(document.body, { childList: true, subtree: true });\n return () => {\n io.disconnect();\n mo.disconnect();\n };\n }, []);\n\n useEffect(() => {\n const move = (e: PointerEvent) => {\n const card = (e.target as Element | null)?.closest?.(\".kz-spotlight\") as HTMLElement | null;\n if (!card) return;\n const box = card.getBoundingClientRect();\n card.style.setProperty(\"--spot-x\", `${e.clientX - box.left}px`);\n card.style.setProperty(\"--spot-y\", `${e.clientY - box.top}px`);\n };\n document.addEventListener(\"pointermove\", move, { passive: true });\n return () => document.removeEventListener(\"pointermove\", move);\n }, []);\n\n return null;\n}\n","import { useEffect, useState } from \"react\";\nimport { cx } from \"../cx\";\n\n/**\n * A word that rolls through alternatives — the Krizaka headline signature. The server render and the first client\n * render show the first word; under prefers-reduced-motion it stays put. Decorative (`aria-hidden`): give the\n * heading a stable accessible label.\n */\nexport function RotatingWord({ words, interval = 2600, className }: { words: readonly string[]; interval?: number; className?: string }) {\n const [i, setI] = useState(0);\n useEffect(() => {\n if (words.length < 2 || window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n const timer = setInterval(() => setI((k) => (k + 1) % words.length), interval);\n return () => clearInterval(timer);\n }, [words.length, interval]);\n return (\n <span aria-hidden className=\"kz-rotating\">\n <span key={i} className={cx(\"kz-word\", className)}>\n {words[i]}\n </span>\n </span>\n );\n}\n","/** Joins class names, skipping the falsy ones. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(\" \");\n}\n"],"mappings":";;;AAAA,SAAS,aAAa;AAaf,IAAM,UAAU,CAAC,OAAe,YAAoB,OAAO,KAAK,qCAAqC,OAAO;AAG5G,SAAS,OAAyB,QAAgB,MAAuC;AAC9F,QAAM,MAAM,MAAM,EAAE,QAAQ,mBAAmB,EAAE;AACjD,SAAO,OAAO,YAAY,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;AACzE;AAEO,IAAM,OAAO,CAAC,UAAoB,QAAQ,EAAE,MAAM,OAAgB,cAAc,MAAM,IAAI,EAAE,eAAe,KAAc;;;ACA1H,cAEE,YAFF;AAnBN,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYL,SAAS,YAAY,EAAE,OAAO,IAAI,WAAW,MAAM,OAAO,UAAU,GAAc;AACvF,QAAM,KAAK,OAAO,OAAO,CAAC,QAAQ,SAAS,QAAQ,SAAS,CAAU;AACtE,QAAM,SAAS;AACf,QAAM,IAAI,CAAC,QAAiB,WAAW,MAAM;AAC7C,QAAM,QAAQ,CAAC,GAAW,OAAe,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,EAAE,iBAAiB,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE;AAClH,SACE,qBAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,SAAQ,eAAc,MAAK,QAAO,OAAM,8BAA6B,WAAuB,GAAG,KAAK,KAAK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AAe,IAAI;AAAA,EAC/D,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;;;ACpDA,SAAS,aAAAC,YAAW,gBAAgB;;;ACC7B,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;ADcM,gBAAAC,YAAA;AATC,SAAS,aAAa,EAAE,OAAO,WAAW,MAAM,UAAU,GAAwE;AACvI,QAAM,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC;AAC5B,EAAAC,WAAU,MAAM;AACd,QAAI,MAAM,SAAS,KAAK,OAAO,WAAW,kCAAkC,EAAE,QAAS;AACvF,UAAM,QAAQ,YAAY,MAAM,KAAK,CAAC,OAAO,IAAI,KAAK,MAAM,MAAM,GAAG,QAAQ;AAC7E,WAAO,MAAM,cAAc,KAAK;AAAA,EAClC,GAAG,CAAC,MAAM,QAAQ,QAAQ,CAAC;AAC3B,SACE,gBAAAD,KAAC,UAAK,eAAW,MAAC,WAAU,eAC1B,0BAAAA,KAAC,UAAa,WAAW,GAAG,WAAW,SAAS,GAC7C,gBAAM,CAAC,KADC,CAEX,GACF;AAEJ;","names":["jsx","jsxs","CSS","jsx","jsxs","CSS","jsx","mo","useEffect","jsx","useEffect"]}
|
package/dist/motion.css
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* @krizaka/ui — the Krizaka motion signature.
|
|
2
|
+
One easing (--kz-ease); pages that enter; sections that rise into view ([data-reveal] + MotionObserver); words
|
|
3
|
+
that roll (RotatingWord); a sheen across primary actions; a spotlight that follows the pointer; cards that lift;
|
|
4
|
+
bands that slide; and one vocabulary for what opens over the page (overlay, dialog, pop, fade).
|
|
5
|
+
Plain CSS, no framework: import "@krizaka/ui/motion.css" once. Everything stops under prefers-reduced-motion.
|
|
6
|
+
Tailwind v4: `--default-transition-timing-function: var(--kz-ease)` in @theme gives every transition the easing. */
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--kz-ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Page entrance (app/template.tsx re-mounts on every navigation). */
|
|
13
|
+
.kz-page {
|
|
14
|
+
/* backwards, not both: a filled transform animation would anchor every position:fixed descendant to the page. */
|
|
15
|
+
animation: kz-page-in 0.5s var(--kz-ease) backwards;
|
|
16
|
+
}
|
|
17
|
+
@keyframes kz-page-in {
|
|
18
|
+
from { opacity: 0; transform: translateY(10px); }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Reveal on scroll: [data-reveal] rises into place when it enters the viewport (MotionObserver adds .kz-in). */
|
|
22
|
+
[data-reveal] {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
transform: translateY(22px);
|
|
25
|
+
filter: blur(4px);
|
|
26
|
+
transition: opacity 0.8s var(--kz-ease), transform 0.8s var(--kz-ease), filter 0.8s var(--kz-ease);
|
|
27
|
+
transition-delay: var(--kz-delay, 0ms);
|
|
28
|
+
}
|
|
29
|
+
[data-reveal].kz-in {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
transform: none;
|
|
32
|
+
filter: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* A word that rolls in (RotatingWord). */
|
|
36
|
+
.kz-word {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
animation: kz-word-in 0.6s var(--kz-ease) both;
|
|
39
|
+
}
|
|
40
|
+
@keyframes kz-word-in {
|
|
41
|
+
from { opacity: 0; transform: translateY(70%); filter: blur(6px); }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* RotatingWord: the alternatives share one grid cell, the current one rolls in. */
|
|
45
|
+
.kz-rotating {
|
|
46
|
+
display: inline-grid;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
padding-bottom: 0.08em;
|
|
49
|
+
vertical-align: bottom;
|
|
50
|
+
}
|
|
51
|
+
.kz-rotating > .kz-word {
|
|
52
|
+
grid-area: 1 / 1;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Sheen across a primary action on hover. */
|
|
57
|
+
.kz-sheen {
|
|
58
|
+
position: relative;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
isolation: isolate;
|
|
61
|
+
}
|
|
62
|
+
.kz-sheen::after {
|
|
63
|
+
content: "";
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset: -20% auto -20% 0;
|
|
66
|
+
width: 40%;
|
|
67
|
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
@media (hover: hover) and (pointer: fine) {
|
|
72
|
+
.kz-sheen:hover::after {
|
|
73
|
+
animation: kz-sheen-sweep 760ms var(--kz-ease);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
@keyframes kz-sheen-sweep {
|
|
77
|
+
0% { opacity: 0; transform: translateX(-160%) skewX(-18deg); }
|
|
78
|
+
18% { opacity: 1; }
|
|
79
|
+
100% { opacity: 0; transform: translateX(360%) skewX(-18deg); }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Spotlight: a soft accent bloom follows the pointer across a card (MotionObserver writes --spot-x/--spot-y). */
|
|
83
|
+
.kz-spotlight {
|
|
84
|
+
position: relative;
|
|
85
|
+
}
|
|
86
|
+
.kz-spotlight::before {
|
|
87
|
+
content: "";
|
|
88
|
+
position: absolute;
|
|
89
|
+
inset: 0;
|
|
90
|
+
border-radius: inherit;
|
|
91
|
+
background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(168, 85, 247, 0.16), transparent 45%);
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transition: opacity 0.35s var(--kz-ease);
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
z-index: 0;
|
|
96
|
+
}
|
|
97
|
+
.kz-spotlight:hover::before {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Lift: cards rise a little under the pointer. */
|
|
102
|
+
.kz-lift {
|
|
103
|
+
transition: transform 0.35s var(--kz-ease), box-shadow 0.35s var(--kz-ease), border-color 0.35s var(--kz-ease);
|
|
104
|
+
}
|
|
105
|
+
@media (hover: hover) {
|
|
106
|
+
.kz-lift:hover {
|
|
107
|
+
transform: translateY(-4px);
|
|
108
|
+
box-shadow: 0 18px 40px -18px rgba(124, 58, 237, 0.45);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Gradient text that slowly drifts. */
|
|
113
|
+
.kz-gradient-text {
|
|
114
|
+
background-size: 200% auto;
|
|
115
|
+
animation: kz-gradient-drift 8s ease-in-out infinite;
|
|
116
|
+
}
|
|
117
|
+
@keyframes kz-gradient-drift {
|
|
118
|
+
50% { background-position: 100% center; }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Marquee (logos, feature words): two copies side by side, sliding forever. */
|
|
122
|
+
.kz-marquee {
|
|
123
|
+
display: flex;
|
|
124
|
+
width: max-content;
|
|
125
|
+
animation: kz-marquee var(--kz-marquee-duration, 40s) linear infinite;
|
|
126
|
+
}
|
|
127
|
+
@keyframes kz-marquee {
|
|
128
|
+
to { transform: translateX(-50%); }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Entrances of what opens over the page — one vocabulary for every overlay, dialog, menu and swapped view.
|
|
132
|
+
Opacity and transform only, `backwards` fill: nothing stays transformed once in place. */
|
|
133
|
+
.kz-overlay { animation: kz-fade-in 0.22s var(--kz-ease) backwards; } /* the dimmed backdrop */
|
|
134
|
+
.kz-dialog { animation: kz-dialog-in 0.42s var(--kz-ease) backwards; } /* a dialog: rises from the bottom on phones */
|
|
135
|
+
.kz-pop { animation: kz-pop-in 0.22s var(--kz-ease) backwards; transform-origin: top right; } /* menus, popovers */
|
|
136
|
+
.kz-fade { animation: kz-fade-in 0.35s var(--kz-ease) backwards; } /* a view swapped in place (tabs, filters) */
|
|
137
|
+
@keyframes kz-fade-in {
|
|
138
|
+
from { opacity: 0; }
|
|
139
|
+
}
|
|
140
|
+
@keyframes kz-dialog-in {
|
|
141
|
+
from { opacity: 0; transform: translateY(32px); }
|
|
142
|
+
}
|
|
143
|
+
@media (min-width: 640px) {
|
|
144
|
+
@keyframes kz-dialog-in {
|
|
145
|
+
from { opacity: 0; transform: translateY(12px) scale(0.97); }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
@keyframes kz-pop-in {
|
|
149
|
+
from { opacity: 0; transform: translateY(-6px) scale(0.96); }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@media (prefers-reduced-motion: reduce) {
|
|
153
|
+
.kz-page, .kz-word, .kz-gradient-text, .kz-marquee, .kz-overlay, .kz-dialog, .kz-pop, .kz-fade { animation: none !important; }
|
|
154
|
+
[data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
|
|
155
|
+
.kz-sheen::after { display: none; }
|
|
156
|
+
.kz-lift, .kz-lift:hover { transform: none; transition: none; }
|
|
157
|
+
}
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface NativeMarkProps {
|
|
4
|
+
/** Width and height in points. */
|
|
5
|
+
size?: number;
|
|
6
|
+
/** The orbit turns and the flame breathes; always still when the system asks to reduce motion. */
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
/** An accessible name (the mark becomes an image); without it the mark is decorative. */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** The neutral strokes (orbit, ring): the host's border colour. */
|
|
11
|
+
neutral?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The Orochia mark for React Native — the same geometry as the web mark (marks/orochia-geometry.ts), drawn with
|
|
15
|
+
* react-native-svg. Three layers so that the motion runs on the native driver: the orbit turns, the eye and the flame
|
|
16
|
+
* breathe, the serpent stays still.
|
|
17
|
+
*/
|
|
18
|
+
declare function OrochiaMark({ size, animated, title, neutral }: NativeMarkProps): React.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { type NativeMarkProps, OrochiaMark };
|
package/dist/native.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// src/native/OrochiaMark.tsx
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { AccessibilityInfo, Animated, Easing, View } from "react-native";
|
|
4
|
+
import Svg, { Circle, Defs, Ellipse, G as Group, LinearGradient, Path, RadialGradient, Stop } from "react-native-svg";
|
|
5
|
+
|
|
6
|
+
// src/marks/orochia-geometry.ts
|
|
7
|
+
var OROCHIA = {
|
|
8
|
+
viewBox: "0 0 400 400",
|
|
9
|
+
croppedViewBox: "86 82 228 228",
|
|
10
|
+
offset: 20,
|
|
11
|
+
body: { x1: 70, y1: 290, x2: 290, y2: 70, stops: [["0%", "#7c3aed"], ["55%", "#d946ef"], ["100%", "#f472b6"]] },
|
|
12
|
+
flameGradient: { stops: [["0%", "#a855f7"], ["100%", "#f9a8d4"]] },
|
|
13
|
+
glow: { color: "#d946ef", opacity: 0.18 },
|
|
14
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
15
|
+
ring: { r: 134, width: 1 },
|
|
16
|
+
arc: "M259.8,142.8 A88,88 0 1 1 142.8,100.2",
|
|
17
|
+
neck: "M142.8,100.2 A88,88 0 0 1 187.7,92.3",
|
|
18
|
+
tail: "M187.7,92.3 A88,88 0 0 1 221.3,102.3",
|
|
19
|
+
scales: { color: "#fdf4ff", opacity: 0.45, width: 3, dash: "2 14" },
|
|
20
|
+
head: { cx: 253.9, cy: 130.1, rx: 13, ry: 20, rotate: -25 },
|
|
21
|
+
tongue: { d: "M245.4,112.0 L242.0,104.8 L235.0,101.5 M242.0,104.8 L244.0,97.3", color: "#f472b6" },
|
|
22
|
+
eye: { cx: 256.3, cy: 123.5, r: 4.5, color: "#fdf4ff" },
|
|
23
|
+
flame: {
|
|
24
|
+
translate: [127, 120],
|
|
25
|
+
scale: 4.4,
|
|
26
|
+
d: "M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/native/OrochiaMark.tsx
|
|
31
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
+
var CENTER = OROCHIA.offset + 180;
|
|
33
|
+
function OrochiaMark({ size = 48, animated = true, title, neutral = "rgba(255,255,255,0.35)" }) {
|
|
34
|
+
const spin = useRef(new Animated.Value(0)).current;
|
|
35
|
+
const pulse = useRef(new Animated.Value(0)).current;
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!animated) return;
|
|
38
|
+
let loops = [];
|
|
39
|
+
let cancelled = false;
|
|
40
|
+
void AccessibilityInfo.isReduceMotionEnabled().then((reduce) => {
|
|
41
|
+
if (reduce || cancelled) return;
|
|
42
|
+
loops = [
|
|
43
|
+
Animated.loop(Animated.timing(spin, { toValue: 1, duration: 3e4, easing: Easing.linear, useNativeDriver: true })),
|
|
44
|
+
Animated.loop(
|
|
45
|
+
Animated.sequence([
|
|
46
|
+
Animated.timing(pulse, { toValue: 1, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true }),
|
|
47
|
+
Animated.timing(pulse, { toValue: 0, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true })
|
|
48
|
+
])
|
|
49
|
+
)
|
|
50
|
+
];
|
|
51
|
+
loops.forEach((l) => l.start());
|
|
52
|
+
});
|
|
53
|
+
return () => {
|
|
54
|
+
cancelled = true;
|
|
55
|
+
loops.forEach((l) => l.stop());
|
|
56
|
+
};
|
|
57
|
+
}, [animated, spin, pulse]);
|
|
58
|
+
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
59
|
+
const layer = { position: "absolute", width: size, height: size };
|
|
60
|
+
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
61
|
+
const bodyGradient = /* @__PURE__ */ jsx(LinearGradient, { id: "body", gradientUnits: "userSpaceOnUse", x1: OROCHIA.body.x1 + OROCHIA.offset, y1: OROCHIA.body.y1 + OROCHIA.offset, x2: OROCHIA.body.x2 + OROCHIA.offset, y2: OROCHIA.body.y2 + OROCHIA.offset, children: OROCHIA.body.stops.map(([offset, color]) => /* @__PURE__ */ jsx(Stop, { offset, stopColor: color }, offset)) });
|
|
62
|
+
return /* @__PURE__ */ jsxs(View, { style: { width: size, height: size }, ...a11y, children: [
|
|
63
|
+
/* @__PURE__ */ jsxs(Svg, { viewBox, style: layer, children: [
|
|
64
|
+
/* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(RadialGradient, { id: "glow", cx: "50%", cy: "50%", r: "50%", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Stop, { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
66
|
+
/* @__PURE__ */ jsx(Stop, { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: 0 })
|
|
67
|
+
] }) }),
|
|
68
|
+
/* @__PURE__ */ jsx(Circle, { cx: CENTER, cy: CENTER, r: 170, fill: "url(#glow)" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Circle, { cx: CENTER, cy: CENTER, r: OROCHIA.ring.r, stroke: neutral, strokeWidth: OROCHIA.ring.width, opacity: 0.35, fill: "none" })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] }], children: /* @__PURE__ */ jsx(Svg, { viewBox, style: layer, children: /* @__PURE__ */ jsx(Circle, { cx: CENTER, cy: CENTER, r: OROCHIA.orbit.r, stroke: neutral, strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
72
|
+
/* @__PURE__ */ jsxs(Svg, { viewBox, style: layer, children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Defs, { children: bodyGradient }),
|
|
74
|
+
/* @__PURE__ */ jsxs(Group, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
75
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.arc, stroke: "url(#body)", strokeWidth: 22, strokeLinecap: "round", fill: "none" }),
|
|
76
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash, fill: "none" }),
|
|
77
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.neck, stroke: "url(#body)", strokeWidth: 14, strokeLinecap: "round", fill: "none" }),
|
|
78
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.tail, stroke: "url(#body)", strokeWidth: 6, strokeLinecap: "round", fill: "none" }),
|
|
79
|
+
/* @__PURE__ */ jsx(Ellipse, { cx: OROCHIA.head.cx, cy: OROCHIA.head.cy, rx: OROCHIA.head.rx, ry: OROCHIA.head.ry, rotation: OROCHIA.head.rotate, origin: `${OROCHIA.head.cx}, ${OROCHIA.head.cy}`, fill: "url(#body)" }),
|
|
80
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: 3, strokeLinecap: "round", fill: "none" })
|
|
81
|
+
] })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }], children: /* @__PURE__ */ jsxs(Svg, { viewBox, style: layer, children: [
|
|
84
|
+
/* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsx(LinearGradient, { id: "flame", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx(Stop, { offset, stopColor: color }, offset)) }) }),
|
|
85
|
+
/* @__PURE__ */ jsxs(Group, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
86
|
+
/* @__PURE__ */ jsx(Circle, { cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
87
|
+
/* @__PURE__ */ jsx(Path, { d: OROCHIA.flame.d, transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, fill: "url(#flame)" })
|
|
88
|
+
] })
|
|
89
|
+
] }) })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
OrochiaMark
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/native/OrochiaMark.tsx","../src/marks/orochia-geometry.ts"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport { AccessibilityInfo, Animated, Easing, View } from \"react-native\";\nimport Svg, { Circle, Defs, Ellipse, G as Group, LinearGradient, Path, RadialGradient, Stop } from \"react-native-svg\";\nimport { OROCHIA as G } from \"../marks/orochia-geometry\";\n\nexport interface NativeMarkProps {\n /** Width and height in points. */\n size?: number;\n /** The orbit turns and the flame breathes; always still when the system asks to reduce motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n /** The neutral strokes (orbit, ring): the host's border colour. */\n neutral?: string;\n}\n\nconst CENTER = G.offset + 180;\n\n/**\n * The Orochia mark for React Native — the same geometry as the web mark (marks/orochia-geometry.ts), drawn with\n * react-native-svg. Three layers so that the motion runs on the native driver: the orbit turns, the eye and the flame\n * breathe, the serpent stays still.\n */\nexport function OrochiaMark({ size = 48, animated = true, title, neutral = \"rgba(255,255,255,0.35)\" }: NativeMarkProps) {\n const spin = useRef(new Animated.Value(0)).current;\n const pulse = useRef(new Animated.Value(0)).current;\n useEffect(() => {\n if (!animated) return;\n let loops: Animated.CompositeAnimation[] = [];\n let cancelled = false;\n void AccessibilityInfo.isReduceMotionEnabled().then((reduce) => {\n if (reduce || cancelled) return;\n loops = [\n Animated.loop(Animated.timing(spin, { toValue: 1, duration: 30_000, easing: Easing.linear, useNativeDriver: true })),\n Animated.loop(\n Animated.sequence([\n Animated.timing(pulse, { toValue: 1, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true }),\n Animated.timing(pulse, { toValue: 0, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true }),\n ]),\n ),\n ];\n loops.forEach((l) => l.start());\n });\n return () => {\n cancelled = true;\n loops.forEach((l) => l.stop());\n };\n }, [animated, spin, pulse]);\n\n const viewBox = size < 48 ? G.croppedViewBox : G.viewBox;\n const layer = { position: \"absolute\" as const, width: size, height: size };\n const a11y = title ? { accessible: true, accessibilityRole: \"image\" as const, accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: \"no-hide-descendants\" as const };\n const bodyGradient = (\n <LinearGradient id=\"body\" gradientUnits=\"userSpaceOnUse\" x1={G.body.x1 + G.offset} y1={G.body.y1 + G.offset} x2={G.body.x2 + G.offset} y2={G.body.y2 + G.offset}>\n {G.body.stops.map(([offset, color]) => (\n <Stop key={offset} offset={offset} stopColor={color} />\n ))}\n </LinearGradient>\n );\n\n return (\n <View style={{ width: size, height: size }} {...a11y}>\n <Svg viewBox={viewBox} style={layer}>\n <Defs>\n <RadialGradient id=\"glow\" cx=\"50%\" cy=\"50%\" r=\"50%\">\n <Stop offset=\"0%\" stopColor={G.glow.color} stopOpacity={G.glow.opacity} />\n <Stop offset=\"100%\" stopColor={G.glow.color} stopOpacity={0} />\n </RadialGradient>\n </Defs>\n <Circle cx={CENTER} cy={CENTER} r={170} fill=\"url(#glow)\" />\n <Circle cx={CENTER} cy={CENTER} r={G.ring.r} stroke={neutral} strokeWidth={G.ring.width} opacity={0.35} fill=\"none\" />\n </Svg>\n <Animated.View style={[layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: [\"0deg\", \"360deg\"] }) }] }]}>\n <Svg viewBox={viewBox} style={layer}>\n <Circle cx={CENTER} cy={CENTER} r={G.orbit.r} stroke={neutral} strokeWidth={G.orbit.width} strokeDasharray={G.orbit.dash} opacity={0.6} fill=\"none\" />\n </Svg>\n </Animated.View>\n <Svg viewBox={viewBox} style={layer}>\n <Defs>{bodyGradient}</Defs>\n <Group transform={`translate(${G.offset} ${G.offset})`}>\n <Path d={G.arc} stroke=\"url(#body)\" strokeWidth={22} strokeLinecap=\"round\" fill=\"none\" />\n <Path d={G.arc} stroke={G.scales.color} strokeOpacity={G.scales.opacity} strokeWidth={G.scales.width} strokeLinecap=\"round\" strokeDasharray={G.scales.dash} fill=\"none\" />\n <Path d={G.neck} stroke=\"url(#body)\" strokeWidth={14} strokeLinecap=\"round\" fill=\"none\" />\n <Path d={G.tail} stroke=\"url(#body)\" strokeWidth={6} strokeLinecap=\"round\" fill=\"none\" />\n <Ellipse cx={G.head.cx} cy={G.head.cy} rx={G.head.rx} ry={G.head.ry} rotation={G.head.rotate} origin={`${G.head.cx}, ${G.head.cy}`} fill=\"url(#body)\" />\n <Path d={G.tongue.d} stroke={G.tongue.color} strokeWidth={3} strokeLinecap=\"round\" fill=\"none\" />\n </Group>\n </Svg>\n <Animated.View style={[layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }]}>\n <Svg viewBox={viewBox} style={layer}>\n <Defs>\n <LinearGradient id=\"flame\" x1=\"50%\" y1=\"100%\" x2=\"50%\" y2=\"0%\">\n {G.flameGradient.stops.map(([offset, color]) => (\n <Stop key={offset} offset={offset} stopColor={color} />\n ))}\n </LinearGradient>\n </Defs>\n <Group transform={`translate(${G.offset} ${G.offset})`}>\n <Circle cx={G.eye.cx} cy={G.eye.cy} r={G.eye.r} fill={G.eye.color} />\n <Path d={G.flame.d} transform={`translate(${G.flame.translate[0]} ${G.flame.translate[1]}) scale(${G.flame.scale})`} fill=\"url(#flame)\" />\n </Group>\n </Svg>\n </Animated.View>\n </View>\n );\n}\n","/**\n * The Orochia mark's geometry — the one description of the serpent and its flame, drawn by the web mark (SVG in the\n * DOM, OrochiaLogo) and the native one (react-native-svg, @krizaka/ui/native). Coordinates are in the 360×360 artwork,\n * placed at (20, 20) in a 400×400 view box; below 48 px the view box crops to the serpent.\n */\nexport const OROCHIA = {\n viewBox: \"0 0 400 400\",\n croppedViewBox: \"86 82 228 228\",\n offset: 20,\n body: { x1: 70, y1: 290, x2: 290, y2: 70, stops: [[\"0%\", \"#7c3aed\"], [\"55%\", \"#d946ef\"], [\"100%\", \"#f472b6\"]] },\n flameGradient: { stops: [[\"0%\", \"#a855f7\"], [\"100%\", \"#f9a8d4\"]] },\n glow: { color: \"#d946ef\", opacity: 0.18 },\n orbit: { r: 160, dash: \"8 8\", width: 1.5 },\n ring: { r: 134, width: 1 },\n arc: \"M259.8,142.8 A88,88 0 1 1 142.8,100.2\",\n neck: \"M142.8,100.2 A88,88 0 0 1 187.7,92.3\",\n tail: \"M187.7,92.3 A88,88 0 0 1 221.3,102.3\",\n scales: { color: \"#fdf4ff\", opacity: 0.45, width: 3, dash: \"2 14\" },\n head: { cx: 253.9, cy: 130.1, rx: 13, ry: 20, rotate: -25 },\n tongue: { d: \"M245.4,112.0 L242.0,104.8 L235.0,101.5 M242.0,104.8 L244.0,97.3\", color: \"#f472b6\" },\n eye: { cx: 256.3, cy: 123.5, r: 4.5, color: \"#fdf4ff\" },\n flame: {\n translate: [127, 120] as const,\n scale: 4.4,\n d: \"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-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,EAAE,CAAC,GAC1G,+BAAC,OAAI,SAAkB,OAAO,OAC5B;AAAA,0BAAC,QACC,8BAAC,kBAAe,IAAG,SAAQ,IAAG,OAAM,IAAG,QAAO,IAAG,OAAM,IAAG,MACvD,kBAAE,cAAc,MAAM,IAAI,CAAC,CAAC,QAAQ,KAAK,MACxC,oBAAC,QAAkB,QAAgB,WAAW,SAAnC,MAA0C,CACtD,GACH,GACF;AAAA,MACA,qBAAC,SAAM,WAAW,aAAa,QAAE,MAAM,IAAI,QAAE,MAAM,KACjD;AAAA,4BAAC,UAAO,IAAI,QAAE,IAAI,IAAI,IAAI,QAAE,IAAI,IAAI,GAAG,QAAE,IAAI,GAAG,MAAM,QAAE,IAAI,OAAO;AAAA,QACnE,oBAAC,QAAK,GAAG,QAAE,MAAM,GAAG,WAAW,aAAa,QAAE,MAAM,UAAU,CAAC,CAAC,IAAI,QAAE,MAAM,UAAU,CAAC,CAAC,WAAW,QAAE,MAAM,KAAK,KAAK,MAAK,eAAc;AAAA,SAC1I;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,92 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "The Krizaka brand layer shared by every product: the animated marks (Krizaka, Orazaka, Orochia) and the Krizaka motion signature, in CSS and React.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"krizaka",
|
|
7
|
+
"orazaka",
|
|
8
|
+
"orochia",
|
|
9
|
+
"react",
|
|
10
|
+
"logo",
|
|
11
|
+
"motion",
|
|
12
|
+
"animation",
|
|
13
|
+
"design-system",
|
|
14
|
+
"brand"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/krizaka/krizaka-ui#readme",
|
|
17
|
+
"bugs": "https://github.com/krizaka/krizaka-ui/issues",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/krizaka/krizaka-ui.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"author": "Krizaka (https://www.krizaka.com)",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./motion.css": "./dist/motion.css",
|
|
34
|
+
"./package.json": "./package.json",
|
|
35
|
+
"./native": {
|
|
36
|
+
"types": "./dist/native.d.ts",
|
|
37
|
+
"import": "./dist/native.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"README.md",
|
|
43
|
+
"LICENSE"
|
|
44
|
+
],
|
|
45
|
+
"sideEffects": [
|
|
46
|
+
"*.css"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css')\"",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"check": "npm run typecheck && npm test && npm run build",
|
|
53
|
+
"prepublishOnly": "npm run check"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": ">=18",
|
|
57
|
+
"react-dom": ">=18",
|
|
58
|
+
"react-native": ">=0.76",
|
|
59
|
+
"react-native-svg": ">=15"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@testing-library/dom": "^10.4.0",
|
|
63
|
+
"@testing-library/react": "^16.3.0",
|
|
64
|
+
"@types/react": "^19.2.0",
|
|
65
|
+
"@types/react-dom": "^19.2.0",
|
|
66
|
+
"happy-dom": "^20.0.0",
|
|
67
|
+
"react": "^19.2.0",
|
|
68
|
+
"react-dom": "^19.2.0",
|
|
69
|
+
"react-native": "^0.86.3",
|
|
70
|
+
"react-native-svg": "^15.15.4",
|
|
71
|
+
"tsup": "^8.5.1",
|
|
72
|
+
"typescript": "^5.9.0",
|
|
73
|
+
"vitest": "^4.1.11"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=20"
|
|
77
|
+
},
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"react-dom": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"react-native": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"react-native-svg": {
|
|
89
|
+
"optional": true
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|