@hackersheet/core 0.1.0-alpha.1 → 0.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/chunk-2BT3AUUD.mjs +1 -0
  2. package/dist/chunk-4DVWGIZX.mjs +1 -0
  3. package/dist/chunk-B7V45JSA.mjs +1 -0
  4. package/dist/chunk-C3G2CMRR.mjs +1 -13
  5. package/dist/chunk-FIFBNWMD.mjs +1 -21
  6. package/dist/chunk-KV7ERTFN.mjs +1 -0
  7. package/dist/chunk-LCYEOT4E.mjs +1 -0
  8. package/dist/chunk-MFOHLRBN.mjs +1 -0
  9. package/dist/chunk-NTJOIYZC.mjs +1 -0
  10. package/dist/chunk-PA32N4A6.mjs +1 -6
  11. package/dist/chunk-PUTNZ4GU.mjs +1 -12
  12. package/dist/chunk-QEMYU6OR.mjs +1 -0
  13. package/dist/chunk-RXX3SC7G.mjs +1 -0
  14. package/dist/chunk-SAWXFXEV.mjs +1 -0
  15. package/dist/chunk-XJVHC2S7.mjs +1 -0
  16. package/dist/client/client.d.mts +16 -1
  17. package/dist/client/client.d.ts +16 -1
  18. package/dist/client/client.js +1 -3424
  19. package/dist/client/client.mjs +1 -20
  20. package/dist/client/create-client.d.mts +1 -0
  21. package/dist/client/create-client.d.ts +1 -0
  22. package/dist/client/create-client.js +1 -3429
  23. package/dist/client/create-client.mjs +1 -21
  24. package/dist/client/operations/get-document.js +1 -881
  25. package/dist/client/operations/get-document.mjs +1 -14
  26. package/dist/client/operations/get-documents.js +1 -798
  27. package/dist/client/operations/get-documents.mjs +1 -14
  28. package/dist/client/operations/get-tag.js +1 -776
  29. package/dist/client/operations/get-tag.mjs +1 -14
  30. package/dist/client/operations/get-tags.js +1 -772
  31. package/dist/client/operations/get-tags.mjs +1 -14
  32. package/dist/client/operations/get-tree-node-document.d.mts +15 -0
  33. package/dist/client/operations/get-tree-node-document.d.ts +15 -0
  34. package/dist/client/operations/get-tree-node-document.js +1 -0
  35. package/dist/client/operations/get-tree-node-document.mjs +1 -0
  36. package/dist/client/operations/get-tree.d.mts +15 -0
  37. package/dist/client/operations/get-tree.d.ts +15 -0
  38. package/dist/client/operations/get-tree.js +1 -0
  39. package/dist/client/operations/get-tree.mjs +1 -0
  40. package/dist/client/operations/get-websites.js +1 -798
  41. package/dist/client/operations/get-websites.mjs +1 -14
  42. package/dist/client/operations/index.js +1 -1041
  43. package/dist/client/operations/index.mjs +1 -31
  44. package/dist/gql/fragment-masking.js +1 -47
  45. package/dist/gql/fragment-masking.mjs +1 -10
  46. package/dist/gql/gql.d.mts +24 -26
  47. package/dist/gql/gql.d.ts +24 -26
  48. package/dist/gql/gql.js +1 -739
  49. package/dist/gql/gql.mjs +1 -7
  50. package/dist/gql/graphql.d.mts +365 -2
  51. package/dist/gql/graphql.d.ts +365 -2
  52. package/dist/gql/graphql.js +1 -733
  53. package/dist/gql/graphql.mjs +1 -14
  54. package/dist/gql/index.js +1 -761
  55. package/dist/gql/index.mjs +1 -16
  56. package/dist/index.d.mts +1 -0
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +1 -3429
  59. package/dist/index.mjs +1 -22
  60. package/dist/types/document.js +1 -18
  61. package/dist/types/index.d.mts +1 -0
  62. package/dist/types/index.d.ts +1 -0
  63. package/dist/types/index.js +1 -18
  64. package/dist/types/index.mjs +1 -1
  65. package/dist/types/tag.d.mts +3 -0
  66. package/dist/types/tag.d.ts +3 -0
  67. package/dist/types/tag.js +1 -18
  68. package/dist/types/tree.d.mts +37 -0
  69. package/dist/types/tree.d.ts +37 -0
  70. package/dist/types/tree.js +1 -0
  71. package/dist/types/tree.mjs +0 -0
  72. package/dist/types/website.js +1 -18
  73. package/dist/utils/index.js +1 -49
  74. package/dist/utils/index.mjs +1 -12
  75. package/dist/utils/make-after-cursor-from-page.js +1 -32
  76. package/dist/utils/make-after-cursor-from-page.mjs +1 -6
  77. package/dist/utils/non-nullable-filter.js +1 -30
  78. package/dist/utils/non-nullable-filter.mjs +1 -6
  79. package/dist/utils/to-array-from-edges.js +1 -34
  80. package/dist/utils/to-array-from-edges.mjs +1 -7
  81. package/package.json +21 -17
  82. package/dist/chunk-3GXIDS5H.mjs +0 -23
  83. package/dist/chunk-5X53IRLN.mjs +0 -2417
  84. package/dist/chunk-7R3CATQT.mjs +0 -143
  85. package/dist/chunk-EXRG4APR.mjs +0 -34
  86. package/dist/chunk-JGQBUURE.mjs +0 -60
  87. package/dist/chunk-SYHSU6VH.mjs +0 -38
  88. package/dist/chunk-TXCPBPKN.mjs +0 -12
  89. package/dist/chunk-WIUPPYM5.mjs +0 -60
  90. package/dist/chunk-ZZFAG7Y6.mjs +0 -705
