@mittwald/flow-react-components 0.2.0-alpha.460 → 0.2.0-alpha.462

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/assets/doc-properties.json +464 -422
  3. package/dist/js/components/src/components/Markdown/Markdown.mjs +56 -7
  4. package/dist/js/components/src/components/Markdown/Markdown.mjs.map +1 -1
  5. package/dist/js/components/src/components/Markdown/lib/getHeadingLevelWithOffset.mjs +9 -0
  6. package/dist/js/components/src/components/Markdown/lib/getHeadingLevelWithOffset.mjs.map +1 -0
  7. package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs +8 -1
  8. package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  9. package/dist/types/components/List/typedList.d.ts +2 -2
  10. package/dist/types/components/Markdown/Markdown.d.ts +2 -0
  11. package/dist/types/components/Markdown/Markdown.d.ts.map +1 -1
  12. package/dist/types/components/Markdown/lib/getHeadingLevelWithOffset.d.ts +2 -0
  13. package/dist/types/components/Markdown/lib/getHeadingLevelWithOffset.d.ts.map +1 -0
  14. package/dist/types/components/Markdown/lib/getHeadingLevelWithOffset.test.d.ts +2 -0
  15. package/dist/types/components/Markdown/lib/getHeadingLevelWithOffset.test.d.ts.map +1 -0
  16. package/dist/types/components/Markdown/stories/Default.stories.d.ts +1 -0
  17. package/dist/types/components/Markdown/stories/Default.stories.d.ts.map +1 -1
  18. package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts +3 -2
  19. package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
  20. package/dist/types/components/MarkdownEditor/stories/Default.stories.d.ts +1 -0
  21. package/dist/types/components/MarkdownEditor/stories/Default.stories.d.ts.map +1 -1
  22. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.2.0-alpha.462](https://github.com/mittwald/flow/compare/0.2.0-alpha.461...0.2.0-alpha.462) (2025-09-08)
7
+
8
+ **Note:** Version bump only for package @mittwald/flow-react-components
9
+
10
+ # [0.2.0-alpha.461](https://github.com/mittwald/flow/compare/0.2.0-alpha.460...0.2.0-alpha.461) (2025-09-08)
11
+
12
+ ### Bug Fixes
13
+
14
+ * **MarkdownEditor:** fix remote ([#1957](https://github.com/mittwald/flow/issues/1957)) ([adc4a1a](https://github.com/mittwald/flow/commit/adc4a1a9cdf08acd8eab2b27b8f679e3b8755107))
15
+
6
16
  # [0.2.0-alpha.460](https://github.com/mittwald/flow/compare/0.2.0-alpha.459...0.2.0-alpha.460) (2025-09-05)
7
17
 
8
18
  ### Bug Fixes
@@ -83432,6 +83432,27 @@
83432
83432
  "type": {
83433
83433
  "name": "Key | null"
83434
83434
  }
83435
+ },
83436
+ "headingOffset": {
83437
+ "defaultValue": {
83438
+ "value": "0"
83439
+ },
83440
+ "description": "Shifts all heading levels by the given offset.",
83441
+ "name": "headingOffset",
83442
+ "parent": {
83443
+ "fileName": "components/src/components/Markdown/Markdown.tsx",
83444
+ "name": "MarkdownProps"
83445
+ },
83446
+ "declarations": [
83447
+ {
83448
+ "fileName": "components/src/components/Markdown/Markdown.tsx",
83449
+ "name": "MarkdownProps"
83450
+ }
83451
+ ],
83452
+ "required": false,
83453
+ "type": {
83454
+ "name": "number"
83455
+ }
83435
83456
  }
83436
83457
  }
83437
83458
  },
@@ -83463,6 +83484,27 @@
83463
83484
  "name": "\"light\" | \"dark\" | \"default\""
83464
83485
  }
83465
83486
  },
83487
+ "headingOffset": {
83488
+ "defaultValue": {
83489
+ "value": "0"
83490
+ },
83491
+ "description": "Shifts all heading levels by the given offset.",
83492
+ "name": "headingOffset",
83493
+ "parent": {
83494
+ "fileName": "components/src/components/Markdown/Markdown.tsx",
83495
+ "name": "MarkdownProps"
83496
+ },
83497
+ "declarations": [
83498
+ {
83499
+ "fileName": "components/src/components/Markdown/Markdown.tsx",
83500
+ "name": "MarkdownProps"
83501
+ }
83502
+ ],
83503
+ "required": false,
83504
+ "type": {
83505
+ "name": "number"
83506
+ }
83507
+ },
83466
83508
  "style": {
83467
83509
  "defaultValue": null,
83468
83510
  "description": "@internal",
@@ -93359,6 +93401,165 @@
93359
93401
  }
93360
93402
  }
93361
93403
  },
93404
+ {
93405
+ "tags": {},
93406
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/LightBox/LightBox.tsx",
93407
+ "description": "",
93408
+ "displayName": "LightBox",
93409
+ "methods": [],
93410
+ "props": {
93411
+ "controller": {
93412
+ "defaultValue": null,
93413
+ "description": "An overlay controller to control the light box state.",
93414
+ "name": "controller",
93415
+ "parent": {
93416
+ "fileName": "components/src/components/LightBox/LightBox.tsx",
93417
+ "name": "LightBoxProps"
93418
+ },
93419
+ "declarations": [
93420
+ {
93421
+ "fileName": "components/src/components/LightBox/LightBox.tsx",
93422
+ "name": "LightBoxProps"
93423
+ }
93424
+ ],
93425
+ "required": false,
93426
+ "type": {
93427
+ "name": "OverlayController"
93428
+ }
93429
+ },
93430
+ "fitScreen": {
93431
+ "defaultValue": {
93432
+ "value": "true"
93433
+ },
93434
+ "description": "Whether content can be displayed larger than the available space in the\nscreen.",
93435
+ "name": "fitScreen",
93436
+ "parent": {
93437
+ "fileName": "components/src/components/LightBox/LightBox.tsx",
93438
+ "name": "LightBoxProps"
93439
+ },
93440
+ "declarations": [
93441
+ {
93442
+ "fileName": "components/src/components/LightBox/LightBox.tsx",
93443
+ "name": "LightBoxProps"
93444
+ }
93445
+ ],
93446
+ "required": false,
93447
+ "type": {
93448
+ "name": "boolean"
93449
+ }
93450
+ },
93451
+ "children": {
93452
+ "defaultValue": null,
93453
+ "description": "",
93454
+ "name": "children",
93455
+ "declarations": [
93456
+ {
93457
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
93458
+ "name": "TypeLiteral"
93459
+ }
93460
+ ],
93461
+ "required": false,
93462
+ "type": {
93463
+ "name": "ReactNode"
93464
+ }
93465
+ },
93466
+ "wrapWith": {
93467
+ "defaultValue": null,
93468
+ "description": "",
93469
+ "name": "wrapWith",
93470
+ "parent": {
93471
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
93472
+ "name": "FlowComponentProps"
93473
+ },
93474
+ "declarations": [
93475
+ {
93476
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
93477
+ "name": "FlowComponentProps"
93478
+ }
93479
+ ],
93480
+ "required": false,
93481
+ "type": {
93482
+ "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
93483
+ }
93484
+ },
93485
+ "tunnelId": {
93486
+ "defaultValue": null,
93487
+ "description": "@internal",
93488
+ "name": "tunnelId",
93489
+ "parent": {
93490
+ "fileName": "components/src/lib/types/props.ts",
93491
+ "name": "PropsWithTunnel"
93492
+ },
93493
+ "declarations": [
93494
+ {
93495
+ "fileName": "components/src/lib/types/props.ts",
93496
+ "name": "PropsWithTunnel"
93497
+ }
93498
+ ],
93499
+ "required": false,
93500
+ "type": {
93501
+ "name": "string | null"
93502
+ }
93503
+ },
93504
+ "ref": {
93505
+ "defaultValue": null,
93506
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
93507
+ "name": "ref",
93508
+ "parent": {
93509
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
93510
+ "name": "RefAttributes"
93511
+ },
93512
+ "declarations": [
93513
+ {
93514
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
93515
+ "name": "RefAttributes"
93516
+ }
93517
+ ],
93518
+ "required": false,
93519
+ "type": {
93520
+ "name": "Ref<HTMLInputElement>"
93521
+ }
93522
+ },
93523
+ "key": {
93524
+ "defaultValue": null,
93525
+ "description": "",
93526
+ "name": "key",
93527
+ "parent": {
93528
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
93529
+ "name": "Attributes"
93530
+ },
93531
+ "declarations": [
93532
+ {
93533
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
93534
+ "name": "Attributes"
93535
+ }
93536
+ ],
93537
+ "required": false,
93538
+ "type": {
93539
+ "name": "Key | null"
93540
+ }
93541
+ },
93542
+ "className": {
93543
+ "defaultValue": null,
93544
+ "description": "The elements class name.",
93545
+ "name": "className",
93546
+ "parent": {
93547
+ "fileName": "components/src/lib/types/props.ts",
93548
+ "name": "PropsWithClassName"
93549
+ },
93550
+ "declarations": [
93551
+ {
93552
+ "fileName": "components/src/lib/types/props.ts",
93553
+ "name": "PropsWithClassName"
93554
+ }
93555
+ ],
93556
+ "required": false,
93557
+ "type": {
93558
+ "name": "string"
93559
+ }
93560
+ }
93561
+ }
93562
+ },
93362
93563
  {
93363
93564
  "tags": {
93364
93565
  "flr-generate": "all",
@@ -95459,165 +95660,6 @@
95459
95660
  }
95460
95661
  }
