@mirohq/design-system-types 0.9.0 β†’ 1.0.0-pdl-removing-ffs.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/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @mirohq-internal/design-system-types
2
2
 
3
+ ## 1.0.0-pdl-removing-ffs.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#989](https://github.com/miroapp-dev/design-system/pull/989) [`2b732a10b`](https://github.com/miroapp-dev/design-system/commit/2b732a10b8e8515d2c62c2d69ee922d121697f31) Thanks [@skarensmoll](https://github.com/skarensmoll)! - πŸŽ‰ Design System β€” v1.0.0
8
+
9
+ We’re excited to announce the first major release of our Design System! After years of iteration and collaboration, our system has matured into a stable foundation that bridges design and code β€” enabling teams to deliver consistent, scalable, and accessible experiences across Miro.
10
+
11
+ This release introduces Miro Aura, our new Product Design Language. Aura amplifies the energy, creativity, and connection at the heart of Miro β€” bringing light, clarity, and emotion to every interaction. From refreshed colors to refined components, Aura creates a more cohesive and distinctly human experience.
12
+
13
+ v1.0.0 is more than just a version bump β€” it marks a new chapter for design and engineering at Miro, setting the stage for future evolution while celebrating the teamwork and craft that brought it to life.
14
+
15
+ ## 0.10.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#617](https://github.com/miroapp-dev/design-system/pull/617) [`9ea14f4a`](https://github.com/miroapp-dev/design-system/commit/9ea14f4a48ab87d13c0a38e37186fb50ea642b02) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Added two new types:
20
+
21
+ _OneOrMore_: creates a type that can be a single value or an array of that value.
22
+
23
+ ```ts
24
+ type Result = OneOrMore<number>
25
+ // number | number[]
26
+ ```
27
+
28
+ _MergeUnion_: merges two types by combining their properties. Overlapping properties result in a union of their values.
29
+
30
+ ```ts
31
+ type TypeA = { foo: number; bar: string }
32
+ type TypeB = { bar: boolean; baz: number }
33
+
34
+ type Result = MergeUnion<TypeA, TypeB>
35
+ // { foo: number, bar: string | boolean, baz: number }
36
+ ```
37
+
3
38
  ## 0.9.0
4
39
 
5
40
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-types",
3
- "version": "0.9.0",
3
+ "version": "1.0.0-pdl-removing-ffs.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "types": "src/index.d.ts",
package/src/global.d.ts CHANGED
@@ -1,7 +1,30 @@
1
+ /**
2
+ * Convert a type into a union of the value itself with null and undefined.
3
+ *
4
+ * @example
5
+ * type Text = string
6
+ * type Result = Nullable<Text>
7
+ *
8
+ * result: string | null | undefined
9
+ */
1
10
  export type Nullable<T> = T | null | undefined
2
11
 
12
+ /**
13
+ * A type that can be a number or a string representation of a number.
14
+ *
15
+ * @example
16
+ * type Num<X extends Numeric> = X
17
+ * type Result = Num<1 | '1'>
18
+ */
3
19
  export type Numeric = number | `${number}`
4
20
 
21
+ /**
22
+ * A type that can be a boolean or a string representation of a boolean.
23
+ *
24
+ * @example
25
+ * type Bool<X extends Booleanish> = X
26
+ * type Result = Bool<true | 'true'>
27
+ */
5
28
  export type Booleanish = boolean | `${boolean}`
6
29
 
7
30
  /**
@@ -52,11 +75,25 @@ export type MergeUnion<T, U> = {
52
75
  [K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
53
76
  } & OmitFromUnion<U, keyof T>
54
77
 
55
- export interface TypeA {
56
- foo: number
57
- bar: string
58
- }
59
- export interface TypeB {
60
- foo: boolean
61
- qux: number
62
- }
78
+ /**
79
+ * Convert a type into a union of the value itself and an array of the value.
80
+ *
81
+ * @example
82
+ * type Result = OneOrMore<number>
83
+ * number | number[]
84
+ */
85
+ type OneOrMore<T> = T | T[]
86
+
87
+ /**
88
+ * Converts a union type into an intersection type.
89
+ *
90
+ * @example
91
+ * type Union = { foo: number } | { bar: string }
92
+ * type Result = UnionToIntersection<Union>
93
+ * { foo: number } & { bar: string }
94
+ */
95
+ type UnionToIntersection<U> = (U extends any ? (x: U) => any : never) extends (
96
+ x: infer I
97
+ ) => any
98
+ ? I
99
+ : never