diff --git a/facades/antd-native-slinky/build.json b/facades/antd-native-slinky/build.json deleted file mode 100644 index 39f53cf66a4b..000000000000 --- a/facades/antd-native-slinky/build.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "typings": [ - "ant-design__react-native", - "ant-design__icons-react-native", - "react-slinky-facade" - ], - "dependencies": [ - { - "org": "me.shadaj", - "artifact": "slinky-native", - "version": "0.6.2" - } - ] -} diff --git a/facades/antd-native-slinky/build.sbt b/facades/antd-native-slinky/build.sbt deleted file mode 100644 index 4631ea0cc29f..000000000000 --- a/facades/antd-native-slinky/build.sbt +++ /dev/null @@ -1,27 +0,0 @@ -organization := "org.scalablytyped" -name := "antd-native-slinky-facade" -version := "201912121214-a504ab" -scalaVersion := "2.12.10" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "me.shadaj" %%% "slinky-native" % "0.6.2", - "org.scalablytyped" %%% "ant-design__icons-react-native" % "1.0.2-41ba6b", - "org.scalablytyped" %%% "ant-design__react-native" % "3.2.2-65f67b", - "org.scalablytyped" %%% "bang88__react-native-drawer-layout" % "2.0.3-8cdb05", - "org.scalablytyped" %%% "csstype" % "2.6.6-fd5644", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-b24434", - "org.scalablytyped" %%% "react" % "16.9-dt-20191220Z-22d23f", - "org.scalablytyped" %%% "react-native" % "0.60-dt-20200116Z-c53518", - "org.scalablytyped" %%% "react-native-collapsible" % "1.5.1-82d743", - "org.scalablytyped" %%% "react-native-community__viewpager" % "1.1.7-18bec3", - "org.scalablytyped" %%% "react-native-modal-popover" % "0.0.12-f4fde1", - "org.scalablytyped" %%% "react-native-swipeout" % "2.3.6-d77d01", - "org.scalablytyped" %%% "react-slinky-facade" % "201907271058-b72fb0", - "org.scalablytyped" %%% "std" % "3.7-b6d959") -publishArtifact in packageDoc := false -scalacOptions ++= List("-P:scalajs:sjsDefinedByDefault", "-g:notailcalls") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") - \ No newline at end of file diff --git a/facades/antd-native-slinky/project/build.properties b/facades/antd-native-slinky/project/build.properties deleted file mode 100644 index e018b8933ade..000000000000 --- a/facades/antd-native-slinky/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.3 \ No newline at end of file diff --git a/facades/antd-native-slinky/project/plugins.sbt b/facades/antd-native-slinky/project/plugins.sbt deleted file mode 100644 index c3e06763ef67..000000000000 --- a/facades/antd-native-slinky/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.31") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/antd-native-slinky/readme.md b/facades/antd-native-slinky/readme.md deleted file mode 100644 index 9b2f59dcb4f1..000000000000 --- a/facades/antd-native-slinky/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for antd-native-slinky-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/antd-native-slinky/src/main/scala/typings/antdDashNative/AntdNativeFacade.scala b/facades/antd-native-slinky/src/main/scala/typings/antdDashNative/AntdNativeFacade.scala deleted file mode 100644 index f12862b3893d..000000000000 --- a/facades/antd-native-slinky/src/main/scala/typings/antdDashNative/AntdNativeFacade.scala +++ /dev/null @@ -1,73 +0,0 @@ -package typings.antdNative - -import typings.atAntDesignIconsReactNative.fillMod.IconFillProps -import typings.atAntDesignIconsReactNative.outlineMod.IconOutlineProps -import typings.atAntDesignIconsReactNative.{atAntDesignIconsReactNativeComponents => AntdIcons} -import typings.atAntDesignReactNative.mod.{ActionSheet, Toast} -import typings.atAntDesignReactNative.{atAntDesignReactNativeProps, atAntDesignReactNativeStrings, atAntDesignReactNativeComponents => Antd} -import typings.react.ScalableSlinky._ -import typings.reactNative.mod.ActionSheetIOSOptions - -/** - * This wraps most of `ant-design__react-native` in a more slinky friendly way. We cast all components into `ExternalComponent`s, and - * export all available component props object creators as well - * - * Usage: - * ``` - * import demo.AntdNativeFacade - * AntdNativeFacade.Button(AntdNativeFacade.ButtonProps(...)) - * ``` - */ -object AntdNativeFacade extends atAntDesignReactNativeProps { - /* rewrites to slinky external components */ - @inline def ActivityIndicator: ExternalComponentP[ActivityIndicatorProps] = importSTComponent(Antd.ActivityIndicator) - @inline def Badge: ExternalComponentP[BadgeProps] = importSTComponent(Antd.Badge) - @inline def Button: ExternalComponentP[ButtonProps] = importSTComponent(Antd.Button) - @inline def Card: ExternalComponentP[CardProps] = importSTComponent(Antd.Card) - @inline def CardHeader: ExternalComponentP[CardHeaderProps] = importSTComponent(Antd.CardHeader) - @inline def CardBody: ExternalComponentP[CardBodyProps] = importSTComponent(Antd.CardBody) - @inline def CardFooter: ExternalComponentP[CardFooterProps] = importSTComponent(Antd.CardFooter) - @inline def Carousel: ExternalComponentP[CarouselProps] = importSTComponent(Antd.Carousel) - @inline def CameraRollPicker: ExternalComponentP[CameraRollPickerProps] = importSTComponent(Antd.CameraRollPicker) - @inline def Checkbox: ExternalComponentP[CheckboxProps] = importSTComponent(Antd.Checkbox) - @inline def DatePicker: ExternalComponentP[DatePickerProps] = importSTComponent(Antd.DatePicker) - @inline def Drawer: ExternalComponentP[DrawerProps] = importSTComponent(Antd.Drawer) - @inline def Flex: ExternalComponentP[FlexProps] = importSTComponent(Antd.Flex) - @inline def Grid: ExternalComponentP[GridProps] = importSTComponent(Antd.Grid) - @inline def Icon: ExternalComponentP[IconProps] = importSTComponent(Antd.Icon) - @inline def ImagePicker: ExternalComponentP[ImagePickerProps] = importSTComponent(Antd.ImagePicker) - @inline def ImageRoll: ExternalComponentP[ImageRollProps] = importSTComponent(Antd.ImageRoll) - @inline def InputItem: ExternalComponentP[InputItemProps] = importSTComponent(Antd.InputItem) - @inline def List: ExternalComponentP[ListProps] = importSTComponent(Antd.List) - @inline def ListItem: ExternalComponentP[ListItemProps] = importSTComponent(Antd.ListItem) - @inline def LocaleProvider: ExternalComponentP[LocaleProviderProps] = importSTComponent(Antd.LocaleProvider) - @inline def Modal: ExternalComponentP[ModalProps] = importSTComponent(Antd.Modal) - @inline def Pagination: ExternalComponentP[PaginationProps] = importSTComponent(Antd.Pagination) - @inline def Picker: ExternalComponentP[PickerProps] = importSTComponent(Antd.Picker) - @inline def Popover: ExternalComponentP[PopoverProps] = importSTComponent(Antd.Popover) - @inline def Portal: ExternalComponentP[PortalProps] = importSTComponent(Antd.Portal) - @inline def Progress: ExternalComponentP[ProgressProps] = importSTComponent(Antd.Progress) - @inline def Provider: ExternalComponentP[ProviderProps] = importSTComponent(Antd.Provider) - @inline def Radio: ExternalComponentP[RadioProps] = importSTComponent(Antd.Radio) - @inline def Result: ExternalComponentP[ResultProps] = importSTComponent(Antd.Result) - @inline def SearchBar: ExternalComponentP[SearchBarProps] = importSTComponent(Antd.SearchBar) - @inline def Slider: ExternalComponentP[SliderProps] = importSTComponent(Antd.Slider) - @inline def Steps: ExternalComponentP[StepsProps] = importSTComponent(Antd.Steps) - @inline def SwipeAction: ExternalComponentP[SwipeActionProps] = importSTComponent(Antd.SwipeAction) - @inline def Switch: ExternalComponentP[SwitchProps] = importSTComponent(Antd.Switch) - @inline def TabBar: ExternalComponentP[TabBarProps] = importSTComponent(Antd.TabBar) - @inline def TabBarItem: ExternalComponentP[TabBarItemProps] = importSTComponent(Antd.TabBarItem) - @inline def Tabs: ExternalComponentP[TabsProps] = importSTComponent(Antd.Tabs) - @inline def Tag: ExternalComponentP[TagProps] = importSTComponent(Antd.Tag) - @inline def WhiteSpace: ExternalComponentP[WhiteSpaceProps] = importSTComponent(Antd.WhiteSpace) - @inline def WingBlank: ExternalComponentP[WingBlankProps] = importSTComponent(Antd.WingBlank) - - @inline def IconFill: ExternalComponentP[IconFillProps] = importSTComponent(AntdIcons.IconFill) - @inline def IconOutline: ExternalComponentP[IconOutlineProps] = importSTComponent(AntdIcons.IconOutline) - - val antdActionSheet: ActionSheet.type = ActionSheet - val antdActionSheetOptions: ActionSheetIOSOptions.type = ActionSheetIOSOptions - val antdToast: Toast.type = Toast - val antdStrings: atAntDesignReactNativeStrings.type = atAntDesignReactNativeStrings - -} diff --git a/facades/antd-slinky/build.json b/facades/antd-slinky/build.json deleted file mode 100644 index a9733dfc19b0..000000000000 --- a/facades/antd-slinky/build.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "typings": [ - "antd", - "react-slinky-facade" - ], - "dependencies": [ - { - "org": "me.shadaj", - "artifact": "slinky-web", - "version": "0.6.2" - } - ] -} diff --git a/facades/antd-slinky/build.sbt b/facades/antd-slinky/build.sbt deleted file mode 100644 index 959f3f1ddc6c..000000000000 --- a/facades/antd-slinky/build.sbt +++ /dev/null @@ -1,24 +0,0 @@ -organization := "org.scalablytyped" -name := "antd-slinky-facade" -version := "202002160131-f8e52b" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "me.shadaj" %%% "slinky-web" % "0.6.2", - "org.scalablytyped" %%% "ant-design__create-react-context" % "0.2.5-8858dc", - "org.scalablytyped" %%% "antd" % "3.26.9-1d167a", - "org.scalablytyped" %%% "csstype" % "2.6.6-ffacbb", - "org.scalablytyped" %%% "moment" % "2.24.0-8b2e89", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-05a52c", - "org.scalablytyped" %%% "rc-mentions" % "0.4.2-14b852", - "org.scalablytyped" %%% "rc-menu" % "7.5.5-b2b21e", - "org.scalablytyped" %%% "react" % "16.9-dt-20200122Z-b17eee", - "org.scalablytyped" %%% "react-slick" % "0.23-dt-20190503Z-36d6f2", - "org.scalablytyped" %%% "react-slinky-facade" % "202002160131-f5629a", - "org.scalablytyped" %%% "std" % "3.7-1b8369") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/antd-slinky/project/build.properties b/facades/antd-slinky/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/antd-slinky/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/antd-slinky/project/plugins.sbt b/facades/antd-slinky/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/antd-slinky/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/antd-slinky/readme.md b/facades/antd-slinky/readme.md deleted file mode 100644 index 4e37d5c335ae..000000000000 --- a/facades/antd-slinky/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for antd-slinky-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/antd-slinky/src/main/scala/typings/antd/AntdFacade.scala b/facades/antd-slinky/src/main/scala/typings/antd/AntdFacade.scala deleted file mode 100644 index ca2f795b5edf..000000000000 --- a/facades/antd-slinky/src/main/scala/typings/antd/AntdFacade.scala +++ /dev/null @@ -1,165 +0,0 @@ -package typings.antd - -import slinky.core.TagMod -import slinky.core.facade.ReactElement -import typings.antd.formFormMod.default.{create => createForm} -import typings.antd.formFormMod.{FormCreateOption, GetFieldDecoratorOptions, WrappedFormUtils} -import typings.antd.{antdComponents => Antd} -import typings.react.ScalableSlinky._ -import typings.react.mod.ComponentType - -import scala.scalajs.js - -/** - * This wraps most of `antd` in a more slinky friendly way. We cast all components into `ExternalComponent`s, and - * export all available component props object creators as well - * - * Usage: - * ``` - * import demo.AntdFacade - * AntdFacade.ActionButton(AntdFacade.ActionButtonProps(...)) - * ``` - * - * There are also some helper methods for working with form components, see usage in demo - */ -object AntdFacade extends antdProps { - /* rewrites to slinky external components */ - @inline def ActionButton: ExternalComponentP[ActionButtonProps] = importSTComponent(Antd.ActionButton) - @inline def Affix: ExternalComponentP[AffixProps] = importSTComponent(Antd.Affix) - @inline def Alert: ExternalComponentP[AlertProps] = importSTComponent(Antd.Alert) - @inline def Anchor: ExternalComponentP[AnchorProps] = importSTComponent(Antd.Anchor) - @inline def AnchorLink: ExternalComponentP[AnchorLinkProps] = importSTComponent(Antd.AnchorLink) - @inline def AutoComplete: ExternalComponentP[AutoCompleteProps] = importSTComponent(Antd.AutoComplete) - @inline def AutoCompleteOptGroup: ExternalComponentP[OptGroupProps] = importSTComponent(Antd.AutoCompleteOptGroup) - @inline def AutoCompleteOption: ExternalComponentP[OptionProps] = importSTComponent(Antd.AutoCompleteOption) - @inline def Avatar: ExternalComponentP[AvatarProps] = importSTComponent(Antd.Avatar) - @inline def BackTop: ExternalComponentP[BackTopProps] = importSTComponent(Antd.BackTop) - @inline def Badge: ExternalComponentP[BadgeProps] = importSTComponent(Antd.Badge) - @inline def Base: ExternalComponentP[BaseProps] = importSTComponent(Antd.Base) - @inline def Breadcrumb: ExternalComponentP[BreadcrumbProps] = importSTComponent(Antd.Breadcrumb) - @inline def BreadcrumbItem: ExternalComponentP[BreadcrumbItemProps] = importSTComponent(Antd.BreadcrumbItem) - @inline def Button: ExternalComponentP[ButtonProps] = importSTComponent(Antd.Button) - @inline def ButtonGroup: ExternalComponentP[ButtonGroupProps] = importSTComponent(Antd.ButtonGroup) - @inline def Calendar: ExternalComponentP[CalendarProps] = importSTComponent(Antd.Calendar) - @inline def Card: ExternalComponentP[CardProps] = importSTComponent(Antd.Card) - @inline def CardGrid: ExternalComponentP[CardGridProps] = importSTComponent(Antd.CardGrid) - @inline def CardMeta: ExternalComponentP[CardMetaProps] = importSTComponent(Antd.CardMeta) - @inline def Carousel: ExternalComponentP[CarouselProps] = importSTComponent(Antd.Carousel) - @inline def Cascader: ExternalComponentP[CascaderProps] = importSTComponent(Antd.Cascader) - @inline def CheckableTag: ExternalComponentP[CheckableTagProps] = importSTComponent(Antd.CheckableTag) - @inline def Checkbox: ExternalComponentP[CheckboxProps] = importSTComponent(Antd.Checkbox) - @inline def Col: ExternalComponentP[ColProps] = importSTComponent(Antd.Col) - @inline def Collapse: ExternalComponentP[CollapseProps] = importSTComponent(Antd.Collapse) - @inline def CollapsePanel: ExternalComponentP[CollapsePanelProps] = importSTComponent(Antd.CollapsePanel) - @inline def Column[T]: ExternalComponentP[ColumnProps[T]] = importSTComponent(Antd.Column[T]) - @inline def ColumnGroup: ExternalComponentP[ColumnGroupProps] = importSTComponent(Antd.ColumnGroup) - @inline def Comment: ExternalComponentP[CommentProps] = importSTComponent(Antd.Comment) -// @inline def ConfigConsumer: ExternalComponentP[ConfigConsumerProps[typings.antd.esConfigProviderMod.ConfigConsumerProps]] = importSTComponent(Antd.ConfigConsumer) - @inline def ConfigProvider: ExternalComponentP[ConfigProviderProps] = importSTComponent(Antd.ConfigProvider) - @inline def Countdown: ExternalComponentP[CountdownProps] = importSTComponent(Antd.Countdown) - @inline def DatePicker: ExternalComponentP[DatePickerProps] = importSTComponent(Antd.DatePicker) - @inline def Descriptions: ExternalComponentP[DescriptionsProps] = importSTComponent(Antd.Descriptions) - @inline def DescriptionsItem: ExternalComponentP[DescriptionsItemProps] = importSTComponent(Antd.DescriptionsItem) - @inline def DirectoryTree: ExternalComponentP[DirectoryTreeProps] = importSTComponent(Antd.DirectoryTree) - @inline def Divider: ExternalComponentP[DividerProps] = importSTComponent(Antd.Divider) - @inline def Dragger: ExternalComponentP[DraggerProps] = importSTComponent(Antd.Dragger) - @inline def Drawer: ExternalComponentP[DrawerProps] = importSTComponent(Antd.Drawer) - @inline def Dropdown: ExternalComponentP[DropdownProps] = importSTComponent(Antd.Dropdown) - @inline def DropdownButton: ExternalComponentP[DropdownButtonProps] = importSTComponent(Antd.DropdownButton) - @inline def Empty: ExternalComponentP[EmptyProps] = importSTComponent(Antd.Empty) - @inline def Form: ExternalComponentP[FormProps] = importSTComponent(Antd.Form) - @inline def FormItem: ExternalComponentP[FormItemProps] = importSTComponent(Antd.FormItem) - @inline def Grid: ExternalComponentP[CardGridProps] = importSTComponent(Antd.Grid) - @inline def Group: ExternalComponentP[GroupProps] = importSTComponent(Antd.Group) - @inline def Header: ExternalComponentP[HeaderProps] = importSTComponent(Antd.Header) - @inline def Icon: ExternalComponentP[IconProps] = importSTComponent(Antd.Icon) - @inline def Input: ExternalComponentP[InputProps] = importSTComponent(Antd.Input) - @inline def InputNumber: ExternalComponentP[InputNumberProps] = importSTComponent(Antd.InputNumber) - @inline def InputGroup: ExternalComponentP[GroupProps] = importSTComponent(Antd.InputGroup) - @inline def Item: ExternalComponentP[ItemProps] = importSTComponent(Antd.Item) - @inline def Layout: ExternalComponentP[LayoutProps] = importSTComponent(Antd.Layout) - @inline def LayoutContent: ExternalComponentP[LayoutContentProps] = importSTComponent(Antd.LayoutContent) - @inline def LayoutFooter: ExternalComponentP[LayoutFooterProps] = importSTComponent(Antd.LayoutFooter) - @inline def LayoutHeader: ExternalComponentP[LayoutHeaderProps] = importSTComponent(Antd.LayoutHeader) - @inline def LayoutSider: ExternalComponentP[LayoutSiderProps] = importSTComponent(Antd.LayoutSider) - @inline def List[T]: ExternalComponentP[ListProps[T]] = importSTComponent(Antd.List[T]) - @inline def LocaleProvider: ExternalComponentP[LocaleProviderProps] = importSTComponent(Antd.LocaleProvider) - @inline def Mention: ExternalComponentP[MentionProps] = importSTComponent(Antd.Mention) - @inline def Mentions: ExternalComponentP[MentionsProps] = importSTComponent(Antd.Mentions) - @inline def MentionsOption: ExternalComponentP[MentionsOptionProps] = importSTComponent(Antd.MentionsOption) - @inline def Menu: ExternalComponentP[MenuProps] = importSTComponent(Antd.Menu) - @inline def MenuItem: ExternalComponentP[MenuItemProps] = importSTComponent(Antd.MenuItem) - @inline def Meta: ExternalComponentP[CardMetaProps] = importSTComponent(Antd.Meta) - @inline def Modal: ExternalComponentP[ModalProps] = importSTComponent(Antd.Modal) - @inline def Operation: ExternalComponentP[TransferOperationProps] = importSTComponent(Antd.Operation) - @inline def OptGroup: ExternalComponentP[OptGroupProps] = importSTComponent(Antd.OptGroup) - @inline def Option: ExternalComponentP[OptionProps] = importSTComponent(Antd.Option) - @inline def PageHeader: ExternalComponentP[PageHeaderProps] = importSTComponent(Antd.PageHeader) - @inline def Pagination: ExternalComponentP[PaginationProps] = importSTComponent(Antd.Pagination) - @inline def Paragraph: ExternalComponentP[ParagraphProps] = importSTComponent(Antd.Paragraph) - @inline def Password: ExternalComponentP[PasswordProps] = importSTComponent(Antd.Password) - @inline def Popconfirm: ExternalComponentP[PopconfirmProps] = importSTComponent(Antd.Popconfirm) - @inline def Popover: ExternalComponentP[PopoverProps] = importSTComponent(Antd.Popover) - @inline def Progress: ExternalComponentP[ProgressProps] = importSTComponent(Antd.Progress) - @inline def Radio: ExternalComponentP[RadioProps] = importSTComponent(Antd.Radio) - @inline def RadioButton: ExternalComponentP[RadioButtonProps] = importSTComponent(Antd.RadioButton) - @inline def Rate: ExternalComponentP[RateProps] = importSTComponent(Antd.Rate) - @inline def Result: ExternalComponentP[ResultProps] = importSTComponent(Antd.Result) - @inline def Row: ExternalComponentP[RowProps] = importSTComponent(Antd.Row) - @inline def ScrollNumber: ExternalComponentP[ScrollNumberProps] = importSTComponent(Antd.ScrollNumber) - @inline def Search: ExternalComponentP[SearchProps] = importSTComponent(Antd.Search) - @inline def Select[T]: ExternalComponentP[SelectProps[T]] = importSTComponent(Antd.Select[T]) - @inline def SelectOptGroup: ExternalComponentP[OptGroupProps] = importSTComponent(Antd.SelectOptGroup) - @inline def SelectOption: ExternalComponentP[OptionProps] = importSTComponent(Antd.SelectOption) - @inline def Sider: ExternalComponentP[js.Object] = importSTComponent(Antd.Sider) - @inline def Skeleton: ExternalComponentP[SkeletonProps] = importSTComponent(Antd.Skeleton) - @inline def Slider: ExternalComponentP[SliderProps] = importSTComponent(Antd.Slider) - @inline def Spin: ExternalComponentP[SpinProps] = importSTComponent(Antd.Spin) - @inline def Steps: ExternalComponentP[StepsProps] = importSTComponent(Antd.Steps) - @inline def StepsStep: ExternalComponentP[StepsStepProps] = importSTComponent(Antd.StepsStep) - @inline def SubMenu: ExternalComponentP[SubMenuProps] = importSTComponent(Antd.SubMenu) - @inline def Switch: ExternalComponentP[SwitchProps] = importSTComponent(Antd.Switch) - @inline def Table[T]: ExternalComponentP[TableProps[T]] = importSTComponent(Antd.Table[T]) - @inline def Tabs: ExternalComponentP[TabsProps] = importSTComponent(Antd.Tabs) - @inline def TabsTabPane: ExternalComponentP[TabsTabPaneProps] = importSTComponent(Antd.TabsTabPane) - @inline def Tag: ExternalComponentP[TagProps] = importSTComponent(Antd.Tag) - @inline def Text: ExternalComponentP[TextProps] = importSTComponent(Antd.Text) - @inline def TextArea: ExternalComponentP[TextAreaProps] = importSTComponent(Antd.TextArea) - @inline def TimePicker: ExternalComponentP[TimePickerProps] = importSTComponent(Antd.TimePicker) - @inline def Timeline: ExternalComponentP[TimelineProps] = importSTComponent(Antd.Timeline) - @inline def TimelineItem: ExternalComponentP[TimelineItemProps] = importSTComponent(Antd.TimelineItem) - @inline def Title: ExternalComponentP[TitleProps] = importSTComponent(Antd.Title) - @inline def Tooltip: ExternalComponentP[TooltipProps] = importSTComponent(Antd.Tooltip) - @inline def Transfer: ExternalComponentP[TransferProps] = importSTComponent(Antd.Transfer) - @inline def TransferOperation: ExternalComponentP[TransferOperationProps] = importSTComponent(Antd.TransferOperation) - @inline def Tree: ExternalComponentP[TreeProps] = importSTComponent(Antd.Tree) - @inline def TreeNode: ExternalComponentP[TreeNodeProps] = importSTComponent(Antd.TreeNode) - @inline def TreeSelect[T /* <: TreeNodeValue */]: ExternalComponentP[TreeSelectProps[T]] = importSTComponent(Antd.TreeSelect[T]) - @inline def TreeTreeNode: ExternalComponentP[TreeTreeNodeProps] = importSTComponent(Antd.TreeTreeNode) - @inline def Typography: ExternalComponentP[TypographyProps] = importSTComponent(Antd.Typography) - @inline def Upload: ExternalComponentP[UploadProps] = importSTComponent(Antd.Upload) - - @inline def NotificationArgsProps = typings.antd.notificationMod.ArgsProps - type NotificationArgsProps = typings.antd.notificationMod.ArgsProps - - val antdStrings: typings.antd.antdStrings.type = typings.antd.antdStrings - - /** - * This is an example of something a bit more complicated than just rewriting component types, and which a manually - * written facade. Given an implementation of a component which has a `form` prop which is to be prefilled, - * this will generate a ready-to-use `ExternalComponent` for it. - */ - def formComponent[Props <: js.Object]( - options: FormCreateOption[Props] - )(f: js.Function1[Props with WithForm, ReactElement]): ExternalComponentP[Props] = - importSTComponent(createForm(options)(f).asInstanceOf[ComponentType[Props]]) - - trait WithForm extends js.Object { - val form: WrappedFormUtils[js.Object] - } - - def decoratedField(form: WrappedFormUtils[js.Object], fieldName: String, options: GetFieldDecoratorOptions)( - children: ReactElement - ): TagMod[Any] = - form.getFieldDecorator(fieldName, options).apply(children.toST).fromST -} diff --git a/facades/react-japgolly/build.json b/facades/react-japgolly/build.json deleted file mode 100644 index ec29d1085b32..000000000000 --- a/facades/react-japgolly/build.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "typings": [ - "react-facade" - ], - "dependencies": [ - { - "org": "com.github.japgolly.scalajs-react", - "artifact": "core", - "version": "1.5.0" - } - ] -} diff --git a/facades/react-japgolly/build.sbt b/facades/react-japgolly/build.sbt deleted file mode 100644 index ce038faf2adb..000000000000 --- a/facades/react-japgolly/build.sbt +++ /dev/null @@ -1,18 +0,0 @@ -organization := "org.scalablytyped" -name := "react-japgolly-facade" -version := "202002160131-879827" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.github.japgolly.scalajs-react" %%% "core" % "1.5.0", - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "org.scalablytyped" %%% "csstype" % "2.6.9-313239", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-11830c", - "org.scalablytyped" %%% "react" % "16.9-dt-20200409Z-0bc722", - "org.scalablytyped" %%% "react-facade" % "202002160131-2a15d2", - "org.scalablytyped" %%% "std" % "3.8-9b2470") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react-japgolly/project/build.properties b/facades/react-japgolly/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react-japgolly/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react-japgolly/project/plugins.sbt b/facades/react-japgolly/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react-japgolly/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react-japgolly/readme.md b/facades/react-japgolly/readme.md deleted file mode 100644 index 53e04ee748dd..000000000000 --- a/facades/react-japgolly/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-japgolly-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react-japgolly/src/main/scala/typings/react/JapgollyDsl.scala b/facades/react-japgolly/src/main/scala/typings/react/JapgollyDsl.scala deleted file mode 100644 index 61d4796df928..000000000000 --- a/facades/react-japgolly/src/main/scala/typings/react/JapgollyDsl.scala +++ /dev/null @@ -1,16 +0,0 @@ -package typings.react - -import typings.react.mod._ -import typings.std.{console, Object} -import typings.{react, std} - -import scala.language.{higherKinds, implicitConversions} -import scala.scalajs.js.| -import scala.scalajs.{js, LinkingInfo} - -// nothing useful to see here yet, just make sure we compile -object JapgollyDsl { - import japgolly.scalajs.react.raw.JsNumber - - type Test = dsl.type -} diff --git a/facades/react-redux/build.json b/facades/react-redux/build.json deleted file mode 100644 index b43cfa7ccbac..000000000000 --- a/facades/react-redux/build.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "typings": [ - "react-redux" - ], - "dependencies": [] -} \ No newline at end of file diff --git a/facades/react-redux/build.sbt b/facades/react-redux/build.sbt deleted file mode 100644 index acc89cb11dc8..000000000000 --- a/facades/react-redux/build.sbt +++ /dev/null @@ -1,19 +0,0 @@ -organization := "org.scalablytyped" -name := "react-redux-facade" -version := "202002160131-9ea54f" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "org.scalablytyped" %%% "csstype" % "2.6.9-313239", - "org.scalablytyped" %%% "hoist-non-react-statics" % "3.3-dt-20190402Z-878ffb", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-11830c", - "org.scalablytyped" %%% "react" % "16.9-dt-20200409Z-0bc722", - "org.scalablytyped" %%% "react-redux" % "7.1-dt-20200225Z-0c8e9c", - "org.scalablytyped" %%% "redux" % "4.0.5-069469", - "org.scalablytyped" %%% "std" % "3.8-9b2470") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react-redux/project/build.properties b/facades/react-redux/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react-redux/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react-redux/project/plugins.sbt b/facades/react-redux/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react-redux/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react-redux/readme.md b/facades/react-redux/readme.md deleted file mode 100644 index 4856b9431228..000000000000 --- a/facades/react-redux/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-redux-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react-redux/src/main/scala/typings/reactDashRedux/ReduxFacade.scala b/facades/react-redux/src/main/scala/typings/reactDashRedux/ReduxFacade.scala deleted file mode 100644 index 88edbb0e7a59..000000000000 --- a/facades/react-redux/src/main/scala/typings/reactDashRedux/ReduxFacade.scala +++ /dev/null @@ -1,38 +0,0 @@ -package typings.reactRedux - -import typings.reactRedux.mod.connect -import typings.react.mod.FC -import typings.redux.mod.{Action, Dispatch, Store} - -import scala.scalajs.js - -/** - * This is very rudimentary, just enough to support the demo - */ -object ReduxFacade { - - /** Since redux forces us to use plain js objects, - * this is the only trivially extractable boilerplate - */ - trait Extractor[T] { - protected val _type: String - def unapply(a: Action[String]): Option[T] = - if (a.`type` == _type) Some(a.asInstanceOf[T]) else None - } - - trait Connected[State, Action] extends js.Object { - val dispatch: Dispatch[Action] - val state: State - } - - /* take a store and a component which takes `dispatch` and `state` as props, return a component with those filled */ - def simpleConnect[State <: js.Any, Action <: js.Any, P](store: Store[State, Action], - fc: FC[Connected[State, Action] with P]): FC[P] = { - val keepState: js.Function1[State, js.Dynamic] = - s => js.Dynamic.literal(state = s) - val keepDispatch: js.Function1[Dispatch[Action], js.Dynamic] = - d => js.Dynamic.literal(dispatch = d) - - connect.asInstanceOf[js.Dynamic](keepState, keepDispatch)(fc).asInstanceOf[FC[P]] - } -} diff --git a/facades/react-router-dom-slinky/build.json b/facades/react-router-dom-slinky/build.json deleted file mode 100644 index 26c074951b76..000000000000 --- a/facades/react-router-dom-slinky/build.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "typings": [ - "react-router-dom", - "react-slinky-facade" - ], - "dependencies": [ - { - "org": "me.shadaj", - "artifact": "slinky-web", - "version": "0.6.2" - } - ] -} diff --git a/facades/react-router-dom-slinky/build.sbt b/facades/react-router-dom-slinky/build.sbt deleted file mode 100644 index 3233b30c0c8c..000000000000 --- a/facades/react-router-dom-slinky/build.sbt +++ /dev/null @@ -1,21 +0,0 @@ -organization := "org.scalablytyped" -name := "react-router-dom-slinky-facade" -version := "202002160131-c15192" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "me.shadaj" %%% "slinky-web" % "0.6.2", - "org.scalablytyped" %%% "csstype" % "2.6.9-2d2033", - "org.scalablytyped" %%% "history" % "4.7.2-dt-20200226Z-b605ef", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-ece683", - "org.scalablytyped" %%% "react" % "16.9-dt-20200402Z-6f4338", - "org.scalablytyped" %%% "react-router" % "5.1-dt-20200402Z-340682", - "org.scalablytyped" %%% "react-router-dom" % "5.1-dt-20191125Z-a52b2a", - "org.scalablytyped" %%% "react-slinky-facade" % "202002160131-d9d8ca", - "org.scalablytyped" %%% "std" % "3.8-a0108c") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react-router-dom-slinky/project/build.properties b/facades/react-router-dom-slinky/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react-router-dom-slinky/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react-router-dom-slinky/project/plugins.sbt b/facades/react-router-dom-slinky/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react-router-dom-slinky/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react-router-dom-slinky/readme.md b/facades/react-router-dom-slinky/readme.md deleted file mode 100644 index 67f01bde63b9..000000000000 --- a/facades/react-router-dom-slinky/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-router-dom-slinky-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react-router-dom-slinky/src/main/scala/typings/reactDashRouterDashDom/ReactRouterFacade.scala b/facades/react-router-dom-slinky/src/main/scala/typings/reactDashRouterDashDom/ReactRouterFacade.scala deleted file mode 100644 index a2442752b5ee..000000000000 --- a/facades/react-router-dom-slinky/src/main/scala/typings/reactDashRouterDashDom/ReactRouterFacade.scala +++ /dev/null @@ -1,60 +0,0 @@ -package typings.reactRouterDom - -import slinky.core.facade.ReactElement -import slinky.core.{BuildingComponent, ReactComponentClass} -import typings.history.mod.{Location, LocationState} -import typings.reactRouterDom.{reactRouterDomComponents => RRD} -import typings.reactRouter.mod.{RouteChildrenProps, RouteComponentProps, RouteProps, StaticContext} -import typings.react.ScalableSlinky.{importSTComponent, ExternalComponentP} - -import scala.scalajs.js -import scala.scalajs.js.| - -object ReactRouterFacade extends reactRouterDomProps { - - @inline def BrowserRouter: ExternalComponentP[BrowserRouterProps] = importSTComponent(RRD.BrowserRouter) - @inline def HashRouter : ExternalComponentP[HashRouterProps] = importSTComponent(RRD.HashRouter) - @inline def Link[S] : ExternalComponentP[LinkProps[S]] = importSTComponent(RRD.Link[S]) - @inline def MemoryRouter : ExternalComponentP[MemoryRouterProps] = importSTComponent(RRD.MemoryRouter) - @inline def NavLink[S] : ExternalComponentP[NavLinkProps[S]] = importSTComponent(RRD.NavLink[S]) - @inline def Prompt : ExternalComponentP[PromptProps] = importSTComponent(RRD.Prompt) - @inline def Redirect : ExternalComponentP[RedirectProps] = importSTComponent(RRD.Redirect) - @inline def Router : ExternalComponentP[RouterProps] = importSTComponent(RRD.Router) - @inline def StaticRouter : ExternalComponentP[StaticRouterProps] = importSTComponent(RRD.StaticRouter) - @inline def Switch : ExternalComponentP[SwitchProps] = importSTComponent(RRD.Switch) - - /** The description of the `Route` component is somewhat rough, so this is a somewhat better slinky wrapper. - * - * The main problematic issue is the type parameter `T` which ends up in `match`, which is awkward in - * typescript jsx, in slinky, and in ScalablyTyped for three different reasons. - * - * Note that the `component` param has been renamed to `componentAlt` to avoid conflicts with Slinky's - * definitions - * - * Note that this could be developed much further, probably the only way to make a somewhat sane API - * would be to use a builder. - */ - def Route[T]( - alwaysRender: js.Function1[ /* props */ RouteChildrenProps[T, LocationState], ReactElement] = null, - componentAlt: ReactComponentClass[RouteComponentProps[T, StaticContext, LocationState]] = null, - exact: js.UndefOr[scala.Boolean] = js.undefined, - location: Location[LocationState] = null, - path: String | js.Array[String] = null, - render: /* props */ RouteComponentProps[T, StaticContext, LocationState] => ReactElement = null, - sensitive: js.UndefOr[Boolean] = js.undefined, - strict: js.UndefOr[Boolean] = js.undefined - ): BuildingComponent[Nothing, js.Object] = { - - val props = js.Dynamic.literal() - if (alwaysRender != null) props.updateDynamic("children")(alwaysRender.asInstanceOf[js.Any]) - if (componentAlt != null) props.updateDynamic("component")(componentAlt.asInstanceOf[js.Any]) - if (!js.isUndefined(exact)) props.updateDynamic("exact")(exact) - if (location != null) props.updateDynamic("location")(location) - if (path != null) props.updateDynamic("path")(path.asInstanceOf[js.Any]) - if (render != null) props.updateDynamic("render")(js.Any.fromFunction1(render)) - if (!js.isUndefined(sensitive)) props.updateDynamic("sensitive")(sensitive) - if (!js.isUndefined(strict)) props.updateDynamic("strict")(strict) - - importSTComponent(RRD.Route[RouteProps])(props.asInstanceOf[RouteProps]) - } -} diff --git a/facades/react-router-native-slinky/build.json b/facades/react-router-native-slinky/build.json deleted file mode 100644 index ae921a7d15c8..000000000000 --- a/facades/react-router-native-slinky/build.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "typings": [ - "react-router-native", - "react-slinky-facade" - ], - "dependencies": [ - { - "org": "me.shadaj", - "artifact": "slinky-native", - "version": "0.6.2" - } - ] -} diff --git a/facades/react-router-native-slinky/build.sbt b/facades/react-router-native-slinky/build.sbt deleted file mode 100644 index 3e514e2a79c8..000000000000 --- a/facades/react-router-native-slinky/build.sbt +++ /dev/null @@ -1,21 +0,0 @@ -organization := "org.scalablytyped" -name := "react-router-native-slinky-facade" -version := "202002160131-809f7f" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "me.shadaj" %%% "slinky-native" % "0.6.2", - "org.scalablytyped" %%% "csstype" % "2.6.9-313239", - "org.scalablytyped" %%% "history" % "4.7.2-dt-20200226Z-849324", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-11830c", - "org.scalablytyped" %%% "react" % "16.9-dt-20200409Z-0bc722", - "org.scalablytyped" %%% "react-router" % "5.1-dt-20200402Z-df39e7", - "org.scalablytyped" %%% "react-router-native" % "5.1-dt-20200225Z-aebf0f", - "org.scalablytyped" %%% "react-slinky-facade" % "202002160131-56e2bb", - "org.scalablytyped" %%% "std" % "3.8-9b2470") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react-router-native-slinky/project/build.properties b/facades/react-router-native-slinky/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react-router-native-slinky/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react-router-native-slinky/project/plugins.sbt b/facades/react-router-native-slinky/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react-router-native-slinky/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react-router-native-slinky/readme.md b/facades/react-router-native-slinky/readme.md deleted file mode 100644 index 6b288eeb3464..000000000000 --- a/facades/react-router-native-slinky/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-router-native-slinky-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react-router-native-slinky/src/main/scala/typings/reactDashRouterDashNative/ReactRouterNativeFacade.scala b/facades/react-router-native-slinky/src/main/scala/typings/reactDashRouterDashNative/ReactRouterNativeFacade.scala deleted file mode 100644 index 66d6777c798e..000000000000 --- a/facades/react-router-native-slinky/src/main/scala/typings/reactDashRouterDashNative/ReactRouterNativeFacade.scala +++ /dev/null @@ -1,61 +0,0 @@ -package typings.reactRouterNative - -import slinky.core.facade.ReactElement -import slinky.core.{BuildingComponent, ReactComponentClass} -import typings.history.mod.{Location, LocationState} -import typings.reactRouterNative.{reactRouterNativeComponents => RRN} -import typings.reactRouter.mod.{RouteChildrenProps, RouteComponentProps, RouteProps, StaticContext} -import typings.react.ScalableSlinky.{importSTComponent, ExternalComponentP} - -import scala.scalajs.js -import scala.scalajs.js.| - -object ReactRouterNativeFacade extends reactRouterNativeProps { - - @inline def NativeRouter : ExternalComponentP[NativeRouterProps] = importSTComponent(RRN.NativeRouter) - @inline def Link : ExternalComponentP[LinkProps] = importSTComponent(RRN.Link) - @inline def DeepLinking : ExternalComponentP[js.Object] = importSTComponent(RRN.DeepLinking) - @inline def MemoryRouter : ExternalComponentP[MemoryRouterProps] = importSTComponent(RRN.MemoryRouter) - @inline def BackButton : ExternalComponentP[BackButtonProps] = importSTComponent(RRN.BackButton) - @inline def AndroidBackButton: ExternalComponentP[AndroidBackButtonProps] = importSTComponent(RRN.AndroidBackButton) - @inline def Prompt : ExternalComponentP[PromptProps] = importSTComponent(RRN.Prompt) - @inline def Redirect : ExternalComponentP[RedirectProps] = importSTComponent(RRN.Redirect) - @inline def Router : ExternalComponentP[RouterProps] = importSTComponent(RRN.Router) - @inline def StaticRouter : ExternalComponentP[StaticRouterProps] = importSTComponent(RRN.StaticRouter) - @inline def Switch : ExternalComponentP[SwitchProps] = importSTComponent(RRN.Switch) - - /** The description of the `Route` component is somewhat rough, so this is a somewhat better slinky wrapper. - * - * The main problematic issue is the type parameter `T` which ends up in `match`, which is awkward in - * typescript jsx, in slinky, and in ScalablyTyped for three different reasons. - * - * Note that the `component` param has been renamed to `componentAlt` to avoid conflicts with Slinky's - * definitions - * - * Note that this could be developed much further, probably the only way to make a somewhat sane API - * would be to use a builder. - */ - def Route[T]( - alwaysRender: js.Function1[ /* props */ RouteChildrenProps[T, LocationState], ReactElement] = null, - componentAlt: ReactComponentClass[RouteComponentProps[T, StaticContext, LocationState]] = null, - exact: js.UndefOr[scala.Boolean] = js.undefined, - location: Location[LocationState] = null, - path: String | js.Array[String] = null, - render: /* props */ RouteComponentProps[T, StaticContext, LocationState] => ReactElement = null, - sensitive: js.UndefOr[Boolean] = js.undefined, - strict: js.UndefOr[Boolean] = js.undefined - ): BuildingComponent[Nothing, js.Object] = { - - val props = js.Dynamic.literal() - if (alwaysRender != null) props.updateDynamic("children")(alwaysRender.asInstanceOf[js.Any]) - if (componentAlt != null) props.updateDynamic("component")(componentAlt.asInstanceOf[js.Any]) - if (!js.isUndefined(exact)) props.updateDynamic("exact")(exact) - if (location != null) props.updateDynamic("location")(location) - if (path != null) props.updateDynamic("path")(path.asInstanceOf[js.Any]) - if (render != null) props.updateDynamic("render")(js.Any.fromFunction1(render)) - if (!js.isUndefined(sensitive)) props.updateDynamic("sensitive")(sensitive) - if (!js.isUndefined(strict)) props.updateDynamic("strict")(strict) - - importSTComponent(RRN.Route[RouteProps])(props.asInstanceOf[RouteProps]) - } -} diff --git a/facades/react-slinky/build.json b/facades/react-slinky/build.json deleted file mode 100644 index 14b166e28bcd..000000000000 --- a/facades/react-slinky/build.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "typings": [ - "react" - ], - "dependencies": [ - { - "org": "me.shadaj", - "artifact": "slinky-web", - "version": "0.6.2" - } - ] -} diff --git a/facades/react-slinky/build.sbt b/facades/react-slinky/build.sbt deleted file mode 100644 index 57e05a2fc6c9..000000000000 --- a/facades/react-slinky/build.sbt +++ /dev/null @@ -1,17 +0,0 @@ -organization := "org.scalablytyped" -name := "react-slinky-facade" -version := "202002160131-56e2bb" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "me.shadaj" %%% "slinky-web" % "0.6.2", - "org.scalablytyped" %%% "csstype" % "2.6.9-313239", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-11830c", - "org.scalablytyped" %%% "react" % "16.9-dt-20200409Z-0bc722", - "org.scalablytyped" %%% "std" % "3.8-9b2470") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react-slinky/project/build.properties b/facades/react-slinky/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react-slinky/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react-slinky/project/plugins.sbt b/facades/react-slinky/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react-slinky/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react-slinky/readme.md b/facades/react-slinky/readme.md deleted file mode 100644 index cb5f3ba7f6f7..000000000000 --- a/facades/react-slinky/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-slinky-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react-slinky/src/main/scala/typings/react/ScalableSlinky.scala b/facades/react-slinky/src/main/scala/typings/react/ScalableSlinky.scala deleted file mode 100644 index d1d112b2f269..000000000000 --- a/facades/react-slinky/src/main/scala/typings/react/ScalableSlinky.scala +++ /dev/null @@ -1,82 +0,0 @@ -package typings.react - -import org.scalablytyped.runtime.{Instantiable1, Instantiable2} -import slinky.core.{ - BuildingComponent, - ExternalComponent, - KeyAddingStage, - KeyAndRefAddingStage, - TagMod, - WithAttrs, - facade => S -} -import typings.react.{mod => ST} - -import scala.language.implicitConversions -import scala.scalajs.js - -object ScalableSlinky { - - /* Does this not exist? Am i completely blind? */ - trait ExternalComponentP[P] extends ExternalComponent { - type Props = P - } - - /** - * Support using ScalablyTyped components as slinky ExternalComponents - * - * We hide this behind an object, because it's meant for facade authors primarily - */ - object importSTComponent { - @inline def apply[P <: js.Object](c: ST.ExoticComponent[P]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - - @inline def apply[P <: js.Object](c: ST.ComponentClass[P, _]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - - @inline def apply[P <: js.Object](c: Instantiable1[P, ST.ReactElement]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - - @inline def apply[P <: js.Object](c: Instantiable2[P, _, ST.ReactElement]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - - @inline def apply[P <: js.Object](c: ST.ComponentType[P]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - - @inline def apply[P <: js.Object](c: ST.FunctionComponent[P]): ExternalComponentP[P] = - new ExternalComponentP[P] { - override val component = c.asInstanceOf[js.Object] - } - } - - @inline implicit final class FromStReactNode(val node: ST.ReactNode) { - @inline def fromST: TagMod[Any] = node.asInstanceOf[TagMod[Any]] - } - - /* Support using Slinky things when a ScalablyTyped `ReactElement` is expected */ - @inline implicit final class ToStReactElement(val elem: S.ReactElement) extends AnyVal { - @inline def toST: ST.ReactElement = elem.asInstanceOf[ST.ReactElement] - } - - @inline implicit def buildExternal[E, R <: js.Object](comp: BuildingComponent[E, R]): ToStReactElement = - new ToStReactElement(BuildingComponent.make[E, R](comp)) - - @inline implicit def buildWithAttrs[A](withAttrs: WithAttrs[A]): ToStReactElement = - new ToStReactElement(WithAttrs.build(withAttrs)) - - @inline implicit def buildKeyAddingState(stage: KeyAddingStage): ToStReactElement = - new ToStReactElement(KeyAddingStage.build(stage)) - - @inline final implicit def buildKeyAndRefAddingStage[D](stage: KeyAndRefAddingStage[D]): ToStReactElement = - new ToStReactElement(KeyAndRefAddingStage.build(stage)) -} diff --git a/facades/react/build.json b/facades/react/build.json deleted file mode 100644 index 0f355285a164..000000000000 --- a/facades/react/build.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "typings": [ - "react" - ], - "dependencies": [] -} \ No newline at end of file diff --git a/facades/react/build.sbt b/facades/react/build.sbt deleted file mode 100644 index 01d471bb769c..000000000000 --- a/facades/react/build.sbt +++ /dev/null @@ -1,16 +0,0 @@ -organization := "org.scalablytyped" -name := "react-facade" -version := "202002160131-2a15d2" -scalaVersion := "2.13.1" -enablePlugins(ScalaJSPlugin) -libraryDependencies ++= Seq( - "com.olvind" %%% "scalablytyped-runtime" % "2.1.0", - "org.scalablytyped" %%% "csstype" % "2.6.9-313239", - "org.scalablytyped" %%% "prop-types" % "15.7-dt-20190924Z-11830c", - "org.scalablytyped" %%% "react" % "16.9-dt-20200409Z-0bc722", - "org.scalablytyped" %%% "std" % "3.8-9b2470") -publishArtifact in packageDoc := false -scalacOptions ++= List("-encoding", "utf-8", "-g:notailcalls", "-P:scalajs:sjsDefinedByDefault") -licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayRepository := "ScalablyTyped" -resolvers += Resolver.bintrayRepo("oyvindberg", "ScalablyTyped") diff --git a/facades/react/project/build.properties b/facades/react/project/build.properties deleted file mode 100644 index 35b49aea8c91..000000000000 --- a/facades/react/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.3.8 \ No newline at end of file diff --git a/facades/react/project/plugins.sbt b/facades/react/project/plugins.sbt deleted file mode 100644 index 9dc5036c54e3..000000000000 --- a/facades/react/project/plugins.sbt +++ /dev/null @@ -1,2 +0,0 @@ -addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.32") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") diff --git a/facades/react/readme.md b/facades/react/readme.md deleted file mode 100644 index 35f2cec6cae4..000000000000 --- a/facades/react/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Scala.js typings for react-facade - - - - -## Note -This library has been generated from typescript code from first party type definitions. - -Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) - -## Usage -See [the main readme](../../readme.md) for instructions. - - diff --git a/facades/react/src/main/scala/typings/react/dsl.scala b/facades/react/src/main/scala/typings/react/dsl.scala deleted file mode 100644 index 38c4c5fdcacf..000000000000 --- a/facades/react/src/main/scala/typings/react/dsl.scala +++ /dev/null @@ -1,503 +0,0 @@ -package typings.react - -import org.scalablytyped.runtime.{Instantiable1, Instantiable2} -import typings.react.mod._ -import typings.std.{Object, console} -import typings.{react, std} - -import scala.language.{higherKinds, implicitConversions} -import scala.scalajs.js.annotation.JSImport -import scala.scalajs.js.| -import scala.scalajs.{LinkingInfo, js} - -object dsl { - - object define { - /* define a functional component */ - def fc[P](f: js.Function1[P with AnonChildren, ReactNode]): FC[P] = - f.asInstanceOf[FC[P]] - } - - @inline implicit def fromExoticComponent[P]( - _ctor: ExoticComponent[P]): BuildComponent[P] = - dsl.c(_ctor.asInstanceOf[FC[P]]) - - @inline implicit def fromComponentClass[P]( - _ctor: ComponentClass[P, _]): BuildComponent[P] = dsl.c(_ctor) - - @inline implicit def fromInstantiable1[P]( - _ctor: Instantiable1[P, ReactElement]): BuildComponent[P] = - dsl.c(_ctor) - - @inline implicit def fromInstantiable2[P]( - _ctor: Instantiable2[P, _, ReactElement]): BuildComponent[P] = - dsl.c(_ctor) - - @inline implicit def fromComponentType[P]( - _ctor: ComponentType[P]): BuildComponent[P] = - c(_ctor.asInstanceOf[ComponentClass[P, _]]) - - @inline implicit def fromFc[P]( - _ctor: FunctionComponent[P]): BuildComponent[P] = dsl.c(_ctor) - - @inline final class BuildIntrinsic[P[e] <: DOMAttributes[e], E]( - tpe: String, - _key: js.UndefOr[Key] = js.undefined, - _ref: js.UndefOr[Ref[E]] = js.undefined - ) { - - @inline def withKey(newKey: Key): BuildIntrinsic[P, E] = - new BuildIntrinsic[P, E](tpe, newKey, _ref) - - @inline def withRef(newRef: Ref[E]): BuildIntrinsic[P, E] = - new BuildIntrinsic[P, E](tpe, _key, newRef) - - @inline protected def fullProps(props: P[E]): ClassAttributes[E] with P[E] = - Object.assign[ClassAttributes[E], P[E]]( - new ClassAttributes[E] { - key = _key - ref = _ref - }, - props, - ) - - @inline def noprops(children: ReactNode*): ReactElement = - createElement[P[E], E](tpe, fullProps(null.asInstanceOf[P[E]]), children: _*) - - @inline def props(props: P[E], children: ReactNode*): ReactElement = - createElement[P[E], E](tpe, fullProps(props), children: _*) - } - - lazy val a = - new BuildIntrinsic[AnchorHTMLAttributes, std.HTMLAnchorElement]("a") - lazy val abbr = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("abbr") - lazy val address = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("address") - lazy val animate = - new BuildIntrinsic[SVGAttributes, std.SVGElement]("animate") - lazy val animateTransform = - new BuildIntrinsic[SVGAttributes, std.SVGElement]("animateTransform") - lazy val area = - new BuildIntrinsic[AreaHTMLAttributes, std.HTMLAreaElement]("area") - lazy val article = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("article") - lazy val aside = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("aside") - lazy val audio = - new BuildIntrinsic[AudioHTMLAttributes, std.HTMLAudioElement]("audio") - lazy val b = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("b") - lazy val base = - new BuildIntrinsic[BaseHTMLAttributes, std.HTMLBaseElement]("base") - lazy val bdi = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("bdi") - lazy val bdo = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("bdo") - lazy val big = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("big") - lazy val blockquote = - new BuildIntrinsic[BlockquoteHTMLAttributes, std.HTMLElement]( - "blockquote") - lazy val body = - new BuildIntrinsic[HTMLAttributes, std.HTMLBodyElement]("body") - lazy val br = new BuildIntrinsic[HTMLAttributes, std.HTMLBRElement]("br") - lazy val button = - new BuildIntrinsic[ButtonHTMLAttributes, std.HTMLButtonElement]("button") - lazy val canvas = - new BuildIntrinsic[CanvasHTMLAttributes, std.HTMLCanvasElement]("canvas") - lazy val caption = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("caption") - lazy val circle = - new BuildIntrinsic[SVGAttributes, std.SVGCircleElement]("circle") - lazy val cite = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("cite") - lazy val clipPath = - new BuildIntrinsic[SVGAttributes, std.SVGClipPathElement]("clipPath") - lazy val code = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("code") - lazy val col = - new BuildIntrinsic[ColHTMLAttributes, std.HTMLTableColElement]("col") - lazy val colgroup = - new BuildIntrinsic[ColgroupHTMLAttributes, std.HTMLTableColElement]( - "colgroup") - lazy val data = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("data") - lazy val datalist = - new BuildIntrinsic[HTMLAttributes, std.HTMLDataListElement]("datalist") - lazy val dd = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("dd") - lazy val defs = - new BuildIntrinsic[SVGAttributes, std.SVGDefsElement]("defs") - lazy val del = - new BuildIntrinsic[DelHTMLAttributes, std.HTMLElement]("del") - lazy val desc = - new BuildIntrinsic[SVGAttributes, std.SVGDescElement]("desc") - lazy val details = - new BuildIntrinsic[DetailsHTMLAttributes, std.HTMLElement]("details") - lazy val dfn = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("dfn") - lazy val dialog = - new BuildIntrinsic[DialogHTMLAttributes, std.HTMLDialogElement]("dialog") - lazy val div = - new BuildIntrinsic[HTMLAttributes, std.HTMLDivElement]("div") - lazy val dl = - new BuildIntrinsic[HTMLAttributes, std.HTMLDListElement]("dl") - lazy val dt = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("dt") - lazy val ellipse = - new BuildIntrinsic[SVGAttributes, std.SVGEllipseElement]("ellipse") - lazy val em = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("em") - lazy val embed = - new BuildIntrinsic[EmbedHTMLAttributes, std.HTMLEmbedElement]("embed") - lazy val feBlend = - new BuildIntrinsic[SVGAttributes, std.SVGFEBlendElement]("feBlend") - lazy val feColorMatrix = - new BuildIntrinsic[SVGAttributes, std.SVGFEColorMatrixElement]( - "feColorMatrix") - lazy val feComponentTransfer = - new BuildIntrinsic[SVGAttributes, std.SVGFEComponentTransferElement]( - "feComponentTransfer") - lazy val feComposite = - new BuildIntrinsic[SVGAttributes, std.SVGFECompositeElement]( - "feComposite") - lazy val feConvolveMatrix = - new BuildIntrinsic[SVGAttributes, std.SVGFEConvolveMatrixElement]( - "feConvolveMatrix") - lazy val feDiffuseLighting = - new BuildIntrinsic[SVGAttributes, std.SVGFEDiffuseLightingElement]( - "feDiffuseLighting") - lazy val feDisplacementMap = - new BuildIntrinsic[SVGAttributes, std.SVGFEDisplacementMapElement]( - "feDisplacementMap") - lazy val feDistantLight = - new BuildIntrinsic[SVGAttributes, std.SVGFEDistantLightElement]( - "feDistantLight") - lazy val feFlood = - new BuildIntrinsic[SVGAttributes, std.SVGFEFloodElement]("feFlood") - lazy val feFuncA = - new BuildIntrinsic[SVGAttributes, std.SVGFEFuncAElement]("feFuncA") - lazy val feFuncB = - new BuildIntrinsic[SVGAttributes, std.SVGFEFuncBElement]("feFuncB") - lazy val feFuncG = - new BuildIntrinsic[SVGAttributes, std.SVGFEFuncGElement]("feFuncG") - lazy val feFuncR = - new BuildIntrinsic[SVGAttributes, std.SVGFEFuncRElement]("feFuncR") - lazy val feGaussianBlur = - new BuildIntrinsic[SVGAttributes, std.SVGFEGaussianBlurElement]( - "feGaussianBlur") - lazy val feImage = - new BuildIntrinsic[SVGAttributes, std.SVGFEImageElement]("feImage") - lazy val feMerge = - new BuildIntrinsic[SVGAttributes, std.SVGFEMergeElement]("feMerge") - lazy val feMergeNode = - new BuildIntrinsic[SVGAttributes, std.SVGFEMergeNodeElement]( - "feMergeNode") - lazy val feMorphology = - new BuildIntrinsic[SVGAttributes, std.SVGFEMorphologyElement]( - "feMorphology") - lazy val feOffset = - new BuildIntrinsic[SVGAttributes, std.SVGFEOffsetElement]("feOffset") - lazy val fePointLight = - new BuildIntrinsic[SVGAttributes, std.SVGFEPointLightElement]( - "fePointLight") - lazy val feSpecularLighting = - new BuildIntrinsic[SVGAttributes, std.SVGFESpecularLightingElement]( - "feSpecularLighting") - lazy val feSpotLight = - new BuildIntrinsic[SVGAttributes, std.SVGFESpotLightElement]( - "feSpotLight") - lazy val feTile = - new BuildIntrinsic[SVGAttributes, std.SVGFETileElement]("feTile") - lazy val feTurbulence = - new BuildIntrinsic[SVGAttributes, std.SVGFETurbulenceElement]( - "feTurbulence") - lazy val fieldset = - new BuildIntrinsic[FieldsetHTMLAttributes, std.HTMLFieldSetElement]( - "fieldset") - lazy val figcaption = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("figcaption") - lazy val figure = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("figure") - lazy val filter = - new BuildIntrinsic[SVGAttributes, std.SVGFilterElement]("filter") - lazy val footer = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("footer") - lazy val foreignObject = - new BuildIntrinsic[SVGAttributes, std.SVGForeignObjectElement]( - "foreignObject") - lazy val form = - new BuildIntrinsic[FormHTMLAttributes, std.HTMLFormElement]("form") - lazy val g = new BuildIntrinsic[SVGAttributes, std.SVGGElement]("g") - lazy val h1 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h1") - lazy val h2 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h2") - lazy val h3 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h3") - lazy val h4 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h4") - lazy val h5 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h5") - lazy val h6 = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadingElement]("h6") - lazy val head = - new BuildIntrinsic[HTMLAttributes, std.HTMLHeadElement]("head") - lazy val header = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("header") - lazy val hgroup = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("hgroup") - lazy val hr = new BuildIntrinsic[HTMLAttributes, std.HTMLHRElement]("hr") - lazy val html = - new BuildIntrinsic[HtmlHTMLAttributes, std.HTMLHtmlElement]("html") - lazy val i = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("i") - lazy val iframe = - new BuildIntrinsic[IframeHTMLAttributes, std.HTMLIFrameElement]("iframe") - lazy val image = - new BuildIntrinsic[SVGAttributes, std.SVGImageElement]("image") - lazy val img = - new BuildIntrinsic[ImgHTMLAttributes, std.HTMLImageElement]("img") - lazy val input = - new BuildIntrinsic[InputHTMLAttributes, std.HTMLInputElement]("input") - lazy val ins = - new BuildIntrinsic[InsHTMLAttributes, std.HTMLModElement]("ins") - lazy val kbd = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("kbd") - lazy val keygen = - new BuildIntrinsic[KeygenHTMLAttributes, std.HTMLElement]("keygen") - lazy val label = - new BuildIntrinsic[LabelHTMLAttributes, std.HTMLLabelElement]("label") - lazy val legend = - new BuildIntrinsic[HTMLAttributes, std.HTMLLegendElement]("legend") - lazy val li = new BuildIntrinsic[LiHTMLAttributes, std.HTMLLIElement]("li") - lazy val line = - new BuildIntrinsic[SVGAttributes, std.SVGLineElement]("line") - lazy val linearGradient = - new BuildIntrinsic[SVGAttributes, std.SVGLinearGradientElement]( - "linearGradient") - lazy val link = - new BuildIntrinsic[LinkHTMLAttributes, std.HTMLLinkElement]("link") - lazy val main = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("main") - lazy val map = - new BuildIntrinsic[MapHTMLAttributes, std.HTMLMapElement]("map") - lazy val mark = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("mark") - lazy val marker = - new BuildIntrinsic[SVGAttributes, std.SVGMarkerElement]("marker") - lazy val mask = - new BuildIntrinsic[SVGAttributes, std.SVGMaskElement]("mask") - lazy val menu = - new BuildIntrinsic[MenuHTMLAttributes, std.HTMLElement]("menu") - lazy val menuitem = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("menuitem") - lazy val meta = - new BuildIntrinsic[MetaHTMLAttributes, std.HTMLMetaElement]("meta") - lazy val metadata = - new BuildIntrinsic[SVGAttributes, std.SVGMetadataElement]("metadata") - lazy val meter = - new BuildIntrinsic[MeterHTMLAttributes, std.HTMLElement]("meter") - lazy val nav = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("nav") - lazy val noindex = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("noindex") - lazy val noscript = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("noscript") - lazy val `object` = - new BuildIntrinsic[ObjectHTMLAttributes, std.HTMLObjectElement]("object") - lazy val ol = - new BuildIntrinsic[OlHTMLAttributes, std.HTMLOListElement]("ol") - lazy val optgroup = - new BuildIntrinsic[OptgroupHTMLAttributes, std.HTMLOptGroupElement]( - "optgroup") - lazy val option = - new BuildIntrinsic[OptionHTMLAttributes, std.HTMLOptionElement]("option") - lazy val output = - new BuildIntrinsic[OutputHTMLAttributes, std.HTMLElement]("output") - lazy val p = - new BuildIntrinsic[HTMLAttributes, std.HTMLParagraphElement]("p") - lazy val param = - new BuildIntrinsic[ParamHTMLAttributes, std.HTMLParamElement]("param") - lazy val path = - new BuildIntrinsic[SVGAttributes, std.SVGPathElement]("path") - lazy val pattern = - new BuildIntrinsic[SVGAttributes, std.SVGPatternElement]("pattern") - lazy val picture = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("picture") - lazy val polygon = - new BuildIntrinsic[SVGAttributes, std.SVGPolygonElement]("polygon") - lazy val polyline = - new BuildIntrinsic[SVGAttributes, std.SVGPolylineElement]("polyline") - lazy val pre = - new BuildIntrinsic[HTMLAttributes, std.HTMLPreElement]("pre") - lazy val progress = - new BuildIntrinsic[ProgressHTMLAttributes, std.HTMLProgressElement]( - "progress") - lazy val q = - new BuildIntrinsic[QuoteHTMLAttributes, std.HTMLQuoteElement]("q") - lazy val radialGradient = - new BuildIntrinsic[SVGAttributes, std.SVGRadialGradientElement]( - "radialGradient") - lazy val rect = - new BuildIntrinsic[SVGAttributes, std.SVGRectElement]("rect") - lazy val rp = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("rp") - lazy val rt = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("rt") - lazy val ruby = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("ruby") - lazy val s = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("s") - lazy val samp = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("samp") - lazy val script = - new BuildIntrinsic[ScriptHTMLAttributes, std.HTMLScriptElement]("script") - lazy val section = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("section") - lazy val select = - new BuildIntrinsic[SelectHTMLAttributes, std.HTMLSelectElement]("select") - lazy val small = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("small") - lazy val source = - new BuildIntrinsic[SourceHTMLAttributes, std.HTMLSourceElement]("source") - lazy val span = - new BuildIntrinsic[HTMLAttributes, std.HTMLSpanElement]("span") - lazy val stop = - new BuildIntrinsic[SVGAttributes, std.SVGStopElement]("stop") - lazy val strong = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("strong") - lazy val style = - new BuildIntrinsic[StyleHTMLAttributes, std.HTMLStyleElement]("style") - lazy val sub = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("sub") - lazy val summary = - new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("summary") - lazy val sup = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("sup") - lazy val svg = new BuildIntrinsic[SVGAttributes, std.SVGSVGElement]("svg") - lazy val switch = - new BuildIntrinsic[SVGAttributes, std.SVGSwitchElement]("switch") - lazy val symbol = - new BuildIntrinsic[SVGAttributes, std.SVGSymbolElement]("symbol") - lazy val table = - new BuildIntrinsic[TableHTMLAttributes, std.HTMLTableElement]("table") - lazy val tbody = - new BuildIntrinsic[HTMLAttributes, std.HTMLTableSectionElement]("tbody") - lazy val td = - new BuildIntrinsic[TdHTMLAttributes, std.HTMLTableDataCellElement]("td") - lazy val text = - new BuildIntrinsic[SVGAttributes, std.SVGTextElement]("text") - lazy val textPath = - new BuildIntrinsic[SVGAttributes, std.SVGTextPathElement]("textPath") - lazy val textarea = - new BuildIntrinsic[TextareaHTMLAttributes, std.HTMLTextAreaElement]( - "textarea") - lazy val tfoot = - new BuildIntrinsic[HTMLAttributes, std.HTMLTableSectionElement]("tfoot") - lazy val th = - new BuildIntrinsic[ThHTMLAttributes, std.HTMLTableHeaderCellElement]( - "th") - lazy val thead = - new BuildIntrinsic[HTMLAttributes, std.HTMLTableSectionElement]("thead") - lazy val time = - new BuildIntrinsic[TimeHTMLAttributes, std.HTMLElement]("time") - lazy val title = - new BuildIntrinsic[HTMLAttributes, std.HTMLTitleElement]("title") - lazy val tr = - new BuildIntrinsic[HTMLAttributes, std.HTMLTableRowElement]("tr") - lazy val track = - new BuildIntrinsic[TrackHTMLAttributes, std.HTMLTrackElement]("track") - lazy val tspan = - new BuildIntrinsic[SVGAttributes, std.SVGTSpanElement]("tspan") - lazy val u = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("u") - lazy val ul = - new BuildIntrinsic[HTMLAttributes, std.HTMLUListElement]("ul") - lazy val use = new BuildIntrinsic[SVGAttributes, std.SVGUseElement]("use") - lazy val `var` = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("var") - lazy val video = - new BuildIntrinsic[VideoHTMLAttributes, std.HTMLVideoElement]("video") - lazy val view = - new BuildIntrinsic[SVGAttributes, std.SVGViewElement]("view") - lazy val wbr = new BuildIntrinsic[HTMLAttributes, std.HTMLElement]("wbr") - lazy val webview = - new BuildIntrinsic[WebViewHTMLAttributes, react.HTMLWebViewElement]( - "webview") - - /** - * ```scala - * // component you want to use - * class Foo extends React.Component[FooProps, ...]{...} - * - * // usage - * dsl.cls[Foo].props(new FooProps{}, "child1", 2) - * ``` - */ - @inline def cls[C <: Component[_, _, _]]( - implicit C: js.ConstructorTag[C]): InferProps[C] = - C.constructor.asInstanceOf[InferProps[C]] - - @inline def c[P](_ctor: ComponentClass[P, _]): BuildComponent[P] = - new BuildComponent[P](_ctor.asInstanceOf[ComponentClass[P, ComponentState]], - js.undefined, - js.undefined) - - @inline def c[P]( - _ctor: Instantiable1[P, ReactElement]): BuildComponent[P] = - new BuildComponent[P](_ctor.asInstanceOf[ComponentClass[P, ComponentState]], - js.undefined, - js.undefined) - - @inline def c[P]( - _ctor: Instantiable2[P, _, ReactElement]): BuildComponent[P] = - new BuildComponent[P](_ctor.asInstanceOf[ComponentClass[P, ComponentState]], - js.undefined, - js.undefined) - - // dodgy cast inside here, but I don't think it matters. let's see - @inline def c[P](_ctor: FunctionComponent[P]): BuildComponent[P] = - new BuildComponent[P](_ctor.asInstanceOf[ComponentClass[P, ComponentState]], - js.undefined, - js.undefined) - - @js.native - trait InferProps[+C <: Component[_, _, _]] extends js.Object - - object InferProps { - @inline implicit def builder[P]( - ctor: InferProps[Component[P, _, _]]): BuildComponent[P] = - new BuildComponent[P]( - ctor.asInstanceOf[ComponentClass[P, ComponentState]]) - } - - /* we're having some instability with createElement and overloads, so just inline it for now*/ - @JSImport("react", "createElement") - @js.native - object createElementHack extends js.Object { - def apply[P /* <: js.Object */ ]( - `type`: ComponentClass[P, ComponentState], - props: Attributes with P, - children: ReactNode*): ReactElement = js.native - } - - @inline final class BuildComponent[P] private[dsl] ( - ctor: ComponentClass[P, ComponentState], - _key: js.UndefOr[Key] = js.undefined, - _ref: js.UndefOr[Ref[Component[P, ComponentState, _]]] = js.undefined) { - - @inline def withKey(newKey: Key): BuildComponent[P] = - new BuildComponent(ctor, newKey, _ref) - - @inline def withRef( - newRef: Ref[Component[P, ComponentState, _]]): BuildComponent[P] = - new BuildComponent(ctor, _key, newRef) - - @inline protected def fullProps(props: P) - : ClassAttributes[Component[P, ComponentState, _]] with P = - Object.assign[ClassAttributes[Component[P, ComponentState, _]], P]( - new ClassAttributes[Component[P, ComponentState, _]] { - key = _key - ref = _ref.map(r => r: LegacyRef[Component[P, ComponentState, _]]) - }, - props, - ) - - @inline def props(props: P, children: ReactNode*): ReactElement = { - if (LinkingInfo.developmentMode && js.isUndefined(ctor)) - console.warn("Component was undefined", - props.asInstanceOf[js.Any], - _key.asInstanceOf[js.Any], - _ref.asInstanceOf[js.Any], - children) - - createElementHack(ctor, fullProps(props), children: _*) - } - - @inline def noprops(children: ReactNode*): ReactElement = { - if (LinkingInfo.developmentMode && js.isUndefined(ctor)) - console.warn("Component was undefined", - _key.asInstanceOf[js.Any], - _ref.asInstanceOf[js.Any], - children) - - createElementHack(ctor, fullProps(null.asInstanceOf[P]), children: _*) - } - } -}