95461
95662
  },
95462
- {
95463
- "tags": {},
95464
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/LightBox/LightBox.tsx",
95465
- "description": "",
95466
- "displayName": "LightBox",
95467
- "methods": [],
95468
- "props": {
95469
- "controller": {
95470
- "defaultValue": null,
95471
- "description": "An overlay controller to control the light box state.",
95472
- "name": "controller",
95473
- "parent": {
95474
- "fileName": "components/src/components/LightBox/LightBox.tsx",
95475
- "name": "LightBoxProps"
95476
- },
95477
- "declarations": [
95478
- {
95479
- "fileName": "components/src/components/LightBox/LightBox.tsx",
95480
- "name": "LightBoxProps"
95481
- }
95482
- ],
95483
- "required": false,
95484
- "type": {
95485
- "name": "OverlayController"
95486
- }
95487
- },
95488
- "fitScreen": {
95489
- "defaultValue": {
95490
- "value": "true"
95491
- },
95492
- "description": "Whether content can be displayed larger than the available space in the\nscreen.",
95493
- "name": "fitScreen",
95494
- "parent": {
95495
- "fileName": "components/src/components/LightBox/LightBox.tsx",
95496
- "name": "LightBoxProps"
95497
- },
95498
- "declarations": [
95499
- {
95500
- "fileName": "components/src/components/LightBox/LightBox.tsx",
95501
- "name": "LightBoxProps"
95502
- }
95503
- ],
95504
- "required": false,
95505
- "type": {
95506
- "name": "boolean"
95507
- }
95508
- },
95509
- "children": {
95510
- "defaultValue": null,
95511
- "description": "",
95512
- "name": "children",
95513
- "declarations": [
95514
- {
95515
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
95516
- "name": "TypeLiteral"
95517
- }
95518
- ],
95519
- "required": false,
95520
- "type": {
95521
- "name": "ReactNode"
95522
- }
95523
- },
95524
- "wrapWith": {
95525
- "defaultValue": null,
95526
- "description": "",
95527
- "name": "wrapWith",
95528
- "parent": {
95529
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
95530
- "name": "FlowComponentProps"
95531
- },
95532
- "declarations": [
95533
- {
95534
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
95535
- "name": "FlowComponentProps"
95536
- }
95537
- ],
95538
- "required": false,
95539
- "type": {
95540
- "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
95541
- }
95542
- },
95543
- "tunnelId": {
95544
- "defaultValue": null,
95545
- "description": "@internal",
95546
- "name": "tunnelId",
95547
- "parent": {
95548
- "fileName": "components/src/lib/types/props.ts",
95549
- "name": "PropsWithTunnel"
95550
- },
95551
- "declarations": [
95552
- {
95553
- "fileName": "components/src/lib/types/props.ts",
95554
- "name": "PropsWithTunnel"
95555
- }
95556
- ],
95557
- "required": false,
95558
- "type": {
95559
- "name": "string | null"
95560
- }
95561
- },
95562
- "ref": {
95563
- "defaultValue": null,
95564
- "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
95565
- "name": "ref",
95566
- "parent": {
95567
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
95568
- "name": "RefAttributes"
95569
- },
95570
- "declarations": [
95571
- {
95572
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
95573
- "name": "RefAttributes"
95574
- }
95575
- ],
95576
- "required": false,
95577
- "type": {
95578
- "name": "Ref<HTMLInputElement>"
95579
- }
95580
- },
95581
- "key": {
95582
- "defaultValue": null,
95583
- "description": "",
95584
- "name": "key",
95585
- "parent": {
95586
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
95587
- "name": "Attributes"
95588
- },
95589
- "declarations": [
95590
- {
95591
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
95592
- "name": "Attributes"
95593
- }
95594
- ],
95595
- "required": false,
95596
- "type": {
95597
- "name": "Key | null"
95598
- }
95599
- },
95600
- "className": {
95601
- "defaultValue": null,
95602
- "description": "The elements class name.",
95603
- "name": "className",
95604
- "parent": {
95605
- "fileName": "components/src/lib/types/props.ts",
95606
- "name": "PropsWithClassName"
95607
- },
95608
- "declarations": [
95609
- {
95610
- "fileName": "components/src/lib/types/props.ts",
95611
- "name": "PropsWithClassName"
95612
- }
95613
- ],
95614
- "required": false,
95615
- "type": {
95616
- "name": "string"
95617
- }
95618
- }
95619
- }
95620
- },
95621
95663
  {
95622
95664
  "tags": {
95623
95665
  "flr-generate": "all"
@@ -298062,131 +298104,269 @@
298062
298104
  }
298063
298105
  }
298064
298106
  },
