@gobolt/genesis 0.2.20 → 0.3.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/README.md +10 -11
- package/dist/_virtual/index5.cjs +4 -4
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.cjs +4 -4
- package/dist/_virtual/index6.js +4 -4
- package/dist/_virtual/index7.cjs +5 -2
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.cjs +3 -0
- package/dist/_virtual/index8.js +4 -0
- package/dist/_virtual/utilities.cjs +3 -0
- package/dist/_virtual/utilities.js +4 -0
- package/dist/components/Avatar/styles.d.ts +2 -2
- package/dist/components/Badge/Badge.cjs +3 -3
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/__stories__/Badge.stories.d.ts +1 -0
- package/dist/components/Badge/styles.cjs +9 -10
- package/dist/components/Badge/styles.d.ts +5 -6
- package/dist/components/Badge/styles.js +9 -10
- package/dist/components/Breadcrumb/styles.cjs +3 -1
- package/dist/components/Breadcrumb/styles.d.ts +4 -4
- package/dist/components/Breadcrumb/styles.js +3 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/icon-button-styles.d.ts +2 -2
- package/dist/components/Button/styles.d.ts +4 -4
- package/dist/components/Card/styles.d.ts +2 -2
- package/dist/components/Chat/Chat.cjs +247 -0
- package/dist/components/Chat/Chat.d.ts +18 -0
- package/dist/components/Chat/Chat.js +248 -0
- package/dist/components/Chat/Message.cjs +96 -0
- package/dist/components/Chat/Message.d.ts +8 -0
- package/dist/components/Chat/Message.js +97 -0
- package/dist/components/Chat/__stories__/Chat.stories.d.ts +19 -0
- package/dist/components/Chat/index.d.ts +2 -0
- package/dist/components/Checkbox/styles.d.ts +2 -2
- package/dist/components/Dashboard/__stories__/charts/LineChart.d.ts +2 -2
- package/dist/components/Dashboard/styles.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.cjs +2 -2
- package/dist/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/components/DatePicker/DatePicker.js +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.cjs +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +2 -2
- package/dist/components/ErrorBoundary/ErrorBoundary.cjs +2 -2
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/dist/components/ErrorBoundary/styles.d.ts +2 -2
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.cjs +12 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +1 -1
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +12 -4
- package/dist/components/Filters/__stories__/Filters.stories.d.ts +0 -2
- package/dist/components/Filters/__stories__/mock.d.ts +5 -0
- package/dist/components/Filters/styles.d.ts +4 -4
- package/dist/components/Form/Form.cjs +2 -2
- package/dist/components/Form/Form.d.ts +2 -2
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Glyph/custom/UnitNumber.cjs +51 -0
- package/dist/components/Glyph/custom/UnitNumber.d.ts +5 -0
- package/dist/components/Glyph/custom/UnitNumber.js +52 -0
- package/dist/components/Glyph/custom/__stories__/UnitNumber.stories.d.ts +7 -0
- package/dist/components/Glyph/index.d.ts +2 -0
- package/dist/components/Glyph/styles.d.ts +2 -2
- package/dist/components/Input/Input.cjs +19 -2
- package/dist/components/Input/Input.d.ts +7 -3
- package/dist/components/Input/Input.js +19 -2
- package/dist/components/Input/styles.cjs +43 -12
- package/dist/components/Input/styles.d.ts +5 -4
- package/dist/components/Input/styles.js +43 -12
- package/dist/components/Layout/Content/ResponsiveContent.d.ts +2 -2
- package/dist/components/Layout/Content/styles.d.ts +2 -2
- package/dist/components/Message/Message.cjs +21 -11
- package/dist/components/Message/Message.js +21 -11
- package/dist/components/Notification/Notification.cjs +11 -6
- package/dist/components/Notification/Notification.js +11 -6
- package/dist/components/Notification/NotificationBadge/NotificationBadge.cjs +19 -10
- package/dist/components/Notification/NotificationBadge/NotificationBadge.js +19 -10
- package/dist/components/Notification/NotificationBadge/icons/ASN.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/ASN.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/ASN.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Appointment.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Appointment.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Appointment.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Inventory.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Inventory.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Inventory.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Parcel.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Parcel.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Parcel.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Product.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Product.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Product.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Route.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Route.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Route.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Shipment.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/Shipment.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/Shipment.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/ShoppingCart.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/ShoppingCart.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/ShoppingCart.js +2 -2
- package/dist/components/Notification/NotificationBadge/icons/System.cjs +2 -2
- package/dist/components/Notification/NotificationBadge/icons/System.d.ts +1 -1
- package/dist/components/Notification/NotificationBadge/icons/System.js +2 -2
- package/dist/components/Notification/NotificationRightChevron.cjs +2 -2
- package/dist/components/Notification/NotificationRightChevron.d.ts +1 -1
- package/dist/components/Notification/NotificationRightChevron.js +2 -2
- package/dist/components/Notification/styles.d.ts +2 -2
- package/dist/components/Popover/styles.d.ts +2 -2
- package/dist/components/Progress/Progress.cjs +1 -1
- package/dist/components/Progress/Progress.js +1 -1
- package/dist/components/Progress/styles.d.ts +2 -2
- package/dist/components/Radio/Radio.cjs +3 -3
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/states/RadioChecked.cjs +2 -2
- package/dist/components/Radio/states/RadioChecked.d.ts +1 -1
- package/dist/components/Radio/states/RadioChecked.js +2 -2
- package/dist/components/Radio/states/RadioCheckedDisabled.cjs +2 -2
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +1 -1
- package/dist/components/Radio/states/RadioCheckedDisabled.js +2 -2
- package/dist/components/Radio/states/RadioCheckedFocussed.cjs +2 -2
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +1 -1
- package/dist/components/Radio/states/RadioCheckedFocussed.js +2 -2
- package/dist/components/Radio/states/RadioCheckedHover.cjs +2 -2
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +1 -1
- package/dist/components/Radio/states/RadioCheckedHover.js +2 -2
- package/dist/components/Radio/states/RadioUnchecked.cjs +2 -2
- package/dist/components/Radio/states/RadioUnchecked.d.ts +1 -1
- package/dist/components/Radio/states/RadioUnchecked.js +2 -2
- package/dist/components/Radio/states/RadioUncheckedDisabled.cjs +2 -2
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +1 -1
- package/dist/components/Radio/states/RadioUncheckedDisabled.js +2 -2
- package/dist/components/Radio/states/RadioUncheckedFocussed.cjs +2 -2
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +1 -1
- package/dist/components/Radio/states/RadioUncheckedFocussed.js +2 -2
- package/dist/components/Radio/states/RadioUncheckedHover.cjs +2 -2
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +1 -1
- package/dist/components/Radio/states/RadioUncheckedHover.js +2 -2
- package/dist/components/Row/Row.cjs +2 -2
- package/dist/components/Row/Row.d.ts +1 -1
- package/dist/components/Row/Row.js +2 -2
- package/dist/components/Row/RowActions/RowActions.d.ts +2 -2
- package/dist/components/Row/RowLabelValue/RowLabelValue.cjs +1 -1
- package/dist/components/Row/RowLabelValue/RowLabelValue.d.ts +2 -2
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +1 -1
- package/dist/components/Row/RowLabelValue/styles.d.ts +2 -2
- package/dist/components/Row/styles.d.ts +2 -2
- package/dist/components/SegmentedControls/styles.d.ts +2 -2
- package/dist/components/Select/Select.cjs +187 -51
- package/dist/components/Select/Select.d.ts +10 -3
- package/dist/components/Select/Select.js +189 -53
- package/dist/components/Select/SelectTrigger.cjs +131 -0
- package/dist/components/Select/SelectTrigger.d.ts +23 -0
- package/dist/components/Select/SelectTrigger.js +132 -0
- package/dist/components/Select/__stories__/Select.stories.d.ts +4 -3
- package/dist/components/Select/index.d.ts +0 -2
- package/dist/components/Switch/styles.d.ts +2 -2
- package/dist/components/Table/Table.cjs +21 -2
- package/dist/components/Table/Table.d.ts +7 -3
- package/dist/components/Table/Table.js +21 -2
- package/dist/components/Table/TableControls/CustomPagination.cjs +321 -0
- package/dist/components/Table/TableControls/CustomPagination.d.ts +13 -0
- package/dist/components/Table/TableControls/CustomPagination.js +321 -0
- package/dist/components/Table/TableControls/PaginationNumber.cjs +44 -0
- package/dist/components/Table/TableControls/PaginationNumber.d.ts +7 -0
- package/dist/components/Table/TableControls/PaginationNumber.js +45 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.cjs +74 -39
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.d.ts +3 -1
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +74 -39
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.cjs +8 -6
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +8 -6
- package/dist/components/Table/TableControls/TableControls.cjs +3 -1
- package/dist/components/Table/TableControls/TableControls.js +3 -1
- package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.d.ts +9 -0
- package/dist/components/Table/TableControls/__stories__/PaginationNumber.stories.d.ts +7 -0
- package/dist/components/Table/TableControls/styles.d.ts +2 -2
- package/dist/components/Table/TablePagination.cjs +51 -0
- package/dist/components/Table/TablePagination.d.ts +13 -0
- package/dist/components/Table/TablePagination.js +52 -0
- package/dist/components/Table/TableWithControls/TableWithControls.cjs +2 -2
- package/dist/components/Table/TableWithControls/TableWithControls.js +2 -2
- package/dist/components/Table/TableWithControls/useTableWithControls.cjs +19 -19
- package/dist/components/Table/TableWithControls/useTableWithControls.js +20 -20
- package/dist/components/Table/__mocks__/table-mocks.cjs +241 -9
- package/dist/components/Table/__mocks__/table-mocks.d.ts +1 -1
- package/dist/components/Table/__mocks__/table-mocks.js +241 -9
- package/dist/components/Table/__stories__/GenesisTable.stories.d.ts +3 -1
- package/dist/components/Table/__stories__/Table.stories.d.ts +4 -4
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/styles.cjs +54 -25
- package/dist/components/Table/styles.d.ts +25 -4
- package/dist/components/Table/styles.js +54 -25
- package/dist/components/Tabs/styles.d.ts +2 -2
- package/dist/components/Tile/styles.d.ts +2 -2
- package/dist/components/Toast/Toast.cjs +20 -10
- package/dist/components/Toast/Toast.js +20 -10
- package/dist/components/Tooltip/Tooltip.cjs +4 -4
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/styles.cjs +18 -2
- package/dist/components/Tooltip/styles.d.ts +2 -2
- package/dist/components/Tooltip/styles.js +18 -2
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/styles.cjs +4 -2
- package/dist/components/Typography/styles.d.ts +4 -4
- package/dist/components/Typography/styles.js +4 -2
- package/dist/components/index.d.ts +4 -2
- package/dist/components/shared/DropdownChevron.cjs +3 -3
- package/dist/components/shared/DropdownChevron.d.ts +1 -1
- package/dist/components/shared/DropdownChevron.js +3 -3
- package/dist/genesis/GenesisThemeDemo.d.ts +2 -2
- package/dist/genesis/styles.d.ts +3 -3
- package/dist/index.cjs +6 -4
- package/dist/index.js +52 -50
- package/dist/node_modules/@socket.io/component-emitter/lib/esm/index.cjs +72 -0
- package/dist/node_modules/@socket.io/component-emitter/lib/esm/index.js +73 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs +67 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +68 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.cjs +11 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +11 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs +134 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +135 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.cjs +21 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +22 -0
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.cjs +1 -1
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.js +1 -1
- package/dist/node_modules/bail/index.cjs +7 -0
- package/dist/node_modules/bail/index.js +8 -0
- package/dist/node_modules/comma-separated-tokens/index.cjs +9 -0
- package/dist/node_modules/comma-separated-tokens/index.js +10 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.cjs +16 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js +17 -0
- package/dist/node_modules/devlop/lib/default.cjs +7 -0
- package/dist/node_modules/devlop/lib/default.js +8 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.cjs +8 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.js +9 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.cjs +23 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.js +24 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.cjs +60 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js +61 -0
- package/dist/node_modules/engine.io-client/build/esm/globals.cjs +25 -0
- package/dist/node_modules/engine.io-client/build/esm/globals.js +26 -0
- package/dist/node_modules/engine.io-client/build/esm/socket.cjs +575 -0
- package/dist/node_modules/engine.io-client/build/esm/socket.js +576 -0
- package/dist/node_modules/engine.io-client/build/esm/transport.cjs +137 -0
- package/dist/node_modules/engine.io-client/build/esm/transport.js +138 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/index.cjs +10 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/index.js +11 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.cjs +248 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +249 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.cjs +134 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +135 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.cjs +101 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js +102 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.cjs +66 -0
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +67 -0
- package/dist/node_modules/engine.io-client/build/esm/util.cjs +52 -0
- package/dist/node_modules/engine.io-client/build/esm/util.js +53 -0
- package/dist/node_modules/engine.io-parser/build/esm/commons.cjs +17 -0
- package/dist/node_modules/engine.io-parser/build/esm/commons.js +18 -0
- package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.cjs +27 -0
- package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +28 -0
- package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.cjs +55 -0
- package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +56 -0
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.cjs +56 -0
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +57 -0
- package/dist/node_modules/engine.io-parser/build/esm/index.cjs +151 -0
- package/dist/node_modules/engine.io-parser/build/esm/index.js +152 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.cjs +10 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +11 -0
- package/dist/node_modules/extend/index.cjs +93 -0
- package/dist/node_modules/extend/index.js +94 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +389 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +390 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.cjs +9 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +10 -0
- package/dist/node_modules/html-url-attributes/lib/index.cjs +25 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +26 -0
- package/dist/node_modules/inline-style-parser/index.cjs +140 -0
- package/dist/node_modules/inline-style-parser/index.js +141 -0
- package/dist/node_modules/is-plain-obj/index.cjs +9 -0
- package/dist/node_modules/is-plain-obj/index.js +10 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.cjs +718 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +719 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.cjs +114 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +115 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.cjs +7 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.cjs +23 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +24 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.cjs +40 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +41 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.cjs +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +11 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.cjs +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.cjs +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +16 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.cjs +58 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +59 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.cjs +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.cjs +23 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +24 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.cjs +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.cjs +63 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +64 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.cjs +25 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +26 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.cjs +7 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.cjs +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.cjs +34 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +35 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.cjs +38 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +39 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.cjs +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +9 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.cjs +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.cjs +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.cjs +28 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +29 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.cjs +147 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +148 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.cjs +37 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +38 -0
- package/dist/node_modules/micromark/lib/constructs.cjs +92 -0
- package/dist/node_modules/micromark/lib/constructs.js +93 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.cjs +319 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +320 -0
- package/dist/node_modules/micromark/lib/initialize/content.cjs +52 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +53 -0
- package/dist/node_modules/micromark/lib/initialize/document.cjs +185 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +186 -0
- package/dist/node_modules/micromark/lib/initialize/flow.cjs +41 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +42 -0
- package/dist/node_modules/micromark/lib/initialize/text.cjs +141 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +142 -0
- package/dist/node_modules/micromark/lib/parse.cjs +33 -0
- package/dist/node_modules/micromark/lib/parse.js +34 -0
- package/dist/node_modules/micromark/lib/postprocess.cjs +8 -0
- package/dist/node_modules/micromark/lib/postprocess.js +9 -0
- package/dist/node_modules/micromark/lib/preprocess.cjs +79 -0
- package/dist/node_modules/micromark/lib/preprocess.js +80 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs +134 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +135 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.cjs +102 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +103 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.cjs +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.cjs +60 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +61 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.cjs +27 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +28 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.cjs +67 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +68 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs +185 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +186 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs +66 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +67 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.cjs +115 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +116 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.cjs +74 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +75 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.cjs +93 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +94 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.cjs +22 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +23 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs +94 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +95 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs +382 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +383 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.cjs +308 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +309 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs +234 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +235 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs +32 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +33 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs +23 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +24 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.cjs +16 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.cjs +134 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +135 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs +94 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +95 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.cjs +41 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +42 -0
- package/dist/node_modules/micromark-factory-destination/index.cjs +93 -0
- package/dist/node_modules/micromark-factory-destination/index.js +94 -0
- package/dist/node_modules/micromark-factory-label/index.cjs +62 -0
- package/dist/node_modules/micromark-factory-label/index.js +63 -0
- package/dist/node_modules/micromark-factory-space/index.cjs +23 -0
- package/dist/node_modules/micromark-factory-space/index.js +24 -0
- package/dist/node_modules/micromark-factory-title/index.cjs +64 -0
- package/dist/node_modules/micromark-factory-title/index.js +65 -0
- package/dist/node_modules/micromark-factory-whitespace/index.cjs +21 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +22 -0
- package/dist/node_modules/micromark-util-character/index.cjs +43 -0
- package/dist/node_modules/micromark-util-character/index.js +44 -0
- package/dist/node_modules/micromark-util-chunked/index.cjs +35 -0
- package/dist/node_modules/micromark-util-chunked/index.js +36 -0
- package/dist/node_modules/micromark-util-classify-character/index.cjs +11 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +12 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.cjs +40 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +41 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.cjs +18 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +19 -0
- package/dist/node_modules/micromark-util-decode-string/index.cjs +20 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +21 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.cjs +68 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +69 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.cjs +5 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +6 -0
- package/dist/node_modules/micromark-util-resolve-all/index.cjs +14 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +15 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.cjs +40 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +41 -0
- package/dist/node_modules/micromark-util-subtokenize/index.cjs +156 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +157 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.cjs +193 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +194 -0
- package/dist/node_modules/property-information/index.cjs +12 -0
- package/dist/node_modules/property-information/index.js +13 -0
- package/dist/node_modules/property-information/lib/aria.cjs +60 -0
- package/dist/node_modules/property-information/lib/aria.js +61 -0
- package/dist/node_modules/property-information/lib/find.cjs +39 -0
- package/dist/node_modules/property-information/lib/find.js +40 -0
- package/dist/node_modules/property-information/lib/hast-to-react.cjs +21 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +22 -0
- package/dist/node_modules/property-information/lib/html.cjs +367 -0
- package/dist/node_modules/property-information/lib/html.js +368 -0
- package/dist/node_modules/property-information/lib/normalize.cjs +5 -0
- package/dist/node_modules/property-information/lib/normalize.js +6 -0
- package/dist/node_modules/property-information/lib/svg.cjs +565 -0
- package/dist/node_modules/property-information/lib/svg.js +566 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.cjs +6 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.cjs +5 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
- package/dist/node_modules/property-information/lib/util/create.cjs +24 -0
- package/dist/node_modules/property-information/lib/util/create.js +25 -0
- package/dist/node_modules/property-information/lib/util/defined-info.cjs +40 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js +41 -0
- package/dist/node_modules/property-information/lib/util/info.cjs +28 -0
- package/dist/node_modules/property-information/lib/util/info.js +29 -0
- package/dist/node_modules/property-information/lib/util/merge.cjs +12 -0
- package/dist/node_modules/property-information/lib/util/merge.js +13 -0
- package/dist/node_modules/property-information/lib/util/schema.cjs +24 -0
- package/dist/node_modules/property-information/lib/util/schema.js +25 -0
- package/dist/node_modules/property-information/lib/util/types.cjs +19 -0
- package/dist/node_modules/property-information/lib/util/types.js +20 -0
- package/dist/node_modules/property-information/lib/xlink.cjs +18 -0
- package/dist/node_modules/property-information/lib/xlink.js +19 -0
- package/dist/node_modules/property-information/lib/xml.cjs +10 -0
- package/dist/node_modules/property-information/lib/xml.js +11 -0
- package/dist/node_modules/property-information/lib/xmlns.cjs +10 -0
- package/dist/node_modules/property-information/lib/xmlns.js +11 -0
- package/dist/node_modules/react-icons/hi/index.cjs +32 -0
- package/dist/node_modules/react-icons/hi/index.js +33 -1
- package/dist/node_modules/react-icons/pi/index.cjs +4 -0
- package/dist/node_modules/react-icons/pi/index.js +5 -1
- package/dist/node_modules/react-markdown/lib/index.cjs +148 -0
- package/dist/node_modules/react-markdown/lib/index.js +149 -0
- package/dist/node_modules/remark-parse/lib/index.cjs +18 -0
- package/dist/node_modules/remark-parse/lib/index.js +19 -0
- package/dist/node_modules/remark-rehype/lib/index.cjs +20 -0
- package/dist/node_modules/remark-rehype/lib/index.js +21 -0
- package/dist/node_modules/socket.io-client/build/esm/contrib/backo2.cjs +31 -0
- package/dist/node_modules/socket.io-client/build/esm/contrib/backo2.js +32 -0
- package/dist/node_modules/socket.io-client/build/esm/index.cjs +58 -0
- package/dist/node_modules/socket.io-client/build/esm/index.js +58 -0
- package/dist/node_modules/socket.io-client/build/esm/manager.cjs +363 -0
- package/dist/node_modules/socket.io-client/build/esm/manager.js +364 -0
- package/dist/node_modules/socket.io-client/build/esm/on.cjs +8 -0
- package/dist/node_modules/socket.io-client/build/esm/on.js +9 -0
- package/dist/node_modules/socket.io-client/build/esm/socket.cjs +777 -0
- package/dist/node_modules/socket.io-client/build/esm/socket.js +778 -0
- package/dist/node_modules/socket.io-client/build/esm/url.cjs +48 -0
- package/dist/node_modules/socket.io-client/build/esm/url.js +49 -0
- package/dist/node_modules/socket.io-parser/build/esm/binary.cjs +64 -0
- package/dist/node_modules/socket.io-parser/build/esm/binary.js +65 -0
- package/dist/node_modules/socket.io-parser/build/esm/index.cjs +261 -0
- package/dist/node_modules/socket.io-parser/build/esm/index.js +263 -0
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.cjs +38 -0
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.js +39 -0
- package/dist/node_modules/space-separated-tokens/index.cjs +5 -0
- package/dist/node_modules/space-separated-tokens/index.js +6 -0
- package/dist/node_modules/style-to-js/cjs/index.cjs +30 -0
- package/dist/node_modules/style-to-js/cjs/index.js +31 -0
- package/dist/node_modules/style-to-js/cjs/utilities.cjs +41 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +42 -0
- package/dist/node_modules/style-to-object/cjs/index.cjs +37 -0
- package/dist/node_modules/style-to-object/cjs/index.js +38 -0
- package/dist/node_modules/trim-lines/index.cjs +40 -0
- package/dist/node_modules/trim-lines/index.js +41 -0
- package/dist/node_modules/trough/lib/index.cjs +85 -0
- package/dist/node_modules/trough/lib/index.js +86 -0
- package/dist/node_modules/unified/lib/callable-instance.cjs +29 -0
- package/dist/node_modules/unified/lib/callable-instance.js +30 -0
- package/dist/node_modules/unified/lib/index.cjs +635 -0
- package/dist/node_modules/unified/lib/index.js +636 -0
- package/dist/node_modules/unist-util-is/lib/index.cjs +92 -0
- package/dist/node_modules/unist-util-is/lib/index.js +93 -0
- package/dist/node_modules/unist-util-position/lib/index.cjs +26 -0
- package/dist/node_modules/unist-util-position/lib/index.js +27 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.cjs +26 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +27 -0
- package/dist/node_modules/unist-util-visit/lib/index.cjs +26 -0
- package/dist/node_modules/unist-util-visit/lib/index.js +28 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs +5 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +6 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs +82 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +83 -0
- package/dist/node_modules/vfile/lib/index.cjs +461 -0
- package/dist/node_modules/vfile/lib/index.js +462 -0
- package/dist/node_modules/vfile/lib/minpath.browser.cjs +213 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +214 -0
- package/dist/node_modules/vfile/lib/minproc.browser.cjs +6 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +7 -0
- package/dist/node_modules/vfile/lib/minurl.browser.cjs +45 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +46 -0
- package/dist/node_modules/vfile/lib/minurl.shared.cjs +8 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +9 -0
- package/dist/node_modules/vfile-message/lib/index.cjs +137 -0
- package/dist/node_modules/vfile-message/lib/index.js +138 -0
- package/dist/providers/BreakpointProvider.cjs +4 -2
- package/dist/providers/BreakpointProvider.d.ts +2 -2
- package/dist/providers/BreakpointProvider.js +4 -2
- package/dist/providers/GenesisProvider.cjs +1 -1
- package/dist/providers/GenesisProvider.d.ts +2 -2
- package/dist/providers/GenesisProvider.js +1 -1
- package/dist/providers/ToastProvider.cjs +3 -3
- package/dist/providers/ToastProvider.js +3 -3
- package/dist/providers/useGenesis.cjs +1 -1
- package/dist/providers/useGenesis.js +1 -1
- package/dist/styles/global-styles.cjs +1 -1
- package/dist/styles/global-styles.js +1 -1
- package/dist/styles/theme/genesis-theme.cjs +19 -8
- package/dist/styles/theme/genesis-theme.js +20 -9
- package/dist/styles/theme/genesis-theme.types.d.ts +7 -1
- package/dist/utils/icon-util.cjs +57 -48
- package/dist/utils/icon-util.js +58 -49
- package/dist/utils/styled.d.ts +1 -6
- package/dist/utils/user-util.cjs +2 -2
- package/dist/utils/user-util.js +2 -2
- package/package.json +11 -2
- package/dist/components/Select/MultiSelectCount.cjs +0 -48
- package/dist/components/Select/MultiSelectCount.d.ts +0 -13
- package/dist/components/Select/MultiSelectCount.js +0 -49
- package/dist/components/Select/__stories__/MultiSelectCount.stories.d.ts +0 -8
- package/dist/components/Select/styles.cjs +0 -238
- package/dist/components/Select/styles.d.ts +0 -41
- package/dist/components/Select/styles.js +0 -239
- package/dist/node_modules/@ant-design/icons/es/icons/ClockCircleFilled.cjs +0 -35
- package/dist/node_modules/@ant-design/icons/es/icons/ClockCircleFilled.js +0 -17
- package/dist/node_modules/@ant-design/icons/es/icons/MinusCircleFilled.cjs +0 -35
- package/dist/node_modules/@ant-design/icons/es/icons/MinusCircleFilled.js +0 -17
- package/dist/node_modules/@ant-design/icons-svg/es/asn/ClockCircleFilled.cjs +0 -3
- package/dist/node_modules/@ant-design/icons-svg/es/asn/ClockCircleFilled.js +0 -4
- package/dist/node_modules/@ant-design/icons-svg/es/asn/MinusCircleFilled.cjs +0 -3
- package/dist/node_modules/@ant-design/icons-svg/es/asn/MinusCircleFilled.js +0 -4
- package/dist/node_modules/debounce/index.cjs +0 -83
- package/dist/node_modules/debounce/index.js +0 -84
- package/dist/utils/styled.cjs +0 -10
- package/dist/utils/styled.js +0 -11
- /package/dist/components/{Select/__tests__/Select.test.d.ts → Table/TableControls/__tests__/CustomPagination.test.d.ts} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { markdownLineEnding } from "../../micromark-util-character/index.js";
|
|
2
|
+
const codeText = {
|
|
3
|
+
name: "codeText",
|
|
4
|
+
previous,
|
|
5
|
+
resolve: resolveCodeText,
|
|
6
|
+
tokenize: tokenizeCodeText
|
|
7
|
+
};
|
|
8
|
+
function resolveCodeText(events) {
|
|
9
|
+
let tailExitIndex = events.length - 4;
|
|
10
|
+
let headEnterIndex = 3;
|
|
11
|
+
let index;
|
|
12
|
+
let enter;
|
|
13
|
+
if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
|
|
14
|
+
index = headEnterIndex;
|
|
15
|
+
while (++index < tailExitIndex) {
|
|
16
|
+
if (events[index][1].type === "codeTextData") {
|
|
17
|
+
events[headEnterIndex][1].type = "codeTextPadding";
|
|
18
|
+
events[tailExitIndex][1].type = "codeTextPadding";
|
|
19
|
+
headEnterIndex += 2;
|
|
20
|
+
tailExitIndex -= 2;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
index = headEnterIndex - 1;
|
|
26
|
+
tailExitIndex++;
|
|
27
|
+
while (++index <= tailExitIndex) {
|
|
28
|
+
if (enter === void 0) {
|
|
29
|
+
if (index !== tailExitIndex && events[index][1].type !== "lineEnding") {
|
|
30
|
+
enter = index;
|
|
31
|
+
}
|
|
32
|
+
} else if (index === tailExitIndex || events[index][1].type === "lineEnding") {
|
|
33
|
+
events[enter][1].type = "codeTextData";
|
|
34
|
+
if (index !== enter + 2) {
|
|
35
|
+
events[enter][1].end = events[index - 1][1].end;
|
|
36
|
+
events.splice(enter + 2, index - enter - 2);
|
|
37
|
+
tailExitIndex -= index - enter - 2;
|
|
38
|
+
index = enter + 2;
|
|
39
|
+
}
|
|
40
|
+
enter = void 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return events;
|
|
44
|
+
}
|
|
45
|
+
function previous(code) {
|
|
46
|
+
return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
47
|
+
}
|
|
48
|
+
function tokenizeCodeText(effects, ok, nok) {
|
|
49
|
+
let sizeOpen = 0;
|
|
50
|
+
let size;
|
|
51
|
+
let token;
|
|
52
|
+
return start;
|
|
53
|
+
function start(code) {
|
|
54
|
+
effects.enter("codeText");
|
|
55
|
+
effects.enter("codeTextSequence");
|
|
56
|
+
return sequenceOpen(code);
|
|
57
|
+
}
|
|
58
|
+
function sequenceOpen(code) {
|
|
59
|
+
if (code === 96) {
|
|
60
|
+
effects.consume(code);
|
|
61
|
+
sizeOpen++;
|
|
62
|
+
return sequenceOpen;
|
|
63
|
+
}
|
|
64
|
+
effects.exit("codeTextSequence");
|
|
65
|
+
return between(code);
|
|
66
|
+
}
|
|
67
|
+
function between(code) {
|
|
68
|
+
if (code === null) {
|
|
69
|
+
return nok(code);
|
|
70
|
+
}
|
|
71
|
+
if (code === 32) {
|
|
72
|
+
effects.enter("space");
|
|
73
|
+
effects.consume(code);
|
|
74
|
+
effects.exit("space");
|
|
75
|
+
return between;
|
|
76
|
+
}
|
|
77
|
+
if (code === 96) {
|
|
78
|
+
token = effects.enter("codeTextSequence");
|
|
79
|
+
size = 0;
|
|
80
|
+
return sequenceClose(code);
|
|
81
|
+
}
|
|
82
|
+
if (markdownLineEnding(code)) {
|
|
83
|
+
effects.enter("lineEnding");
|
|
84
|
+
effects.consume(code);
|
|
85
|
+
effects.exit("lineEnding");
|
|
86
|
+
return between;
|
|
87
|
+
}
|
|
88
|
+
effects.enter("codeTextData");
|
|
89
|
+
return data(code);
|
|
90
|
+
}
|
|
91
|
+
function data(code) {
|
|
92
|
+
if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {
|
|
93
|
+
effects.exit("codeTextData");
|
|
94
|
+
return between(code);
|
|
95
|
+
}
|
|
96
|
+
effects.consume(code);
|
|
97
|
+
return data;
|
|
98
|
+
}
|
|
99
|
+
function sequenceClose(code) {
|
|
100
|
+
if (code === 96) {
|
|
101
|
+
effects.consume(code);
|
|
102
|
+
size++;
|
|
103
|
+
return sequenceClose;
|
|
104
|
+
}
|
|
105
|
+
if (size === sizeOpen) {
|
|
106
|
+
effects.exit("codeTextSequence");
|
|
107
|
+
effects.exit("codeText");
|
|
108
|
+
return ok(code);
|
|
109
|
+
}
|
|
110
|
+
token.type = "codeTextData";
|
|
111
|
+
return data(code);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
codeText
|
|
116
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var index$2 = require("../../micromark-factory-space/index.cjs");
|
|
3
|
+
var index = require("../../micromark-util-character/index.cjs");
|
|
4
|
+
var index$1 = require("../../micromark-util-subtokenize/index.cjs");
|
|
5
|
+
const content = {
|
|
6
|
+
resolve: resolveContent,
|
|
7
|
+
tokenize: tokenizeContent
|
|
8
|
+
};
|
|
9
|
+
const continuationConstruct = {
|
|
10
|
+
partial: true,
|
|
11
|
+
tokenize: tokenizeContinuation
|
|
12
|
+
};
|
|
13
|
+
function resolveContent(events) {
|
|
14
|
+
index$1.subtokenize(events);
|
|
15
|
+
return events;
|
|
16
|
+
}
|
|
17
|
+
function tokenizeContent(effects, ok) {
|
|
18
|
+
let previous;
|
|
19
|
+
return chunkStart;
|
|
20
|
+
function chunkStart(code) {
|
|
21
|
+
effects.enter("content");
|
|
22
|
+
previous = effects.enter("chunkContent", {
|
|
23
|
+
contentType: "content"
|
|
24
|
+
});
|
|
25
|
+
return chunkInside(code);
|
|
26
|
+
}
|
|
27
|
+
function chunkInside(code) {
|
|
28
|
+
if (code === null) {
|
|
29
|
+
return contentEnd(code);
|
|
30
|
+
}
|
|
31
|
+
if (index.markdownLineEnding(code)) {
|
|
32
|
+
return effects.check(continuationConstruct, contentContinue, contentEnd)(code);
|
|
33
|
+
}
|
|
34
|
+
effects.consume(code);
|
|
35
|
+
return chunkInside;
|
|
36
|
+
}
|
|
37
|
+
function contentEnd(code) {
|
|
38
|
+
effects.exit("chunkContent");
|
|
39
|
+
effects.exit("content");
|
|
40
|
+
return ok(code);
|
|
41
|
+
}
|
|
42
|
+
function contentContinue(code) {
|
|
43
|
+
effects.consume(code);
|
|
44
|
+
effects.exit("chunkContent");
|
|
45
|
+
previous.next = effects.enter("chunkContent", {
|
|
46
|
+
contentType: "content",
|
|
47
|
+
previous
|
|
48
|
+
});
|
|
49
|
+
previous = previous.next;
|
|
50
|
+
return chunkInside;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function tokenizeContinuation(effects, ok, nok) {
|
|
54
|
+
const self = this;
|
|
55
|
+
return startLookahead;
|
|
56
|
+
function startLookahead(code) {
|
|
57
|
+
effects.exit("chunkContent");
|
|
58
|
+
effects.enter("lineEnding");
|
|
59
|
+
effects.consume(code);
|
|
60
|
+
effects.exit("lineEnding");
|
|
61
|
+
return index$2.factorySpace(effects, prefixed, "linePrefix");
|
|
62
|
+
}
|
|
63
|
+
function prefixed(code) {
|
|
64
|
+
if (code === null || index.markdownLineEnding(code)) {
|
|
65
|
+
return nok(code);
|
|
66
|
+
}
|
|
67
|
+
const tail = self.events[self.events.length - 1];
|
|
68
|
+
if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
|
|
69
|
+
return ok(code);
|
|
70
|
+
}
|
|
71
|
+
return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.content = content;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { factorySpace } from "../../micromark-factory-space/index.js";
|
|
2
|
+
import { markdownLineEnding } from "../../micromark-util-character/index.js";
|
|
3
|
+
import { subtokenize } from "../../micromark-util-subtokenize/index.js";
|
|
4
|
+
const content = {
|
|
5
|
+
resolve: resolveContent,
|
|
6
|
+
tokenize: tokenizeContent
|
|
7
|
+
};
|
|
8
|
+
const continuationConstruct = {
|
|
9
|
+
partial: true,
|
|
10
|
+
tokenize: tokenizeContinuation
|
|
11
|
+
};
|
|
12
|
+
function resolveContent(events) {
|
|
13
|
+
subtokenize(events);
|
|
14
|
+
return events;
|
|
15
|
+
}
|
|
16
|
+
function tokenizeContent(effects, ok) {
|
|
17
|
+
let previous;
|
|
18
|
+
return chunkStart;
|
|
19
|
+
function chunkStart(code) {
|
|
20
|
+
effects.enter("content");
|
|
21
|
+
previous = effects.enter("chunkContent", {
|
|
22
|
+
contentType: "content"
|
|
23
|
+
});
|
|
24
|
+
return chunkInside(code);
|
|
25
|
+
}
|
|
26
|
+
function chunkInside(code) {
|
|
27
|
+
if (code === null) {
|
|
28
|
+
return contentEnd(code);
|
|
29
|
+
}
|
|
30
|
+
if (markdownLineEnding(code)) {
|
|
31
|
+
return effects.check(continuationConstruct, contentContinue, contentEnd)(code);
|
|
32
|
+
}
|
|
33
|
+
effects.consume(code);
|
|
34
|
+
return chunkInside;
|
|
35
|
+
}
|
|
36
|
+
function contentEnd(code) {
|
|
37
|
+
effects.exit("chunkContent");
|
|
38
|
+
effects.exit("content");
|
|
39
|
+
return ok(code);
|
|
40
|
+
}
|
|
41
|
+
function contentContinue(code) {
|
|
42
|
+
effects.consume(code);
|
|
43
|
+
effects.exit("chunkContent");
|
|
44
|
+
previous.next = effects.enter("chunkContent", {
|
|
45
|
+
contentType: "content",
|
|
46
|
+
previous
|
|
47
|
+
});
|
|
48
|
+
previous = previous.next;
|
|
49
|
+
return chunkInside;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function tokenizeContinuation(effects, ok, nok) {
|
|
53
|
+
const self = this;
|
|
54
|
+
return startLookahead;
|
|
55
|
+
function startLookahead(code) {
|
|
56
|
+
effects.exit("chunkContent");
|
|
57
|
+
effects.enter("lineEnding");
|
|
58
|
+
effects.consume(code);
|
|
59
|
+
effects.exit("lineEnding");
|
|
60
|
+
return factorySpace(effects, prefixed, "linePrefix");
|
|
61
|
+
}
|
|
62
|
+
function prefixed(code) {
|
|
63
|
+
if (code === null || markdownLineEnding(code)) {
|
|
64
|
+
return nok(code);
|
|
65
|
+
}
|
|
66
|
+
const tail = self.events[self.events.length - 1];
|
|
67
|
+
if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
|
|
68
|
+
return ok(code);
|
|
69
|
+
}
|
|
70
|
+
return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
content
|
|
75
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var index$4 = require("../../micromark-factory-destination/index.cjs");
|
|
3
|
+
var index = require("../../micromark-factory-label/index.cjs");
|
|
4
|
+
var index$5 = require("../../micromark-factory-space/index.cjs");
|
|
5
|
+
var index$6 = require("../../micromark-factory-title/index.cjs");
|
|
6
|
+
var index$2 = require("../../micromark-factory-whitespace/index.cjs");
|
|
7
|
+
var index$3 = require("../../micromark-util-character/index.cjs");
|
|
8
|
+
var index$1 = require("../../micromark-util-normalize-identifier/index.cjs");
|
|
9
|
+
const definition = {
|
|
10
|
+
name: "definition",
|
|
11
|
+
tokenize: tokenizeDefinition
|
|
12
|
+
};
|
|
13
|
+
const titleBefore = {
|
|
14
|
+
partial: true,
|
|
15
|
+
tokenize: tokenizeTitleBefore
|
|
16
|
+
};
|
|
17
|
+
function tokenizeDefinition(effects, ok, nok) {
|
|
18
|
+
const self = this;
|
|
19
|
+
let identifier;
|
|
20
|
+
return start;
|
|
21
|
+
function start(code) {
|
|
22
|
+
effects.enter("definition");
|
|
23
|
+
return before(code);
|
|
24
|
+
}
|
|
25
|
+
function before(code) {
|
|
26
|
+
return index.factoryLabel.call(
|
|
27
|
+
self,
|
|
28
|
+
effects,
|
|
29
|
+
labelAfter,
|
|
30
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
31
|
+
nok,
|
|
32
|
+
"definitionLabel",
|
|
33
|
+
"definitionLabelMarker",
|
|
34
|
+
"definitionLabelString"
|
|
35
|
+
)(code);
|
|
36
|
+
}
|
|
37
|
+
function labelAfter(code) {
|
|
38
|
+
identifier = index$1.normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));
|
|
39
|
+
if (code === 58) {
|
|
40
|
+
effects.enter("definitionMarker");
|
|
41
|
+
effects.consume(code);
|
|
42
|
+
effects.exit("definitionMarker");
|
|
43
|
+
return markerAfter;
|
|
44
|
+
}
|
|
45
|
+
return nok(code);
|
|
46
|
+
}
|
|
47
|
+
function markerAfter(code) {
|
|
48
|
+
return index$3.markdownLineEndingOrSpace(code) ? index$2.factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);
|
|
49
|
+
}
|
|
50
|
+
function destinationBefore(code) {
|
|
51
|
+
return index$4.factoryDestination(
|
|
52
|
+
effects,
|
|
53
|
+
destinationAfter,
|
|
54
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
55
|
+
nok,
|
|
56
|
+
"definitionDestination",
|
|
57
|
+
"definitionDestinationLiteral",
|
|
58
|
+
"definitionDestinationLiteralMarker",
|
|
59
|
+
"definitionDestinationRaw",
|
|
60
|
+
"definitionDestinationString"
|
|
61
|
+
)(code);
|
|
62
|
+
}
|
|
63
|
+
function destinationAfter(code) {
|
|
64
|
+
return effects.attempt(titleBefore, after, after)(code);
|
|
65
|
+
}
|
|
66
|
+
function after(code) {
|
|
67
|
+
return index$3.markdownSpace(code) ? index$5.factorySpace(effects, afterWhitespace, "whitespace")(code) : afterWhitespace(code);
|
|
68
|
+
}
|
|
69
|
+
function afterWhitespace(code) {
|
|
70
|
+
if (code === null || index$3.markdownLineEnding(code)) {
|
|
71
|
+
effects.exit("definition");
|
|
72
|
+
self.parser.defined.push(identifier);
|
|
73
|
+
return ok(code);
|
|
74
|
+
}
|
|
75
|
+
return nok(code);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function tokenizeTitleBefore(effects, ok, nok) {
|
|
79
|
+
return titleBefore2;
|
|
80
|
+
function titleBefore2(code) {
|
|
81
|
+
return index$3.markdownLineEndingOrSpace(code) ? index$2.factoryWhitespace(effects, beforeMarker)(code) : nok(code);
|
|
82
|
+
}
|
|
83
|
+
function beforeMarker(code) {
|
|
84
|
+
return index$6.factoryTitle(effects, titleAfter, nok, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(code);
|
|
85
|
+
}
|
|
86
|
+
function titleAfter(code) {
|
|
87
|
+
return index$3.markdownSpace(code) ? index$5.factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code) : titleAfterOptionalWhitespace(code);
|
|
88
|
+
}
|
|
89
|
+
function titleAfterOptionalWhitespace(code) {
|
|
90
|
+
return code === null || index$3.markdownLineEnding(code) ? ok(code) : nok(code);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.definition = definition;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { factoryDestination } from "../../micromark-factory-destination/index.js";
|
|
2
|
+
import { factoryLabel } from "../../micromark-factory-label/index.js";
|
|
3
|
+
import { factorySpace } from "../../micromark-factory-space/index.js";
|
|
4
|
+
import { factoryTitle } from "../../micromark-factory-title/index.js";
|
|
5
|
+
import { factoryWhitespace } from "../../micromark-factory-whitespace/index.js";
|
|
6
|
+
import { markdownLineEndingOrSpace, markdownSpace, markdownLineEnding } from "../../micromark-util-character/index.js";
|
|
7
|
+
import { normalizeIdentifier } from "../../micromark-util-normalize-identifier/index.js";
|
|
8
|
+
const definition = {
|
|
9
|
+
name: "definition",
|
|
10
|
+
tokenize: tokenizeDefinition
|
|
11
|
+
};
|
|
12
|
+
const titleBefore = {
|
|
13
|
+
partial: true,
|
|
14
|
+
tokenize: tokenizeTitleBefore
|
|
15
|
+
};
|
|
16
|
+
function tokenizeDefinition(effects, ok, nok) {
|
|
17
|
+
const self = this;
|
|
18
|
+
let identifier;
|
|
19
|
+
return start;
|
|
20
|
+
function start(code) {
|
|
21
|
+
effects.enter("definition");
|
|
22
|
+
return before(code);
|
|
23
|
+
}
|
|
24
|
+
function before(code) {
|
|
25
|
+
return factoryLabel.call(
|
|
26
|
+
self,
|
|
27
|
+
effects,
|
|
28
|
+
labelAfter,
|
|
29
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
30
|
+
nok,
|
|
31
|
+
"definitionLabel",
|
|
32
|
+
"definitionLabelMarker",
|
|
33
|
+
"definitionLabelString"
|
|
34
|
+
)(code);
|
|
35
|
+
}
|
|
36
|
+
function labelAfter(code) {
|
|
37
|
+
identifier = normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));
|
|
38
|
+
if (code === 58) {
|
|
39
|
+
effects.enter("definitionMarker");
|
|
40
|
+
effects.consume(code);
|
|
41
|
+
effects.exit("definitionMarker");
|
|
42
|
+
return markerAfter;
|
|
43
|
+
}
|
|
44
|
+
return nok(code);
|
|
45
|
+
}
|
|
46
|
+
function markerAfter(code) {
|
|
47
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);
|
|
48
|
+
}
|
|
49
|
+
function destinationBefore(code) {
|
|
50
|
+
return factoryDestination(
|
|
51
|
+
effects,
|
|
52
|
+
destinationAfter,
|
|
53
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
54
|
+
nok,
|
|
55
|
+
"definitionDestination",
|
|
56
|
+
"definitionDestinationLiteral",
|
|
57
|
+
"definitionDestinationLiteralMarker",
|
|
58
|
+
"definitionDestinationRaw",
|
|
59
|
+
"definitionDestinationString"
|
|
60
|
+
)(code);
|
|
61
|
+
}
|
|
62
|
+
function destinationAfter(code) {
|
|
63
|
+
return effects.attempt(titleBefore, after, after)(code);
|
|
64
|
+
}
|
|
65
|
+
function after(code) {
|
|
66
|
+
return markdownSpace(code) ? factorySpace(effects, afterWhitespace, "whitespace")(code) : afterWhitespace(code);
|
|
67
|
+
}
|
|
68
|
+
function afterWhitespace(code) {
|
|
69
|
+
if (code === null || markdownLineEnding(code)) {
|
|
70
|
+
effects.exit("definition");
|
|
71
|
+
self.parser.defined.push(identifier);
|
|
72
|
+
return ok(code);
|
|
73
|
+
}
|
|
74
|
+
return nok(code);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function tokenizeTitleBefore(effects, ok, nok) {
|
|
78
|
+
return titleBefore2;
|
|
79
|
+
function titleBefore2(code) {
|
|
80
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);
|
|
81
|
+
}
|
|
82
|
+
function beforeMarker(code) {
|
|
83
|
+
return factoryTitle(effects, titleAfter, nok, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(code);
|
|
84
|
+
}
|
|
85
|
+
function titleAfter(code) {
|
|
86
|
+
return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code) : titleAfterOptionalWhitespace(code);
|
|
87
|
+
}
|
|
88
|
+
function titleAfterOptionalWhitespace(code) {
|
|
89
|
+
return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
definition
|
|
94
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var index = require("../../micromark-util-character/index.cjs");
|
|
3
|
+
const hardBreakEscape = {
|
|
4
|
+
name: "hardBreakEscape",
|
|
5
|
+
tokenize: tokenizeHardBreakEscape
|
|
6
|
+
};
|
|
7
|
+
function tokenizeHardBreakEscape(effects, ok, nok) {
|
|
8
|
+
return start;
|
|
9
|
+
function start(code) {
|
|
10
|
+
effects.enter("hardBreakEscape");
|
|
11
|
+
effects.consume(code);
|
|
12
|
+
return after;
|
|
13
|
+
}
|
|
14
|
+
function after(code) {
|
|
15
|
+
if (index.markdownLineEnding(code)) {
|
|
16
|
+
effects.exit("hardBreakEscape");
|
|
17
|
+
return ok(code);
|
|
18
|
+
}
|
|
19
|
+
return nok(code);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.hardBreakEscape = hardBreakEscape;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { markdownLineEnding } from "../../micromark-util-character/index.js";
|
|
2
|
+
const hardBreakEscape = {
|
|
3
|
+
name: "hardBreakEscape",
|
|
4
|
+
tokenize: tokenizeHardBreakEscape
|
|
5
|
+
};
|
|
6
|
+
function tokenizeHardBreakEscape(effects, ok, nok) {
|
|
7
|
+
return start;
|
|
8
|
+
function start(code) {
|
|
9
|
+
effects.enter("hardBreakEscape");
|
|
10
|
+
effects.consume(code);
|
|
11
|
+
return after;
|
|
12
|
+
}
|
|
13
|
+
function after(code) {
|
|
14
|
+
if (markdownLineEnding(code)) {
|
|
15
|
+
effects.exit("hardBreakEscape");
|
|
16
|
+
return ok(code);
|
|
17
|
+
}
|
|
18
|
+
return nok(code);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
hardBreakEscape
|
|
23
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var index$1 = require("../../micromark-factory-space/index.cjs");
|
|
3
|
+
var index = require("../../micromark-util-character/index.cjs");
|
|
4
|
+
var index$2 = require("../../micromark-util-chunked/index.cjs");
|
|
5
|
+
const headingAtx = {
|
|
6
|
+
name: "headingAtx",
|
|
7
|
+
resolve: resolveHeadingAtx,
|
|
8
|
+
tokenize: tokenizeHeadingAtx
|
|
9
|
+
};
|
|
10
|
+
function resolveHeadingAtx(events, context) {
|
|
11
|
+
let contentEnd = events.length - 2;
|
|
12
|
+
let contentStart = 3;
|
|
13
|
+
let content;
|
|
14
|
+
let text;
|
|
15
|
+
if (events[contentStart][1].type === "whitespace") {
|
|
16
|
+
contentStart += 2;
|
|
17
|
+
}
|
|
18
|
+
if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
|
|
19
|
+
contentEnd -= 2;
|
|
20
|
+
}
|
|
21
|
+
if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
|
|
22
|
+
contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
|
|
23
|
+
}
|
|
24
|
+
if (contentEnd > contentStart) {
|
|
25
|
+
content = {
|
|
26
|
+
type: "atxHeadingText",
|
|
27
|
+
start: events[contentStart][1].start,
|
|
28
|
+
end: events[contentEnd][1].end
|
|
29
|
+
};
|
|
30
|
+
text = {
|
|
31
|
+
type: "chunkText",
|
|
32
|
+
start: events[contentStart][1].start,
|
|
33
|
+
end: events[contentEnd][1].end,
|
|
34
|
+
contentType: "text"
|
|
35
|
+
};
|
|
36
|
+
index$2.splice(events, contentStart, contentEnd - contentStart + 1, [["enter", content, context], ["enter", text, context], ["exit", text, context], ["exit", content, context]]);
|
|
37
|
+
}
|
|
38
|
+
return events;
|
|
39
|
+
}
|
|
40
|
+
function tokenizeHeadingAtx(effects, ok, nok) {
|
|
41
|
+
let size = 0;
|
|
42
|
+
return start;
|
|
43
|
+
function start(code) {
|
|
44
|
+
effects.enter("atxHeading");
|
|
45
|
+
return before(code);
|
|
46
|
+
}
|
|
47
|
+
function before(code) {
|
|
48
|
+
effects.enter("atxHeadingSequence");
|
|
49
|
+
return sequenceOpen(code);
|
|
50
|
+
}
|
|
51
|
+
function sequenceOpen(code) {
|
|
52
|
+
if (code === 35 && size++ < 6) {
|
|
53
|
+
effects.consume(code);
|
|
54
|
+
return sequenceOpen;
|
|
55
|
+
}
|
|
56
|
+
if (code === null || index.markdownLineEndingOrSpace(code)) {
|
|
57
|
+
effects.exit("atxHeadingSequence");
|
|
58
|
+
return atBreak(code);
|
|
59
|
+
}
|
|
60
|
+
return nok(code);
|
|
61
|
+
}
|
|
62
|
+
function atBreak(code) {
|
|
63
|
+
if (code === 35) {
|
|
64
|
+
effects.enter("atxHeadingSequence");
|
|
65
|
+
return sequenceFurther(code);
|
|
66
|
+
}
|
|
67
|
+
if (code === null || index.markdownLineEnding(code)) {
|
|
68
|
+
effects.exit("atxHeading");
|
|
69
|
+
return ok(code);
|
|
70
|
+
}
|
|
71
|
+
if (index.markdownSpace(code)) {
|
|
72
|
+
return index$1.factorySpace(effects, atBreak, "whitespace")(code);
|
|
73
|
+
}
|
|
74
|
+
effects.enter("atxHeadingText");
|
|
75
|
+
return data(code);
|
|
76
|
+
}
|
|
77
|
+
function sequenceFurther(code) {
|
|
78
|
+
if (code === 35) {
|
|
79
|
+
effects.consume(code);
|
|
80
|
+
return sequenceFurther;
|
|
81
|
+
}
|
|
82
|
+
effects.exit("atxHeadingSequence");
|
|
83
|
+
return atBreak(code);
|
|
84
|
+
}
|
|
85
|
+
function data(code) {
|
|
86
|
+
if (code === null || code === 35 || index.markdownLineEndingOrSpace(code)) {
|
|
87
|
+
effects.exit("atxHeadingText");
|
|
88
|
+
return atBreak(code);
|
|
89
|
+
}
|
|
90
|
+
effects.consume(code);
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.headingAtx = headingAtx;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { factorySpace } from "../../micromark-factory-space/index.js";
|
|
2
|
+
import { markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from "../../micromark-util-character/index.js";
|
|
3
|
+
import { splice } from "../../micromark-util-chunked/index.js";
|
|
4
|
+
const headingAtx = {
|
|
5
|
+
name: "headingAtx",
|
|
6
|
+
resolve: resolveHeadingAtx,
|
|
7
|
+
tokenize: tokenizeHeadingAtx
|
|
8
|
+
};
|
|
9
|
+
function resolveHeadingAtx(events, context) {
|
|
10
|
+
let contentEnd = events.length - 2;
|
|
11
|
+
let contentStart = 3;
|
|
12
|
+
let content;
|
|
13
|
+
let text;
|
|
14
|
+
if (events[contentStart][1].type === "whitespace") {
|
|
15
|
+
contentStart += 2;
|
|
16
|
+
}
|
|
17
|
+
if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
|
|
18
|
+
contentEnd -= 2;
|
|
19
|
+
}
|
|
20
|
+
if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
|
|
21
|
+
contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
|
|
22
|
+
}
|
|
23
|
+
if (contentEnd > contentStart) {
|
|
24
|
+
content = {
|
|
25
|
+
type: "atxHeadingText",
|
|
26
|
+
start: events[contentStart][1].start,
|
|
27
|
+
end: events[contentEnd][1].end
|
|
28
|
+
};
|
|
29
|
+
text = {
|
|
30
|
+
type: "chunkText",
|
|
31
|
+
start: events[contentStart][1].start,
|
|
32
|
+
end: events[contentEnd][1].end,
|
|
33
|
+
contentType: "text"
|
|
34
|
+
};
|
|
35
|
+
splice(events, contentStart, contentEnd - contentStart + 1, [["enter", content, context], ["enter", text, context], ["exit", text, context], ["exit", content, context]]);
|
|
36
|
+
}
|
|
37
|
+
return events;
|
|
38
|
+
}
|
|
39
|
+
function tokenizeHeadingAtx(effects, ok, nok) {
|
|
40
|
+
let size = 0;
|
|
41
|
+
return start;
|
|
42
|
+
function start(code) {
|
|
43
|
+
effects.enter("atxHeading");
|
|
44
|
+
return before(code);
|
|
45
|
+
}
|
|
46
|
+
function before(code) {
|
|
47
|
+
effects.enter("atxHeadingSequence");
|
|
48
|
+
return sequenceOpen(code);
|
|
49
|
+
}
|
|
50
|
+
function sequenceOpen(code) {
|
|
51
|
+
if (code === 35 && size++ < 6) {
|
|
52
|
+
effects.consume(code);
|
|
53
|
+
return sequenceOpen;
|
|
54
|
+
}
|
|
55
|
+
if (code === null || markdownLineEndingOrSpace(code)) {
|
|
56
|
+
effects.exit("atxHeadingSequence");
|
|
57
|
+
return atBreak(code);
|
|
58
|
+
}
|
|
59
|
+
return nok(code);
|
|
60
|
+
}
|
|
61
|
+
function atBreak(code) {
|
|
62
|
+
if (code === 35) {
|
|
63
|
+
effects.enter("atxHeadingSequence");
|
|
64
|
+
return sequenceFurther(code);
|
|
65
|
+
}
|
|
66
|
+
if (code === null || markdownLineEnding(code)) {
|
|
67
|
+
effects.exit("atxHeading");
|
|
68
|
+
return ok(code);
|
|
69
|
+
}
|
|
70
|
+
if (markdownSpace(code)) {
|
|
71
|
+
return factorySpace(effects, atBreak, "whitespace")(code);
|
|
72
|
+
}
|
|
73
|
+
effects.enter("atxHeadingText");
|
|
74
|
+
return data(code);
|
|
75
|
+
}
|
|
76
|
+
function sequenceFurther(code) {
|
|
77
|
+
if (code === 35) {
|
|
78
|
+
effects.consume(code);
|
|
79
|
+
return sequenceFurther;
|
|
80
|
+
}
|
|
81
|
+
effects.exit("atxHeadingSequence");
|
|
82
|
+
return atBreak(code);
|
|
83
|
+
}
|
|
84
|
+
function data(code) {
|
|
85
|
+
if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {
|
|
86
|
+
effects.exit("atxHeadingText");
|
|
87
|
+
return atBreak(code);
|
|
88
|
+
}
|
|
89
|
+
effects.consume(code);
|
|
90
|
+
return data;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
headingAtx
|
|
95
|
+
};
|