@@ -0,0 +1 @@
1
+ var e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"document"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"preview"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}},{kind:"Field",name:{kind:"Name",value:"assets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"width"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"outboundLinkDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"by"},value:{kind:"StringValue",value:"published_at",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"StringValue",value:"desc",block:!1}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"inboundLinkDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"by"},value:{kind:"StringValue",value:"published_at",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"StringValue",value:"desc",block:!1}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"websites"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"by"},value:{kind:"StringValue",value:"published_at",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"order"},value:{kind:"StringValue",value:"desc",block:!1}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"domain"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ogSiteName"}},{kind:"Field",name:{kind:"Name",value:"ogTitle"}},{kind:"Field",name:{kind:"Name",value:"ogType"}},{kind:"Field",name:{kind:"Name",value:"ogUrl"}},{kind:"Field",name:{kind:"Name",value:"ogDescription"}},{kind:"Field",name:{kind:"Name",value:"ogLocale"}},{kind:"Field",name:{kind:"Name",value:"ogImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]},i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"documents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"before"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"last"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filter"}},type:{kind:"NamedType",name:{kind:"Name",value:"DocumentConnectionFilter"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"NamedType",name:{kind:"Name",value:"ConnectionSort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"before"},value:{kind:"Variable",name:{kind:"Name",value:"before"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"Variable",name:{kind:"Name",value:"last"}}},{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"Variable",name:{kind:"Name",value:"filter"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"preview"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}}]}}]}}]}}]}}]},n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"tag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"documentCount"}},{kind:"Field",name:{kind:"Name",value:"documentCountInPublished"}},{kind:"Field",name:{kind:"Name",value:"documentCountInDraft"}},{kind:"Field",name:{kind:"Name",value:"relatedTags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"documentCount"}},{kind:"Field",name:{kind:"Name",value:"documentCountInPublished"}},{kind:"Field",name:{kind:"Name",value:"documentCountInDraft"}}]}}]}}]}}]}}]}}]},a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"tags"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"before"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"last"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filter"}},type:{kind:"NamedType",name:{kind:"Name",value:"TagConnectionFilter"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"NamedType",name:{kind:"Name",value:"ConnectionSort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"before"},value:{kind:"Variable",name:{kind:"Name",value:"before"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"Variable",name:{kind:"Name",value:"last"}}},{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"Variable",name:{kind:"Name",value:"filter"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"documentCount"}},{kind:"Field",name:{kind:"Name",value:"documentCountInPublished"}},{kind:"Field",name:{kind:"Name",value:"documentCountInDraft"}}]}}]}}]}}]}}]},d={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"treeNodeDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"treeSlug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeFullSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"variant"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tree"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"treeSlug"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"fullSlug"},value:{kind:"Variable",name:{kind:"Name",value:"nodeFullSlug"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"nodeDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"variant"},value:{kind:"Variable",name:{kind:"Name",value:"variant"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"preview"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}},{kind:"Field",name:{kind:"Name",value:"assets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"width"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"outboundLinkDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"inboundLinkDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"emoji"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"path"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"publishedAt"}},{kind:"Field",name:{kind:"Name",value:"modifiedAt"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"websites"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"domain"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ogSiteName"}},{kind:"Field",name:{kind:"Name",value:"ogTitle"}},{kind:"Field",name:{kind:"Name",value:"ogType"}},{kind:"Field",name:{kind:"Name",value:"ogUrl"}},{kind:"Field",name:{kind:"Name",value:"ogDescription"}},{kind:"Field",name:{kind:"Name",value:"ogLocale"}},{kind:"Field",name:{kind:"Name",value:"ogImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]},l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"tree"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tree"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"fullSlug"}},{kind:"Field",name:{kind:"Name",value:"names"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"variant"}},{kind:"Field",name:{kind:"Name",value:"content"}}]}},{kind:"Field",name:{kind:"Name",value:"nodeDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"variant"}},{kind:"Field",name:{kind:"Name",value:"document"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"path"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"parent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"root"}},{kind:"Field",name:{kind:"Name",value:"position"}}]}}]}}]}}]}}]}}]},k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"websites"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"before"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"last"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filter"}},type:{kind:"NamedType",name:{kind:"Name",value:"WorkspaceWebsiteConnectionFilter"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"NamedType",name:{kind:"Name",value:"ConnectionSort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websites"},arguments:[{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"before"},value:{kind:"Variable",name:{kind:"Name",value:"before"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"Variable",name:{kind:"Name",value:"last"}}},{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"Variable",name:{kind:"Name",value:"filter"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"domain"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ogSiteName"}},{kind:"Field",name:{kind:"Name",value:"ogTitle"}},{kind:"Field",name:{kind:"Name",value:"ogType"}},{kind:"Field",name:{kind:"Name",value:"ogUrl"}},{kind:"Field",name:{kind:"Name",value:"ogDescription"}},{kind:"Field",name:{kind:"Name",value:"ogLocale"}},{kind:"Field",name:{kind:"Name",value:"ogImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"fileUrl"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}},{kind:"Field",name:{kind:"Name",value:"documents"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"draft"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}}]}}]}}]}}]}}]}}]};export{e as DocumentDocument,i as DocumentsDocument,n as TagDocument,a as TagsDocument,d as TreeNodeDocumentDocument,l as TreeDocument,k as WebsitesDocument};
@@ -0,0 +1 @@
1
+ import{Client as n}from"./chunk-XJVHC2S7.mjs";function r(r){return new n(r)}export{r as createClient};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as t}from"./chunk-NTJOIYZC.mjs";function e(t){const e=n(t.data?.websites?.edges).map(t=>({...t,documents:n(t.documents?.edges)})),o=t.data?.websites?.totalCount||0;return{websites:e,totalCount:o,isEmpty:0===o,error:t.error}}t("\n query websites(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: WorkspaceWebsiteConnectionFilter\n $sort: ConnectionSort\n ) {\n websites(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n");export{e as makeGetWebsitesResponse};
@@ -1,13 +1 @@
1
- import {
2
- nonNullableFilter
3
- } from "./chunk-PA32N4A6.mjs";
4
-
5
- // src/utils/to-array-from-edges.ts
6
- function toArrayFromEdges(edges) {
7
- if (!edges) return [];
8
- return edges.map((edge) => edge?.node).filter(nonNullableFilter) ?? [];
9
- }
10
-
11
- export {
12
- toArrayFromEdges
13
- };
1
+ import{nonNullableFilter as r}from"./chunk-PA32N4A6.mjs";function n(n){return n?n.map(r=>r?.node).filter(r)??[]:[]}export{n as toArrayFromEdges};
@@ -1,21 +1 @@
1
- // src/gql/fragment-masking.ts
2
- function getFragmentData(_documentNode, fragmentType) {
3
- return fragmentType;
4
- }
5
- function makeFragmentData(data, _fragment) {
6
- return data;
7
- }
8
- function isFragmentReady(queryNode, fragmentNode, data) {
9
- const deferredFields = queryNode.__meta__?.deferredFields;
10
- if (!deferredFields) return true;
11
- const fragDef = fragmentNode.definitions[0];
12
- const fragName = fragDef?.name?.value;
13
- const fields = fragName && deferredFields[fragName] || [];
14
- return fields.length > 0 && fields.every((field) => data && field in data);
15
- }
16
-
17
- export {
18
- getFragmentData,
19
- makeFragmentData,
20
- isFragmentReady
21
- };
1
+ function n(n,e){return e}function e(n,e){return n}function t(n,e,t){const r=n.__meta__?.deferredFields;if(!r)return!0;const i=e.definitions[0],u=i?.name?.value,o=u&&r[u]||[];return o.length>0&&o.every(n=>t&&n in t)}export{n as getFragmentData,e as makeFragmentData,t as isFragmentReady};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as e}from"./chunk-NTJOIYZC.mjs";function t(e){if(!e.data?.document)return{document:null,error:e.error};const t=e.data?.document;return{document:{...t,tags:n(t.tags?.edges),assets:n(t.assets?.edges),outboundLinkDocuments:n(t.outboundLinkDocuments?.edges).map(e=>({...e,tags:n(e.tags?.edges)})),inboundLinkDocuments:n(t.inboundLinkDocuments?.edges).map(e=>({...e,tags:n(e.tags?.edges)})),websites:n(t.websites?.edges)},error:e.error}}e('\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n');export{t as makeGetDocumentResponse};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as e}from"./chunk-NTJOIYZC.mjs";function t(e){if(!e.data?.tree?.node?.nodeDocument?.document)return{document:null,error:e.error};const t=e.data?.tree.node?.nodeDocument?.document;return{document:{...t,tags:n(t.tags?.edges),assets:n(t.assets?.edges),outboundLinkDocuments:n(t.outboundLinkDocuments?.edges).map(e=>({...e,tags:n(e.tags?.edges)})),inboundLinkDocuments:n(t.inboundLinkDocuments?.edges).map(e=>({...e,tags:n(e.tags?.edges)})),websites:n(t.websites?.edges)},error:e.error}}e("\n query treeNodeDocument($treeSlug: String, $nodeFullSlug: String!, $variant: String) {\n tree(slug: $treeSlug) {\n id\n node(fullSlug: $nodeFullSlug) {\n id\n nodeDocument(variant: $variant) {\n document {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n }\n }\n }\n");export{t as makeGetTreeNodeDocumentResponse};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as e}from"./chunk-NTJOIYZC.mjs";function t(e){if(!e.data?.tree)return{tree:null,error:e.error};const t=e.data?.tree,r=n(t.nodes?.edges).map(n=>{const e=new Map(n.names?.map(n=>[n.variant,n.content])),t=new Map(n.nodeDocuments?.map(n=>[n.variant,n.document??null]));return{id:n.id,fullSlug:n.fullSlug,name:e.get("")??"",names:n.names??[],nameMap:e,document:t.get("")??null,documentMap:t,nodeDocuments:n.nodeDocuments??[],parentId:n.parent?.id??void 0,root:n.root,position:n.position}});return{tree:{...t,nodes:o(r),flatNodes:r},error:e.error}}function o(n){const e=new Map,t=[];return n.forEach(n=>{e.set(n.id,{...n,children:[]})}),n.forEach(n=>{const o=e.get(n.id);if(n.parentId){const t=e.get(n.parentId);t?.children?.push(o)}else t.push(o)}),t}e("\n query tree($slug: String) {\n tree(slug: $slug) {\n id\n slug\n name\n nodes {\n edges {\n node {\n id\n fullSlug\n names {\n variant\n content\n }\n nodeDocuments {\n variant\n document {\n id\n slug\n title\n path\n }\n }\n parent {\n id\n }\n root\n position\n }\n }\n }\n }\n }\n");export{t as makeGetTreeResponse};
@@ -0,0 +1 @@
1
+ import{DocumentDocument as n,DocumentsDocument as e,TagDocument as t,TagsDocument as i,TreeDocument as o,TreeNodeDocumentDocument as d,WebsitesDocument as r}from"./chunk-2BT3AUUD.mjs";var s={'\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites(sort: { by: "published_at", order: "desc" }) {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n':n,"\n query documents(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: DocumentConnectionFilter\n $sort: ConnectionSort\n ) {\n documents(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n":e,"\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n }\n }\n }\n }\n }\n":t,"\n query tags(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: TagConnectionFilter\n $sort: ConnectionSort\n ) {\n tags(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n }\n }\n }\n }\n":i,"\n query treeNodeDocument($treeSlug: String, $nodeFullSlug: String!, $variant: String) {\n tree(slug: $treeSlug) {\n id\n node(fullSlug: $nodeFullSlug) {\n id\n nodeDocument(variant: $variant) {\n document {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n }\n }\n }\n":d,"\n query tree($slug: String) {\n tree(slug: $slug) {\n id\n slug\n name\n nodes {\n edges {\n node {\n id\n fullSlug\n names {\n variant\n content\n }\n nodeDocuments {\n variant\n document {\n id\n slug\n title\n path\n }\n }\n parent {\n id\n }\n root\n position\n }\n }\n }\n }\n }\n":o,"\n query websites(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: WorkspaceWebsiteConnectionFilter\n $sort: ConnectionSort\n ) {\n websites(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n":r};function l(n){return s[n]??{}}export{l as graphql};
@@ -1,6 +1 @@
1
- // src/utils/non-nullable-filter.ts
2
- var nonNullableFilter = (value) => value != null;
3
-
4
- export {
5
- nonNullableFilter
6
- };
1
+ var l=l=>null!=l;export{l as nonNullableFilter};
@@ -1,12 +1 @@
1
- // src/utils/make-after-cursor-from-page.ts
2
- function makeAfterCursorFromPage(page, first) {
3
- const after = (page - 1) * first;
4
- if (after === 0) {
5
- return void 0;
6
- }
7
- return Buffer.from(after.toString()).toString("base64");
8
- }
9
-
10
- export {
11
- makeAfterCursorFromPage
12
- };
1
+ function t(t,r){const n=(t-1)*r;if(0!==n)return Buffer.from(n.toString()).toString("base64")}export{t as makeAfterCursorFromPage};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as e}from"./chunk-NTJOIYZC.mjs";function t(e){const t=e.data?.tag;return{tag:t?{...t,relatedTags:n(t.relatedTags?.edges)}:null,error:e.error}}e("\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n }\n }\n }\n }\n }\n");export{t as makeGetTagResponse};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as n}from"./chunk-C3G2CMRR.mjs";import{graphql as t}from"./chunk-NTJOIYZC.mjs";function e(t){if(!t.data||!t.data.documents)return{documents:[],totalCount:0,isEmpty:!0,error:t.error};const e=t.data.documents,r=n(e?.edges).map(t=>({...t,tags:n(t.tags?.edges)})),o=t.data?.documents?.totalCount||0;return{documents:r,totalCount:o,isEmpty:0===o,error:t.error}}t("\n query documents(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: DocumentConnectionFilter\n $sort: ConnectionSort\n ) {\n documents(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n");export{e as makeGetDocumentsResponse};
@@ -0,0 +1 @@
1
+ import{toArrayFromEdges as t}from"./chunk-C3G2CMRR.mjs";import{graphql as n}from"./chunk-NTJOIYZC.mjs";function r(n){const r=t(n.data?.tags?.edges),o=n.data?.tags?.totalCount||0;return{tags:r,totalCount:o,isEmpty:0===o,error:n.error}}n("\n query tags(\n $after: String\n $before: String\n $first: Int\n $last: Int\n $filter: TagConnectionFilter\n $sort: ConnectionSort\n ) {\n tags(after: $after, before: $before, first: $first, last: $last, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n documentCountInDraft\n }\n }\n }\n }\n");export{r as makeGetTagsResponse};
@@ -0,0 +1 @@
1
+ import{makeGetTreeNodeDocumentResponse as t}from"./chunk-LCYEOT4E.mjs";import{makeGetTreeResponse as r}from"./chunk-MFOHLRBN.mjs";import{makeGetDocumentResponse as e}from"./chunk-KV7ERTFN.mjs";import{makeGetDocumentsResponse as s}from"./chunk-RXX3SC7G.mjs";import{makeGetTagResponse as n}from"./chunk-QEMYU6OR.mjs";import{makeGetTagsResponse as i}from"./chunk-SAWXFXEV.mjs";import{makeGetWebsitesResponse as c}from"./chunk-B7V45JSA.mjs";import{DocumentDocument as u,DocumentsDocument as o,TagDocument as a,TagsDocument as l,TreeDocument as m,TreeNodeDocumentDocument as h,WebsitesDocument as q}from"./chunk-2BT3AUUD.mjs";import{createClient as y,cacheExchange as C,fetchExchange as p}from"@urql/core";var f=class{url;accessKey;urqlClient;constructor(t){this.url=t.url,this.accessKey=t.accessKey,this.urqlClient=t.urqlClient??this.createUrqlClient()}async getDocument(t){const r=await this.urqlClient.query(u,t);return e(r)}async getDocuments(t){const r=await this.urqlClient.query(o,t??{});return s(r)}async getTag(t){const r=await this.urqlClient.query(a,t);return n(r)}async getTags(t){const r=await this.urqlClient.query(l,t??{});return i(r)}async getWebsites(t){const r=await this.urqlClient.query(q,t??{});return c(r)}async getTree(t){const e=await this.urqlClient.query(m,t??{});return r(e)}async getTreeNodeDocument(r){const e=await this.urqlClient.query(h,r);return t(e)}createUrqlClient(){return y({url:this.url,exchanges:[C,p],fetchOptions:{headers:{Authorization:`bearer ${this.accessKey}`},cache:"no-store"},preferGetMethod:!1})}};export{f as Client};
@@ -1,9 +1,10 @@
1
1
  import { Document, DocumentList } from '../types/document.mjs';