298065
- {
298066
- "tags": {},
298067
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/ListItemView/ListItemView.tsx",
298068
- "description": "",
298069
- "displayName": "ListItemView",
298070
- "methods": [],
298071
- "props": {
298072
- "children": {
298073
- "defaultValue": null,
298074
- "description": "",
298075
- "name": "children",
298076
- "declarations": [
298077
- {
298078
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298079
- "name": "TypeLiteral"
298080
- }
298081
- ],
298082
- "required": false,
298083
- "type": {
298084
- "name": "ReactNode"
298085
- }
298086
- },
298087
- "s": {
298088
- "defaultValue": null,
298089
- "description": "Column layout for container size s.",
298090
- "name": "s",
298091
- "parent": {
298092
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298093
- "name": "ColumnLayoutProps"
298094
- },
298095
- "declarations": [
298096
- {
298097
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298098
- "name": "ColumnLayoutProps"
298099
- }
298100
- ],
298101
- "required": false,
298102
- "type": {
298103
- "name": "(number | null)[]"
298104
- }
298105
- },
298106
- "m": {
298107
- "defaultValue": null,
298108
- "description": "Column layout for container size m.",
298109
- "name": "m",
298110
- "parent": {
298111
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298112
- "name": "ColumnLayoutProps"
298113
- },
298114
- "declarations": [
298115
- {
298116
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298117
- "name": "ColumnLayoutProps"
298118
- }
298119
- ],
298120
- "required": false,
298121
- "type": {
298122
- "name": "(number | null)[]"
298123
- }
298124
- },
298125
- "l": {
298126
- "defaultValue": null,
298127
- "description": "Column layout for container size l.",
298128
- "name": "l",
298129
- "parent": {
298130
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298131
- "name": "ColumnLayoutProps"
298132
- },
298133
- "declarations": [
298134
- {
298135
- "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298136
- "name": "ColumnLayoutProps"
298137
- }
298138
- ],
298139
- "required": false,
298140
- "type": {
298141
- "name": "(number | null)[]"
298142
- }
298143
- }
298144
- }
298145
- },
298146
- {
298147
- "tags": {},
298148
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Items/Items.tsx",
298149
- "description": "",
298150
- "displayName": "Items",
298151
- "methods": [],
298152
- "props": {}
298153
- },
298154
- {
298155
- "tags": {},
298156
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Header/Header.tsx",
298157
- "description": "",
298158
- "displayName": "Header",
298159
- "methods": [],
298160
- "props": {
298161
- "className": {
298162
- "defaultValue": null,
298163
- "description": "The elements class name.",
298164
- "name": "className",
298165
- "parent": {
298166
- "fileName": "components/src/lib/types/props.ts",
298167
- "name": "PropsWithClassName"
298168
- },
298169
- "declarations": [
298170
- {
298171
- "fileName": "components/src/lib/types/props.ts",
298172
- "name": "PropsWithClassName"
298173
- }
298174
- ],
298175
- "required": false,
298176
- "type": {
298177
- "name": "string"
298178
- }
298179
- }
298180
- }
298181
- },
298182
- {
298183
- "tags": {},
298184
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Footer/Footer.tsx",
298185
- "description": "",
298186
- "displayName": "Footer",
298187
- "methods": [],
298188
- "props": {}
298189
- },
298107
+ {
298108
+ "tags": {},
298109
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/ListItemView/ListItemView.tsx",
298110
+ "description": "",
298111
+ "displayName": "ListItemView",
298112
+ "methods": [],
298113
+ "props": {
298114
+ "children": {
298115
+ "defaultValue": null,
298116
+ "description": "",
298117
+ "name": "children",
298118
+ "declarations": [
298119
+ {
298120
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298121
+ "name": "TypeLiteral"
298122
+ }
298123
+ ],
298124
+ "required": false,
298125
+ "type": {
298126
+ "name": "ReactNode"
298127
+ }
298128
+ },
298129
+ "s": {
298130
+ "defaultValue": null,
298131
+ "description": "Column layout for container size s.",
298132
+ "name": "s",
298133
+ "parent": {
298134
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298135
+ "name": "ColumnLayoutProps"
298136
+ },
298137
+ "declarations": [
298138
+ {
298139
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298140
+ "name": "ColumnLayoutProps"
298141
+ }
298142
+ ],
298143
+ "required": false,
298144
+ "type": {
298145
+ "name": "(number | null)[]"
298146
+ }
298147
+ },
298148
+ "m": {
298149
+ "defaultValue": null,
298150
+ "description": "Column layout for container size m.",
298151
+ "name": "m",
298152
+ "parent": {
298153
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298154
+ "name": "ColumnLayoutProps"
298155
+ },
298156
+ "declarations": [
298157
+ {
298158
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298159
+ "name": "ColumnLayoutProps"
298160
+ }
298161
+ ],
298162
+ "required": false,
298163
+ "type": {
298164
+ "name": "(number | null)[]"
298165
+ }
298166
+ },
298167
+ "l": {
298168
+ "defaultValue": null,
298169
+ "description": "Column layout for container size l.",
298170
+ "name": "l",
298171
+ "parent": {
298172
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298173
+ "name": "ColumnLayoutProps"
298174
+ },
298175
+ "declarations": [
298176
+ {
298177
+ "fileName": "components/src/components/ColumnLayout/ColumnLayout.tsx",
298178
+ "name": "ColumnLayoutProps"
298179
+ }
298180
+ ],
298181
+ "required": false,
298182
+ "type": {
298183
+ "name": "(number | null)[]"
298184
+ }
298185
+ }
298186
+ }
298187
+ },
298188
+ {
298189
+ "tags": {},
298190
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Items/Items.tsx",
298191
+ "description": "",
298192
+ "displayName": "Items",
298193
+ "methods": [],
298194
+ "props": {}
298195
+ },
298196
+ {
298197
+ "tags": {},
298198
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Header/Header.tsx",
298199
+ "description": "",
298200
+ "displayName": "Header",
298201
+ "methods": [],
298202
+ "props": {
298203
+ "className": {
298204
+ "defaultValue": null,
298205
+ "description": "The elements class name.",
298206
+ "name": "className",
298207
+ "parent": {
298208
+ "fileName": "components/src/lib/types/props.ts",
298209
+ "name": "PropsWithClassName"
298210
+ },
298211
+ "declarations": [
298212
+ {
298213
+ "fileName": "components/src/lib/types/props.ts",
298214
+ "name": "PropsWithClassName"
298215
+ }
298216
+ ],
298217
+ "required": false,
298218
+ "type": {
298219
+ "name": "string"
298220
+ }
298221
+ }
298222
+ }
298223
+ },
298224
+ {
298225
+ "tags": {},
298226
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/List/components/Footer/Footer.tsx",
298227
+ "description": "",
298228
+ "displayName": "Footer",
298229
+ "methods": [],
298230
+ "props": {}
298231
+ },
298232
+ {
298233
+ "tags": {},
298234
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/LightBox/components/LightBoxTrigger/LightBoxTrigger.tsx",
298235
+ "description": "",
298236
+ "displayName": "LightBoxTrigger",
298237
+ "methods": [],
298238
+ "props": {
298239
+ "isDefaultOpen": {
298240
+ "defaultValue": null,
298241
+ "description": "Whether the overlay should be open initially.",
298242
+ "name": "isDefaultOpen",
298243
+ "parent": {
298244
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
298245
+ "name": "OverlayTriggerProps"
298246
+ },
298247
+ "declarations": [
298248
+ {
298249
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
298250
+ "name": "OverlayTriggerProps"
298251
+ }
298252
+ ],
298253
+ "required": false,
298254
+ "type": {
298255
+ "name": "boolean"
298256
+ }
298257
+ },
298258
+ "controller": {
298259
+ "defaultValue": null,
298260
+ "description": "A controller to control the state of the overlay.",
298261
+ "name": "controller",
298262
+ "parent": {
298263
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
298264
+ "name": "OverlayTriggerProps"
298265
+ },
298266
+ "declarations": [
298267
+ {
298268
+ "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
298269
+ "name": "OverlayTriggerProps"
298270
+ }
298271
+ ],
298272
+ "required": false,
298273
+ "type": {
298274
+ "name": "OverlayController"
298275
+ }
298276
+ },
298277
+ "wrapWith": {
298278
+ "defaultValue": null,
298279
+ "description": "",
298280
+ "name": "wrapWith",
298281
+ "parent": {
298282
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
298283
+ "name": "FlowComponentProps"
298284
+ },
298285
+ "declarations": [
298286
+ {
298287
+ "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
298288
+ "name": "FlowComponentProps"
298289
+ }
298290
+ ],
298291
+ "required": false,
298292
+ "type": {
298293
+ "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
298294
+ }
298295
+ },
298296
+ "tunnelId": {
298297
+ "defaultValue": null,
298298
+ "description": "@internal",
298299
+ "name": "tunnelId",
298300
+ "parent": {
298301
+ "fileName": "components/src/lib/types/props.ts",
298302
+ "name": "PropsWithTunnel"
298303
+ },
298304
+ "declarations": [
298305
+ {
298306
+ "fileName": "components/src/lib/types/props.ts",
298307
+ "name": "PropsWithTunnel"
298308
+ }
298309
+ ],
298310
+ "required": false,
298311
+ "type": {
298312
+ "name": "string | null"
298313
+ }
298314
+ },
298315
+ "ref": {
298316
+ "defaultValue": null,
298317
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
298318
+ "name": "ref",
298319
+ "parent": {
298320
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298321
+ "name": "RefAttributes"
298322
+ },
298323
+ "declarations": [
298324
+ {
298325
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298326
+ "name": "RefAttributes"
298327
+ }
298328
+ ],
298329
+ "required": false,
298330
+ "type": {
298331
+ "name": "Ref<HTMLInputElement>"
298332
+ }
298333
+ },
298334
+ "key": {
298335
+ "defaultValue": null,
298336
+ "description": "",
298337
+ "name": "key",
298338
+ "parent": {
298339
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298340
+ "name": "Attributes"
298341
+ },
298342
+ "declarations": [
298343
+ {
298344
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298345
+ "name": "Attributes"
298346
+ }
298347
+ ],
298348
+ "required": false,
298349
+ "type": {
298350
+ "name": "Key | null"
298351
+ }
298352
+ },
298353
+ "children": {
298354
+ "defaultValue": null,
298355
+ "description": "",
298356
+ "name": "children",
298357
+ "declarations": [
298358
+ {
298359
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
298360
+ "name": "TypeLiteral"
298361
+ }
298362
+ ],
298363
+ "required": false,
298364
+ "type": {
298365
+ "name": "ReactNode"
298366
+ }
298367
+ }
298368
+ }
298369
+ },
298190
298370
  {
298191
298371
  "tags": {},
298192
298372
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Link/components/LinkIcon/LinkIcon.tsx",
@@ -300284,144 +300464,6 @@
300284
300464
  }
300285
300465
  }
300286
300466
  },
300287
- {
300288
- "tags": {},
300289
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/LightBox/components/LightBoxTrigger/LightBoxTrigger.tsx",
300290
- "description": "",
300291
- "displayName": "LightBoxTrigger",
300292
- "methods": [],
300293
- "props": {
300294
- "isDefaultOpen": {
300295
- "defaultValue": null,
300296
- "description": "Whether the overlay should be open initially.",
300297
- "name": "isDefaultOpen",
300298
- "parent": {
300299
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
300300
- "name": "OverlayTriggerProps"
300301
- },
300302
- "declarations": [
300303
- {
300304
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
300305
- "name": "OverlayTriggerProps"
300306
- }
300307
- ],
300308
- "required": false,
300309
- "type": {
300310
- "name": "boolean"
300311
- }
300312
- },
300313
- "controller": {
300314
- "defaultValue": null,
300315
- "description": "A controller to control the state of the overlay.",
300316
- "name": "controller",
300317
- "parent": {
300318
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
300319
- "name": "OverlayTriggerProps"
300320
- },
300321
- "declarations": [
300322
- {
300323
- "fileName": "components/src/components/OverlayTrigger/OverlayTrigger.tsx",
300324
- "name": "OverlayTriggerProps"
300325
- }
300326
- ],
300327
- "required": false,
300328
- "type": {
300329
- "name": "OverlayController"
300330
- }
300331
- },
300332
- "wrapWith": {
300333
- "defaultValue": null,
300334
- "description": "",
300335
- "name": "wrapWith",
300336
- "parent": {
300337
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
300338
- "name": "FlowComponentProps"
300339
- },
300340
- "declarations": [
300341
- {
300342
- "fileName": "components/src/lib/componentFactory/flowComponent.tsx",
300343
- "name": "FlowComponentProps"
300344
- }
300345
- ],
300346
- "required": false,
300347
- "type": {
300348
- "name": "ReactElement<unknown, string | JSXElementConstructor<any>>"
300349
- }
300350
- },
300351
- "tunnelId": {
300352
- "defaultValue": null,
300353
- "description": "@internal",
300354
- "name": "tunnelId",
300355
- "parent": {
300356
- "fileName": "components/src/lib/types/props.ts",
300357
- "name": "PropsWithTunnel"
300358
- },
300359
- "declarations": [
300360
- {
300361
- "fileName": "components/src/lib/types/props.ts",
300362
- "name": "PropsWithTunnel"
300363
- }
300364
- ],
300365
- "required": false,
300366
- "type": {
300367
- "name": "string | null"
300368
- }
300369
- },
300370
- "ref": {
300371
- "defaultValue": null,
300372
- "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}",
300373
- "name": "ref",
300374
- "parent": {
300375
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
300376
- "name": "RefAttributes"
300377
- },
300378
- "declarations": [
300379
- {
300380
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
300381
- "name": "RefAttributes"
300382
- }
300383
- ],
300384
- "required": false,
300385
- "type": {
300386
- "name": "Ref<HTMLInputElement>"
300387
- }
300388
- },
300389
- "key": {
300390
- "defaultValue": null,
300391
- "description": "",
300392
- "name": "key",
300393
- "parent": {
300394
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
300395
- "name": "Attributes"
300396
- },
300397
- "declarations": [
300398
- {
300399
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
300400
- "name": "Attributes"
300401
- }
300402
- ],
300403
- "required": false,
300404
- "type": {
300405
- "name": "Key | null"
300406
- }
300407
- },
300408
- "children": {
300409
- "defaultValue": null,
300410
- "description": "",
300411
- "name": "children",
300412
- "declarations": [
300413
- {
300414
- "fileName": "flow/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
300415
- "name": "TypeLiteral"
300416
- }
300417
- ],
300418
- "required": false,
300419
- "type": {
300420
- "name": "ReactNode"
300421
- }
300422
- }
300423
- }
300424
- },
300425
300467
  {
300426
300468
  "tags": {},
300427
300469
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Legend/components/LegendItem/LegendItem.tsx",
@@ -13,21 +13,70 @@ import styles from './Markdown.module.scss.mjs';
13
13
  import { extractTextFromFirstChild } from '../../lib/react/remote.mjs';
14
14
  import clsx from 'clsx';
15
15
  import remarkGfm from 'remark-gfm';
16
+ import { getHeadingLevelWithOffset } from './lib/getHeadingLevelWithOffset.mjs';
16
17
 
17
18
  const Markdown = (props) => {
18
- const { children, color = "default", className, ...rest } = props;
19
+ const {
20
+ children,
21
+ color = "default",
22
+ className,
23
+ headingOffset = 0,
24
+ ...rest
25
+ } = props;
19
26
  const headingAndLinkColor = color === "default" ? "primary" : color;
20
27
  const textColor = color === "default" ? void 0 : color;
21
28
  const components = {
22
29
  a: (props2) => /* @__PURE__ */ jsx(Link, { target: "_blank", color: headingAndLinkColor, href: props2.href, children: props2.children }),
23
30
  p: (props2) => /* @__PURE__ */ jsx(Text, { elementType: "p", color: textColor, children: props2.children }),
24
31
  code: (props2) => /* @__PURE__ */ jsx(InlineCode, { color, children: props2.children }),
25
- h1: (props2) => /* @__PURE__ */ jsx(Heading, { level: 1, color: headingAndLinkColor, children: props2.children }),
26
- h2: (props2) => /* @__PURE__ */ jsx(Heading, { level: 2, color: headingAndLinkColor, children: props2.children }),
27
- h3: (props2) => /* @__PURE__ */ jsx(Heading, { level: 3, color: headingAndLinkColor, children: props2.children }),
28
- h4: (props2) => /* @__PURE__ */ jsx(Heading, { level: 4, color: headingAndLinkColor, children: props2.children }),
29
- h5: (props2) => /* @__PURE__ */ jsx(Heading, { level: 5, color: headingAndLinkColor, children: props2.children }),
30
- h6: (props2) => /* @__PURE__ */ jsx(Heading, { level: 6, color: headingAndLinkColor, children: props2.children }),
32
+ h1: (props2) => /* @__PURE__ */ jsx(
33
+ Heading,
34
+ {
35
+ level: getHeadingLevelWithOffset(1, headingOffset),
36
+ color: headingAndLinkColor,
37
+ children: props2.children
38
+ }
39
+ ),
40
+ h2: (props2) => /* @__PURE__ */ jsx(
41
+ Heading,
42
+ {
43
+ level: getHeadingLevelWithOffset(2, headingOffset),
44
+ color: headingAndLinkColor,
45
+ children: props2.children
46
+ }
47
+ ),
48
+ h3: (props2) => /* @__PURE__ */ jsx(
49
+ Heading,
50
+ {
51
+ level: getHeadingLevelWithOffset(3, headingOffset),
52
+ color: headingAndLinkColor,
53
+ children: props2.children
54
+ }
55
+ ),
56
+ h4: (props2) => /* @__PURE__ */ jsx(
57
+ Heading,
58
+ {
59
+ level: getHeadingLevelWithOffset(4, headingOffset),
60
+ color: headingAndLinkColor,
61
+ children: props2.children
62
+ }
63
+ ),
64
+ h5: (props2) => /* @__PURE__ */ jsx(
65
+ Heading,
66
+ {
67
+ level: getHeadingLevelWithOffset(5, headingOffset),
68
+ color: headingAndLinkColor,
69
+ children: props2.children
70
+ }
71
+ ),
72
+ h6: (props2) => /* @__PURE__ */ jsx(
73
+ Heading,
74
+ {
75
+ level: getHeadingLevelWithOffset(6, headingOffset),
76
+ color: headingAndLinkColor,
77
+ children: props2.children
78
+ }
79
+ ),
31
80
  hr: () => /* @__PURE__ */ jsx(Separator, {}),
32
81
  pre: (props2) => {
33
82
  const preElementContent = Children.toArray(props2.children)[0];
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.mjs","sources":["../../../../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import { CodeBlock } from \"@/components/CodeBlock\";\nimport { Heading } from \"@/components/Heading\";\nimport { InlineCode } from \"@/components/InlineCode\";\nimport { Link } from \"@/components/Link\";\nimport { Separator } from \"@/components/Separator\";\nimport { Text } from \"@/components/Text\";\nimport type { CSSProperties, FC, ReactNode } from \"react\";\nimport React, { Children, isValidElement } from \"react\";\nimport type { Components, Options } from \"react-markdown\";\nimport ReactMarkdown from \"react-markdown\";\nimport styles from \"./Markdown.module.scss\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport remarkGfm from \"remark-gfm\";\n\nexport interface MarkdownProps\n extends PropsWithClassName,\n Omit<Options, \"components\"> {\n /** The color schema of the markdown component. */\n color?: \"dark\" | \"light\" | \"default\";\n /** @internal */\n style?: CSSProperties;\n}\n\n/** @flr-generate all */\nexport const Markdown: FC<MarkdownProps> = (props) => {\n const { children, color = \"default\", className, ...rest } = props;\n\n const headingAndLinkColor = color === \"default\" ? \"primary\" : color;\n const textColor = color === \"default\" ? undefined : color;\n\n const components: Components = {\n a: (props) => (\n <Link target=\"_blank\" color={headingAndLinkColor} href={props.href}>\n {props.children}\n </Link>\n ),\n p: (props) => (\n <Text elementType=\"p\" color={textColor}>\n {props.children}\n </Text>\n ),\n code: (props) => <InlineCode color={color}>{props.children}</InlineCode>,\n h1: (props) => (\n <Heading level={1} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n h2: (props) => (\n <Heading level={2} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n h3: (props) => (\n <Heading level={3} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n h4: (props) => (\n <Heading level={4} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n h5: (props) => (\n <Heading level={5} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n h6: (props) => (\n <Heading level={6} color={headingAndLinkColor}>\n {props.children}\n </Heading>\n ),\n hr: () => <Separator />,\n pre: (props) => {\n const preElementContent = Children.toArray(props.children)[0];\n\n return (\n <CodeBlock\n copyable={false}\n color=\"dark\"\n language={\n isValidElement<{ className?: string }>(preElementContent) &&\n preElementContent.props.className\n ? preElementContent.props.className.replace(\"language-\", \"\")\n : undefined\n }\n code={String(\n isValidElement<{ children: string }>(preElementContent)\n ? preElementContent.props.children\n : preElementContent,\n )}\n />\n );\n },\n ul: (props) => (\n <Text color={textColor}>\n <ul>{props.children as ReactNode}</ul>\n </Text>\n ),\n ol: (props) => (\n <Text color={textColor}>\n <ol>{props.children as ReactNode}</ol>\n </Text>\n ),\n blockquote: (props) => (\n <Text color={textColor}>\n <blockquote>{props.children}</blockquote>\n </Text>\n ),\n };\n\n const textContent = extractTextFromFirstChild(children);\n\n return (\n <div className={clsx(styles.markdown, className)} {...rest}>\n <ReactMarkdown remarkPlugins={[remarkGfm]} components={components}>\n {textContent}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default Markdown;\n"],"names":["props"],"mappings":";;;;;;;;;;;;;;AA0Ba,MAAA,QAAA,GAA8B,CAAC,KAAU,KAAA;AACpD,EAAA,MAAM,EAAE,QAAU,EAAA,KAAA,GAAQ,WAAW,SAAW,EAAA,GAAG,MAAS,GAAA,KAAA;AAE5D,EAAM,MAAA,mBAAA,GAAsB,KAAU,KAAA,SAAA,GAAY,SAAY,GAAA,KAAA;AAC9D,EAAM,MAAA,SAAA,GAAY,KAAU,KAAA,SAAA,GAAY,MAAY,GAAA,KAAA;AAEpD,EAAA,MAAM,UAAyB,GAAA;AAAA,IA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AAA,EAAsB,CACnC,EAAA,CAAA;AAAA,IAEF,UAAY,EAAA,CAACA,MACX,qBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,KAAA,EAAO,SACX,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAY,EAAA,EAAA,QAAA,EAAAA,MAAM,CAAA,QAAA,EAAS,CAC9B,EAAA;AAAA,GAEJ;AAEA,EAAM,MAAA,WAAA,GAAc,0BAA0B,QAAQ,CAAA;AAEtD,EAAA,2BACG,KAAI,EAAA,EAAA,SAAA,EAAW,KAAK,MAAO,CAAA,QAAA,EAAU,SAAS,CAAI,EAAA,GAAG,IACpD,EAAA,QAAA,kBAAA,GAAA,CAAC,iBAAc,aAAe,EAAA,CAAC,SAAS,CAAG,EAAA,UAAA,EACxC,uBACH,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Markdown.mjs","sources":["../../../../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import { CodeBlock } from \"@/components/CodeBlock\";\nimport { Heading } from \"@/components/Heading\";\nimport { InlineCode } from \"@/components/InlineCode\";\nimport { Link } from \"@/components/Link\";\nimport { Separator } from \"@/components/Separator\";\nimport { Text } from \"@/components/Text\";\nimport type { CSSProperties, FC, ReactNode } from \"react\";\nimport React, { Children, isValidElement } from \"react\";\nimport type { Components, Options } from \"react-markdown\";\nimport ReactMarkdown from \"react-markdown\";\nimport styles from \"./Markdown.module.scss\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport remarkGfm from \"remark-gfm\";\nimport { getHeadingLevelWithOffset } from \"@/components/Markdown/lib/getHeadingLevelWithOffset\";\n\nexport interface MarkdownProps\n extends PropsWithClassName,\n Omit<Options, \"components\"> {\n /** The color schema of the markdown component. */\n color?: \"dark\" | \"light\" | \"default\";\n /** Shifts all heading levels by the given offset. @default 0 */\n headingOffset?: number;\n /** @internal */\n style?: CSSProperties;\n}\n\n/** @flr-generate all */\nexport const Markdown: FC<MarkdownProps> = (props) => {\n const {\n children,\n color = \"default\",\n className,\n headingOffset = 0,\n ...rest\n } = props;\n\n const headingAndLinkColor = color === \"default\" ? \"primary\" : color;\n const textColor = color === \"default\" ? undefined : color;\n\n const components: Components = {\n a: (props) => (\n <Link target=\"_blank\" color={headingAndLinkColor} href={props.href}>\n {props.children}\n </Link>\n ),\n p: (props) => (\n <Text elementType=\"p\" color={textColor}>\n {props.children}\n </Text>\n ),\n code: (props) => <InlineCode color={color}>{props.children}</InlineCode>,\n h1: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(1, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n h2: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(2, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n h3: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(3, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n h4: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(4, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n h5: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(5, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n h6: (props) => (\n <Heading\n level={getHeadingLevelWithOffset(6, headingOffset)}\n color={headingAndLinkColor}\n >\n {props.children}\n </Heading>\n ),\n hr: () => <Separator />,\n pre: (props) => {\n const preElementContent = Children.toArray(props.children)[0];\n\n return (\n <CodeBlock\n copyable={false}\n color=\"dark\"\n language={\n isValidElement<{ className?: string }>(preElementContent) &&\n preElementContent.props.className\n ? preElementContent.props.className.replace(\"language-\", \"\")\n : undefined\n }\n code={String(\n isValidElement<{ children: string }>(preElementContent)\n ? preElementContent.props.children\n : preElementContent,\n )}\n />\n );\n },\n ul: (props) => (\n <Text color={textColor}>\n <ul>{props.children as ReactNode}</ul>\n </Text>\n ),\n ol: (props) => (\n <Text color={textColor}>\n <ol>{props.children as ReactNode}</ol>\n </Text>\n ),\n blockquote: (props) => (\n <Text color={textColor}>\n <blockquote>{props.children}</blockquote>\n </Text>\n ),\n };\n\n const textContent = extractTextFromFirstChild(children);\n\n return (\n <div className={clsx(styles.markdown, className)} {...rest}>\n <ReactMarkdown remarkPlugins={[remarkGfm]} components={components}>\n {textContent}\n </ReactMarkdown>\n </div>\n );\n};\n\nexport default Markdown;\n"],"names":["props"],"mappings":";;;;;;;;;;;;;;;AA6Ba,MAAA,QAAA,GAA8B,CAAC,KAAU,KAAA;AACpD,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,KAAQ,GAAA,SAAA;AAAA,IACR,SAAA;AAAA,IACA,aAAgB,GAAA,CAAA;AAAA,IAChB,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAM,MAAA,mBAAA,GAAsB,KAAU,KAAA,SAAA,GAAY,SAAY,GAAA,KAAA;AAC9D,EAAM,MAAA,SAAA,GAAY,KAAU,KAAA,SAAA,GAAY,MAAY,GAAA,KAAA;AAEpD,EAAA,MAAM,UAAyB,GAAA;AAAA,IAC7B,CAAG,EAAA,CAACA,MACF,qBAAA,GAAA,CAAC,QAAK,MAAO,EAAA,QAAA,EAAS,KAAO,EAAA,mBAAA,EAAqB,IAAMA,EAAAA,MAAAA,CAAM,IAC3D,EAAA,QAAA,EAAAA,OAAM,QACT,EAAA,CAAA;AAAA,IAEF,CAAA,EAAG,CAACA,MAAAA,qBACD,GAAA,CAAA,IAAA,EAAA,EAAK,WAAY,EAAA,GAAA,EAAI,KAAO,EAAA,SAAA,EAC1B,QAAAA,EAAAA,MAAAA,CAAM,QACT,EAAA,CAAA;AAAA,IAEF,IAAA,EAAM,CAACA,MAAU,qBAAA,GAAA,CAAC,cAAW,KAAe,EAAA,QAAA,EAAAA,OAAM,QAAS,EAAA,CAAA;AAAA,IAC3D,EAAA,EAAI,CAACA,MACH,qBAAA,GAAA;AAAA,MA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EAAA;AAAA,GAEJ;AAEA,EAAM,MAAA,WAAA,GAAc,0BAA0B,QAAQ,CAAA;AAEtD,EAAA,2BACG,KAAI,EAAA,EAAA,SAAA,EAAW,KAAK,MAAO,CAAA,QAAA,EAAU,SAAS,CAAI,EAAA,GAAG,IACpD,EAAA,QAAA,kBAAA,GAAA,CAAC,iBAAc,aAAe,EAAA,CAAC,SAAS,CAAG,EAAA,UAAA,EACxC,uBACH,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ const getHeadingLevelWithOffset = (level, offset) => {
4
+ const levelWithOffset = level + offset;
5
+ return levelWithOffset > 6 ? 6 : levelWithOffset < 1 ? 1 : levelWithOffset;
6
+ };
7
+
8
+ export { getHeadingLevelWithOffset };
9
+ //# sourceMappingURL=getHeadingLevelWithOffset.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHeadingLevelWithOffset.mjs","sources":["../../../../../../../src/components/Markdown/lib/getHeadingLevelWithOffset.ts"],"sourcesContent":["export const getHeadingLevelWithOffset = (level: number, offset: number) => {\n const levelWithOffset = level + offset;\n return levelWithOffset > 6 ? 6 : levelWithOffset < 1 ? 1 : levelWithOffset;\n};\n"],"names":[],"mappings":"AAAa,MAAA,yBAAA,GAA4B,CAAC,KAAA,EAAe,MAAmB,KAAA;AAC1E,EAAA,MAAM,kBAAkB,KAAQ,GAAA,MAAA;AAChC,EAAA,OAAO,eAAkB,GAAA,CAAA,GAAI,CAAI,GAAA,eAAA,GAAkB,IAAI,CAAI,GAAA,eAAA;AAC7D;;;;"}
@@ -19,6 +19,7 @@ const MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
19
19
  onChange,
20
20
  rows,
21
21
  autoResizeMaxRows,
22
+ headingOffset,
22
23
  ...rest
23
24
  } = props;
24
25
  const [markdown, setMarkdown] = useState(value ?? "");
@@ -39,7 +40,12 @@ const MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
39
40
  value: value !== void 0 ? value : markdown,
40
41
  rows,
41
42
  autoResizeMaxRows,
42
- onChange: (v) => setMarkdown(v),
43
+ onChange: (v) => {
44
+ if (onChange) {
45
+ onChange(v);
46
+ }
47
+ setMarkdown(v);
48
+ },
43
49
  onKeyDown: (e) => handleKeyDown(e, textAreaRef, setMarkdown, onChange),
44
50
  children: [
45
51
  /* @__PURE__ */ jsx(
@@ -57,6 +63,7 @@ const MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
57
63
  /* @__PURE__ */ jsx(
58
64
  Markdown,
59
65
  {
66
+ headingOffset,
60
67
  className: styles.markdown,
61
68
  style: {
62
69
  maxHeight: `calc(var(--line-height--m) * ${autoResizeMaxRows ?? rows} + (var(--form-control--padding-y) * 2))`
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.mjs","sources":["../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import React, { useRef, useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport { Markdown } from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { handleKeyDown } from \"@/components/MarkdownEditor/lib/handleKeyDown\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nexport type MarkdownEditorProps = TextAreaProps;\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n children,\n className,\n value,\n onChange,\n rows,\n autoResizeMaxRows,\n ...rest\n } = props;\n\n const [markdown, setMarkdown] = useState(value ?? \"\");\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const rootClassName = clsx(\n styles.markdownEditor,\n className,\n styles[`mode-${mode}`],\n );\n\n return (\n <TextArea\n {...rest}\n isDisabled={isDisabled || mode === \"preview\"}\n className={rootClassName}\n ref={textAreaRef}\n value={value !== undefined ? value : markdown}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={(v) => setMarkdown(v)}\n onKeyDown={(e) => handleKeyDown(e, textAreaRef, setMarkdown, onChange)}\n >\n <Toolbar\n markdown={markdown}\n setMarkdown={setMarkdown}\n textAreaRef={textAreaRef}\n setMode={setMode}\n mode={mode}\n isDisabled={isDisabled}\n onChange={onChange}\n />\n\n <Markdown\n className={styles.markdown}\n style={{\n maxHeight: `calc(var(--line-height--m) * ${autoResizeMaxRows ?? rows} + (var(--form-control--padding-y) * 2))`,\n }}\n >\n {markdown}\n </Markdown>\n\n {children}\n </TextArea>\n );\n});\n\nexport default MarkdownEditor;\n"],"names":[],"mappings":";;;;;;;;;;AAcO,MAAM,cAAiB,GAAA,aAAA,CAAc,gBAAkB,EAAA,CAAC,KAAU,KAAA;AACvE,EAAM,MAAA;AAAA,IACJ,UAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,iBAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,CAAC,QAAU,EAAA,WAAW,CAAI,GAAA,QAAA,CAAS,SAAS,EAAE,CAAA;AACpD,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAA6B,QAAQ,CAAA;AAC7D,EAAM,MAAA,WAAA,GAAc,OAA4B,IAAI,CAAA;AAEpD,EAAA,MAAM,aAAgB,GAAA,IAAA;AAAA,IACpB,MAAO,CAAA,cAAA;AAAA,IACP,SAAA;AAAA,IACA,MAAA,CAAO,CAAQ,KAAA,EAAA,IAAI,CAAE,CAAA;AAAA,GACvB;AAEA,EACE,uBAAA,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,UAAA,EAAY,cAAc,IAAS,KAAA,SAAA;AAAA,MACnC,SAAW,EAAA,aAAA;AAAA,MACX,GAAK,EAAA,WAAA;AAAA,MACL,KAAA,EAAO,KAAU,KAAA,MAAA,GAAY,KAAQ,GAAA,QAAA;AAAA,MACrC,IAAA;AAAA,MACA,iBAAA;AAAA,MACA,QAAU,EAAA,CAAC,CAAM,KAAA,WAAA,CAAY,CAAC,CAAA;AAAA,MAC9B,WAAW,CAAC,CAAA,KAAM,cAAc,CAAG,EAAA,WAAA,EAAa,aAAa,QAAQ,CAAA;AAAA,MAErE,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,QAAA;AAAA,YACA,WAAA;AAAA,YACA,WAAA;AAAA,YACA,OAAA;AAAA,YACA,IAAA;AAAA,YACA,UAAA;AAAA,YACA;AAAA;AAAA,SACF;AAAA,wBAEA,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACC,WAAW,MAAO,CAAA,QAAA;AAAA,YAClB,KAAO,EAAA;AAAA,cACL,SAAA,EAAW,CAAgC,6BAAA,EAAA,iBAAA,IAAqB,IAAI,CAAA,wCAAA;AAAA,aACtE;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACH;AAAA,QAEC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"MarkdownEditor.mjs","sources":["../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import React, { useRef, useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport { Markdown, type MarkdownProps } from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { handleKeyDown } from \"@/components/MarkdownEditor/lib/handleKeyDown\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nexport type MarkdownEditorProps = TextAreaProps &\n Pick<MarkdownProps, \"headingOffset\">;\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n children,\n className,\n value,\n onChange,\n rows,\n autoResizeMaxRows,\n headingOffset,\n ...rest\n } = props;\n\n const [markdown, setMarkdown] = useState(value ?? \"\");\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const rootClassName = clsx(\n styles.markdownEditor,\n className,\n styles[`mode-${mode}`],\n );\n\n return (\n <TextArea\n {...rest}\n isDisabled={isDisabled || mode === \"preview\"}\n className={rootClassName}\n ref={textAreaRef}\n value={value !== undefined ? value : markdown}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={(v) => {\n if (onChange) {\n onChange(v);\n }\n setMarkdown(v);\n }}\n onKeyDown={(e) => handleKeyDown(e, textAreaRef, setMarkdown, onChange)}\n >\n <Toolbar\n markdown={markdown}\n setMarkdown={setMarkdown}\n textAreaRef={textAreaRef}\n setMode={setMode}\n mode={mode}\n isDisabled={isDisabled}\n onChange={onChange}\n />\n\n <Markdown\n headingOffset={headingOffset}\n className={styles.markdown}\n style={{\n maxHeight: `calc(var(--line-height--m) * ${autoResizeMaxRows ?? rows} + (var(--form-control--padding-y) * 2))`,\n }}\n >\n {markdown}\n </Markdown>\n\n {children}\n </TextArea>\n );\n});\n\nexport default MarkdownEditor;\n"],"names":[],"mappings":";;;;;;;;;;AAeO,MAAM,cAAiB,GAAA,aAAA,CAAc,gBAAkB,EAAA,CAAC,KAAU,KAAA;AACvE,EAAM,MAAA;AAAA,IACJ,UAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,iBAAA;AAAA,IACA,aAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,CAAC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6BAAA,EAAA,iBAAA,IAAqB,IAAI,CAAA,wCAAA;AAAA,aACtE;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACH;AAAA,QAEC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
@@ -99,15 +99,15 @@ export declare const typedList: <T>() => {
99
99
  onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
100
100
  id?: import('react-aria').Key | undefined;
101
101
  rel?: string | undefined;
102
+ isDisabled?: boolean | undefined;
103
+ value?: undefined;
102
104
  target?: import('react').HTMLAttributeAnchorTarget | undefined;
103
105
  href?: import('@react-types/shared').Href | undefined;
104
- isDisabled?: boolean | undefined;
105
106
  onPress?: ((e: import('react-aria').PressEvent) => void) | undefined;
106
107
  onPressStart?: ((e: import('react-aria').PressEvent) => void) | undefined;
107
108
  onPressEnd?: ((e: import('react-aria').PressEvent) => void) | undefined;
108
109
  onPressChange?: ((isPressed: boolean) => void) | undefined;
109
110
  onPressUp?: ((e: import('react-aria').PressEvent) => void) | undefined;
110
- value?: undefined;
111
111
  onHoverStart?: ((e: import('react-aria').HoverEvent) => void) | undefined;
112
112
  onHoverEnd?: ((e: import('react-aria').HoverEvent) => void) | undefined;
113
113
  onHoverChange?: ((isHovering: boolean) => void) | undefined;
@@ -4,6 +4,8 @@ import { PropsWithClassName } from '../../lib/types/props';
4
4
  export interface MarkdownProps extends PropsWithClassName, Omit<Options, "components"> {
5
5
  /** The color schema of the markdown component. */
6
6
  color?: "dark" | "light" | "default";
7
+ /** Shifts all heading levels by the given offset. @default 0 */
8
+ headingOffset?: number;
7
9
  }
8
10
  /** @flr-generate all */
9
11
  export declare const Markdown: FC<MarkdownProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,EAAE,EAAa,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,MAAM,WAAW,aACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC;IAC7B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAGtC;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAgGtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,EAAE,EAAa,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,MAAM,WAAW,aACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC;IAC7B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;CAGxB;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwHtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getHeadingLevelWithOffset: (level: number, offset: number) => number;
2
+ //# sourceMappingURL=getHeadingLevelWithOffset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHeadingLevelWithOffset.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/lib/getHeadingLevelWithOffset.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,WAGtE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=getHeadingLevelWithOffset.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHeadingLevelWithOffset.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/lib/getHeadingLevelWithOffset.test.ts"],"names":[],"mappings":""}
@@ -6,4 +6,5 @@ type Story = StoryObj<typeof Markdown>;
6
6
  export declare const Default: Story;
7
7
  export declare const Dark: Story;
8
8
  export declare const Light: Story;
9
+ export declare const WithOffset: Story;
9
10
  //# sourceMappingURL=Default.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAmB/B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Markdown/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAoB/B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAsC,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
+ import { MarkdownProps } from '../Markdown';
2
3
  import { TextAreaProps } from '../TextArea';
3
4
  export type MarkdownEditorMode = "editor" | "preview";
4
- export type MarkdownEditorProps = TextAreaProps;
5
+ export type MarkdownEditorProps = TextAreaProps & Pick<MarkdownProps, "headingOffset">;
5
6
  /** @flr-generate all */
6
- export declare const MarkdownEditor: React.FunctionComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
7
+ export declare const MarkdownEditor: React.FunctionComponent<TextAreaProps & Pick<MarkdownProps, "headingOffset"> & React.RefAttributes<HTMLTextAreaElement>>;
7
8
  export default MarkdownEditor;
8
9
  //# sourceMappingURL=MarkdownEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMrE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEhD,wBAAwB;AACxB,eAAO,MAAM,cAAc,mFAwDzB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMrE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAC7C,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AAEvC,wBAAwB;AACxB,eAAO,MAAM,cAAc,0HA+DzB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -10,4 +10,5 @@ export declare const ShowCharacterCount: Story;
10
10
  export declare const WithFieldError: Story;
11
11
  export declare const Resizeable: Story;
12
12
  export declare const WithForm: Story;
13
+ export declare const WithOnChange: Story;
13
14
  //# sourceMappingURL=Default.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAQ7D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAKrC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAuBtB,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownEditor/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAQ7D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAKrC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAuBtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.460",
3
+ "version": "0.2.0-alpha.462",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "@internationalized/string-compiler": "^3.2.6",
59
59
  "@mittwald/password-tools-js": "3.0.0-alpha.18",
60
- "@mittwald/react-tunnel": "0.2.0-alpha.460",
60
+ "@mittwald/react-tunnel": "0.2.0-alpha.462",
61
61
  "@mittwald/react-use-promise": "^3.0.4",
62
62
  "@react-aria/form": "^3.1.0",
63
63
  "@react-aria/live-announcer": "^3.4.4",
@@ -100,7 +100,7 @@
100
100
  "@faker-js/faker": "^9.9.0",
101
101
  "@internationalized/date": "^3.8.2",
102
102
  "@mittwald/flow-core": "",
103
- "@mittwald/flow-design-tokens": "0.2.0-alpha.460",
103
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.462",
104
104
  "@mittwald/react-use-promise": "^3.0.4",
105
105
  "@mittwald/remote-dom-react": "1.2.2-mittwald.3",
106
106
  "@mittwald/typescript-config": "",
@@ -173,5 +173,5 @@
173
173
  "optional": true
174
174
  }
175
175
  },
176
- "gitHead": "97029ba8087030415b1637619d5251cf9bc81b70"
176
+ "gitHead": "b45ea2fff577a38068c140f495c92d76cd2e32f1"
177
177
  }