2
2
  import { Tag, TagList } from '../types/tag.mjs';
3
+ import { Tree } from '../types/tree.mjs';
3
4
  import { WebsiteListeItem } from '../types/website.mjs';
4
5
  import * as _urql_core from '@urql/core';
5
6
  import { Client as Client$1 } from '@urql/core';
6
- import { QueryDocumentArgs, QueryDocumentsArgs, QueryTagArgs, QueryTagsArgs, QueryWebsitesArgs } from '../gql/graphql.mjs';
7
+ import { QueryDocumentArgs, QueryDocumentsArgs, QueryTagArgs, QueryTagsArgs, QueryWebsitesArgs, QueryTreeArgs, TreeNodeDocumentQueryVariables } from '../gql/graphql.mjs';
7
8
  import '@graphql-typed-document-node/core';
8
9
 
9
10
  type ClientOptions = {
@@ -45,6 +46,20 @@ declare class Client {
45
46
  readonly isEmpty: boolean;
46
47
  readonly error: _urql_core.CombinedError | undefined;
47
48
  }>;
49
+ getTree(args?: QueryTreeArgs): Promise<{
50
+ tree: null;
51
+ error: _urql_core.CombinedError | undefined;
52
+ } | {
53
+ readonly tree: Tree;
54
+ readonly error: _urql_core.CombinedError | undefined;
55
+ }>;
56
+ getTreeNodeDocument(args: TreeNodeDocumentQueryVariables): Promise<{
57
+ document: null;
58
+ error: _urql_core.CombinedError | undefined;
59
+ } | {
60
+ readonly document: Document;
61
+ readonly error: _urql_core.CombinedError | undefined;
62
+ }>;
48
63
  private createUrqlClient;
49
64
  }
50
65
 
@@ -1,9 +1,10 @@
1
1
  import { Document, DocumentList } from '../types/document.js';
2
2
  import { Tag, TagList } from '../types/tag.js';
3
+ import { Tree } from '../types/tree.js';
3
4
  import { WebsiteListeItem } from '../types/website.js';
4
5
  import * as _urql_core from '@urql/core';
5
6
  import { Client as Client$1 } from '@urql/core';
6
- import { QueryDocumentArgs, QueryDocumentsArgs, QueryTagArgs, QueryTagsArgs, QueryWebsitesArgs } from '../gql/graphql.js';
7
+ import { QueryDocumentArgs, QueryDocumentsArgs, QueryTagArgs, QueryTagsArgs, QueryWebsitesArgs, QueryTreeArgs, TreeNodeDocumentQueryVariables } from '../gql/graphql.js';
7
8
  import '@graphql-typed-document-node/core';
8
9
 
9
10
  type ClientOptions = {
@@ -45,6 +46,20 @@ declare class Client {
45
46
  readonly isEmpty: boolean;
46
47
  readonly error: _urql_core.CombinedError | undefined;
47
48
  }>;
49
+ getTree(args?: QueryTreeArgs): Promise<{
50
+ tree: null;
51
+ error: _urql_core.CombinedError | undefined;
52
+ } | {
53
+ readonly tree: Tree;
54
+ readonly error: _urql_core.CombinedError | undefined;
55
+ }>;
56
+ getTreeNodeDocument(args: TreeNodeDocumentQueryVariables): Promise<{
57
+ document: null;
58
+ error: _urql_core.CombinedError | undefined;
59
+ } | {
60
+ readonly document: Document;
61
+ readonly error: _urql_core.CombinedError | undefined;
62
+ }>;
48
63
  private createUrqlClient;
49
64
  }
50
65